Belle II Software  release-06-00-14
charmless.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 
11 
12 import modularAnalysis as ma
13 from vertex import kFit
14 from stdPhotons import stdPhotons
15 
16 
17 def loadStdVeryLooseTracks(particletype, path):
18  """
19  Function to prepare veryLoose charged particle lists. We require only fiducial the cuts
20  :b2:var:`thetaInCDCAcceptance` and :b2:var:`chiProb` :math:`> 0` and
21  abs(:b2:var:`dr`) :math:`< 0.5~{\\rm cm}` and abs(dz) :math:` < 3~{\\rm cm}`.
22 
23  @param particletype type of charged particle to make a list of
24  @param path modules are added to this path
25  """
26 
27  # basic quality cut strings
28  trackQuality = 'thetaInCDCAcceptance and chiProb > 0 '
29  ipCut = 'abs(dr) < 0.5 and abs(dz) < 3'
30  goodTrack = trackQuality + ' and ' + ipCut
31 
32  if particletype not in ['pi', 'K', 'p', 'e', 'mu']:
33  ma.B2ERROR("The requested list is not a standard charged particle. Use one of pi, K, e, mu, p.")
34 
35  ma.fillParticleList(particletype + '+:SkimVeryLoose', goodTrack, True, path=path)
36 
37 
38 def loadStdVeryLooseKstar0(path):
39  """
40  Create a list of 'K*0:veryLoose' list from 'pi-:SkimVeryLoose K+:SkimVeryLoose' with :math:`0.7 < M < 1.6~GeV`
41 
42  @param path modules are added to this path
43  """
44  ma.reconstructDecay('K*0:veryLoose -> K+:SkimVeryLoose pi-:SkimVeryLoose', '0.7 < M < 1.6', 1, path=path)
45  return 'K*0:veryLoose'
46 
47 
48 def loadStdVeryLooseRho0(path):
49  """
50  Create a list of 'rho0:veryLoose' list from 'pi-:SkimVeryLoose pi+:SkimVeryLoose' with :math:`0.47 < M < 1.15~GeV`
51 
52  @param path modules are added to this path
53  """
54  ma.reconstructDecay('rho0:veryLoose -> pi+:SkimVeryLoose pi-:SkimVeryLoose', '0.47 < M < 1.15', 1, path=path)
55  return 'rho0:veryLoose'
56 
57 
58 def loadStdVeryLooseRhoPlus(path):
59  """
60  Create a list of 'rho+:veryLoose' list from 'pi0:charmlessFit pi+:SkimVeryLoose' with :math:`0.47 < M < 1.15~GeV`
61 
62  @param path modules are added to this path
63  """
64  ma.reconstructDecay('rho+:veryLoose -> pi+:SkimVeryLoose pi0:charmlessFit', '0.47 < M < 1.15', 1, path=path)
65  return 'rho+:veryLoose'
66 
67 
68 def loadStdPi0ForBToCharmless(path):
69  """
70  Creates a list 'pi0:charmlessFit' for :math:`B\\to {\\rm charmless}` skims, based on recommendations of
71  the neutral group (avoiding ECL timing cuts) for winter 2020. We require the energy of the photons
72  to be larger than :math:`22.5~{\\rm MeV}` in the forward end cap, :math:`20~{\\rm MeV}` in the barrel,
73  and :math:`20~{\\rm MeV}` in the backward end cap. For the :math:`\\pi^{0}`, we require the mass to be
74  :math:`105 < M < 150~{\\rm MeV}/c^2` and a massKFit to converge.
75  """
76  stdPhotons('all', path=path)
77  ma.reconstructDecay('pi0:all -> gamma:all gamma:all', '', 1, True, path=path)
78  ma.cutAndCopyList(outputListName='pi0:charmlessFit', inputListName='pi0:all',
79  cut='[[daughter(0,clusterReg)==1 and daughter(0,E)> 0.0225] or ' +
80  '[daughter(0,clusterReg)==2 and daughter(0,E)> 0.020] or ' +
81  '[daughter(0,clusterReg)==3 and daughter(0,E)> 0.020]] and ' +
82  '[[daughter(1,clusterReg)==1 and daughter(1,E)> 0.0225] or ' +
83  '[daughter(1,clusterReg)==2 and daughter(1,E)> 0.020] or ' +
84  '[daughter(1,clusterReg)==3 and daughter(1,E)> 0.020]] and ' +
85  'M > 0.105 and M < 0.150 ',
86  path=path)
87  kFit('pi0:charmlessFit', 0.0, fit_type='mass', path=path)
88 
89 
90 def loadStdVeryLooseKstarPlus(path):
91  """
92  Create a list of 'K*+:veryLoose' list from 'pi+:SkimVeryLoose K_S0:merged' with :math:`0.7 < M < 1.6~GeV`
93 
94  @param path modules are added to this path
95  """
96  ma.reconstructDecay('K*+:veryLoose -> K_S0:merged pi+:SkimVeryLoose', '0.7 < M < 1.6', 1, path=path)
97  return 'K*+:veryLoose'
98 
99 
100 def loadStdVeryLooseKstarPlusPi0(path):
101  """
102  Create a list of 'K*+:veryLoosePi0' list from 'K+:SkimVeryLoose pi0:charmlessFit' with :math:`0.7 < M < 1.6~GeV`
103 
104  @param path modules are added to this path
105  """
106  ma.reconstructDecay('K*+:veryLoosePi0 -> K+:SkimVeryLoose pi0:charmlessFit', '0.7 < M < 1.6', 1, path=path)
107  return 'K*+:veryLoosePi0'