Belle II Software  release-08-01-10
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 
16 namespace 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 getTOPPhotonCount(const Particle* particle);
394 
402  double expectedPhotonCount(const Particle* particle, int pdg);
403 
411  double getExpectedPhotonCount(const Particle* particle);
412 
421  double getExpectedPhotonCountExpert(const Particle* particle,
422  const std::vector<double>& vars);
423 
431  double getEstimatedBkgCount(const Particle* particle);
432 
440  double getElectronLogL(const Particle* particle);
441 
449  double getMuonLogL(const Particle* particle);
450 
458  double getPionLogL(const Particle* particle);
459 
467  double getKaonLogL(const Particle* particle);
468 
476  double getProtonLogL(const Particle* particle);
477 
485  double getDeuteronLogL(const Particle* particle);
486 
487 
488  //---------------- TOPLikelihoodScanResult based --------------------
489 
497  double getLogLScanMass(const Particle* particle);
498 
506  double getLogLScanMassLowerInterval(const Particle* particle);
507 
515  double getLogLScanMassUpperInterval(const Particle* particle);
516 
524  double getLogLScanThreshold(const Particle* particle);
525 
533  double getLogLScanExpectedSignalPhotons(const Particle* particle);
534 
535 
536  //---------------- TOPRecBunch based --------------------
537 
545  double isTOPRecBunchReconstructed([[maybe_unused]] const Particle* particle);
546 
554  double isTOPRecBunchFilled([[maybe_unused]] const Particle* particle);
555 
563  double TOPRecBunchNumber([[maybe_unused]] const Particle* particle);
564 
572  double TOPRecBucketNumber([[maybe_unused]] const Particle* particle);
573 
581  double isTOPRecBunchNumberEQsim([[maybe_unused]] const Particle* particle);
582 
590  double TOPRecBunchCurrentOffset([[maybe_unused]] const Particle* particle);
591 
599  double TOPRecBunchTrackCount([[maybe_unused]] const Particle* particle);
600 
608  double TOPRecBunchUsedTrackCount([[maybe_unused]] const Particle* particle);
609 
610 
611  //-------------- Event based -----------------------------------
612 
621  double TOPRawPhotonsInSlot([[maybe_unused]] const Particle* particle, const std::vector<double>& vars);
622 
631  double TOPGoodPhotonsInSlot([[maybe_unused]] const Particle* particle, const std::vector<double>& vars);
632 
640  double TOPTracksInSlot(const Particle* particle);
641 
642  } // TOPVariable
643  } // Variable
645 } // Belle2
Abstract base class for different kinds of events.