Belle II Software  release-05-01-25
dileptons.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 import modularAnalysis as ma
5 
6 
7 def loadStdDiLeptons(persistent=True, path=None):
8  """
9  Create the following lists of di-leptons:
10  - 'J/psi:mumuLoose'Psi2s
11  - 'J/psi:eeLoose'
12  - 'psi(2S):mumuLoose'
13  - 'psi(2S):eeLoose'
14 
15  @param persistent whether RootOutput module should save the created ParticleLists (default True)
16  @param path modules are added to this path
17  """
18 
19  loadStdLooseJpsi2mumu(persistent, path)
20  loadStdLooseJpsi2ee(persistent, path)
21  loadStdLooseJpsi2ee_noTOP(persistent, path)
22  loadStdLoosePsi2s2mumu(persistent, path)
23  loadStdLoosePsi2s2ee(persistent, path)
24  loadStdPsi2s2lepton(persistent, path)
25 
26 
27 def loadStdLooseJpsi2mumu(persistent=True, path=None):
28  """
29  Load the 'J/psi:mumuLoose' list from 'mu-:loose mu+:loose', with :math:`2.8 < M < 3.7~GeV`
30 
31  @param persistent whether RootOutput module should save the created ParticleLists (default True)
32  @param path modules are added to this path
33  """
34  ma.reconstructDecay('J/psi:mumuLoose -> mu-:loose mu+:loose', '2.8 < M < 3.7', 2, persistent, path)
35  return 'J/psi:mumuLoose'
36 
37 
38 def loadStdLooseJpsi2ee(persistent=True, path=None):
39  """
40  Load the 'J/psi:eeLoose' list from 'e-:loose e+:loose', with :math:`2.8 < M < 3.7~GeV`
41 
42  @param persistent whether RootOutput module should save the created ParticleLists (default True)
43  @param path modules are added to this path
44  """
45  ma.reconstructDecay('J/psi:eeLoose -> e-:loose e+:loose', '2.8 < M < 3.7', 2, persistent, path)
46  return 'J/psi:eeLoose'
47 
48 
49 def loadStdJpsiToee(persistent=True, path=None):
50  """
51  Load the 'J/psi:ee' list from 'e+:bremCorr e-:bremCorr', with :math:`2.8 < M < 3.4~GeV` with electronID>0.01
52 
53  @param persistent whether RootOutput module should save the created ParticleLists (default True)
54  @param path modules are added to this path
55  """
56 
57  ma.fillParticleList('e+:withCuts', cut="dr < 0.5 and abs(dz) < 2 and thetaInCDCAcceptance", path=path)
58  ma.fillParticleList(decayString='gamma:e+', cut="E < 1.0", path=path)
59  ma.correctBrems(outputList='e+:bremCorr', inputList='e+:withCuts', gammaList='gamma:e+', multiplePhotons=False,
60  usePhotonOnlyOnce=True, writeOut=True, path=path)
61 
62  ma.reconstructDecay(
63  'J/psi:ee -> e+:bremCorr e-:bremCorr',
64  '2.8 < M < 3.4 and daughter(0, electronID) > 0.01 or daughter(1, electronID) > 0.01',
65  2,
66  persistent,
67  path)
68  return 'J/psi:ee'
69 
70 
71 def loadStdJpsiToee_noTOP(persistent=True, path=None):
72  """
73  Load the 'J/psi:ee' list from 'e+:bremCorr e-:bremCorr', with :math:`2.8 < M < 3.4~GeV` with electronID_noTOP>0.01
74 
75  @param persistent whether RootOutput module should save the created ParticleLists (default True)
76  @param path modules are added to this path
77  """
78 
79  ma.fillParticleList('e+:withCuts', cut="dr < 0.5 and abs(dz) < 2 and thetaInCDCAcceptance", path=path)
80  ma.fillParticleList(decayString='gamma:e+', cut="E < 1.0", path=path)
81  ma.correctBrems(outputList='e+:bremCorr', inputList='e+:withCuts', gammaList='gamma:e+', multiplePhotons=False,
82  usePhotonOnlyOnce=True, writeOut=True, path=path)
83 
84  ma.reconstructDecay(
85  'J/psi:ee -> e+:bremCorr e-:bremCorr',
86  '2.8 < M < 3.4 and daughter(0, electronID_noTOP) > 0.01 or daughter(1, electronID_noTOP) > 0.01',
87  2,
88  persistent,
89  path)
90  return 'J/psi:ee'
91 
92 
93 def loadStdJpsiTomumu(persistent=True, path=None):
94  """
95  Load the 'J/psi:mumu' list from 'mu+:withCuts mu+:withCuts', with :math:`2.8 < M < 3.4~GeV`
96  where mu+:withCuts list is with cut="dr < 0.5 and abs(dz) < 2 and thetaInCDCAcceptance and muonID > 0.01"
97 
98  @param persistent whether RootOutput module should save the created ParticleLists (default True)
99  @param path modules are added to this path
100  """
101  ma.fillParticleList('mu+:withCuts', cut="dr < 0.5 and abs(dz) < 2 and thetaInCDCAcceptance", path=path)
102  ma.reconstructDecay(
103  'J/psi:mumu -> mu+:withCuts mu-:withCuts',
104  '2.8 < M < 3.4 and daughter(0, muonID) > 0.01 or daughter(1,muonID) > 0.01',
105  2,
106  persistent,
107  path)
108  return 'J/psi:mumu'
109 
110 
111 def loadStdPsi2s2lepton(persistent=True, path=None):
112  """
113  'psi(2S):ll' list of Psi(2S) to mumu or ee.
114  'psi(2S):mumu' reconstructed from 'mu-:all mu+:all', with :math:`3.2 < M < 4.1~GeV`
115  'psi(2S):ee' reconstructed from 'e-:all e+:all', with :math:`3.2 < M < 4.1~GeV`
116 
117  @param persistent whether RootOutput module should save the created ParticleLists (default True)
118  @param path modules are added to this path
119  """
120  ma.reconstructDecay('psi(2S):mumu -> mu-:all mu+:all', '3.2 < M < 4.1', 1, persistent, path=path)
121  ma.reconstructDecay('psi(2S):ee -> e-:all e+:all', '3.2 < M < 4.1', 2, persistent, path=path)
122  ma.copyLists('psi(2S):ll', ['psi(2S):mumu', 'psi(2S):ee'], persistent, path)
123  return 'psi(2S):ll'
124 
125 
126 def loadStdLoosePsi2s2mumu(persistent=True, path=None):
127  """
128  Load the 'psi(2S):mumuLoose' list from 'mu-:loose mu+:loose', with :math:`3.2 < M < 4.1~GeV`
129 
130  @param persistent whether RootOutput module should save the created ParticleLists (default True)
131  @param path modules are added to this path
132  """
133  ma.reconstructDecay('psi(2S):mumuLoose -> mu-:loose mu+:loose', '3.2 < M < 4.1', 2, persistent, path)
134  return 'psi(2S):mumuLoose'
135 
136 
137 def loadStdLoosePsi2s2ee(persistent=True, path=None):
138  """
139  Load the 'psi(2S):eeLoose' list from 'e-:loose e+:loose', with :math:`3.2 < M < 4.1~GeV`
140 
141  @param persistent whether RootOutput module should save the created ParticleLists (default True)
142  @param path modules are added to this path
143  """
144  ma.reconstructDecay('psi(2S):eeLoose -> e-:loose e+:loose', '3.2 < M < 4.1', 2, persistent, path)
145  return 'psi(2S):eeLoose'