Pickin and grinin
scratching during chess tournament

There are no specific rules, but individual arbiters will tolerate a certain threshold of indecency. Indecency level relies on a number of variables:
Ind ∝ e^(1/|(Al-Te)|*Gr*V) * Si * Fr
Where
Ind= Indecency level
Al= Altitude of scratch
Te= Altitude of testicles
Gr= Groan/Grunt factor
V= Volume of hand hidden by your clothes
Si= Side: 2 if front, 1 if back.
Fr= Frequency
Is it against tournament rules to scratch yourself?