12 import modularAnalysis
as ma
13 import variables
as va
16 sys_tests = [
'def',
'scale']
21 if test
not in sys_tests:
22 print(f
"Unknown systematic test {test}")
26 my_path = b2.create_path()
29 ma.inputMdst(filename=b2.find_file(
'B02D0pi0_D02pi0pi0.root',
'examples',
False),
33 weight_table_id =
"PhotonEnergyBiasCorrection_Feb2021"
35 b2.conditions.prepend_globaltag(ma.getAnalysisGlobaltag())
39 va.variables.addAlias(
'Weight',
'extraInfo(' + weight_table_id +
'_Weight)')
40 va.variables.addAlias(
'StatErr',
'extraInfo(' + weight_table_id +
'_StatErr)')
41 va.variables.addAlias(
'binID',
'extraInfo(' + weight_table_id +
'_binID)')
44 GammaSelection =
'theta > 0.296706 and theta < 2.6179'
45 ma.fillParticleList(decayString=
'gamma:sel',
56 ma.correctEnergyBias(inputListNames=[
'gamma:sel'], tableName=weight_table_id, path=my_path)
60 'E',
'Weight',
'StatErr',
'binID'
64 ma.variablesToNtuple(decayString=
'gamma:sel',
66 filename=f
'gamma_{test}.root',