12 import modularAnalysis
as ma
13 import variables
as va
17 sys_tests = [
'def',
'scale']
22 if test
not in sys_tests:
23 print(f
"Unknown systematic test {test}")
27 my_path = b2.create_path()
30 ma.inputMdst(environmentType=
'default',
31 filename=b2.find_file(
'B02D0pi0_D02pi0pi0.root',
'examples',
False),
35 weight_table_id =
"PhotonEnergyBiasCorrection_Feb2021"
37 b2.conditions.prepend_globaltag(ma.getAnalysisGlobaltag())
41 va.variables.addAlias(
'Weight',
'extraInfo(' + weight_table_id +
'_Weight)')
42 va.variables.addAlias(
'StatErr',
'extraInfo(' + weight_table_id +
'_StatErr)')
43 va.variables.addAlias(
'binID',
'extraInfo(' + weight_table_id +
'_binID)')
46 GammaSelection =
'theta > 0.296706 and theta < 2.6179'
47 ma.fillParticleList(decayString=
'gamma:sel',
58 ma.correctEnergyBias(inputListNames=[
'gamma:sel'], tableName=weight_table_id, path=my_path)
62 'E',
'Weight',
'StatErr',
'binID'
66 ma.variablesToNtuple(decayString=
'gamma:sel',
68 filename=f
'gamma_{test}.root',