37 import modularAnalysis
as ma
40 import stdCharged
as stdc
41 from stdPi0s
import stdPi0s
44 my_path = b2.create_path()
47 ma.inputMdstList(filelist=[b2.find_file(
'B2pi0D_D2hh_D2hhh_B2munu.root',
'examples',
False)],
53 ma.fillParticleList(decayString=
'pi+:goodtracks',
56 ma.fillParticleList(decayString=
'gamma:goodclusters',
61 ma.buildEventShape(inputListNames=[
'pi+:goodtracks',
'gamma:goodclusters'],
70 checkForDuplicates=
False,
75 ma.applyEventCuts(cut=
'foxWolframR2 < 0.3', path=my_path)
83 stdc.stdPi(listtype=
'loose', path=my_path)
85 stdc.stdK(listtype=
'loose', path=my_path)
87 stdc.stdMu(listtype=
'loose', path=my_path)
91 stdPi0s(listtype=
'eff40_May2020Fit', path=my_path)
95 ma.reconstructDecay(decayString=
'D0:ch1 -> K-:loose pi+:loose',
100 ma.reconstructDecay(decayString=
'D0:ch2 -> K-:loose pi+:loose pi0:eff40_May2020Fit',
105 ma.reconstructDecay(decayString=
'D0:ch3 -> K-:loose pi+:loose pi+:loose pi-:loose',
110 ma.reconstructDecay(decayString=
'D0:ch4 -> K-:loose K+:loose',
115 ma.reconstructDecay(decayString=
'D0:ch5 -> pi-:loose pi+:loose',
121 ma.copyLists(outputListName=
'D0:all',
122 inputListNames=[
'D0:ch1',
'D0:ch2',
'D0:ch3',
'D0:ch4',
'D0:ch5'],
127 ma.reconstructDecay(decayString=
'B+:tag -> anti-D0:all pi+:loose',
128 cut=
'5.24 < Mbc < 5.29 and abs(deltaE) < 1.0',
133 ma.matchMCTruth(list_name=
'B+:tag',
138 ma.reconstructDecay(decayString=
'Upsilon(4S) -> B-:tag mu+:loose',
143 ma.matchMCTruth(list_name=
'Upsilon(4S)', path=my_path)
146 ma.buildRestOfEvent(target_list_name=
'Upsilon(4S)', path=my_path)
148 d_vars = vc.mc_truth + vc.kinematics + vc.inv_mass + [
'foxWolframR2']
149 mu_vars = vc.mc_truth
151 b_vars = vc.mc_truth + \
153 vu.create_aliases_for_selected(list_of_variables=d_vars,
154 decay_string=
'B- -> ^D0 pi-') + \
155 vu.create_aliases(list_of_variables=[
'decayModeID'],
156 wrapper=
'daughter(0,extraInfo({variable}))',
160 u4s_vars = vc.mc_truth + \
161 vc.roe_multiplicities + \
162 vc.recoil_kinematics + \
165 vu.create_aliases_for_selected(list_of_variables=b_vars,
166 decay_string=
'Upsilon(4S) -> ^B- mu+') + \
167 vu.create_aliases_for_selected(list_of_variables=mu_vars,
168 decay_string=
'Upsilon(4S) -> B- ^mu+')
172 rootOutputFile =
'B2A307-BasicEventWiseNtupleSelection.root'
173 ma.variablesToNtuple(decayString=
'B-:tag',
175 filename=rootOutputFile,
178 ma.variablesToNtuple(decayString=
'Upsilon(4S)',
180 filename=rootOutputFile,