22 import modularAnalysis
as ma
23 import variables
as va
26 path = b2.create_path()
29 ma.inputMdst(filename=b2.find_file(
'B02D0pi0_D02pi0pi0.root',
'examples',
False),
33 weight_table_id =
"PhotonEfficiencyDataMCRatio_proc13MC15_November2022"
35 b2.conditions.prepend_globaltag(ma.getAnalysisGlobaltag())
39 va.variables.addAlias(
'Weight', f
'extraInfo({weight_table_id}_Weight)')
40 va.variables.addAlias(
'StatErrUp', f
'extraInfo({weight_table_id}_StatErrUp)')
41 va.variables.addAlias(
'StatErrDown', f
'extraInfo({weight_table_id}_StatErrDown)')
42 va.variables.addAlias(
'SystErrUp', f
'extraInfo({weight_table_id}_SystErrUp)')
43 va.variables.addAlias(
'SystErrDown', f
'extraInfo({weight_table_id}_SystErrDown)')
44 va.variables.addAlias(
'TotalErrUp', f
'extraInfo({weight_table_id}_TotalErrUp)')
45 va.variables.addAlias(
'TotalErrDown', f
'extraInfo({weight_table_id}_TotalErrDown)')
47 simple_selection =
'theta > 0.296706 and theta < 2.6179'
48 ma.fillParticleList(decayString=
'gamma:full',
53 ma.addPhotonEfficiencyRatioVariables([
'gamma:full'], weight_table_id, path=path)
56 weight_vars = [
'p',
'E',
'theta',
'phi',
57 'Weight',
'TotalErrUp',
'TotalErrDown',
'StatErrUp',
'StatErrDown',
'SystErrUp',
'SystErrDown',
61 ma.variablesToNtuple(decayString=
'gamma:full',
62 variables=weight_vars,
63 filename=
'B2A907-PhotonDetectionEfficiencyRatios.root',