22 import modularAnalysis
as ma
23 import variables
as va
27 path = b2.create_path()
30 ma.inputMdst(environmentType=
'default',
31 filename=b2.find_file(
'B02D0pi0_D02pi0pi0.root',
'examples',
False),
35 weight_table_id =
"PhotonEfficiencyDataMCRatio_June2021"
37 b2.conditions.prepend_globaltag(
"test_photoneff_tag_v1")
41 va.variables.addAlias(
'Weight', f
'extraInfo({weight_table_id}_Weight)')
42 va.variables.addAlias(
'StatErrUp', f
'extraInfo({weight_table_id}_StatErrUp)')
43 va.variables.addAlias(
'StatErrDown', f
'extraInfo({weight_table_id}_StatErrDown)')
44 va.variables.addAlias(
'SystErrUp', f
'extraInfo({weight_table_id}_SystErrUp)')
45 va.variables.addAlias(
'SystErrDown', f
'extraInfo({weight_table_id}_SystErrDown)')
46 va.variables.addAlias(
'TotalErrUp', f
'extraInfo({weight_table_id}_TotalErrUp)')
47 va.variables.addAlias(
'TotalErrDown', f
'extraInfo({weight_table_id}_TotalErrDown)')
49 simple_selection =
'theta > 0.296706 and theta < 2.6179'
50 ma.fillParticleList(decayString=
'gamma:full',
55 ma.addPhotonEfficiencyRatioVariables([
'gamma:full'], weight_table_id, path=path)
58 weight_vars = [
'p',
'E',
'theta',
'phi',
59 'Weight',
'TotalErrUp',
'TotalErrDown',
'StatErrUp',
'StatErrDown',
'SystErrUp',
'SystErrDown',
63 ma.variablesToNtuple(decayString=
'gamma:full',
64 variables=weight_vars,
65 filename=f
'B2A907-PhotonDetectionEfficiencyRatios.root',