49 import modularAnalysis
as ma
52 import stdCharged
as stdc
53 from stdPi0s
import stdPi0s
56 my_path = b2.create_path()
59 ma.inputMdst(filename=b2.find_file(
'B2pi0D_D2hh_D2hhh_B2munu.root',
'examples',
False),
65 stdc.stdPi(listtype=
'loose', path=my_path)
67 stdc.stdK(listtype=
'loose', path=my_path)
69 stdc.stdMu(listtype=
'loose', path=my_path)
72 stdPi0s(listtype=
'eff40_May2020Fit',
76 ma.reconstructDecay(decayString=
'D0:ch1 -> K-:loose pi+:loose',
80 ma.reconstructDecay(decayString=
'D0:ch2 -> K-:loose pi+:loose pi0:eff40_May2020Fit',
84 ma.reconstructDecay(decayString=
'D0:ch3 -> K-:loose pi+:loose pi+:loose pi-:loose',
88 ma.reconstructDecay(decayString=
'D0:ch4 -> K-:loose K+:loose',
92 ma.reconstructDecay(decayString=
'D0:ch5 -> pi-:loose pi+:loose',
98 ma.copyLists(outputListName=
'D0:all',
99 inputListNames=[
'D0:ch1',
'D0:ch2',
'D0:ch3',
'D0:ch4',
'D0:ch5'],
103 ma.reconstructDecay(decayString=
'B+:tag -> anti-D0:all pi+:loose',
104 cut=
'5.2 < Mbc < 5.29 and abs(deltaE) < 1.0',
108 ma.matchMCTruth(list_name=
'B+:tag',
112 ma.reconstructDecay(decayString=
'Upsilon(4S) -> B-:tag mu+:loose',
117 ma.matchMCTruth(list_name=
'Upsilon(4S)',
121 ma.buildRestOfEvent(target_list_name=
'Upsilon(4S)',
125 ma.fillParticleListFromROE(
'nu_mu:missing -> Upsilon(4S)',
'',
'',
126 useMissing=
True, path=my_path)
129 d_vars = vc.mc_truth + vc.kinematics + vc.inv_mass
130 b_vars = vc.mc_truth + \
132 vu.create_aliases_for_selected(list_of_variables=d_vars,
133 decay_string=
'B- -> ^D0 pi-') + \
134 vu.create_aliases(list_of_variables=[
'decayModeID'],
135 wrapper=
'daughter(0,extraInfo({variable}))',
137 mu_vars = vc.mc_truth
140 u4s_vars = vc.mc_truth + \
141 vc.roe_multiplicities + \
142 vc.recoil_kinematics + \
144 vu.create_aliases_for_selected(list_of_variables=b_vars,
145 decay_string=
'Upsilon(4S) -> ^B- mu+') + \
146 vu.create_aliases_for_selected(list_of_variables=mu_vars,
147 decay_string=
'Upsilon(4S) -> B- ^mu+')
151 rootOutputFile =
'B2A305-Btag+SingleMuon-Reconstruction.root'
152 ma.variablesToNtuple(decayString=
'nu_mu:missing',
154 filename=rootOutputFile,
157 ma.variablesToNtuple(decayString=
'B-:tag',
159 filename=rootOutputFile,
162 ma.variablesToNtuple(decayString=
'Upsilon(4S)',
164 filename=rootOutputFile,