4 import modularAnalysis
as ma
5 from vertex
import kFit
6 from stdPi0s
import stdPi0s
12 def loadStdPi0ForBToHadrons(persistent=True, path=None):
14 Creates a list 'pi0:bth_skim' for :math:`B\\to {\\rm hadrons}` skims, based on recommendations of
15 the neutral group (avoiding ECL timing cuts) for winter 2020 and BtoCharmless for 2021. We require the energy of the photons
16 to be larger than :math:`22.50~{\\rm MeV}` in the forward end cap, :math:`20~{\\rm MeV}` in the barrel,
17 and :math:`20~{\\rm MeV}` in the backward end cap. For the :math:`\\pi^{0}`, we require the mass to be
18 :math:`105 < M < 150~{\\rm MeV}/c^2` and a mass-constrained KFit to converge.
21 ma.cutAndCopyList(outputListName=
'pi0:bth_skim', inputListName=
'pi0:all',
22 cut=
'[[daughter(0, clusterReg) == 1 and daughter(0, E) > 0.02250] or ' +
23 '[daughter(0, clusterReg) == 2 and daughter(0, E) > 0.020] or ' +
24 '[daughter(0, clusterReg) == 3 and daughter(0, E) > 0.020]] and ' +
25 '[[daughter(1, clusterReg) == 1 and daughter(1, E) > 0.02250] or ' +
26 '[daughter(1, clusterReg) == 2 and daughter(1, E) > 0.020] or ' +
27 '[daughter(1, clusterReg) == 3 and daughter(1, E) > 0.020]] and ' +
28 'M > 0.105 and M < 0.150', path=path)
29 kFit(
'pi0:bth_skim', 0.0,
'mass', path=path)
32 def loadStdSkimHighEffTracks(particletype, path):
34 Function to prepare high eff charged particle lists (:SkimHighEff).
35 We require only fiducial the cuts
36 :b2:var:`thetaInCDCAcceptance` and :b2:var:`chiProb` :math:`> 0` and
37 abs(:b2:var:`dr`) :math:`< 0.5~{\\rm cm}` and abs(dz) :math:` < 3~{\\rm cm}`
40 @param particletype type of charged particle to make a list of
41 @param path modules are added to this path
44 pidnames = {
'pi':
'pionID',
'K':
'kaonID',
'p':
'protonID',
'e':
'electronID',
'mu':
'muonID'}
47 trackQuality =
'thetaInCDCAcceptance and chiProb > 0 '
48 ipCut =
'abs(dr) < 0.5 and abs(dz) < 3'
49 goodTrack = trackQuality +
' and ' + ipCut
51 if particletype
not in pidnames.keys():
52 ma.B2ERROR(f
"The requested list is not a standard charged particle. Use one of {pidnames.keys()}")
53 pidCut = f
'{pidnames[particletype]} > 0.01 and {goodTrack}'
55 ma.fillParticleList(particletype +
'+:SkimHighEff', pidCut,
True, path=path)
60 def loadStdLightMesons(persistent=True, path=None):
62 Create the following lists of light mesons:
80 @param persistent whether RootOutput module should save the created ParticleLists (default True)
81 @param path modules are added to this path
84 loadStdLooseRho0(persistent, path)
85 loadStdAllRho0(persistent, path)
86 loadStdLooseRhoPlus(persistent, path)
87 loadStdLooseKstar0(persistent, path)
88 loadStdAllKstar0(persistent, path)
89 loadStdLooseKstarPlus(persistent, path)
90 loadStdLoosePhi(persistent, path)
91 loadStdAllPhi(persistent, path)
92 loadStdLooseF_0(persistent, path)
93 loadStdAllF_0(persistent, path)
94 loadStdLooseOmega(persistent, path)
95 loadStdAllOmega(persistent, path)
96 loadStdLooseEta(persistent, path)
97 loadStdAllEta(persistent, path)
98 loadStdLooseEtaPrime(persistent, path)
99 loadStdAllEtaPrime(persistent, path)
104 def loadStdLooseRho0(persistent=True, path=None):
106 Create a list of 'rho0:loose' list from 'pi-:loose pi+:loose' with :math:`0.47 < M < 1.07~GeV`
108 @param persistent whether RootOutput module should save the created ParticleLists (default True)
109 @param path modules are added to this path
111 ma.reconstructDecay(
'rho0:loose -> pi-:loose pi+:loose',
'0.47 < M < 1.07', 1, persistent, path)
115 def loadStdAllRho0(persistent=True, path=None):
117 Create a list of 'rho0:all' list from 'pi-:all pi+:all' with :math:`0.47 < M < 1.07~GeV`
119 @param persistent whether RootOutput module should save the created ParticleLists (default True)
120 @param path modules are added to this path
122 ma.reconstructDecay(
'rho0:all -> pi-:all pi+:all',
'0.47 < M < 1.07', 1, persistent, path)
126 def loadStdSkimHighEffRho0(persistent=True, path=None):
128 Create a list of 'rho0:SkimHighEff' list from 'pi-:SkimHighEff pi+:SkimHighEff' with :math:`0.47 < M < 1.07~GeV`
130 @param persistent whether RootOutput module should save the created ParticleLists (default True)
131 @param path modules are added to this path
133 ma.reconstructDecay(
'rho0:SkimHighEff -> pi-:SkimHighEff pi+:SkimHighEff',
'0.47 < M < 1.07', 1, persistent, path)
134 return 'rho0:SkimHighEff'
137 def loadStdLooseRhoPlus(persistent=True, path=None):
139 Create a list of 'rho+:loose' list from 'pi0:eff40_Jan2020 pi+:loose' with :math:`0.47 < M < 1.07~GeV`
141 @param persistent whether RootOutput module should save the created ParticleLists (default True)
142 @param path modules are added to this path
144 ma.reconstructDecay(
'rho+:loose -> pi+:loose pi0:eff40_Jan2020',
'0.47 < M < 1.07', 1, persistent, path)
148 def loadStdAllRhoPlus(persistent=True, path=None):
150 Create a list of 'rho+:all' list from 'pi0:bth_skim' pi+:all' with :math:`0.47 < M < 1.07~GeV`.
151 We apply few sanity cuts on the pi+: thetaInCDCAcceptance, abs(dr) < 0.5, and abs(dz) < 3.
153 @param persistent whether RootOutput module should save the created ParticleLists (default True)
154 @param path modules are added to this path
156 ma.reconstructDecay(
'rho+:all -> pi+:all pi0:bth_skim ',
'0.47 < M < 1.07 and ' +
157 'daughter(0,thetaInCDCAcceptance) > 0 and abs(daughter(0,dr)) < 0.5 and ' +
158 'abs(daughter(0,dz)) < 3', 1, persistent, path)
162 def loadA_1Plus(persistent=True, path=None):
164 Creates a 'a_1+:all' list from 'pi+:all pi+:all pi-:all' requiring :math:`0.8 < M < 1.6~{\\rm GeV}/c^2`.
166 @param persistent whether RootOutput module should save the created ParticleLists (default True)
167 @param path modules are added to this path
170 decayString=
'a_1+:all -> pi+:all pi+:all pi-:all',
172 dmID=1, writeOut=persistent,
178 def loadStdLooseKstar0(persistent=True, path=None):
180 Create a list of 'K*0:loose' list from 'pi-:loose K+:loose' with :math:`0.74 < M < 1.04~GeV`
182 @param persistent whether RootOutput module should save the created ParticleLists (default True)
183 @param path modules are added to this path
185 ma.reconstructDecay(
'K*0:loose -> pi-:loose K+:loose',
'0.74 < M < 1.04', 1, persistent, path)
189 def loadStdAllKstar0(persistent=True, path=None):
191 Create a list of 'K*0:all' list from 'pi-:all K+:all' with :math:`0.74 < M < 1.04~GeV`
193 @param persistent whether RootOutput module should save the created ParticleLists (default True)
194 @param path modules are added to this path
196 ma.reconstructDecay(
'K*0:all -> pi-:all K+:all',
'0.74 < M < 1.04', 1, persistent, path)
200 def loadStdSkimHighEffKstar0(persistent=True, path=None):
202 Create a list of 'K*0:SkimHighEff' list from 'pi-:SkimHighEff K+:SkimHighEff' with :math:`0.74 < M < 1.04~GeV`
204 @param persistent whether RootOutput module should save the created ParticleLists (default True)
205 @param path modules are added to this path
207 ma.reconstructDecay(
'K*0:SkimHighEff -> pi-:SkimHighEff K+:SkimHighEff',
'0.74 < M < 1.04', 1, persistent, path)
208 return 'K*0:SkimHighEff'
211 def loadStdLooseKstarPlus(persistent=True, path=None):
213 Create a list of 'K*+:loose' list from 'pi+:loose K_S0:merged' with :math:`0.74 < M < 1.04~GeV`
215 @param persistent whether RootOutput module should save the created ParticleLists (default True)
216 @param path modules are added to this path
218 ma.reconstructDecay(
'K*+:loose -> pi+:loose K_S0:merged',
'0.74 < M < 1.04', 1, persistent, path)
222 def loadStdAllKstarPlus(persistent=True, path=None):
224 Create a list of 'K*+:all' list from 'pi+:all K_S0:merged' with :math:`0.74 < M < 1.04~GeV`
226 @param persistent whether RootOutput module should save the created ParticleLists (default True)
227 @param path modules are added to this path
229 ma.reconstructDecay(
'K*+:all -> pi+:all K_S0:merged',
'0.74 < M < 1.04', 1, persistent, path)
233 def loadStdAllPhi(persistent=True, path=None):
235 Create a list of 'phi:all' list from 'K+:all K-:all' with :math:`0.97 < M < 1.1~GeV`
237 @param persistent whether RootOutput module should save the created ParticleLists (default True)
238 @param path modules are added to this path
240 ma.reconstructDecay(
'phi:all -> K+:all K-:all',
'0.97 < M < 1.1', 1, persistent, path)
244 def loadStdSkimHighEffPhi(persistent=True, path=None):
246 Create a list of 'phi:SkimHighEff' list from 'K+:SkimHighEff K-:SkimHighEff' with :math:`0.97 < M < 1.1~GeV`
248 @param persistent whether RootOutput module should save the created ParticleLists (default True)
249 @param path modules are added to this path
251 ma.reconstructDecay(
'phi:SkimHighEff -> K+:SkimHighEff K-:SkimHighEff',
'0.97 < M < 1.1', 1, persistent, path)
252 return 'phi:SkimHighEff'
255 def loadStdLoosePhi(persistent=True, path=None):
257 Create a list of 'phi:loose' list from 'K+:loose K-:loose' with :math:`0.97 < M < 1.1~GeV`
259 @param persistent whether RootOutput module should save the created ParticleLists (default True)
260 @param path modules are added to this path
262 ma.reconstructDecay(
'phi:loose -> K+:loose K-:loose',
'0.97 < M < 1.1', 1, persistent, path)
266 def loadStdAllF_0(persistent=True, path=None):
268 Create a list of 'f_0:all' list from 'pi+:all pi-:all' with :math:`0.78 < M < 1.18~GeV`
270 @param persistent whether RootOutput module should save the created ParticleLists (default True)
271 @param path modules are added to this path
273 ma.reconstructDecay(
'f_0:all -> pi+:all pi-:all',
'0.78 < M < 1.18', 1, persistent, path)
277 def loadStdSkimHighEffF_0(persistent=True, path=None):
279 Create a list of 'f_0:SkimHighEff' list from 'pi+:SkimHighEff pi-:SkimHighEff' with :math:`0.78 < M < 1.18~GeV`
281 @param persistent whether RootOutput module should save the created ParticleLists (default True)
282 @param path modules are added to this path
284 ma.reconstructDecay(
'f_0:SkimHighEff -> pi+:SkimHighEff pi-:SkimHighEff',
'0.78 < M < 1.18', 1, persistent, path)
285 return 'f_0:SkimHighEff'
288 def loadStdLooseF_0(persistent=True, path=None):
290 Create a list of 'f_0:loose' list from 'pi+:loose pi1:loose' with :math:`0.78 < M < 1.18~GeV`
292 @param persistent whether RootOutput module should save the created ParticleLists (default True)
293 @param path modules are added to this path
295 ma.reconstructDecay(
'f_0:loose -> pi+:loose pi-:loose',
'0.78 < M < 1.18', 1, persistent, path)
299 def loadStdAllOmega(persistent=True, path=None):
301 Create a list of 'omega:all' list from 'pi0:eff40_Jan2020 pi-:all pi+:all' with :math:`0.73 < M < 0.83~GeV`
303 @param persistent whether RootOutput module should save the created ParticleLists (default True)
304 @param path modules are added to this path
306 ma.reconstructDecay(
'omega:all -> pi0:eff40_Jan2020 pi-:all pi+:all',
'0.73 < M < 0.83', 1, persistent, path)
310 def loadStdSkimHighEffOmega(persistent=True, path=None):
312 Create a list of 'omega:SkimHighEff' list from 'pi0:eff40_Jan2020 pi-:SkimHighEff pi+:SkimHighEff'
313 with :math:`0.73 < M < 0.83~GeV`
315 @param persistent whether RootOutput module should save the created ParticleLists (default True)
316 @param path modules are added to this path
319 'omega:SkimHighEff -> pi0:eff40_Jan2020 pi-:SkimHighEff pi+:SkimHighEff',
324 return 'omega:SkimHighEff'
327 def loadStdLooseOmega(persistent=True, path=None):
329 Create a list of 'omega:loose' list from 'pi0:eff40_Jan2020 pi-:loose pi+:loose' with :math:`0.73 < M < 0.83~GeV`
331 @param persistent whether RootOutput module should save the created ParticleLists (default True)
332 @param path modules are added to this path
334 ma.reconstructDecay(
'omega:loose -> pi0:eff40_Jan2020 pi-:loose pi+:loose',
'0.73 < M < 0.83', 1, persistent, path)
338 def loadStdAllEta(persistent=True, path=None):
340 Create a list of 'eta:all' list from 'gamma:all gamma:all' (dmID=1) and 'pi0:eff40_Jan2020 pi-:all pi+:all'
341 (dmID=2), with :math:`0.4< M < 0.6~GeV`
343 @param persistent whether RootOutput module should save the created ParticleLists (default True)
344 @param path modules are added to this path
346 ma.reconstructDecay(
'eta:all1 -> gamma:all gamma:all',
'0.4 < M < 0.6', 1, persistent, path)
347 ma.reconstructDecay(
'eta:all2 -> pi0:eff40_Jan2020 pi-:all pi+:all',
'0.4 < M < 0.6', 2, persistent, path)
348 ma.copyLists(
'eta:all', [
'eta:all1',
'eta:all2'], persistent, path)
352 def loadStdSkimHighEffEta(persistent=True, path=None):
354 Create a list of 'eta:SkimHighEff' list from 'gamma:all gamma:all' (dmID=1) and
355 'pi0:eff40_Jan2020 pi-:SkimHighEff pi+:SkimHighEff'
356 (dmID=2), with :math:`0.4< M < 0.6~GeV`
358 @param persistent whether RootOutput module should save the created ParticleLists (default True)
359 @param path modules are added to this path
361 ma.reconstructDecay(
'eta:SkimHighEff1 -> gamma:all gamma:all',
'0.4 < M < 0.6', 1, persistent, path)
363 'eta:SkimHighEff2 -> pi0:eff40_Jan2020 pi-:SkimHighEff pi+:SkimHighEff',
368 ma.copyLists(
'eta:SkimHighEff', [
'eta:SkimHighEff1',
'eta:SkimHighEff2'], persistent, path)
369 return 'eta:SkimHighEff'
372 def loadStdLooseEta(persistent=True, path=None):
374 Create a list of 'eta:loose' list from 'gamma:loose gamma:loose' (dmID=1) and 'pi0:eff40_Jan2020 pi-:loose pi+:loose'
375 (dmID=2), with :math:`0.4< M < 0.6~GeV`
377 @param persistent whether RootOutput module should save the created ParticleLists (default True)
378 @param path modules are added to this path
380 ma.reconstructDecay(
'eta:loose1 -> gamma:loose gamma:loose',
'0.4 < M < 0.6', 1, persistent, path)
381 ma.reconstructDecay(
'eta:loose2 -> pi0:eff40_Jan2020 pi-:loose pi+:loose',
'0.4 < M < 0.6', 2, persistent, path)
382 ma.copyLists(
'eta:loose', [
'eta:loose1',
'eta:loose2'], persistent, path)
386 def loadStdAllEtaPrime(persistent=True, path=None):
388 Create a list of 'eta\':all' list from 'pi+:all pi-:all gamma:all' (dmID=1) and 'pi+:all pi-:all eta:all'
389 (dmID=2), with :math:`0.8< M < 1.1~GeV`
391 @param persistent whether RootOutput module should save the created ParticleLists (default True)
392 @param path modules are added to this path
394 ma.reconstructDecay(
'eta\':all1 -> pi+:all pi-:all gamma:all',
'0.8 < M < 1.1', 1, persistent, path)
395 ma.reconstructDecay(
'eta\':all2 -> pi+:all pi-:all eta:all',
'0.8 < M < 1.1', 2, persistent, path)
396 ma.reconstructDecay(
'eta\':all3 -> rho0:all gamma:all',
'0.8 < M < 1.1', 3, persistent, path)
397 ma.copyLists(
'eta\':all', [
'eta\':all1',
'eta\':all2',
'eta\':all3'], persistent, path)
401 def loadStdSkimHighEffEtaPrime(persistent=True, path=None):
403 Create a list of 'eta\':SkimHighEff' list from 'pi+:SkimHighEff pi-:SkimHighEff gamma:all' (dmID=1)
404 and 'pi+:SkimHighEff pi-:SkimHighEff eta:SkimHighEff'
405 (dmID=2), with :math:`0.8< M < 1.1~GeV`
407 @param persistent whether RootOutput module should save the created ParticleLists (default True)
408 @param path modules are added to this path
410 ma.reconstructDecay(
'eta\':SkimHighEff1 -> pi+:SkimHighEff pi-:SkimHighEff gamma:all',
'0.8 < M < 1.1', 1, persistent, path)
412 'eta\':SkimHighEff2 -> pi+:SkimHighEff pi-:SkimHighEff eta:SkimHighEff',
417 ma.copyLists(
'eta\':SkimHighEff', [
'eta\':SkimHighEff1',
'eta\':SkimHighEff2'], persistent, path)
418 return 'eta\':SkimHighEff'
421 def loadStdLooseEtaPrime(persistent=True, path=None):
423 Create a list of 'eta\':loose' list from 'pi+:loose pi-:loose gamma:loose' (dmID=1) and 'pi+:loose pi-:loose eta:loose'
424 (dmID=2), with :math:`0.8< M < 1.1~GeV`
426 @param persistent whether RootOutput module should save the created ParticleLists (default True)
427 @param path modules are added to this path
429 ma.reconstructDecay(
'eta\':loose1 -> pi+:loose pi-:loose gamma:loose',
'0.8 < M < 1.1', 1, persistent, path)
430 ma.reconstructDecay(
'eta\':loose2 -> pi+:loose pi-:loose eta:loose',
'0.8 < M < 1.1', 2, persistent, path)
431 ma.copyLists(
'eta\':loose', [
'eta\':loose1',
'eta\':loose2'], persistent, path)