ndhep  0.1.0
Track.hh
1 #pragma once
2 
3 #include <TObject.h>
4 namespace NDHep
5 {
6 
13 
14 class Track : public TObject
15 {
16 
17 public:
18  Track();
19  virtual ~Track();
20 
44 
67 
68  Double_t GetPx() const { return fPx; }
69  Double_t GetPy() const { return fPy; }
70  Double_t GetPz() const { return fPz; }
71  Short_t GetCharge() const { return fCharge; }
72  Double_t GetTPCSignal() const { return fTPCSignal; }
73  Double_t GetPIDNsigma(Int_t i) const { return fPIDNsigma[i]; }
74  Bool_t IsPrimary() const { return fIsPrimary; }
75  Double_t GetP() const;
76 
77  void SetPx(Double_t px) { fPx = px; }
78  void SetPy(Double_t py) { fPy = py; }
79  void SetPz(Double_t pz) { fPz = pz; }
80  void SetP(Double_t *p);
81  void SetTPCSignal(Double_t s) { fTPCSignal = s; }
82  void SetCharge(Short_t ch) { fCharge = ch; }
83  void SetPIDNsigma(Int_t i, Double_t s);
84  void SetPrimary(Bool_t isPrimary) { fIsPrimary = isPrimary; }
85 
86  virtual void Print(Option_t *option = "") const;
87  virtual void Clear(Option_t *option = "");
88 
89  void BuildRandom();
90 
91 private:
92  Double_t fPx;
93  Double_t fPy;
94  Double_t fPz;
95  Short_t fCharge;
96  Bool_t fIsPrimary;
97  Double_t fTPCSignal;
98  Double_t fPIDNsigma[5];
99 
100  // TODO
102  Track(const Track &);
103  Track &operator=(const Track &);
104 
106  ClassDef(Track, 1);
108 };
109 } // namespace NDHep
void BuildRandom()
Definition: Track.cc:35
Double_t fPx
Momentum x.
Definition: Track.hh:92
void SetPy(Double_t py)
Definition: Track.hh:78
void SetPIDNsigma(Int_t i, Double_t s)
Definition: Track.cc:101
void SetTPCSignal(Double_t s)
Definition: Track.hh:81
void SetP(Double_t *p)
Definition: Track.cc:82
void SetPx(Double_t px)
!
Definition: Track.hh:77
Double_t GetPz() const
Momentum z component.
Definition: Track.hh:70
Double_t GetP() const
Get momentum value for current track.
Definition: Track.cc:92
Double_t fPy
Momentum y.
Definition: Track.hh:93
void SetCharge(Short_t ch)
Definition: Track.hh:82
Double_t GetPx() const
Momentum x component.
Definition: Track.hh:68
Double_t GetPIDNsigma(Int_t i) const
NSigma of PID type.
Definition: Track.hh:73
Bool_t IsPrimary() const
Is track primary.
Definition: Track.hh:74
Short_t fCharge
Charge.
Definition: Track.hh:95
Track object.
Definition: Track.hh:14
Double_t GetPy() const
Momentum y component.
Definition: Track.hh:69
Bool_t fIsPrimary
Flag if track was defined as primary.
Definition: Track.hh:96
virtual ~Track()
Definition: Track.cc:28
virtual void Print(Option_t *option="") const
Definition: Track.cc:53
Double_t fTPCSignal
TPC signal.
Definition: Track.hh:97
virtual void Clear(Option_t *option="")
Definition: Track.cc:63
void SetPz(Double_t pz)
Definition: Track.hh:79
Short_t GetCharge() const
Charge of track.
Definition: Track.hh:71
void SetPrimary(Bool_t isPrimary)
Definition: Track.hh:84
Double_t fPz
Momentum z.
Definition: Track.hh:94
Double_t GetTPCSignal() const
TPC signal of track.
Definition: Track.hh:72
Track & operator=(const Track &)
not implemented
Double_t fPIDNsigma[5]
PID N Sigma.
Definition: Track.hh:98