27import modularAnalysis
as ma
30from stdV0s
import stdKshorts
31from stdPi0s
import stdPi0s
32from stdKlongs
import stdKlongs
35my_path = b2.create_path()
38ma.inputMdst(filename=b2.find_file(
'B2pi0D_D2hh_D2hhh_B2munu.root',
'examples',
False),
42ma.printDataStore(path=my_path)
50ma.fillParticleList(decayString=
'gamma:all', cut=
'', path=my_path)
51ma.fillParticleList(decayString=
'e-:all', cut=
'', path=my_path)
52ma.fillParticleList(decayString=
'mu-:all', cut=
'', path=my_path)
53ma.fillParticleList(decayString=
'pi-:all', cut=
'', path=my_path)
54ma.fillParticleList(decayString=
'K-:all', cut=
'', path=my_path)
55ma.fillParticleList(decayString=
'anti-p-:all', cut=
'', path=my_path)
56ma.fillParticleList(decayString=
'anti-n0:all', cut=
'', path=my_path)
60ma.fillParticleList(decayString=
'gamma:highE', cut=
'E > 1.0', path=my_path)
61ma.fillParticleList(decayString=
'e+:good', cut=
'electronID > 0.1', path=my_path)
62ma.fillParticleList(decayString=
'mu+:good', cut=
'muonID > 0.1', path=my_path)
63ma.fillParticleList(decayString=
'pi+:good', cut=
'protonID > 0.1', path=my_path)
64ma.fillParticleList(decayString=
'K+:good', cut=
'kaonID > 0.1', path=my_path)
65ma.fillParticleList(decayString=
'p+:good', cut=
'protonID > 0.1', path=my_path)
72stdKshorts(prioritiseV0=
True, path=my_path)
73stdPi0s(listtype=
'eff10_May2020Fit', path=my_path)
74stdPi0s(listtype=
'eff20_May2020Fit', path=my_path)
75stdPi0s(listtype=
'eff30_May2020Fit', path=my_path)
76stdPi0s(listtype=
'eff40_May2020Fit', path=my_path)
77stdPi0s(listtype=
'eff50_May2020Fit', path=my_path)
78stdPi0s(listtype=
'eff60_May2020Fit', path=my_path)
82ma.printDataStore(path=my_path)
85ma.printList(
'gamma:all',
False, path=my_path)
86ma.printList(
'gamma:highE',
False, path=my_path)
87ma.printList(
'e-:all',
False, path=my_path)
88ma.printList(
'e-:good',
False, path=my_path)
89ma.printList(
'mu-:all',
False, path=my_path)
90ma.printList(
'mu-:good',
False, path=my_path)
91ma.printList(
'pi-:all',
False, path=my_path)
92ma.printList(
'pi-:good',
False, path=my_path)
93ma.printList(
'K-:all',
False, path=my_path)
94ma.printList(
'K-:good',
False, path=my_path)
95ma.printList(
'anti-p-:all',
False, path=my_path)
96ma.printList(
'anti-p-:good',
False, path=my_path)
97ma.printList(
'K_S0:merged',
False, path=my_path)
98ma.printList(
'pi0:eff40_May2020Fit',
False, path=my_path)
99ma.printList(
'K_L0:allklm',
False, path=my_path)
100ma.printList(
'n0:all',
False, path=my_path)
112charged_particle_variables = vc.reco_stats + \
120gamma_variables = vc.kinematics + \
124K0s_variables = vc.kinematics + \
130 [
'dr',
'dz',
'isSignal',
'chiProb']
132pi0_variables = vc.mc_truth + \
134 [
'extraInfo(BDT)',
'decayAngle(0)']
136K0l_variables = vc.kinematics + \
140n0_variables = K0l_variables + \
141 [
'isFromECL',
'isFromKLM']
144output_file =
'B2A202-LoadReconstructedParticles.root'
145ma.variablesToNtuple(decayString=
'pi+:all',
146 variables=charged_particle_variables,
148 filename=output_file,
150ma.variablesToNtuple(decayString=
'K+:all',
151 variables=charged_particle_variables,
153 filename=output_file,
155ma.variablesToNtuple(decayString=
'e+:all',
156 variables=charged_particle_variables,
158 filename=output_file,
160ma.variablesToNtuple(decayString=
'mu+:all',
161 variables=charged_particle_variables,
163 filename=output_file,
165ma.variablesToNtuple(decayString=
'gamma:all',
166 variables=gamma_variables,
168 filename=output_file,
170ma.variablesToNtuple(decayString=
'K_L0:allklm',
171 variables=K0l_variables,
173 filename=output_file,
175ma.variablesToNtuple(decayString=
'n0:all',
176 variables=n0_variables,
178 filename=output_file,
184ma.variablesToNtuple(decayString=
'pi0:eff40_May2020Fit',
185 variables=pi0_variables + vu.create_aliases_for_selected(gamma_variables,
'pi0 -> ^gamma ^gamma'),
186 filename=output_file,
192ma.variablesToNtuple(decayString=
'K_S0:merged',
193 variables=K0s_variables +
194 vu.create_aliases_for_selected(charged_particle_variables,
'K_S0 -> ^pi+ pi-',
'pip') +
195 vu.create_aliases_for_selected(charged_particle_variables,
'K_S0 -> pi+ ^pi-',
'pim'),
196 filename=output_file,