BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
CbmTofTrack.h
Go to the documentation of this file.
1/** @file CbmTofTrack.h
2 ** @author Volker Friese <v.friese@gsi.de>
3 ** @date 17.10.2013
4 **/
5
6#ifndef CBMTOFTRACK_H
7#define CBMTOFTRACK_H 1
8
9#include "CbmTofHit.h"
10#include "FairTrackParam.h"
11#include "TMath.h"
12#include "TObject.h"
13
14/** @class CbmTofTrack
15 ** @brief Provides information on attaching a TofHit to a GlobalTrack
16 ** @author V.Friese <v.friese@gsi.de>
17 **/
18class CbmTofTrack : public TObject
19{
20
21 public:
22 /** Constructor **/
24
25 /** Constructor with parameters
26 ** @param trackIndex Array index of global track
27 ** @param hitIndex Array index of TOF hit
28 ** @param trackLength Track length from primary vertex to TOF
29 ** @param trackPar Parameters of track at TOF
30 ** @param pidHypo PID hypothesis for track extrapolation
31 **/
32 CbmTofTrack(Int_t trackIndex, Int_t hitIndex, Double_t trackLength, const FairTrackParam& trackPar, Int_t pidHypo)
33 : TObject()
34 , fGlbTrack(trackIndex)
35 , fTofHit(hitIndex)
36 , fTrackLength(trackLength)
37 , fTrackPar(trackPar)
38 , fPidHypo(pidHypo)
39 , fDistance(0.)
40 {}
41
42 /** Destructor **/
43 virtual ~CbmTofTrack();
44
45 /** PID hypothesis for track extrapolation to TOF **/
46 Int_t GetPidHypo() const { return fPidHypo; }
47
48 /** Index of TOF hit **/
49 Int_t GetTofHitIndex() const { return fTofHit; }
50
51 /** Error of track x coordinate at TOF **/
52 Double_t GetTrackDx() const { return TMath::Sqrt(fTrackPar.GetCovariance(1, 1)); }
53
54 /** Error of track x coordinate at TOF **/
55 Double_t GetTrackDy() const { return TMath::Sqrt(fTrackPar.GetCovariance(2, 2)); }
56
57 /** Index of global track **/
58 Int_t GetTrackIndex() const { return fGlbTrack; }
59
60 /** Track length from primary vertex to TOF **/
62
63 /** Track parameters at TOF **/
64 const FairTrackParam* GetTrackParameter() const { return &fTrackPar; }
65
66 /** Track x position at TOF **/
67 Double_t GetTrackX() const { return fTrackPar.GetX(); }
68
69 /** Track y position at TOF **/
70 Double_t GetTrackY() const { return fTrackPar.GetY(); }
71
72 /** Normalized distance from hit to track **/
73 Double_t GetDistance() const { return fDistance; }
74
75 /** Set track index **/
76 void SetTrackIndex(Int_t trackIndex) { fGlbTrack = trackIndex; }
77
78 /** Set TOF hit index **/
79 void SetTofHitIndex(Int_t tofHitIndex) { fTofHit = tofHitIndex; }
80
81 /** Set track parameter **/
82 void SetTrackParameter(const FairTrackParam* par) { fTrackPar = *par; }
83
84 /** Set track length **/
85 void SetTrackLength(Double32_t trackLength) { fTrackLength = trackLength; }
86
87 /** Set PID hypothesis for track extrapolation to TOF **/
88 void SetPidHypo(Int_t pid) { fPidHypo = pid; }
89
90 /** Set normalized distance from hit to track **/
91 void SetDistance(Double_t distance) { fDistance = distance; }
92
93 private:
94 Int_t fGlbTrack; ///< Index of global track
95 Int_t fTofHit; ///< Index of TofHit
96 Double32_t fTrackLength; ///< Track length from primary vertex to TOF [cm]
97 FairTrackParam fTrackPar; ///< Track parameters at z of TofHit
98 Int_t fPidHypo; ///< PID hypothesis used for track extrapolation
99 Double32_t fDistance; ///< Normalized distance from hit to track
100
102};
103
104#endif /* CBMTOFTRACK_H */
int Int_t
double Double32_t
double Double_t
#define ClassDef(name, id)
Double_t GetTrackX() const
Track x position at TOF.
Definition CbmTofTrack.h:67
Int_t fGlbTrack
Index of global track.
Definition CbmTofTrack.h:94
Double32_t fDistance
Normalized distance from hit to track.
Definition CbmTofTrack.h:99
CbmTofTrack()
Constructor.
virtual ~CbmTofTrack()
Destructor.
void SetDistance(Double_t distance)
Set normalized distance from hit to track.
Definition CbmTofTrack.h:91
Double_t GetDistance() const
Normalized distance from hit to track.
Definition CbmTofTrack.h:73
CbmTofTrack(Int_t trackIndex, Int_t hitIndex, Double_t trackLength, const FairTrackParam &trackPar, Int_t pidHypo)
Constructor with parameters.
Definition CbmTofTrack.h:32
Double_t GetTrackDx() const
Error of track x coordinate at TOF.
Definition CbmTofTrack.h:52
Double32_t fTrackLength
Track length from primary vertex to TOF [cm].
Definition CbmTofTrack.h:96
Int_t fTofHit
Index of TofHit.
Definition CbmTofTrack.h:95
Int_t fPidHypo
PID hypothesis used for track extrapolation.
Definition CbmTofTrack.h:98
void SetTrackParameter(const FairTrackParam *par)
Set track parameter.
Definition CbmTofTrack.h:82
Double_t GetTrackY() const
Track y position at TOF.
Definition CbmTofTrack.h:70
void SetTrackLength(Double32_t trackLength)
Set track length.
Definition CbmTofTrack.h:85
Int_t GetTrackIndex() const
Index of global track.
Definition CbmTofTrack.h:58
Double_t GetTrackLength() const
Track length from primary vertex to TOF.
Definition CbmTofTrack.h:61
const FairTrackParam * GetTrackParameter() const
Track parameters at TOF.
Definition CbmTofTrack.h:64
Double_t GetTrackDy() const
Error of track x coordinate at TOF.
Definition CbmTofTrack.h:55
void SetTofHitIndex(Int_t tofHitIndex)
Set TOF hit index.
Definition CbmTofTrack.h:79
FairTrackParam fTrackPar
Track parameters at z of TofHit.
Definition CbmTofTrack.h:97
Int_t GetTofHitIndex() const
Index of TOF hit.
Definition CbmTofTrack.h:49
Int_t GetPidHypo() const
PID hypothesis for track extrapolation to TOF.
Definition CbmTofTrack.h:46
void SetPidHypo(Int_t pid)
Set PID hypothesis for track extrapolation to TOF.
Definition CbmTofTrack.h:88
void SetTrackIndex(Int_t trackIndex)
Set track index.
Definition CbmTofTrack.h:76
Double_t Sqrt(Double_t x)