49 import modularAnalysis
as ma
52 import stdCharged
as stdc
53 from stdPi0s
import stdPi0s
56 my_path = b2.create_path()
59 ma.inputMdst(environmentType=
'default',
60 filename=b2.find_file(
'B2pi0D_D2hh_D2hhh_B2munu.root',
'examples',
False),
66 stdc.stdPi(listtype=
'loose', path=my_path)
68 stdc.stdK(listtype=
'loose', path=my_path)
70 stdc.stdMu(listtype=
'loose', path=my_path)
73 stdPi0s(listtype=
'eff40_May2020Fit',
77 ma.reconstructDecay(decayString=
'D0:ch1 -> K-:loose pi+:loose',
81 ma.reconstructDecay(decayString=
'D0:ch2 -> K-:loose pi+:loose pi0:eff40_May2020Fit',
85 ma.reconstructDecay(decayString=
'D0:ch3 -> K-:loose pi+:loose pi+:loose pi-:loose',
89 ma.reconstructDecay(decayString=
'D0:ch4 -> K-:loose K+:loose',
93 ma.reconstructDecay(decayString=
'D0:ch5 -> pi-:loose pi+:loose',
99 ma.copyLists(outputListName=
'D0:all',
100 inputListNames=[
'D0:ch1',
'D0:ch2',
'D0:ch3',
'D0:ch4',
'D0:ch5'],
104 ma.reconstructDecay(decayString=
'B+:tag -> anti-D0:all pi+:loose',
105 cut=
'5.2 < Mbc < 5.29 and abs(deltaE) < 1.0',
109 ma.matchMCTruth(list_name=
'B+:tag',
113 ma.reconstructDecay(decayString=
'Upsilon(4S) -> B-:tag mu+:loose',
118 ma.matchMCTruth(list_name=
'Upsilon(4S)',
122 ma.buildRestOfEvent(target_list_name=
'Upsilon(4S)',
126 ma.fillParticleListFromROE(
'nu_mu:missing -> Upsilon(4S)',
'',
'',
127 useMissing=
True, path=my_path)
130 d_vars = vc.mc_truth + vc.kinematics + vc.inv_mass
131 b_vars = vc.mc_truth + \
133 vu.create_aliases_for_selected(list_of_variables=d_vars,
134 decay_string=
'B- -> ^D0 pi-') + \
135 vu.create_aliases(list_of_variables=[
'decayModeID'],
136 wrapper=
'daughter(0,extraInfo({variable}))',
138 mu_vars = vc.mc_truth
141 u4s_vars = vc.mc_truth + \
142 vc.roe_multiplicities + \
143 vc.recoil_kinematics + \
145 vu.create_aliases_for_selected(list_of_variables=b_vars,
146 decay_string=
'Upsilon(4S) -> ^B- mu+') + \
147 vu.create_aliases_for_selected(list_of_variables=mu_vars,
148 decay_string=
'Upsilon(4S) -> B- ^mu+')
152 rootOutputFile =
'B2A305-Btag+SingleMuon-Reconstruction.root'
153 ma.variablesToNtuple(decayString=
'nu_mu:missing',
155 filename=rootOutputFile,
158 ma.variablesToNtuple(decayString=
'B-:tag',
160 filename=rootOutputFile,
163 ma.variablesToNtuple(decayString=
'Upsilon(4S)',
165 filename=rootOutputFile,