45 import modularAnalysis
as ma
48 import stdCharged
as stdc
49 from stdPi0s
import stdPi0s
52 my_path = b2.create_path()
55 ma.inputMdst(environmentType=
'default',
56 filename=b2.find_file(
'B2pi0D_D2hh_D2hhh_B2munu.root',
'examples',
False),
62 stdc.stdPi(listtype=
'loose', path=my_path)
64 stdc.stdK(listtype=
'loose', path=my_path)
66 stdc.stdMu(listtype=
'loose', path=my_path)
69 stdPi0s(listtype=
'eff40_Jan2020Fit',
73 ma.reconstructDecay(decayString=
'D0:ch1 -> K-:loose pi+:loose',
77 ma.reconstructDecay(decayString=
'D0:ch2 -> K-:loose pi+:loose pi0:eff40_Jan2020Fit',
81 ma.reconstructDecay(decayString=
'D0:ch3 -> K-:loose pi+:loose pi+:loose pi-:loose',
85 ma.reconstructDecay(decayString=
'D0:ch4 -> K-:loose K+:loose',
89 ma.reconstructDecay(decayString=
'D0:ch5 -> pi-:loose pi+:loose',
95 ma.copyLists(outputListName=
'D0:all',
96 inputListNames=[
'D0:ch1',
'D0:ch2',
'D0:ch3',
'D0:ch4',
'D0:ch5'],
100 ma.reconstructDecay(decayString=
'B+:tag -> anti-D0:all pi+:loose',
101 cut=
'5.2 < Mbc < 5.29 and abs(deltaE) < 1.0',
105 ma.matchMCTruth(list_name=
'B+:tag',
109 ma.reconstructDecay(decayString=
'Upsilon(4S) -> B-:tag mu+:loose',
114 ma.matchMCTruth(list_name=
'Upsilon(4S)',
118 ma.buildRestOfEvent(target_list_name=
'Upsilon(4S)',
122 ma.fillParticleListFromROE(
'nu_mu:missing -> Upsilon(4S)',
'',
'',
123 useMissing=
True, path=my_path)
126 d_vars = vc.mc_truth + vc.kinematics + vc.inv_mass
127 b_vars = vc.mc_truth + \
129 vu.create_aliases_for_selected(list_of_variables=d_vars,
130 decay_string=
'B- -> ^D0 pi-') + \
131 vu.create_aliases(list_of_variables=[
'decayModeID'],
132 wrapper=
'daughter(0,extraInfo({variable}))',
134 mu_vars = vc.mc_truth
137 u4s_vars = vc.mc_truth + \
138 vc.roe_multiplicities + \
139 vc.recoil_kinematics + \
141 vu.create_aliases_for_selected(list_of_variables=b_vars,
142 decay_string=
'Upsilon(4S) -> ^B- mu+') + \
143 vu.create_aliases_for_selected(list_of_variables=mu_vars,
144 decay_string=
'Upsilon(4S) -> B- ^mu+')
148 rootOutputFile =
'B2A305-Btag+SingleMuon-Reconstruction.root'
149 ma.variablesToNtuple(decayString=
'nu_mu:missing',
151 filename=rootOutputFile,
154 ma.variablesToNtuple(decayString=
'B-:tag',
156 filename=rootOutputFile,
159 ma.variablesToNtuple(decayString=
'Upsilon(4S)',
161 filename=rootOutputFile,