Belle II Software  release-06-01-15
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 
14 class TVector3;
15 namespace Belle2 {
20  class Particle;
21  class TOPLikelihood;
22  class ExtHit;
23  namespace Variable {
24  // contains a couple of helper functions that are related to TOP variables
25  namespace TOPVariable {
31  const TOPLikelihood* getTOPLikelihood(const Particle* particle);
32 
38  const ExtHit* getExtHit(const Particle* particle);
39 
45  double getSlotID(const Particle* particle);
46 
50  TVector3 getLocalPosition(const Particle* particle);
51 
55  TVector3 getLocalPositionMCMatch(const Particle* particle);
56 
60  TVector3 getLocalMomentum(const Particle* particle);
61 
65  double getTOF(const Particle* particle);
66 
70  double getTOFExpert(const Particle* particle, const std::vector<double>& vars);
71 
75  double getAverageTimeOfFirst5(const Particle* particle);
76 
81  int countHits(const Particle* particle, double tmin, double tmax, bool clean = true);
82 
86  int countRawHits(const Particle* particle, double tmin, double tmax);
87 
91  double getExpectedPhotonCount(const Particle* particle, int pdg = 0);
92 
96  double topDigitCount(const Particle* particle);
97 
101  double extrapTrackToTOPz(const Particle* particle);
102 
106  double extrapTrackToTOPtheta(const Particle* particle);
107 
111  double extrapTrackToTOPphi(const Particle* particle);
112 
116  double topBackgroundDigitCount(const Particle* particle);
117 
121  double topBackgroundDigitCountRaw(const Particle* particle);
122 
126  double topRawDigitCount(const Particle* particle);
127 
131  double topDigitGapSize(const Particle* particle);
132 
138  double topCountPhotonsAfterLargesGapWithin(const Particle* particle,
139  double min, double max);
140 
144  double topReflectedDigitCount(const Particle* particle);
145 
149  double getTOPLocalX(const Particle* particle);
150 
154  double getTOPLocalY(const Particle* particle);
155 
159  double getTOPLocalZ(const Particle* particle);
160 
164  double getTOPLocalXMCMatch(const Particle* particle);
165 
169  double getTOPLocalYMCMatch(const Particle* particle);
170 
174  double getTOPLocalZMCMatch(const Particle* particle);
175 
179  double getTOPLocalPhi(const Particle* particle);
180 
184  double getTOPLocalTheta(const Particle* particle);
185 
189  double getTOPPhotonCount(const Particle* particle);
190 
194  double getExpectedTOPPhotonCount(const Particle* particle,
195  const std::vector<double>& vars);
196 
200  double countTOPHitsInInterval(const Particle* particle,
201  const std::vector<double>& vars);
202 
206  double countTOPHitsInFirst20ns(const Particle* particle);
207 
211  double countRawTOPHitsInInterval(const Particle* particle,
212  const std::vector<double>& vars);
213 
217  double getFlag(const Particle* particle);
218 
222  double getElectronLogL(const Particle* particle);
223 
227  double getMuonLogL(const Particle* particle);
228 
232  double getPionLogL(const Particle* particle);
233 
237  double getKaonLogL(const Particle* particle);
238 
242  double getProtonLogL(const Particle* particle);
243 
244 
248  double getLogLScanMass(const Particle* particle);
249 
253  double getLogLScanMassLowerInterval(const Particle* particle);
254 
258  double getLogLScanMassUpperInterval(const Particle* particle);
259 
263  double getLogLScanThreshold(const Particle* particle);
264 
268  double getLogLScanExpectedSignalPhotons(const Particle* particle);
269 
270 
271  //---------------- TOPRecBunch related --------------------
272 
276  double isTOPRecBunchReconstructed([[maybe_unused]] const Particle* particle);
277 
281  double TOPRecBunchNumber([[maybe_unused]] const Particle* particle);
282 
286  double TOPRecBunchCurrentOffset([[maybe_unused]] const Particle* particle);
287 
291  double TOPRecBunchTrackCount([[maybe_unused]] const Particle* particle);
292 
296  double TOPRecBunchUsedTrackCount([[maybe_unused]] const Particle* particle);
297 
298  //-------------- Event based -----------------------------------
299 
303  double TOPRawPhotonsInSlot([[maybe_unused]] const Particle* particle,
304  const std::vector<double>& vars);
305 
309  double TOPGoodPhotonsInSlot([[maybe_unused]] const Particle* particle,
310  const std::vector<double>& vars);
311 
315  double TOPTracksInSlot([[maybe_unused]] const Particle* particle);
316  } // TOPVariable
317  } // Variable
319 } // Belle2
Abstract base class for different kinds of events.