Belle II Software  release-05-02-19
TOPDigitVariables.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2018 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributor: Jan Strube (jan.strube@desy.de) *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <analysis/VariableManager/Manager.h>
14 #include <vector>
15 
16 class TVector3;
17 namespace Belle2 {
22  class Particle;
23  class TOPLikelihood;
24  class ExtHit;
25  namespace Variable {
26  // contains a couple of helper functions that are related to TOP variables
27  namespace TOPVariable {
33  const TOPLikelihood* getTOPLikelihood(const Particle* particle);
34 
40  const ExtHit* getExtHit(const Particle* particle);
41 
47  double getSlotID(const Particle* particle);
48 
52  TVector3 getLocalPosition(const Particle* particle);
53 
57  TVector3 getLocalPositionMCMatch(const Particle* particle);
58 
62  TVector3 getLocalMomentum(const Particle* particle);
63 
67  double getTOF(const Particle* particle);
68 
72  double getTOFExpert(const Particle* particle, const std::vector<double>& vars);
73 
77  double getAverageTimeOfFirst5(const Particle* particle);
78 
83  int countHits(const Particle* particle, double tmin, double tmax, bool clean = true);
84 
88  int countRawHits(const Particle* particle, double tmin, double tmax);
89 
93  double getExpectedPhotonCount(const Particle* particle, int pdg = 0);
94 
98  double topDigitCount(const Particle* particle);
99 
103  double extrapTrackToTOPz(const Particle* particle);
104 
108  double extrapTrackToTOPtheta(const Particle* particle);
109 
113  double extrapTrackToTOPphi(const Particle* particle);
114 
118  double topBackgroundDigitCount(const Particle* particle);
119 
123  double topBackgroundDigitCountRaw(const Particle* particle);
124 
128  double topRawDigitCount(const Particle* particle);
129 
133  double topDigitGapSize(const Particle* particle);
134 
140  double topCountPhotonsAfterLargesGapWithin(const Particle* particle,
141  double min, double max);
142 
146  double topReflectedDigitCount(const Particle* particle);
147 
151  double getTOPLocalX(const Particle* particle);
152 
156  double getTOPLocalY(const Particle* particle);
157 
161  double getTOPLocalZ(const Particle* particle);
162 
166  double getTOPLocalXMCMatch(const Particle* particle);
167 
171  double getTOPLocalYMCMatch(const Particle* particle);
172 
176  double getTOPLocalZMCMatch(const Particle* particle);
177 
181  double getTOPLocalPhi(const Particle* particle);
182 
186  double getTOPLocalTheta(const Particle* particle);
187 
191  double getTOPPhotonCount(const Particle* particle);
192 
196  double getExpectedTOPPhotonCount(const Particle* particle,
197  const std::vector<double>& vars);
198 
202  double countTOPHitsInInterval(const Particle* particle,
203  const std::vector<double>& vars);
204 
208  double countTOPHitsInFirst20ns(const Particle* particle);
209 
213  double countRawTOPHitsInInterval(const Particle* particle,
214  const std::vector<double>& vars);
215 
219  double getFlag(const Particle* particle);
220 
224  double getElectronLogL(const Particle* particle);
225 
229  double getMuonLogL(const Particle* particle);
230 
234  double getPionLogL(const Particle* particle);
235 
239  double getKaonLogL(const Particle* particle);
240 
244  double getProtonLogL(const Particle* particle);
245 
246  //---------------- TOPRecBunch related --------------------
247 
251  double isTOPRecBunchReconstructed([[maybe_unused]] const Particle* particle);
252 
256  double TOPRecBunchNumber([[maybe_unused]] const Particle* particle);
257 
261  double TOPRecBunchCurrentOffset([[maybe_unused]] const Particle* particle);
262 
266  double TOPRecBunchTrackCount([[maybe_unused]] const Particle* particle);
267 
271  double TOPRecBunchUsedTrackCount([[maybe_unused]] const Particle* particle);
272 
273  //-------------- Event based -----------------------------------
274 
278  double TOPRawPhotonsInSlot([[maybe_unused]] const Particle* particle,
279  const std::vector<double>& vars);
280 
284  double TOPGoodPhotonsInSlot([[maybe_unused]] const Particle* particle,
285  const std::vector<double>& vars);
286 
290  double TOPTracksInSlot([[maybe_unused]] const Particle* particle);
291  } // TOPVariable
292  } // Variable
294 } // Belle2
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19