FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
NewDetectorPoint.h
Go to the documentation of this file.
1 /********************************************************************************
2  * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
8 #ifndef NEWDETECTORPOINT_H
9 #define NEWDETECTORPOINT_H 1
10 
11 #include <TVector3.h>
12 
13 class NewDetectorPoint
14 {
15 
16  public:
19 
29  NewDetectorPoint(Int_t trackID,
30  Int_t detID,
31  TVector3 pos,
32  TVector3 mom,
33  Double_t tof,
34  Double_t length,
35  Double_t eLoss);
36 
38  virtual ~NewDetectorPoint();
39 
41  virtual void Print(const Option_t* opt) const;
42 
44  uint32_t GetEventID() const { return fEventId; }
45  int GetTrackID() const { return fTrackID; }
46  double GetPx() const { return fPx; }
47  double GetPy() const { return fPy; }
48  double GetPz() const { return fPz; }
49  double GetTime() const { return fTime; }
50  double GetLength() const { return fLength; }
51  double GetEnergyLoss() const { return fELoss; }
52  void Momentum(TVector3& mom) const { mom.SetXYZ(fPx, fPy, fPz); }
53  int GetDetectorID() const { return fDetectorID; };
54  double GetX() const { return fX; };
55  double GetY() const { return fY; };
56  double GetZ() const { return fZ; };
57  void Position(TVector3& pos) const { pos.SetXYZ(fX, fY, fZ); }
58 
60  void SetEventID(uint32_t eventId) { fEventId = eventId; }
61  virtual void SetTrackID(int id) { fTrackID = id; }
62  void SetTime(double time) { fTime = time; }
63  void SetLength(double length) { fLength = length; }
64  void SetEnergyLoss(double eLoss) { fELoss = eLoss; }
65  void SetMomentum(const TVector3& mom);
66  void SetDetectorID(int detID) { fDetectorID = detID; }
67  void SetX(double x) { fX = x; }
68  void SetY(double y) { fY = y; }
69  void SetZ(double z) { fZ = z; }
70  void SetXYZ(double x, double y, double z);
71  void SetPosition(const TVector3& pos);
72 
73  protected:
74  int fTrackID;
76  double fPx, fPy, fPz;
77  double fTime;
78  double fLength;
79  double fELoss;
81  double fX, fY, fZ;
82 
83  private:
85  NewDetectorPoint(const NewDetectorPoint& point);
86  NewDetectorPoint operator=(const NewDetectorPoint& point);
87 
88  ClassDef(NewDetectorPoint, 1);
89 };
90 
91 inline void NewDetectorPoint::SetMomentum(const TVector3& mom)
92 {
93  fPx = mom.Px();
94  fPy = mom.Py();
95  fPz = mom.Pz();
96 }
97 
98 inline void NewDetectorPoint::SetXYZ(Double_t x, Double_t y, Double_t z)
99 {
100  fX = x;
101  fY = y;
102  fZ = z;
103 }
104 
105 inline void NewDetectorPoint::SetPosition(const TVector3& pos)
106 {
107  fX = pos.X();
108  fY = pos.Y();
109  fZ = pos.Z();
110 }
111 
112 #endif
double GetEnergyLoss() const
double GetPz() const
int GetTrackID() const
event identifier
double GetPy() const
int GetDetectorID() const
uint32_t fEventId
MC Event id.
void SetPosition(const TVector3 &pos)
virtual void SetTrackID(int id)
double fELoss
Energy loss at this point [GeV].
void SetEventID(uint32_t eventId)
void SetY(double y)
virtual void Print(const Option_t *opt) const
void Position(TVector3 &pos) const
void SetEnergyLoss(double eLoss)
void SetZ(double z)
virtual ~NewDetectorPoint()
void SetLength(double length)
double GetPx() const
int fTrackID
Track index.
double GetLength() const
uint32_t GetEventID() const
void Momentum(TVector3 &mom) const
double fTime
Time since event start [ns].
double GetY() const
double fPz
Momentum components [GeV].
double GetZ() const
void SetX(double x)
double GetX() const
double fZ
Position of hit [cm].
void SetXYZ(double x, double y, double z)
unsigned int uint32_t
void SetDetectorID(int detID)
double fLength
Track length since creation [cm].
double GetTime() const
void SetMomentum(const TVector3 &mom)
int fDetectorID
Detector unique identifier.
void SetTime(double time)