All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
TOFEstimators.h
Go to the documentation of this file.
1 #ifndef TOFEstimators_h
2 #define TOFEstimators_h 1
3 
4 #include <string>
5 #include <vector>
6 #include "marlin/Processor.h"
7 #include "MarlinTrk/IMarlinTrkSystem.h"
8 
9 /**
10 \addtogroup TimeOfFlight TimeOfFlight
11 @{
12 
13 \addtogroup TOFEstimators TOFEstimators
14 @{
15 Marlin processor that calculates harmonic mean momentum, track length and time-of-flight for charged particles.
16 
17 \author F. Gaede, DESY, April 2018
18 \author B. Dudar, DESY, September 2021
19 */
20 class TOFEstimators : public marlin::Processor {
21  public:
22  /**
23  Copy constructor.
24  We remove it to avoid W-effc++ warnings.
25  */
26  TOFEstimators(const TOFEstimators&) = delete;
27 
28  /**
29  Copy assignment operator.
30  We remove it to avoid W-effc++ warnings.
31  */
32  TOFEstimators& operator=(const TOFEstimators&) = delete;
33 
34  /**
35  Method required by the Marlin to register processor in the global scope.
36  */
37  marlin::Processor* newProcessor() { return new TOFEstimators; }
38 
39  /**
40  Default constructor.
41  Registers steering parameters from the xml steering file.
42  */
43  TOFEstimators();
44 
45  /** Called at the begin of the job before anything is read.
46  Extracts geometry details and initializes Kalman Filter System.
47  */
48  void init();
49 
50  /** Called for every event - the working horse.
51  Calculates momentum, track length and time of flight and
52  writes them into PIDHandler of the input collection object.
53  */
54  void processEvent(EVENT::LCEvent* evt);
55 
56  private:
57  /** Stores ReconstructedParticleCollection steering parameter.
58  */
59  std::string _pfoCollectionName{};
60 
61  /** Stores ExtrapolateToEcal steering parameter.
62  */
64 
65  /** Stores TofMethod steering parameter.
66  */
67  std::string _tofMethod{};
68 
69  /** Stores TimeResolution steering parameter.
70  */
71  double _timeResolution{};
72 
73  /** Stores MaxEcalLayer steering parameter.
74  */
76 
77  /** Stores current event number.
78  */
79  int _nEvent{};
80 
81  /** Stores names of the output parameters.
82  These are "momentumHM", "trackLength" and "timeOfFlight".
83  */
84  std::vector<std::string> _outputParNames{};
85 
86 
87  /** Kalman Filter System.
88  \note Release notes of MarlinTrk v02-00:
89  \note users should no longer delete the IMarlinTrkSystem pointer in their code
90  */
91  MarlinTrk::IMarlinTrkSystem* _trkSystem = nullptr;
92 
93  /** Stores z component of the magnetic field at the origin in Tesla.
94  */
95  double _bField{};
96 
97  /** Stores outer TPC radius in mm.
98  */
99  double _tpcOuterR{};
100 };
101 
102 /** @} @} */
103 #endif
MarlinTrk::IMarlinTrkSystem * _trkSystem
Kalman Filter System.
Definition: TOFEstimators.h:91
double _bField
Stores z component of the magnetic field at the origin in Tesla.
Definition: TOFEstimators.h:95
void init()
Called at the begin of the job before anything is read.
std::string _pfoCollectionName
Stores ReconstructedParticleCollection steering parameter.
Definition: TOFEstimators.h:59
std::vector< std::string > _outputParNames
Stores names of the output parameters.
Definition: TOFEstimators.h:84
TOFEstimators & operator=(const TOFEstimators &)=delete
Copy assignment operator.
std::string _tofMethod
Stores TofMethod steering parameter.
Definition: TOFEstimators.h:67
double _tpcOuterR
Stores outer TPC radius in mm.
Definition: TOFEstimators.h:99
bool _extrapolateToEcal
Stores ExtrapolateToEcal steering parameter.
Definition: TOFEstimators.h:63
double _timeResolution
Stores TimeResolution steering parameter.
Definition: TOFEstimators.h:71
marlin::Processor * newProcessor()
Method required by the Marlin to register processor in the global scope.
Definition: TOFEstimators.h:37
int _maxEcalLayer
Stores MaxEcalLayer steering parameter.
Definition: TOFEstimators.h:75
TOFEstimators()
Default constructor.
void processEvent(EVENT::LCEvent *evt)
Called for every event - the working horse.
int _nEvent
Stores current event number.
Definition: TOFEstimators.h:79