Helper function to format QCD scale value
to conform to the ATLAS weight variation
naming scheme if possible.
Given a scale factor as a float, it returns
a string that is:
- '0.5'
- '1'
- '2'
- or the float rounded to two digits after the decimal point if it is not equal to one of the above
Definition at line 14 of file powheg_control.py.
16 Helper function to format QCD scale value
17 to conform to the ATLAS weight variation
18 naming scheme if possible.
19 Given a scale factor as a float, it returns
24 - or the float rounded to two digits after the decimal point if it is not equal to one of the above
27 return {0.5 :
'0.5', 1.0 :
'1', 2.0 :
'2'}[factor]
29 return '{0:.2f}'.
format(factor)