37import modularAnalysis
as ma
40import stdCharged
as stdc
41from stdPi0s
import stdPi0s
44my_path = b2.create_path()
47ma.inputMdstList(filelist=[b2.find_file(
'B2pi0D_D2hh_D2hhh_B2munu.root',
'examples',
False)],
53ma.fillParticleList(decayString=
'pi+:goodtracks',
56ma.fillParticleList(decayString=
'gamma:goodclusters',
61ma.buildEventShape(inputListNames=[
'pi+:goodtracks',
'gamma:goodclusters'],
70 checkForDuplicates=
False,
75ma.applyEventCuts(cut=
'foxWolframR2 < 0.3', path=my_path)
83stdc.stdPi(listtype=
'loose', path=my_path)
85stdc.stdK(listtype=
'loose', path=my_path)
87stdc.stdMu(listtype=
'loose', path=my_path)
91stdPi0s(listtype=
'eff40_May2020Fit', path=my_path)
95ma.reconstructDecay(decayString=
'D0:ch1 -> K-:loose pi+:loose',
100ma.reconstructDecay(decayString=
'D0:ch2 -> K-:loose pi+:loose pi0:eff40_May2020Fit',
105ma.reconstructDecay(decayString=
'D0:ch3 -> K-:loose pi+:loose pi+:loose pi-:loose',
110ma.reconstructDecay(decayString=
'D0:ch4 -> K-:loose K+:loose',
115ma.reconstructDecay(decayString=
'D0:ch5 -> pi-:loose pi+:loose',
121ma.copyLists(outputListName=
'D0:all',
122 inputListNames=[
'D0:ch1',
'D0:ch2',
'D0:ch3',
'D0:ch4',
'D0:ch5'],
127ma.reconstructDecay(decayString=
'B+:tag -> anti-D0:all pi+:loose',
128 cut=
'5.24 < Mbc < 5.29 and abs(deltaE) < 1.0',
133ma.matchMCTruth(list_name=
'B+:tag',
138ma.reconstructDecay(decayString=
'Upsilon(4S) -> B-:tag mu+:loose',
143ma.matchMCTruth(list_name=
'Upsilon(4S)', path=my_path)
146ma.buildRestOfEvent(target_list_name=
'Upsilon(4S)', path=my_path)
148d_vars = vc.mc_truth + vc.kinematics + vc.inv_mass + [
'foxWolframR2']
151b_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}))',
160u4s_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+')
172rootOutputFile =
'B2A307-BasicEventWiseNtupleSelection.root'
173ma.variablesToNtuple(decayString=
'B-:tag',
175 filename=rootOutputFile,
178ma.variablesToNtuple(decayString=
'Upsilon(4S)',
180 filename=rootOutputFile,