3 from basf2
import B2ERROR, B2WARNING
4 from b2bii
import isB2BII
5 from modularAnalysis
import cutAndCopyList, reconstructDecay, applyCuts
6 from vertex
import treeFit, kFit
8 from stdCharged
import stdPi, stdK
9 from stdV0s
import stdLambdas
10 from stdPhotons
import stdPhotons
11 from stdPi0s
import stdPi0s
14 def stdXi(fitter='TreeFit', path=None):
16 Reconstruct the standard :math:`\Xi^-` ``ParticleList`` named ``Xi-:std``.
18 .. seealso:: `BELLE2-NOTE-PH-2019-011 <https://docs.belle2.org/record/BELLE2-NOTE-PH-2019-011.pdf>`_.
21 fitter (str): specify either ``KFit`` or ``TreeFit`` for the vertex reconstructions (default ``TreeFit``)
22 path (basf2.Path): modules are added to this path building the ``Xi-:std`` list
31 '[ abs( dM ) < 0.0035 ] and \
32 [ cosAngleBetweenMomentumAndVertexVector > 0.0 ] and \
33 [ formula( [ dr^2 + dz^2 ]^[0.5] ) > 0.35 ] and \
34 [ daughter(0,protonID) > 0.01 ] and \
38 stdPi(
'all', path=path)
40 kFit(
'Lambda0:mdst', conf_level=0.0, path=path)
44 '[ abs( dM ) < 0.0035 ] and \
45 [ cosAngleBetweenMomentumAndVertexVector > 0.0 ] and \
47 [ daughter(0,atcPIDBelle(4,3)) > 0.2 ] and \
48 [ daughter(0,atcPIDBelle(4,2)) > 0.2 ] and \
54 kFit(
'Lambda0:reco', 0.0, fit_type=
'massvertex', path=path)
55 reconstructDecay(
'Xi-:reco -> Lambda0:reco pi-:all',
'1.295 < M < 1.35', path=path)
56 kFit(
'Xi-:reco', conf_level=0.0, path=path)
57 elif fitter ==
'TreeFit':
58 reconstructDecay(
'Xi-:reco -> Lambda0:reco pi-:all',
'1.295 < M < 1.35', path=path)
59 treeFit(
'Xi-:reco', conf_level=0.0, massConstraint=[3122], path=path)
61 B2ERROR(f
"stdXi: invalid fitter ({fitter}). Choose from KFit or TreeFit")
66 '[ cosAngleBetweenMomentumAndVertexVector > 0.0 ] and \
67 [ formula( [ dr^2 + dz^2 ]^[0.5] ) > 0. and \
68 formula([dr^2 + dz^2 ]^[0.5])<formula([daughter(0,dr)^2 + daughter(0,dz)^2]^[0.5])] and \
74 def stdXi0(gammatype='eff40', path=None):
76 Reconstruct the standard :math:`\Xi^0` ``ParticleList`` named ``Xi0:std``.
78 .. seealso:: `BELLE2-NOTE-PH-2019-011 <https://docs.belle2.org/record/BELLE2-NOTE-PH-2019-011.pdf>`_.
81 gammatype (str): specify either ``eff60``, ``eff50``, ``eff40``, ``eff30``, or ``eff20``
82 to select the signal efficiency of the photons used in the pi0 reconstruction
84 path (basf2.Path): modules are added to this path building the ``Xi0:std`` list
93 '[ abs( dM ) < 0.0035 ] and \
94 [ cosAngleBetweenMomentumAndVertexVector > 0.0 ] and \
95 [ formula( [ dr^2 + dz^2 ]^[0.5] ) > 0.35 ] and \
96 [ daughter(0,protonID) > 0.01 ] and \
101 reconstructDecay(f
'pi0:reco -> gamma:pi0{gammatype} gamma:pi0{gammatype}',
102 'abs( dM ) < 0.0406',
110 '[ abs( dM ) < 0.0189 ] and \
111 [ [ daughter(0,clusterReg) == 1 and daughter(0,E) > 0.05 ] or [ daughter(0,clusterReg) == 3 and daughter(0,E) > 0.05 ] or \
112 [ daughter(0,clusterReg) == 2 and daughter(0,E) > 0.03 ] ] and \
113 [ [ daughter(1,clusterReg) == 1 and daughter(1,E) > 0.05 ] or [ daughter(1,clusterReg) == 3 and daughter(1,E) > 0.05 ] or \
114 [ daughter(1,clusterReg) == 2 and daughter(1,E) > 0.03 ] ]',
116 kFit(
'Lambda0:mdst', conf_level=0.0, path=path)
120 '[ abs( dM ) < 0.0035 ] and \
121 [ cosAngleBetweenMomentumAndVertexVector > 0.0 ] and \
123 [ daughter(0,atcPIDBelle(4,3)) > 0.2 ] and \
124 [ daughter(0,atcPIDBelle(4,2)) > 0.2 ] and \
129 'Xi0:prelim -> Lambda0:reco pi0:reco',
132 treeFit(
'Xi0:prelim', conf_level=0.0, massConstraint=[3122], ipConstraint=
True, updateAllDaughters=
True, path=path)
135 applyCuts(
'Xi0:prelim',
'[ abs( daughter(1,dM) ) < 0.0232 ]', path=path)
136 treeFit(
'Xi0:prelim', conf_level=0.0, massConstraint=[111, 3122], ipConstraint=
True, updateAllDaughters=
False, path=path)
141 '[ cosAngleBetweenMomentumAndVertexVector > 0.0 ] and \
142 [ daughter(0,cosAngleBetweenMomentumAndVertexVectorInXYPlane) < cosAngleBetweenMomentumAndVertexVectorInXYPlane ] and \
143 [ formula( [ dr^2 + dz^2 ]^[0.5] ) > 0.0 and \
144 formula([dr^2 + dz^2]^[0.5])<formula([daughter(0,dr)^2 + daughter(0,dz)^2]^[0.5])] and \
150 def stdOmega(fitter='TreeFit', path=None):
152 Reconstruct the standard :math:`\Omega^-` ``ParticleList`` named ``Omega-:std``.
154 .. seealso:: `BELLE2-NOTE-PH-2019-011 <https://docs.belle2.org/record/BELLE2-NOTE-PH-2019-011.pdf>`_.
157 fitter (str): specify either ``KFit`` or ``TreeFit`` for the vertex reconstructions (default ``TreeFit``)
158 path (basf2.Path): modules are added to this path building the ``Omega-:std`` list
162 stdLambdas(path=path)
167 '[ abs( dM ) < 0.0035 ] and \
168 [ cosAngleBetweenMomentumAndVertexVector > 0.0 ] and \
169 [ formula( [ dr^2 + dz^2 ]^[0.5] ) > 0.35 ] and \
170 [ daughter(0,protonID) > 0.01 ] and \
174 stdPi(
'all', path=path)
176 kFit(
'Lambda0:mdst', conf_level=0.0, path=path)
180 '[ abs( dM ) < 0.0035 ] and \
181 [ cosAngleBetweenMomentumAndVertexVector > 0.0 ] and \
183 [ daughter(0,atcPIDBelle(4,3)) > 0.2 ] and \
184 [ daughter(0,atcPIDBelle(4,2)) > 0.2 ] and \
188 stdK(
'all', path=path)
191 kFit(
'Lambda0:reco', 0.0, fit_type=
'massvertex', path=path)
192 reconstructDecay(
'Omega-:reco -> Lambda0:reco K-:all',
'1.622 < M < 1.722', path=path)
193 kFit(
'Omega-:reco', conf_level=0.0, path=path)
194 elif fitter ==
'TreeFit':
195 reconstructDecay(
'Omega-:reco -> Lambda0:reco K-:all',
'1.622 < M < 1.722', path=path)
196 treeFit(
'Omega-:reco', conf_level=0.0, massConstraint=[3122], path=path)
198 B2ERROR(f
"stdOmega: invalid fitter ({fitter}). Choose from KFit or TreeFit")
204 '[ cosAngleBetweenMomentumAndVertexVector > 0.0] and \
205 [ formula( [ dr^2 + dz^2 ]^[0.5] ) > 0. and \
206 formula([dr^2 + dz^2]^[0.5])<formula([daughter(0,dr)^2 + daughter(0,dz)^2]^[0.5])] and \
207 [ chiProb > 0.0 ] and \
208 [ daughter(1,kaonID) > 0.01 ]',
216 '[ cosAngleBetweenMomentumAndVertexVector > 0.0 ] and \
217 [ formula( [ dr^2 + dz^2 ]^[0.5] ) > 0. and \
218 formula([dr^2 + dz^2]^[0.5])<formula([daughter(0,dr)^2 + daughter(0,dz)^2 ]^[0.5])] and \
219 [ chiProb > 0.0 ] and \
220 [ daughter(1,atcPIDBelle(3,4)) > 0.2 and daughter(1,atcPIDBelle(3,2)) > 0.2 ]',
225 def goodXi(xitype='loose', path=None):
227 Select the standard good :math:`\Xi^-` ``ParticleList`` named ``Xi-:veryloose``, ``Xi-:loose``, or ``Xi-:tight``
228 from the reconstructed ``Xi-:std``.
230 .. seealso:: `BELLE2-NOTE-PH-2019-011 <https://docs.belle2.org/record/BELLE2-NOTE-PH-2019-011.pdf>`_.
233 xitype (str): specify either ``veryloose``, ``loose``, or ``tight`` for good ``ParticleList`` selection (default ``loose``)
234 path (basf2.Path): modules are added to this path building the ``Xi-:veryloose``, ``Xi-:loose``, or ``Xi-:tight``, list
237 if xitype ==
'veryloose':
241 '[ daughter(1,pt) > 0.05 and \
242 formula( [ dr^2 + dz^2 ]^[0.5] ) > 0.1 ]',
246 elif xitype ==
'loose':
250 '[ daughter(1,pt) > 0.05 and \
251 formula( [ dr^2 + dz^2 ]^[0.5] ) > 0.1 and \
252 formula([daughter(0,cosAngleBetweenMomentumAndVertexVectorInXYPlane)/cosAngleBetweenMomentumAndVertexVectorInXYPlane])\
257 elif xitype ==
'tight':
261 '[ daughter(1,pt) > 0.1 and \
262 formula( [ dr^2 + dz^2 ]^[0.5] ) > 0.15 and \
263 formula([daughter(0,cosAngleBetweenMomentumAndVertexVectorInXYPlane)/cosAngleBetweenMomentumAndVertexVectorInXYPlane])\
269 def goodXi0(xitype='loose', path=None):
271 Select the standard good :math:`\Xi^0` ``ParticleList`` named ``Xi0:veryloose``, ``Xi0:loose``, or ``Xi0:tight``
272 from the reconstructed ``Xi0:std``.
274 .. seealso:: `BELLE2-NOTE-PH-2019-011 <https://docs.belle2.org/record/BELLE2-NOTE-PH-2019-011.pdf>`_.
277 xitype (str): specify either ``veryloose``, ``loose``, or ``tight`` for good ``ParticleList`` selection (default ``loose``)
278 path (basf2.Path): modules are added to this path building the ``Xi0:veryloose``, ``Xi0:loose``, or ``Xi0:tight``, list
281 if xitype ==
'veryloose':
286 '[ formula( [ dr^2 + dz^2 ]^[0.5] ) > 0.25 and \
287 daughter(1,p) > 0.1 and \
288 abs( daughter(1,dM) ) < 0.0174 ]',
292 elif xitype ==
'loose':
297 '[ formula( [ dr^2 + dz^2 ]^[0.5] ) > 0.5 and \
298 daughter(1,p) > 0.15 and \
299 abs( daughter(1,dM) ) < 0.0174 ]',
303 elif xitype ==
'tight':
308 '[ formula( [ dr^2 + dz^2 ]^[0.5] ) > 1.4 and \
309 daughter(1,p) > 0.25 and \
310 abs( daughter(1,dM) ) < 0.0116 ]',
315 def goodOmega(omegatype='loose', path=None):
317 Select the standard good :math:`\Omega^-` ``ParticleList`` named ``Omega-:veryloose``, ``Omega-:loose``,
318 or ``Omega-:tight`` from the reconstructed ``Omega-:std``.
320 .. seealso:: `BELLE2-NOTE-PH-2019-011 <https://docs.belle2.org/record/BELLE2-NOTE-PH-2019-011.pdf>`_.
323 omegatype (str): specify either ``veryloose``, ``loose``, or ``tight`` for good ``ParticleList`` selection
324 (default ``veryloose``)
325 path (basf2.Path): modules are added to this path building the ``Omega-:veryloose``, ``Omega-:loose``,
326 or ``Omega-:tight``, list
329 if omegatype ==
'veryloose':
333 '[ daughter(1,pt) > 0.15 and \
334 formula( [ dr^2 + dz^2 ]^[0.5] ) > 0.05 ]',
338 elif omegatype ==
'loose':
342 '[ daughter(1,pt) > 0.15 and \
343 formula( [ dr^2 + dz^2 ]^[0.5] ) > 0.15 and \
344 formula([daughter(0,cosAngleBetweenMomentumAndVertexVectorInXYPlane)/cosAngleBetweenMomentumAndVertexVectorInXYPlane])\
349 elif omegatype ==
'tight':
353 '[ daughter(1,pt) > 0.3 and \
354 formula( [ dr^2 + dz^2 ]^[0.5] ) > 0.15 and \
355 formula([daughter(0,cosAngleBetweenMomentumAndVertexVectorInXYPlane)/cosAngleBetweenMomentumAndVertexVectorInXYPlane])\