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