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