Belle II Software light-2509-fornax
BelleVariables.cc
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9// Own header.
10#include <analysis/variables/BelleVariables.h>
11
12#include <analysis/dataobjects/Particle.h>
13#include <analysis/dataobjects/ParticleList.h>
14#include <analysis/dbobjects/BellePi0EtaProbParameters.h>
15#include <analysis/variables/AcceptanceVariables.h>
16#include <analysis/variables/Variables.h>
17#include <analysis/variables/VertexVariables.h>
18#include <analysis/variables/ECLVariables.h>
19#include <analysis/variables/V0DaughterTrackVariables.h>
20#include <analysis/variables/VertexVariables.h>
21
22#include <framework/logging/Logger.h>
23#include <framework/gearbox/Const.h>
24#include <framework/database/DBObjPtr.h>
25#include <mdst/dbobjects/BeamSpot.h>
26#include <mdst/dataobjects/Track.h>
27
28#include <framework/datastore/StoreArray.h>
29#include <b2bii/dataobjects/BelleTrkExtra.h>
30
31#include <cmath>
32#include <optional>
33#include <TVectorF.h>
34
35namespace Belle2 {
40 namespace Variable {
41 bool goodBelleKshort(const Particle* KS)
42 {
43 // check input
44 if (KS->getNDaughters() != 2) {
45 B2WARNING("goodBelleKshort is only defined for a particle with two daughters");
46 return false;
47 }
48 const Particle* d0 = KS->getDaughter(0);
49 const Particle* d1 = KS->getDaughter(1);
50 if ((d0->getCharge() == 0) || (d1->getCharge() == 0)) {
51 B2WARNING("goodBelleKshort is only defined for a particle with charged daughters");
52 return false;
53 }
54 if (std::abs(KS->getPDGCode()) != Const::Kshort.getPDGCode())
55 B2WARNING("goodBelleKshort is being applied to a candidate with PDG " << KS->getPDGCode());
56
57 // If goodKs exists, return the value
58 if (KS->hasExtraInfo("goodKs")) {
59 return bool(KS->getExtraInfo("goodKs"));
60 }
61
62 // Belle selection
63 double p = particleP(KS);
64 double fl = particleDRho(KS);
65 double dphi = acos(((particleDX(KS) * particlePx(KS)) + (particleDY(KS) * particlePy(KS))) / (fl * sqrt(particlePx(KS) * particlePx(
66 KS) + particlePy(KS) * particlePy(KS))));
67 // particleDRho returns track d0 relative to IP for tracks
68 double dr = std::min(std::abs(particleDRho(d0)), std::abs(particleDRho(d1)));
69 double zdist = v0DaughterZ0Diff(KS);
70
71 bool low = p < 0.5 && std::abs(zdist) < 0.8 && dr > 0.05 && dphi < 0.3;
72 bool mid = p < 1.5 && p > 0.5 && std::abs(zdist) < 1.8 && dr > 0.03 && dphi < 0.1 && fl > .08;
73 bool high = p > 1.5 && std::abs(zdist) < 2.4 && dr > 0.02 && dphi < 0.03 && fl > .22;
74
75 if (low || mid || high) {
76 return true;
77 } else
78 return false;
79 }
80
81 double goodBelleLambda(const Particle* Lambda)
82 {
83 if (Lambda->getNDaughters() != 2) {
84 B2WARNING("goodBelleLambda is only defined for a particle with two daughters");
85 return 0.;
86 }
87 const Particle* d0 = Lambda->getDaughter(0);
88 const Particle* d1 = Lambda->getDaughter(1);
89 if ((d0->getCharge() == 0) || (d1->getCharge() == 0)) {
90 B2WARNING("goodBelleLambda is only defined for a particle with charged daughters");
91 return 0.;
92 }
93 if (std::abs(Lambda->getPDGCode()) != Const::Lambda.getPDGCode()) {
94 B2WARNING("goodBelleLambda is being applied to a candidate with PDG " << Lambda->getPDGCode());
95 }
96
97 if (Lambda->hasExtraInfo("goodLambda"))
98 return Lambda->getExtraInfo("goodLambda");
99
100 double p = particleP(Lambda);
101 double dr = std::min(std::abs(particleDRho(d0)), std::abs(particleDRho(d1)));
102 double zdist = v0DaughterZ0Diff(Lambda);
103 double dphi = acos(cosAngleBetweenMomentumAndVertexVectorInXYPlane(Lambda));
104 // Flight distance of Lambda0 in xy plane
105 double fl = particleDRho(Lambda);
106
107 // goodBelleLambda == 1 (optimized for proton PID > 0.6)
108 bool high1 = p >= 1.5 && std::abs(zdist) < 12.9 && dr > 0.008 && dphi < 0.09 && fl > 0.22;
109 bool mid1 = p >= 0.5 && p < 1.5 && std::abs(zdist) < 9.8 && dr > 0.01 && dphi < 0.18 && fl > 0.16;
110 bool low1 = p < 0.5 && std::abs(zdist) < 2.4 && dr > 0.027 && dphi < 1.2 && fl > 0.11;
111
112 // goodBelleLambda == 2 (optimized without PID selection)
113 bool high2 = p >= 1.5 && std::abs(zdist) < 7.7 && dr > 0.018 && dphi < 0.07 && fl > 0.35;
114 bool mid2 = p >= 0.5 && p < 1.5 && std::abs(zdist) < 2.1 && dr > 0.033 && dphi < 0.10 && fl > 0.24;
115 bool low2 = p < 0.5 && std::abs(zdist) < 1.9 && dr > 0.059 && dphi < 0.6 && fl > 0.17;
116
117 if (low2 || mid2 || high2) {
118 return 2.0;
119 } else if (low1 || mid1 || high1) {
120 return 1.0;
121 } else {
122 return 0.0;
123 }
124 }
125
126
127 bool isGoodBelleGamma(int region, double energy)
128 {
129 bool goodGammaRegion1, goodGammaRegion2, goodGammaRegion3;
130 goodGammaRegion1 = region == 1 && energy > 0.100;
131 goodGammaRegion2 = region == 2 && energy > 0.050;
132 goodGammaRegion3 = region == 3 && energy > 0.150;
133
134 return goodGammaRegion1 || goodGammaRegion2 || goodGammaRegion3;
135 }
136
137 bool goodBelleGamma(const Particle* particle)
138 {
139 double energy = eclClusterE(particle);
140 int region = eclClusterDetectionRegion(particle);
141
142 return isGoodBelleGamma(region, energy);
143 }
144
145 BelleTrkExtra* getBelleTrkExtraInfoFromParticle(Particle const* particle)
146 {
147 const Track* track = particle->getTrack();
148 if (!track) {
149 return nullptr;
150 }
151 auto belleTrkExtra = track->getRelatedTo<BelleTrkExtra>();
152 if (!belleTrkExtra) {
153 return nullptr;
154 }
155 return belleTrkExtra;
156 }
157
158 double BelleFirstCDCHitX(const Particle* particle)
159 {
160 auto belleTrkExtra = getBelleTrkExtraInfoFromParticle(particle);
161 if (!belleTrkExtra) {
162 B2WARNING("Cannot find BelleTrkExtra, did you forget to enable BelleTrkExtra during the conversion?");
163 return Const::doubleNaN;
164 }
165 return belleTrkExtra->getTrackFirstX();
166 }
167
168 double BelleFirstCDCHitY(const Particle* particle)
169 {
170 auto belleTrkExtra = getBelleTrkExtraInfoFromParticle(particle);
171 if (!belleTrkExtra) {
172 B2WARNING("Cannot find BelleTrkExtra, did you forget to enable BelleTrkExtra during the conversion?");
173 return Const::doubleNaN;
174 }
175 return belleTrkExtra->getTrackFirstY();
176 }
177
178 double BelleFirstCDCHitZ(const Particle* particle)
179 {
180 auto belleTrkExtra = getBelleTrkExtraInfoFromParticle(particle);
181 if (!belleTrkExtra) {
182 B2WARNING("Cannot find BelleTrkExtra, did you forget to enable BelleTrkExtra during the conversion?");
183 return Const::doubleNaN;
184 }
185 return belleTrkExtra->getTrackFirstZ();
186 }
187
188 double BelleLastCDCHitX(const Particle* particle)
189 {
190 auto belleTrkExtra = getBelleTrkExtraInfoFromParticle(particle);
191 if (!belleTrkExtra) {
192 B2WARNING("Cannot find BelleTrkExtra, did you forget to enable BelleTrkExtra during the conversion?");
193 return Const::doubleNaN;
194 }
195 return belleTrkExtra->getTrackLastX();
196 }
197
198 double BelleLastCDCHitY(const Particle* particle)
199 {
200 auto belleTrkExtra = getBelleTrkExtraInfoFromParticle(particle);
201 if (!belleTrkExtra) {
202 B2WARNING("Cannot find BelleTrkExtra, did you forget to enable BelleTrkExtra during the conversion?");
203 return Const::doubleNaN;
204 }
205 return belleTrkExtra->getTrackLastY();
206 }
207
208 double BelleLastCDCHitZ(const Particle* particle)
209 {
210 auto belleTrkExtra = getBelleTrkExtraInfoFromParticle(particle);
211 if (!belleTrkExtra) {
212 B2WARNING("Cannot find BelleTrkExtra, did you forget to enable BelleTrkExtra during the conversion?");
213 return Const::doubleNaN;
214 }
215 return belleTrkExtra->getTrackLastZ();
216 }
217
218 double BellePi0InvariantMassSignificance(const Particle* particle)
219 {
220 TMatrixFSym covarianceMatrix(Particle::c_DimMomentum);
221 for (auto daughter : particle->getDaughters()) {
222 covarianceMatrix += daughter->getMomentumErrorMatrix();
223 }
224
225 TVectorF jacobian(Particle::c_DimMomentum);
226 jacobian[0] = -1.0 * particle->getPx() / particle->getMass();
227 jacobian[1] = -1.0 * particle->getPy() / particle->getMass();
228 jacobian[2] = -1.0 * particle->getPz() / particle->getMass();
229 jacobian[3] = 1.0 * particle->getEnergy() / particle->getMass();
230
231 double massErrSquared = jacobian * (covarianceMatrix * jacobian);
232
233 if (massErrSquared < 0.0)
234 return Const::doubleNaN;
235
236 double invMass = particleInvariantMassFromDaughters(particle);
237 double nomMass = particle->getPDGMass();
238
239 return (invMass - nomMass) / sqrt(massErrSquared);
240 }
241
242 double BelleTof(const Particle* particle)
243 {
244 auto belleTrkExtra = getBelleTrkExtraInfoFromParticle(particle);
245 if (!belleTrkExtra) {
246 B2WARNING("Cannot find BelleTrkExtra, did you forget to enable BelleTrkExtra during the conversion?");
247 return Const::doubleNaN;
248 }
249 return belleTrkExtra->getTof();
250 }
251
252 double BelleTofQuality(const Particle* particle)
253 {
254 auto belleTrkExtra = getBelleTrkExtraInfoFromParticle(particle);
255 if (!belleTrkExtra) {
256 B2WARNING("Cannot find BelleTrkExtra, did you forget to enable BelleTrkExtra during the conversion?");
257 return Const::doubleNaN;
258 }
259 return belleTrkExtra->getTofQuality();
260 }
261
262 double BelleTofSigma(const Particle* particle)
263 {
264 auto belleTrkExtra = getBelleTrkExtraInfoFromParticle(particle);
265 if (!belleTrkExtra) {
266 B2WARNING("Cannot find BelleTrkExtra, did you forget to enable BelleTrkExtra during the conversion?");
267 return Const::doubleNaN;
268 }
269 return belleTrkExtra->getTofSigma();
270 }
271
272 double BellePathLength(const Particle* particle)
273 {
274 auto belleTrkExtra = getBelleTrkExtraInfoFromParticle(particle);
275 if (!belleTrkExtra) {
276 B2WARNING("Cannot find BelleTrkExtra, did you forget to enable BelleTrkExtra during the conversion?");
277 return Const::doubleNaN;
278 }
279 return belleTrkExtra->getPathLength();
280 }
281
282 double BelleTofMass(const Particle* particle)
283 {
284 auto belleTrkExtra = getBelleTrkExtraInfoFromParticle(particle);
285 if (!belleTrkExtra) {
286 B2WARNING("Cannot find BelleTrkExtra, did you forget to enable BelleTrkExtra during the conversion?");
287 return Const::doubleNaN;
288 }
289 double time = belleTrkExtra->getTof();
290 double length = belleTrkExtra->getPathLength();
291 double p = particle->getP(); //3-momentum
292 double tofbeta = length / time / Const::speedOfLight;
293 double tofmass = p * sqrt(1. / (tofbeta * tofbeta) - 1.); //(GeV)
294
295 return tofmass;
296 }
297
298 double BelledEdx(const Particle* particle)
299 {
300 auto belleTrkExtra = getBelleTrkExtraInfoFromParticle(particle);
301 if (!belleTrkExtra) {
302 B2WARNING("Cannot find BelleTrkExtra, did you forget to enable BelleTrkExtra during the conversion?");
303 return Const::doubleNaN;
304 }
305 return belleTrkExtra->getdEdx();
306 }
307
308 double BelledEdxQuality(const Particle* particle)
309 {
310 auto belleTrkExtra = getBelleTrkExtraInfoFromParticle(particle);
311 if (!belleTrkExtra) {
312 B2WARNING("Cannot find BelleTrkExtra, did you forget to enable BelleTrkExtra during the conversion?");
313 return Const::doubleNaN;
314 }
315 return belleTrkExtra->getdEdxQuality();
316 }
317
318 double BelleACCnPe(const Particle* particle)
319 {
320 auto belleTrkExtra = getBelleTrkExtraInfoFromParticle(particle);
321 if (!belleTrkExtra) {
322 B2WARNING("Cannot find BelleTrkExtra, did you forget to enable BelleTrkExtra during the conversion?");
323 return Const::doubleNaN;
324 }
325 return belleTrkExtra->getACCPe();
326 }
327
328 double BelleACCQuality(const Particle* particle)
329 {
330 auto belleTrkExtra = getBelleTrkExtraInfoFromParticle(particle);
331 if (!belleTrkExtra) {
332 B2WARNING("Cannot find BelleTrkExtra, did you forget to enable BelleTrkExtra during the conversion?");
333 return Const::doubleNaN;
334 }
335 return belleTrkExtra->getACCQuality();
336 }
337
338 double Pi0_Prob(double mass, double energy, int eclRegion)
339 {
340 static const double massMin = 0.034976;
341 static const double massMax = 0.234976;
342 static const double logEnergyMin = 1.3;
343 static const double logEnergyMax = 3.7;
344 static const int p_bins = 24;
345 static const int m_bins = 50;
346
347 double logp = log(1000 * energy) / log(10.);
348 if ((logp < logEnergyMin) || (logp > logEnergyMax)) return 0;
349
350 double drow = p_bins * (logp - logEnergyMin) / (logEnergyMax - logEnergyMin);
351 int row = int(drow);
352 double dcol = m_bins * (mass - massMin) / (massMax - massMin);
353 int col = int(dcol);
354 if ((row < 0) || (row >= p_bins) || (col < 0) || (col >= m_bins)) {
355 B2ERROR("Fault in getting the coordinates of pi0 probability");
356 return Const::doubleNaN;
357 }
358 int pos = m_bins * row + col ;
359 if (pos > m_bins * p_bins) {
360 B2ERROR("Fault in getting the coordinates of pi0 probability");
361 return Const::doubleNaN;
362 }
363 static DBObjPtr<BellePi0EtaProbParameters> probs;
364 if (!probs.isValid()) {
365 return Const::doubleNaN;
366 }
367 if (eclRegion == 1) {
368 return probs->getBelleFWDPi0Probability(pos);
369 } else if (eclRegion == 2) {
370 return probs->getBelleBRLPi0Probability(pos);
371 } else if (eclRegion == 3) {
372 return probs->getBelleBWDPi0Probability(pos);
373 } else return Const::doubleNaN;
374 }
375
376 double Eta_Prob(double mass, double energy, int eclRegion)
377 {
378 static const double massMin = 0.4473;
379 static const double massMax = 0.6473;
380 static const double logEnergyMin = 1.3;
381 static const double logEnergyMax = 3.7;
382 static const int p_bins = 24;
383 static const int m_bins = 50;
384
385 double logp = log(1000 * energy) / log(10.);
386 if ((logp < logEnergyMin) || (logp > logEnergyMax)) return 0;
387
388 double drow = p_bins * (logp - logEnergyMin) / (logEnergyMax - logEnergyMin);
389 int row = int(drow);
390 double dcol = m_bins * (mass - massMin) / (massMax - massMin);
391 int col = int(dcol);
392 if ((row < 0) || (row >= p_bins) || (col < 0) || (col >= m_bins)) {
393 B2ERROR("Fault in getting the coordinates of eta probability");
394 return Const::doubleNaN;
395 }
396 int pos = m_bins * row + col ;
397 if (pos > m_bins * p_bins) {
398 B2ERROR("Fault in getting the coordinates of eta probability");
399 return Const::doubleNaN;
400 }
401
402 static DBObjPtr<BellePi0EtaProbParameters> probs;
403 if (!probs.isValid())
404 return Const::doubleNaN;
405 if (eclRegion == 1) {
406 return probs->getBelleFWDEtaProbability(pos);
407 } else if (eclRegion == 2) {
408 return probs->getBelleBRLEtaProbability(pos);
409 } else if (eclRegion == 3) {
410 return probs->getBelleBWDEtaProbability(pos);
411 } else return Const::doubleNaN;
412 }
413
414 Manager::FunctionPtr BellePi0Veto(const std::vector<std::string>& arguments)
415 {
416 std::string photonListName = "gamma:mdst";
417 if (arguments.size() == 1) photonListName = arguments[0];
418
419 auto func = [photonListName](const Particle * particle) -> double {
420 StoreObjPtr<ParticleList> photonList(photonListName);
421 if (!(photonList.isValid()))
422 {
423 B2FATAL("Invalid photon list name " << photonListName << " given to BellePi0Veto!");
424 }
425
426 ROOT::Math::PxPyPzEVector particle4Vector = particle->get4Vector();
427 unsigned int particleIndex = particle->getMdstArrayIndex();
428 std::optional<double> temppi0;
429
430 for (unsigned int i = 0; i < photonList->getListSize(); i++)
431 {
432 const Particle* photon = photonList->getParticle(i);
433
434 if (photon->getMdstArrayIndex() == particleIndex) continue;
435
436 ROOT::Math::PxPyPzEVector Pi0 = particle4Vector + photon->get4Vector();
437
438 double mass = Pi0.M();
439 if (mass < 0.11 or mass > 0.15) continue;
440
441 double pi0_prob = Pi0_Prob(
442 mass,
443 photon->getEnergy(),
444 eclClusterDetectionRegion(photon)
445 );
446 if (!temppi0 or pi0_prob > *temppi0) {
447 temppi0 = pi0_prob;
448 }
449 }
450 return temppi0.value_or(Const::doubleNaN);
451 };
452 return func;
453 }
454
455 Manager::FunctionPtr BelleEtaVeto(const std::vector<std::string>& arguments)
456 {
457 std::string photonListName = "gamma:mdst";
458 if (arguments.size() == 1) photonListName = arguments[0];
459
460 auto func = [photonListName](const Particle * particle) -> double {
461 StoreObjPtr<ParticleList> photonList(photonListName);
462 if (!(photonList.isValid()))
463 {
464 B2FATAL("Invalid photon list name " << photonListName << " given to BelleEtaVeto!");
465 }
466
467 ROOT::Math::PxPyPzEVector particle4Vector = particle->get4Vector();
468 unsigned int particleIndex = particle->getMdstArrayIndex();
469 std::optional<double> tempeta;
470
471 for (unsigned int i = 0; i < photonList->getListSize(); i++)
472 {
473 const Particle* photon = photonList->getParticle(i);
474
475 if (photon->getMdstArrayIndex() == particleIndex) continue;
476
477 ROOT::Math::PxPyPzEVector Eta = particle4Vector + photon->get4Vector();
478
479 double mass = Eta.M();
480 if (mass < 0.5 or mass > 0.58) continue;
481
482 double eta_prob = Eta_Prob(
483 mass,
484 photon->getEnergy(),
485 eclClusterDetectionRegion(photon)
486 );
487 if (!tempeta or eta_prob > *tempeta) {
488 tempeta = eta_prob;
489 }
490 }
491 return tempeta.value_or(Const::doubleNaN);
492 };
493 return func;
494 }
495
496 VARIABLE_GROUP("Belle Variables");
497
498 REGISTER_VARIABLE("goodBelleKshort", goodBelleKshort, R"DOC(
499[Legacy] GoodKs Returns true if a :math:`K_{S}^0\to\pi\pi` candidate passes the Belle algorithm:
500a momentum-binned selection including requirements on impact parameter of, and
501angle between the daughter pions as well as separation from the vertex and
502flight distance in the transverse plane.
503
504.. seealso:: `BELLE2-NOTE-PH-2018-017 <https://docs.belle2.org/record/957>`_
505)DOC");
506
507 REGISTER_VARIABLE("goodBelleLambda", goodBelleLambda, R"DOC(
508[Legacy] Returns 2.0, 1.0, 0.0 as an indication of goodness of :math:`\Lambda^0` candidates,
509based on:
510
511* The distance of the two daughter tracks at their interception at z axis,
512* the minimum distance of the daughter tracks and the IP in xy plane,
513* the difference of the azimuthal angle of the vertex vector and the momentum vector,
514* and the flight distance of the Lambda0 candidates in xy plane.
515
516It reproduces the ``goodLambda()`` function in Belle.
517
518``goodBelleLambda`` selection 1 (selected with: ``goodBelleLambda>0``) maximizes the signal significance after applying
519``atcPIDBelle(4,2) > 0.6``, while ``goodBelleLambda`` selection 2 (``goodBelleLambda>1``) is tighter and maximizes the signal
520significance of a :math:`\Lambda^0` sample without any proton PID cut. However, it might still be beneficial to apply a proton PID
521cut on top of it. Which combination of proton PID cut and ``goodBelleLambda`` selection scenario is ideal, is probably
522analysis-dependent.
523
524.. warning:: ``goodBelleLambda`` is not optimized or tested on Belle II data.
525
526See Also:
527 * `BN-684`_ Lambda selection at Belle. K F Chen et al.
528 * The ``FindLambda`` class can be found at ``/belle_legacy/findLambda/findLambda.h``
529
530.. _BN-684: https://belle.kek.jp/secured/belle_note/gn684/bn684.ps.gz
531
532)DOC");
533
534 REGISTER_VARIABLE("goodBelleGamma", goodBelleGamma, R"DOC(
535[Legacy] Returns 1.0 if the photon candidate passes the simple region dependent
536energy selection for Belle data and MC.
537
538.. math::
539
540 E > 50 \textrm{ MeV; barrel}\\
541 E > 100 \textrm{ MeV; forward endcap}\\
542 E > 150 \textrm{ MeV; backward endcap}
543)DOC");
544
545 REGISTER_VARIABLE("BelleFirstCDCHitX", BelleFirstCDCHitX, R"DOC(
546[Legacy] Returns x component of starting point of the track near the 1st SVD or CDC hit for SVD1 data (exp. 7 - 27) or the 1st CDC hit for SVD2 data (from exp. 31). (Belle only, originally stored in mdst_trk_fit.)
547
548)DOC","cm");
549
550 REGISTER_VARIABLE("BelleFirstCDCHitY", BelleFirstCDCHitY, R"DOC(
551[Legacy] Returns y component of starting point of the track near the 1st SVD or CDC hit for SVD1 data (exp. 7 - 27) or the 1st CDC hit for SVD2 data (from exp. 31). (Belle only, originally stored in mdst_trk_fit.)
552
553)DOC","cm");
554
555 REGISTER_VARIABLE("BelleFirstCDCHitZ", BelleFirstCDCHitZ, R"DOC(
556[Legacy] Returns z component of starting point of the track near the 1st SVD or CDC hit for SVD1 data (exp. 7 - 27) or the 1st CDC hit for SVD2 data (from exp. 31). (Belle only, originally stored in mdst_trk_fit.)
557
558)DOC","cm");
559
560 REGISTER_VARIABLE("BelleLastCDCHitX", BelleLastCDCHitX, R"DOC(
561[Legacy] Returns x component of end point of the track near the last CDC hit. (Belle only, originally stored in mdst_trk_fit.)
562
563)DOC","cm");
564
565 REGISTER_VARIABLE("BelleLastCDCHitY", BelleLastCDCHitY, R"DOC(
566[Legacy] Returns y component of end point of the track near the last CDC hit. (Belle only, originally stored in mdst_trk_fit.)
567
568)DOC","cm");
569
570 REGISTER_VARIABLE("BelleLastCDCHitZ", BelleLastCDCHitZ, R"DOC(
571[Legacy] Returns z component of end point of the track near the last CDC hit. (Belle only, originally stored in mdst_trk_fit.)
572
573)DOC","cm");
574
575 REGISTER_VARIABLE("BellePi0SigM", BellePi0InvariantMassSignificance, R"DOC(
576[Legacy] Returns the significance of the :math:`\pi^0` mass used in the FEI for B2BII.
577The significance is calculated as the difference between the reconstructed and the nominal mass divided by the mass uncertainty:
578
579.. math::
580 \frac{m_{\gamma\gamma} - m_{\pi^0}^\textrm{PDG}}{\sigma_{m_{\gamma\gamma}}}
581
582Since the :math:`\pi^0`'s covariance matrix for B2BII is empty, the latter is calculated using the photon daughters' covariance matrices.
583 )DOC");
584
585 REGISTER_VARIABLE("BelleTof", BelleTof, R"DOC(
586[Legacy] Returns the time of flight of a track. (Belle only).
587
588)DOC", "ns");
589
590 REGISTER_VARIABLE("BelleTofQuality", BelleTofQuality, R"DOC(
591[Legacy] Returns the quality flag of the time of flight of a track. Original description from the panther table: 0 if consistency between z of hit by charge Q and corrected times, 1 if zhit from Q NOT consistent with zhit from and correct times. (Belle only).
592)DOC");
593
594 REGISTER_VARIABLE("BelleTofSigma", BelleTofSigma, R"DOC(
595[Legacy] Returns the expected resolution on the time of flight of a track. (Belle only).
596
597)DOC", "ns");
598
599 REGISTER_VARIABLE("BellePathLength", BellePathLength, R"DOC(
600[Legacy] Returns the track path length. This is defined from the closest point to the z-axis up to TOF counter. (Belle only).
601
602)DOC", "cm");
603
604 REGISTER_VARIABLE("BelleTofMass", BelleTofMass, R"DOC(
605[Legacy] Returns the TOF mass calculated from the time of flight and path length. (Belle only).
606
607)DOC", "GeV/:math:`\\text{c}^2`");
608
609 REGISTER_VARIABLE("BelledEdx", BelledEdx, R"DOC(
610[Legacy] Returns the dE/dx measured in the CDC. (Belle only).
611
612)DOC", "keV/cm");
613
614 REGISTER_VARIABLE("BelledEdxQuality", BelledEdxQuality, R"DOC(
615[Legacy] Returns the quality flag of the dE/dx measured in the CDC. Sadly no information about the code meaning is given in the original panther tables. (Belle only).
616)DOC");
617
618 REGISTER_VARIABLE("BelleACCnPe", BelleACCnPe, R"DOC(
619[Legacy] Returns the number of photo-electrons associated to the track in the ACC. (Belle only).
620)DOC");
621
622 REGISTER_VARIABLE("BelleACCQuality", BelleACCQuality, R"DOC(
623[Legacy] Returns the ACC quality flag. Original definition in the panther tables: if 0 normal, if 1 the track is out of ACC acceptance. (Belle only).
624)DOC");
625
626 REGISTER_METAVARIABLE("BellePi0Veto(photonlistname)", BellePi0Veto, R"DOC(
627[Legacy] Meta-variable that computes the maximum probability that a photon candidate is
628consistent with originating from a pi0 decay when combined with any other photon in a given list.
629Calculated within a mass window of 0.11 - 0.15 GeV/c^2, based on mass, energy, and ecl cluster region,
630using lookup tables derived in Belle. For more details, see Belle Note 665.
631)DOC", Manager::VariableDataType::c_double);
632 REGISTER_METAVARIABLE("BelleEtaVeto(photonlistname)", BelleEtaVeto, R"DOC(
633[Legacy] Meta-variable that computes the maximum probability that a photon candidate is
634consistent with originating from an eta decay when combined with any other photon in a given list.
635Calculated within a mass window of 0.50 - 0.58 GeV/c^2, based on mass, energy, and ecl cluster region,
636using lookup tables derived in Belle. For more details, see Belle Note 665.
637)DOC", Manager::VariableDataType::c_double);
638
639
640 // this is defined in ECLVariables.{h,cc}
641 REGISTER_VARIABLE("clusterBelleQuality", eclClusterDeltaL, R"DOC(
642[Legacy] Returns ECL cluster's quality indicating a good cluster in GSIM (stored in deltaL of ECL cluster object).
643Belle analysis typically used clusters with quality == 0 in their :math:`E_{\text{extra ECL}}` (Belle only).
644)DOC");
645 }
647}
int getPDGCode() const
PDG code.
Definition Const.h:473
static const ParticleType Lambda
Lambda particle.
Definition Const.h:679
static const double speedOfLight
[cm/ns]
Definition Const.h:695
static const ParticleType Kshort
K^0_S particle.
Definition Const.h:677
static const double doubleNaN
quiet_NaN
Definition Const.h:703
std::function< VarVariant(const Particle *)> FunctionPtr
functions stored take a const Particle* and return VarVariant.
Definition Manager.h:112
Abstract base class for different kinds of events.