38 import modularAnalysis
as ma
41 import stdCharged
as stdc
42 from stdPi0s
import stdPi0s
45 my_path = b2.create_path()
48 ma.inputMdstList(environmentType=
'default',
49 filelist=[b2.find_file(
'B2pi0D_D2hh_D2hhh_B2munu.root',
'examples',
False)],
55 ma.fillParticleList(decayString=
'pi+:goodtracks',
58 ma.fillParticleList(decayString=
'gamma:goodclusters',
63 ma.buildEventShape(inputListNames=[
'pi+:goodtracks',
'gamma:goodclusters'],
72 checkForDuplicates=
False,
77 ma.applyEventCuts(cut=
'foxWolframR2 < 0.3', path=my_path)
85 stdc.stdPi(listtype=
'loose', path=my_path)
87 stdc.stdK(listtype=
'loose', path=my_path)
89 stdc.stdMu(listtype=
'loose', path=my_path)
93 stdPi0s(listtype=
'eff40_May2020Fit', path=my_path)
97 ma.reconstructDecay(decayString=
'D0:ch1 -> K-:loose pi+:loose',
102 ma.reconstructDecay(decayString=
'D0:ch2 -> K-:loose pi+:loose pi0:eff40_May2020Fit',
107 ma.reconstructDecay(decayString=
'D0:ch3 -> K-:loose pi+:loose pi+:loose pi-:loose',
112 ma.reconstructDecay(decayString=
'D0:ch4 -> K-:loose K+:loose',
117 ma.reconstructDecay(decayString=
'D0:ch5 -> pi-:loose pi+:loose',
123 ma.copyLists(outputListName=
'D0:all',
124 inputListNames=[
'D0:ch1',
'D0:ch2',
'D0:ch3',
'D0:ch4',
'D0:ch5'],
129 ma.reconstructDecay(decayString=
'B+:tag -> anti-D0:all pi+:loose',
130 cut=
'5.24 < Mbc < 5.29 and abs(deltaE) < 1.0',
135 ma.matchMCTruth(list_name=
'B+:tag',
140 ma.reconstructDecay(decayString=
'Upsilon(4S) -> B-:tag mu+:loose',
145 ma.matchMCTruth(list_name=
'Upsilon(4S)', path=my_path)
148 ma.buildRestOfEvent(target_list_name=
'Upsilon(4S)', path=my_path)
150 d_vars = vc.mc_truth + vc.kinematics + vc.inv_mass + [
'foxWolframR2']
151 mu_vars = vc.mc_truth
153 b_vars = vc.mc_truth + \
155 vu.create_aliases_for_selected(list_of_variables=d_vars,
156 decay_string=
'B- -> ^D0 pi-') + \
157 vu.create_aliases(list_of_variables=[
'decayModeID'],
158 wrapper=
'daughter(0,extraInfo({variable}))',
162 u4s_vars = vc.mc_truth + \
163 vc.roe_multiplicities + \
164 vc.recoil_kinematics + \
167 vu.create_aliases_for_selected(list_of_variables=b_vars,
168 decay_string=
'Upsilon(4S) -> ^B- mu+') + \
169 vu.create_aliases_for_selected(list_of_variables=mu_vars,
170 decay_string=
'Upsilon(4S) -> B- ^mu+')
174 rootOutputFile =
'B2A307-BasicEventWiseNtupleSelection.root'
175 ma.variablesToNtuple(decayString=
'B-:tag',
177 filename=rootOutputFile,
180 ma.variablesToNtuple(decayString=
'Upsilon(4S)',
182 filename=rootOutputFile,