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