CbmRoot
Loading...
Searching...
No Matches
CbmTrack.h
Go to the documentation of this file.
1/* Copyright (C) 2007-2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Florian Uhlig, Volker Friese [committer] */
4
5// -------------------------------------------------------------------------
6// ----- CbmTrack header file -----
7// ----- Created 29/11/07 by V. Friese -----
8// ----- Modified 26/05/09 by A. Lebedev -----
9// -------------------------------------------------------------------------
10
20#ifndef CBMTRACK_H_
21#define CBMTRACK_H_ 1
22
23#include "CbmHit.h" // for HitType
24
25#include <FairTrackParam.h> // for FairTrackParam
26
27#include <Rtypes.h> // for THashConsistencyHolder, ClassDef
28#include <RtypesCore.h> // for Double32_t
29#include <TObject.h> // for TObject
30
31#include <cstdint>
32#include <string> // for string
33#include <vector> // for vector
34
35class CbmMatch;
36
37class CbmTrack : public TObject {
38public:
40 CbmTrack();
41
43 virtual ~CbmTrack();
44
46 CbmTrack(const CbmTrack&);
47
50
55 void AddHit(int32_t index, HitType type);
56
58 virtual int32_t GetNofHits() const { return fHitIndex.size(); }
59 int32_t GetHitIndex(int32_t iHit) const { return fHitIndex[iHit]; }
60 HitType GetHitType(int32_t iHit) const { return fHitType[iHit]; }
61 int32_t GetPidHypo() const { return fPidHypo; }
62 int32_t GetFlag() const { return fFlag; }
63 double GetChiSq() const { return fChiSq; }
64 int32_t GetNDF() const { return fNDF; }
65 double GetChiSqTime() const { return fChiSqTime; }
66 int32_t GetNdfTime() const { return fNdfTime; }
67 int32_t GetPreviousTrackId() const { return fPreviousTrackId; }
68 const FairTrackParam* GetParamFirst() const { return &fParamFirst; }
69 const FairTrackParam* GetParamLast() const { return &fParamLast; }
70 CbmMatch* GetMatch() const { return fMatch; }
71 double GetStartTime() const { return fStartTime; }
72 double GetStartTimeError() const { return fStartTimeError; }
73 double GetFirstHitTime() const { return fFirstHitTime; }
74 double GetFirstHitTimeError() const { return fFirstHitTimeError; }
75 double GetLastHitTime() const { return fLastHitTime; }
76 double GetLastHitTimeError() const { return fLastHitTimeError; }
77
79 void SetPidHypo(int32_t pid) { fPidHypo = pid; }
80 void SetFlag(int32_t flag) { fFlag = flag; }
81 void SetChiSq(double chiSq) { fChiSq = chiSq; }
82 void SetNDF(int32_t ndf) { fNDF = ndf; }
83 void SetChiSqTime(double chiSq) { fChiSqTime = chiSq; }
84 void SetNdfTime(int32_t ndf) { fNdfTime = ndf; }
85 void SetPreviousTrackId(int32_t previousTrackId) { fPreviousTrackId = previousTrackId; }
86 void SetParamFirst(const FairTrackParam* par) { fParamFirst = *par; }
87 void SetParamLast(const FairTrackParam* par) { fParamLast = *par; }
88 void SetParamFirst(const FairTrackParam& par) { fParamFirst = par; }
89 void SetParamLast(const FairTrackParam& par) { fParamLast = par; }
90 void SetMatch(CbmMatch* match);
91 void SetStartTime(double time) { fStartTime = time; }
92 void SetStartTimeError(double error) { fStartTimeError = error; }
93 void SetFirstHitTime(double time) { fFirstHitTime = time; }
94 void SetFirstHitTimeError(double error) { fFirstHitTimeError = error; }
95 void SetLastHitTime(double time) { fLastHitTime = time; }
96 void SetLastHitTimeError(double error) { fLastHitTimeError = error; }
97
98 virtual std::string ToString() const;
99
100protected:
102 std::vector<int32_t> fHitIndex;
103
105 std::vector<HitType> fHitType;
106
108 int32_t fPidHypo;
109
111 FairTrackParam fParamFirst;
112 FairTrackParam fParamLast;
113
117
121
125
127 int32_t fFlag;
128
130 Double32_t fChiSq;
131 int32_t fNDF;
132
135
138
140 Double32_t fChiSqTime {0.};
141 int32_t fNdfTime {0};
142
144};
145
146#endif
HitType
Definition CbmHit.h:21
void SetLastHitTimeError(double error)
Definition CbmTrack.h:96
int32_t fNDF
Definition CbmTrack.h:131
int32_t GetNdfTime() const
Definition CbmTrack.h:66
void SetStartTimeError(double error)
Definition CbmTrack.h:92
double fFirstHitTime
Definition CbmTrack.h:119
double fLastHitTimeError
Definition CbmTrack.h:124
void SetMatch(CbmMatch *match)
Definition CbmTrack.cxx:103
CbmMatch * GetMatch() const
Definition CbmTrack.h:70
double GetFirstHitTime() const
Definition CbmTrack.h:73
double GetLastHitTime() const
Definition CbmTrack.h:75
void SetParamFirst(const FairTrackParam &par)
Definition CbmTrack.h:88
virtual ~CbmTrack()
Definition CbmTrack.cxx:92
int32_t fPreviousTrackId
Definition CbmTrack.h:134
void SetNdfTime(int32_t ndf)
Definition CbmTrack.h:84
virtual std::string ToString() const
Definition CbmTrack.cxx:109
double GetFirstHitTimeError() const
Definition CbmTrack.h:74
CbmTrack & operator=(const CbmTrack &)
Definition CbmTrack.cxx:67
int32_t GetPidHypo() const
Definition CbmTrack.h:61
Double32_t fChiSqTime
Definition CbmTrack.h:140
void SetLastHitTime(double time)
Definition CbmTrack.h:95
void AddHit(int32_t index, HitType type)
Definition CbmTrack.cxx:97
double fFirstHitTimeError
Definition CbmTrack.h:120
ClassDef(CbmTrack, 6)
Double32_t fChiSq
Definition CbmTrack.h:130
int32_t GetFlag() const
Definition CbmTrack.h:62
void SetFirstHitTime(double time)
Definition CbmTrack.h:93
int32_t fPidHypo
Definition CbmTrack.h:108
void SetChiSqTime(double chiSq)
Definition CbmTrack.h:83
const FairTrackParam * GetParamLast() const
Definition CbmTrack.h:69
double GetStartTime() const
Definition CbmTrack.h:71
double GetLastHitTimeError() const
Definition CbmTrack.h:76
int32_t GetNDF() const
Definition CbmTrack.h:64
void SetFirstHitTimeError(double error)
Definition CbmTrack.h:94
double GetStartTimeError() const
Definition CbmTrack.h:72
double fStartTimeError
Definition CbmTrack.h:116
void SetPidHypo(int32_t pid)
Definition CbmTrack.h:79
double fLastHitTime
Definition CbmTrack.h:123
FairTrackParam fParamLast
Definition CbmTrack.h:112
void SetFlag(int32_t flag)
Definition CbmTrack.h:80
std::vector< int32_t > fHitIndex
Definition CbmTrack.h:102
virtual int32_t GetNofHits() const
Definition CbmTrack.h:58
int32_t fNdfTime
Definition CbmTrack.h:141
void SetParamFirst(const FairTrackParam *par)
Definition CbmTrack.h:86
int32_t GetPreviousTrackId() const
Definition CbmTrack.h:67
double GetChiSqTime() const
Definition CbmTrack.h:65
const FairTrackParam * GetParamFirst() const
Definition CbmTrack.h:68
void SetChiSq(double chiSq)
Definition CbmTrack.h:81
int32_t GetHitIndex(int32_t iHit) const
Definition CbmTrack.h:59
double fStartTime
Definition CbmTrack.h:115
HitType GetHitType(int32_t iHit) const
Definition CbmTrack.h:60
CbmMatch * fMatch
Definition CbmTrack.h:137
FairTrackParam fParamFirst
Definition CbmTrack.h:111
void SetPreviousTrackId(int32_t previousTrackId)
Definition CbmTrack.h:85
void SetParamLast(const FairTrackParam &par)
Definition CbmTrack.h:89
std::vector< HitType > fHitType
Definition CbmTrack.h:105
int32_t fFlag
Definition CbmTrack.h:127
void SetStartTime(double time)
Definition CbmTrack.h:91
void SetNDF(int32_t ndf)
Definition CbmTrack.h:82
void SetParamLast(const FairTrackParam *par)
Definition CbmTrack.h:87
double GetChiSq() const
Definition CbmTrack.h:63