49import modularAnalysis
as ma
52import stdCharged
as stdc
53from stdPi0s
import stdPi0s
56my_path = b2.create_path()
59ma.inputMdst(filename=b2.find_file(
'B2pi0D_D2hh_D2hhh_B2munu.root',
'examples',
False),
65stdc.stdPi(listtype=
'loose', path=my_path)
67stdc.stdK(listtype=
'loose', path=my_path)
69stdc.stdMu(listtype=
'loose', path=my_path)
72stdPi0s(listtype=
'eff40_May2020Fit',
76ma.reconstructDecay(decayString=
'D0:ch1 -> K-:loose pi+:loose',
80ma.reconstructDecay(decayString=
'D0:ch2 -> K-:loose pi+:loose pi0:eff40_May2020Fit',
84ma.reconstructDecay(decayString=
'D0:ch3 -> K-:loose pi+:loose pi+:loose pi-:loose',
88ma.reconstructDecay(decayString=
'D0:ch4 -> K-:loose K+:loose',
92ma.reconstructDecay(decayString=
'D0:ch5 -> pi-:loose pi+:loose',
98ma.copyLists(outputListName=
'D0:all',
99 inputListNames=[
'D0:ch1',
'D0:ch2',
'D0:ch3',
'D0:ch4',
'D0:ch5'],
103ma.reconstructDecay(decayString=
'B+:tag -> anti-D0:all pi+:loose',
104 cut=
'5.2 < Mbc < 5.29 and abs(deltaE) < 1.0',
108ma.matchMCTruth(list_name=
'B+:tag',
112ma.reconstructDecay(decayString=
'Upsilon(4S) -> B-:tag mu+:loose',
117ma.matchMCTruth(list_name=
'Upsilon(4S)',
121ma.buildRestOfEvent(target_list_name=
'Upsilon(4S)',
125ma.fillParticleListFromROE(
'nu_mu:missing -> Upsilon(4S)',
'',
'',
126 useMissing=
True, path=my_path)
129d_vars = vc.mc_truth + vc.kinematics + vc.inv_mass
130b_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}))',
140u4s_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+')
151rootOutputFile =
'B2A305-Btag+SingleMuon-Reconstruction.root'
152ma.variablesToNtuple(decayString=
'nu_mu:missing',
154 filename=rootOutputFile,
157ma.variablesToNtuple(decayString=
'B-:tag',
159 filename=rootOutputFile,
162ma.variablesToNtuple(decayString=
'Upsilon(4S)',
164 filename=rootOutputFile,