12 import modularAnalysis
as ma
13 from vertex
import kFit
14 from stdPi0s
import stdPi0s
20 def loadStdPi0ForBToHadrons(persistent=True, path=None):
22 Creates a list 'pi0:bth_skim' for :math:`B\\to {\\rm hadrons}` skims, based on recommendations of
23 the neutral group (avoiding ECL timing cuts) for winter 2020 and BtoCharmless for 2021. We require the energy of the photons
24 to be larger than :math:`22.50~{\\rm MeV}` in the forward end cap, :math:`20~{\\rm MeV}` in the barrel,
25 and :math:`20~{\\rm MeV}` in the backward end cap. For the :math:`\\pi^{0}`, we require the mass to be
26 :math:`105 < M < 150~{\\rm MeV}/c^2` and a mass-constrained KFit to converge.
28 stdPi0s(
'all', path, loadPhotonBeamBackgroundMVA=
False)
29 ma.cutAndCopyList(outputListName=
'pi0:bth_skim', inputListName=
'pi0:all',
30 cut=
'[[daughter(0, clusterReg) == 1 and daughter(0, E) > 0.02250] or ' +
31 '[daughter(0, clusterReg) == 2 and daughter(0, E) > 0.020] or ' +
32 '[daughter(0, clusterReg) == 3 and daughter(0, E) > 0.020]] and ' +
33 '[[daughter(1, clusterReg) == 1 and daughter(1, E) > 0.02250] or ' +
34 '[daughter(1, clusterReg) == 2 and daughter(1, E) > 0.020] or ' +
35 '[daughter(1, clusterReg) == 3 and daughter(1, E) > 0.020]] and ' +
36 'M > 0.105 and M < 0.150', path=path)
37 kFit(
'pi0:bth_skim', 0.0,
'mass', path=path)
40 def loadStdSkimHighEffTracks(particletype, path):
42 Function to prepare high eff charged particle lists (:SkimHighEff).
43 We require only fiducial the cuts
44 :b2:var:`thetaInCDCAcceptance` and :b2:var:`chiProb` :math:`> 0` and
45 abs(:b2:var:`dr`) :math:`< 0.5~{\\rm cm}` and abs(dz) :math:` < 3~{\\rm cm}`
48 @param particletype type of charged particle to make a list of
49 @param path modules are added to this path
52 pidnames = {
'pi':
'pionID',
'K':
'kaonID',
'p':
'protonID',
'e':
'electronID',
'mu':
'muonID'}
55 trackQuality =
'thetaInCDCAcceptance and chiProb > 0 '
56 ipCut =
'abs(dr) < 0.5 and abs(dz) < 3'
57 goodTrack = trackQuality +
' and ' + ipCut
59 if particletype
not in pidnames.keys():
60 ma.B2ERROR(f
"The requested list is not a standard charged particle. Use one of {pidnames.keys()}")
61 pidCut = f
'{pidnames[particletype]} > 0.01 and {goodTrack}'
63 ma.fillParticleList(particletype +
'+:SkimHighEff', pidCut,
True, path=path)
68 def loadStdLightMesons(persistent=True, path=None):
70 Create the following lists of light mesons:
88 @param persistent whether RootOutput module should save the created ParticleLists (default True)
89 @param path modules are added to this path
92 loadStdLooseRho0(persistent, path)
93 loadStdAllRho0(persistent, path)
94 loadStdLooseRhoPlus(persistent, path)
95 loadStdLooseKstar0(persistent, path)
96 loadStdAllKstar0(persistent, path)
97 loadStdLooseKstarPlus(persistent, path)
98 loadStdLoosePhi(persistent, path)
99 loadStdAllPhi(persistent, path)
100 loadStdLooseF_0(persistent, path)
101 loadStdAllF_0(persistent, path)
102 loadStdLooseOmega(persistent, path)
103 loadStdAllOmega(persistent, path)
104 loadStdLooseEta(persistent, path)
105 loadStdAllEta(persistent, path)
106 loadStdLooseEtaPrime(persistent, path)
107 loadStdAllEtaPrime(persistent, path)
112 def loadStdLooseRho0(persistent=True, path=None):
114 Create a list of 'rho0:loose' list from 'pi-:loose pi+:loose' with :math:`0.47 < M < 1.07~GeV`
116 @param persistent whether RootOutput module should save the created ParticleLists (default True)
117 @param path modules are added to this path
119 ma.reconstructDecay(
'rho0:loose -> pi-:loose pi+:loose',
'0.47 < M < 1.07', 1, persistent, path)
123 def loadStdAllRho0(persistent=True, path=None):
125 Create a list of 'rho0:all' list from 'pi-:all pi+:all' with :math:`0.47 < M < 1.07~GeV`
127 @param persistent whether RootOutput module should save the created ParticleLists (default True)
128 @param path modules are added to this path
130 ma.reconstructDecay(
'rho0:all -> pi-:all pi+:all',
'0.47 < M < 1.07', 1, persistent, path)
134 def loadStdSkimHighEffRho0(persistent=True, path=None):
136 Create a list of 'rho0:SkimHighEff' list from 'pi-:SkimHighEff pi+:SkimHighEff' with :math:`0.47 < M < 1.07~GeV`
138 @param persistent whether RootOutput module should save the created ParticleLists (default True)
139 @param path modules are added to this path
141 ma.reconstructDecay(
'rho0:SkimHighEff -> pi-:SkimHighEff pi+:SkimHighEff',
'0.47 < M < 1.07', 1, persistent, path)
142 return 'rho0:SkimHighEff'
145 def loadStdLooseRhoPlus(persistent=True, path=None):
147 Create a list of 'rho+:loose' list from 'pi0:eff40_May2020 pi+:loose' with :math:`0.47 < M < 1.07~GeV`
149 @param persistent whether RootOutput module should save the created ParticleLists (default True)
150 @param path modules are added to this path
152 ma.reconstructDecay(
'rho+:loose -> pi+:loose pi0:eff40_May2020',
'0.47 < M < 1.07', 1, persistent, path)
156 def loadStdAllRhoPlus(persistent=True, path=None):
158 Create a list of 'rho+:all' list from 'pi0:bth_skim' pi+:all' with :math:`0.47 < M < 1.07~GeV`.
159 We apply few sanity cuts on the pi+: thetaInCDCAcceptance, abs(dr) < 0.5, and abs(dz) < 3.
161 @param persistent whether RootOutput module should save the created ParticleLists (default True)
162 @param path modules are added to this path
164 ma.reconstructDecay(
'rho+:all -> pi+:all pi0:bth_skim ',
'0.47 < M < 1.07 and ' +
165 'daughter(0,thetaInCDCAcceptance) > 0 and abs(daughter(0,dr)) < 0.5 and ' +
166 'abs(daughter(0,dz)) < 3', 1, persistent, path)
170 def loadA_1Plus(persistent=True, path=None):
172 Creates a 'a_1+:all' list from 'pi+:all pi+:all pi-:all' requiring :math:`0.8 < M < 1.6~{\\rm GeV}/c^2`.
174 @param persistent whether RootOutput module should save the created ParticleLists (default True)
175 @param path modules are added to this path
178 decayString=
'a_1+:all -> pi+:all pi+:all pi-:all',
180 dmID=1, writeOut=persistent,
186 def loadStdLooseKstar0(persistent=True, path=None):
188 Create a list of 'K*0:loose' list from 'pi-:loose K+:loose' with :math:`0.74 < M < 1.04~GeV`
190 @param persistent whether RootOutput module should save the created ParticleLists (default True)
191 @param path modules are added to this path
193 ma.reconstructDecay(
'K*0:loose -> pi-:loose K+:loose',
'0.74 < M < 1.04', 1, persistent, path)
197 def loadStdAllKstar0(persistent=True, path=None):
199 Create a list of 'K*0:all' list from 'pi-:all K+:all' with :math:`0.74 < M < 1.04~GeV`
201 @param persistent whether RootOutput module should save the created ParticleLists (default True)
202 @param path modules are added to this path
204 ma.reconstructDecay(
'K*0:all -> pi-:all K+:all',
'0.74 < M < 1.04', 1, persistent, path)
208 def loadStdSkimHighEffKstar0(persistent=True, path=None):
210 Create a list of 'K*0:SkimHighEff' list from 'pi-:SkimHighEff K+:SkimHighEff' with :math:`0.74 < M < 1.04~GeV`
212 @param persistent whether RootOutput module should save the created ParticleLists (default True)
213 @param path modules are added to this path
215 ma.reconstructDecay(
'K*0:SkimHighEff -> pi-:SkimHighEff K+:SkimHighEff',
'0.74 < M < 1.04', 1, persistent, path)
216 return 'K*0:SkimHighEff'
219 def loadStdLooseKstarPlus(persistent=True, path=None):
221 Create a list of 'K*+:loose' list from 'pi+:loose K_S0:merged' with :math:`0.74 < M < 1.04~GeV`
223 @param persistent whether RootOutput module should save the created ParticleLists (default True)
224 @param path modules are added to this path
226 ma.reconstructDecay(
'K*+:loose -> pi+:loose K_S0:merged',
'0.74 < M < 1.04', 1, persistent, path)
230 def loadStdAllKstarPlus(persistent=True, path=None):
232 Create a list of 'K*+:all' list from 'pi+:all K_S0:merged' with :math:`0.74 < M < 1.04~GeV`
234 @param persistent whether RootOutput module should save the created ParticleLists (default True)
235 @param path modules are added to this path
237 ma.reconstructDecay(
'K*+:all -> pi+:all K_S0:merged',
'0.74 < M < 1.04', 1, persistent, path)
241 def loadStdAllPhi(persistent=True, path=None):
243 Create a list of 'phi:all' list from 'K+:all K-:all' with :math:`0.97 < M < 1.1~GeV`
245 @param persistent whether RootOutput module should save the created ParticleLists (default True)
246 @param path modules are added to this path
248 ma.reconstructDecay(
'phi:all -> K+:all K-:all',
'0.97 < M < 1.1', 1, persistent, path)
252 def loadStdSkimHighEffPhi(persistent=True, path=None):
254 Create a list of 'phi:SkimHighEff' list from 'K+:SkimHighEff K-:SkimHighEff' with :math:`0.97 < M < 1.1~GeV`
256 @param persistent whether RootOutput module should save the created ParticleLists (default True)
257 @param path modules are added to this path
259 ma.reconstructDecay(
'phi:SkimHighEff -> K+:SkimHighEff K-:SkimHighEff',
'0.97 < M < 1.1', 1, persistent, path)
260 return 'phi:SkimHighEff'
263 def loadStdLoosePhi(persistent=True, path=None):
265 Create a list of 'phi:loose' list from 'K+:loose K-:loose' with :math:`0.97 < M < 1.1~GeV`
267 @param persistent whether RootOutput module should save the created ParticleLists (default True)
268 @param path modules are added to this path
270 ma.reconstructDecay(
'phi:loose -> K+:loose K-:loose',
'0.97 < M < 1.1', 1, persistent, path)
274 def loadStdAllF_0(persistent=True, path=None):
276 Create a list of 'f_0:all' list from 'pi+:all pi-:all' with :math:`0.78 < M < 1.18~GeV`
278 @param persistent whether RootOutput module should save the created ParticleLists (default True)
279 @param path modules are added to this path
281 ma.reconstructDecay(
'f_0:all -> pi+:all pi-:all',
'0.78 < M < 1.18', 1, persistent, path)
285 def loadStdSkimHighEffF_0(persistent=True, path=None):
287 Create a list of 'f_0:SkimHighEff' list from 'pi+:SkimHighEff pi-:SkimHighEff' with :math:`0.78 < M < 1.18~GeV`
289 @param persistent whether RootOutput module should save the created ParticleLists (default True)
290 @param path modules are added to this path
292 ma.reconstructDecay(
'f_0:SkimHighEff -> pi+:SkimHighEff pi-:SkimHighEff',
'0.78 < M < 1.18', 1, persistent, path)
293 return 'f_0:SkimHighEff'
296 def loadStdLooseF_0(persistent=True, path=None):
298 Create a list of 'f_0:loose' list from 'pi+:loose pi1:loose' with :math:`0.78 < M < 1.18~GeV`
300 @param persistent whether RootOutput module should save the created ParticleLists (default True)
301 @param path modules are added to this path
303 ma.reconstructDecay(
'f_0:loose -> pi+:loose pi-:loose',
'0.78 < M < 1.18', 1, persistent, path)
307 def loadStdAllOmega(persistent=True, path=None):
309 Create a list of 'omega:all' list from 'pi0:eff40_May2020 pi-:all pi+:all' with :math:`0.73 < M < 0.83~GeV`
311 @param persistent whether RootOutput module should save the created ParticleLists (default True)
312 @param path modules are added to this path
314 ma.reconstructDecay(
'omega:all -> pi0:eff40_May2020 pi-:all pi+:all',
'0.73 < M < 0.83', 1, persistent, path)
318 def loadStdSkimHighEffOmega(persistent=True, path=None):
320 Create a list of 'omega:SkimHighEff' list from 'pi0:eff40_May2020 pi-:SkimHighEff pi+:SkimHighEff'
321 with :math:`0.73 < M < 0.83~GeV`
323 @param persistent whether RootOutput module should save the created ParticleLists (default True)
324 @param path modules are added to this path
327 'omega:SkimHighEff -> pi0:eff40_May2020 pi-:SkimHighEff pi+:SkimHighEff',
332 return 'omega:SkimHighEff'
335 def loadStdLooseOmega(persistent=True, path=None):
337 Create a list of 'omega:loose' list from 'pi0:eff40_May2020 pi-:loose pi+:loose' with :math:`0.73 < M < 0.83~GeV`
339 @param persistent whether RootOutput module should save the created ParticleLists (default True)
340 @param path modules are added to this path
342 ma.reconstructDecay(
'omega:loose -> pi0:eff40_May2020 pi-:loose pi+:loose',
'0.73 < M < 0.83', 1, persistent, path)
346 def loadStdAllEta(persistent=True, path=None):
348 Create a list of 'eta:all' list from 'gamma:all gamma:all' (dmID=1) and 'pi0:eff40_May2020 pi-:all pi+:all'
349 (dmID=2), with :math:`0.4< M < 0.6~GeV`
351 @param persistent whether RootOutput module should save the created ParticleLists (default True)
352 @param path modules are added to this path
354 ma.reconstructDecay(
'eta:all1 -> gamma:all gamma:all',
'0.4 < M < 0.6', 1, persistent, path)
355 ma.reconstructDecay(
'eta:all2 -> pi0:eff40_May2020 pi-:all pi+:all',
'0.4 < M < 0.6', 2, persistent, path)
356 ma.copyLists(
'eta:all', [
'eta:all1',
'eta:all2'], persistent, path)
360 def loadStdSkimHighEffEta(persistent=True, path=None):
362 Create a list of 'eta:SkimHighEff' list from 'gamma:all gamma:all' (dmID=1) and
363 'pi0:eff40_May2020 pi-:SkimHighEff pi+:SkimHighEff'
364 (dmID=2), with :math:`0.4< M < 0.6~GeV`
366 @param persistent whether RootOutput module should save the created ParticleLists (default True)
367 @param path modules are added to this path
369 ma.reconstructDecay(
'eta:SkimHighEff1 -> gamma:all gamma:all',
'0.4 < M < 0.6', 1, persistent, path)
371 'eta:SkimHighEff2 -> pi0:eff40_May2020 pi-:SkimHighEff pi+:SkimHighEff',
376 ma.copyLists(
'eta:SkimHighEff', [
'eta:SkimHighEff1',
'eta:SkimHighEff2'], persistent, path)
377 return 'eta:SkimHighEff'
380 def loadStdLooseEta(persistent=True, path=None):
382 Create a list of 'eta:loose' list from 'gamma:loose gamma:loose' (dmID=1) and 'pi0:eff40_May2020 pi-:loose pi+:loose'
383 (dmID=2), with :math:`0.4< M < 0.6~GeV`
385 @param persistent whether RootOutput module should save the created ParticleLists (default True)
386 @param path modules are added to this path
388 ma.reconstructDecay(
'eta:loose1 -> gamma:loose gamma:loose',
'0.4 < M < 0.6', 1, persistent, path)
389 ma.reconstructDecay(
'eta:loose2 -> pi0:eff40_May2020 pi-:loose pi+:loose',
'0.4 < M < 0.6', 2, persistent, path)
390 ma.copyLists(
'eta:loose', [
'eta:loose1',
'eta:loose2'], persistent, path)
394 def loadStdAllEtaPrime(persistent=True, path=None):
396 Create a list of 'eta\':all' list from 'pi+:all pi-:all gamma:all' (dmID=1) and 'pi+:all pi-:all eta:all'
397 (dmID=2), with :math:`0.8< M < 1.1~GeV`
399 @param persistent whether RootOutput module should save the created ParticleLists (default True)
400 @param path modules are added to this path
402 ma.reconstructDecay(
'eta\':all1 -> pi+:all pi-:all gamma:all',
'0.8 < M < 1.1', 1, persistent, path)
403 ma.reconstructDecay(
'eta\':all2 -> pi+:all pi-:all eta:all',
'0.8 < M < 1.1', 2, persistent, path)
404 ma.reconstructDecay(
'eta\':all3 -> rho0:all gamma:all',
'0.8 < M < 1.1', 3, persistent, path)
405 ma.copyLists(
'eta\':all', [
'eta\':all1',
'eta\':all2',
'eta\':all3'], persistent, path)
409 def loadStdSkimHighEffEtaPrime(persistent=True, path=None):
411 Create a list of 'eta\':SkimHighEff' list from 'pi+:SkimHighEff pi-:SkimHighEff gamma:all' (dmID=1)
412 and 'pi+:SkimHighEff pi-:SkimHighEff eta:SkimHighEff'
413 (dmID=2), with :math:`0.8< M < 1.1~GeV`
415 @param persistent whether RootOutput module should save the created ParticleLists (default True)
416 @param path modules are added to this path
418 ma.reconstructDecay(
'eta\':SkimHighEff1 -> pi+:SkimHighEff pi-:SkimHighEff gamma:all',
'0.8 < M < 1.1', 1, persistent, path)
420 'eta\':SkimHighEff2 -> pi+:SkimHighEff pi-:SkimHighEff eta:SkimHighEff',
425 ma.copyLists(
'eta\':SkimHighEff', [
'eta\':SkimHighEff1',
'eta\':SkimHighEff2'], persistent, path)
426 return 'eta\':SkimHighEff'
429 def loadStdLooseEtaPrime(persistent=True, path=None):
431 Create a list of 'eta\':loose' list from 'pi+:loose pi-:loose gamma:loose' (dmID=1) and 'pi+:loose pi-:loose eta:loose'
432 (dmID=2), with :math:`0.8< M < 1.1~GeV`
434 @param persistent whether RootOutput module should save the created ParticleLists (default True)
435 @param path modules are added to this path
437 ma.reconstructDecay(
'eta\':loose1 -> pi+:loose pi-:loose gamma:loose',
'0.8 < M < 1.1', 1, persistent, path)
438 ma.reconstructDecay(
'eta\':loose2 -> pi+:loose pi-:loose eta:loose',
'0.8 < M < 1.1', 2, persistent, path)
439 ma.copyLists(
'eta\':loose', [
'eta\':loose1',
'eta\':loose2'], persistent, path)