CaloSamplingFractionAnalysis: make code confirm to rel22 coding rules
Apply the some of the changes from MR !30647 (merged) in master also to 21.0 in order to keep the 21.0 and master branches as much in sync as possible.
Apply the some of the changes from MR !30647 (merged) in master also to 21.0 in order to keep the 21.0 and master branches as much in sync as possible.