Belle II Software development
TOPDigitVariables.h
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#pragma once
10
11#include <analysis/VariableManager/Manager.h>
12#include <vector>
13#include <Math/Vector3D.h>
14#include <Math/Point3D.h>
15
16namespace Belle2 {
21 class Particle;
22 class TOPLikelihood;
23 class ExtHit;
24 class TOPBarHit;
25 class TOPLikelihoodScanResult;
26 namespace Variable {
27 namespace TOPVariable {
28
29 //---------------- helpers --------------------
30
37 const TOPLikelihood* getTOPLikelihood(const Particle* particle);
38
45 const ExtHit* getExtHit(const Particle* particle);
46
53 const TOPBarHit* getBarHit(const Particle* particle);
54
61 const TOPLikelihoodScanResult* getTOPLikelihoodScanResult(const Particle* particle);
62
63
70 int getSlotID(const Particle* particle);
71
72
73 //---------------- ExtHit (or TOPBarHit) based --------------------
74
82 double topSlotID(const Particle* particle);
83
91 double topSlotIDMCMatch(const Particle* particle);
92
100 bool getLocalPosition(const Particle* particle, ROOT::Math::XYZPoint& result);
101
109 double getTOPLocalX(const Particle* particle);
110
118 double getTOPLocalY(const Particle* particle);
119
127 double getTOPLocalZ(const Particle* particle);
128
136 bool getLocalPositionMCMatch(const Particle* particle, ROOT::Math::XYZPoint& result);
137
145 double getTOPLocalXMCMatch(const Particle* particle);
146
154 double getTOPLocalYMCMatch(const Particle* particle);
155
163 double getTOPLocalZMCMatch(const Particle* particle);
164
172 bool getLocalMomentum(const Particle* particle, ROOT::Math::XYZVector& result);
173
181 double getTOPLocalPhi(const Particle* particle);
182
190 double getTOPLocalTheta(const Particle* particle);
191
199 bool getLocalMomentumMCMatch(const Particle* particle, ROOT::Math::XYZVector& result);
200
208 double getTOPLocalPhiMCMatch(const Particle* particle);
209
217 double getTOPLocalThetaMCMatch(const Particle* particle);
218
226 double computeTOF(const Particle* particle, int pdg);
227
235 double getTOF(const Particle* particle);
236
244 double getTOFMCMatch(const Particle* particle);
245
254 double getTOFExpert(const Particle* particle, const std::vector<double>& vars);
255
256
257 //---------------- Helix extrapolation --------------------
258
265 double extrapTrackToTOPz(const Particle* particle);
266
273 double extrapTrackToTOPtheta(const Particle* particle);
274
281 double extrapTrackToTOPphi(const Particle* particle);
282
283
284 //---------------- TOPDigit based --------------------
285
295 double countHits(const Particle* particle, double tmin, double tmax, bool clean);
296
304 double topDigitCount(const Particle* particle);
305
313 double topDigitCountMCMatch(const Particle* particle);
314
323 double topSignalDigitCount(const Particle* particle);
324
333 double topBackgroundDigitCount(const Particle* particle);
334
342 double topRawDigitCount(const Particle* particle);
343
352 double countTOPHitsInInterval(const Particle* particle, const std::vector<double>& vars);
353
362 double countTOPHitsInIntervalMCMatch(const Particle* particle, const std::vector<double>& vars);
363
372 double countRawTOPHitsInInterval(const Particle* particle, const std::vector<double>& vars);
373
374
375 //---------------- TOPLikelihood based --------------------
376
384 double getFlag(const Particle* particle);
385
393 double getModuleID(const Particle* particle);
394
402 double getEmissionX(const Particle* particle);
403
411 double getEmissionZ(const Particle* particle);
412
420 double getTOPPhotonCount(const Particle* particle);
421
429 double expectedPhotonCount(const Particle* particle, int pdg);
430
438 double getExpectedPhotonCount(const Particle* particle);
439
448 double getExpectedPhotonCountExpert(const Particle* particle,
449 const std::vector<double>& vars);
450
458 double effectiveSignalYield(const Particle* particle, int pdg);
459
467 double getEffectiveSignalYield(const Particle* particle);
468
477 double getEffectiveSignalYieldExpert(const Particle* particle,
478 const std::vector<double>& vars);
479
487 double getEstimatedBkgCount(const Particle* particle);
488
496 double getElectronLogL(const Particle* particle);
497
505 double getMuonLogL(const Particle* particle);
506
514 double getPionLogL(const Particle* particle);
515
523 double getKaonLogL(const Particle* particle);
524
532 double getProtonLogL(const Particle* particle);
533
541 double getDeuteronLogL(const Particle* particle);
542
543
544 //---------------- TOPLikelihoodScanResult based --------------------
545
553 double getLogLScanMass(const Particle* particle);
554
562 double getLogLScanMassLowerInterval(const Particle* particle);
563
571 double getLogLScanMassUpperInterval(const Particle* particle);
572
580 double getLogLScanThreshold(const Particle* particle);
581
589 double getLogLScanExpectedSignalPhotons(const Particle* particle);
590
591
592 //---------------- TOPRecBunch based --------------------
593
601 double isTOPRecBunchReconstructed([[maybe_unused]] const Particle* particle);
602
610 double isTOPRecBunchFilled([[maybe_unused]] const Particle* particle);
611
619 double TOPRecBunchNumber([[maybe_unused]] const Particle* particle);
620
628 double TOPRecBucketNumber([[maybe_unused]] const Particle* particle);
629
637 double isTOPRecBunchNumberEQsim([[maybe_unused]] const Particle* particle);
638
646 double TOPRecBunchCurrentOffset([[maybe_unused]] const Particle* particle);
647
655 double TOPRecBunchTrackCount([[maybe_unused]] const Particle* particle);
656
664 double TOPRecBunchUsedTrackCount([[maybe_unused]] const Particle* particle);
665
666
667 //-------------- Event based -----------------------------------
668
677 double TOPRawPhotonsInSlot([[maybe_unused]] const Particle* particle, const std::vector<double>& vars);
678
687 double TOPGoodPhotonsInSlot([[maybe_unused]] const Particle* particle, const std::vector<double>& vars);
688
696 double TOPTracksInSlot(const Particle* particle);
697
698 } // TOPVariable
699 } // Variable
701} // Belle2
Abstract base class for different kinds of events.