CbmRoot
CbmMCEvent.h
Go to the documentation of this file.
1 #
9 #ifndef CBMMCEVENT_H
10 #define CBMMCEVENT_H 1
11 
12 #include <Rtypes.h>
13 #include <RtypesCore.h>
14 #include <TNamed.h>
15 #include <TVector3.h>
16 
17 
18 class CbmMCEvent : public TNamed {
19 
20 public:
22  CbmMCEvent();
23 
24 
35  CbmMCEvent(UInt_t runId,
36  Int_t iEvent,
37  Double_t x,
38  Double_t y,
39  Double_t z,
40  Double_t t,
41  Double_t b,
42  Double_t phi,
43  Int_t nPrim);
44 
45 
47  CbmMCEvent(UInt_t runId);
48 
49 
51  virtual ~CbmMCEvent();
52 
53 
55  UInt_t GetRunID() const { return fRunId; } // run identifier
56  Int_t GetEventID() const { return fEventId; } // event identifier
57  Double_t GetX() const { return fX; } // vertex x [cm]
58  Double_t GetY() const { return fY; } // vertex y [cm]
59  Double_t GetZ() const { return fZ; } // vertex z [cm]
60  Double_t GetT() const { return fT; } // event time [ns]
61  Double_t GetB() const { return fB; } // impact parameter [fm]
62  Double_t GetPhi() const { return fPhi; } // event plane angle [rad]
63  Int_t GetNPrim() const { return fNPrim; } // number of input tracks
64  Bool_t IsSet() const { return fIsSet; } // Flag
65  void GetVertex(TVector3& vertex) { vertex.SetXYZ(fX, fY, fZ); }
66 
67 
69  void SetEventID(Int_t eventId) { fEventId = eventId; }
70  void SetTime(Double_t t) { fT = t; }
71  void SetB(Double_t b) { fB = b; }
72  void SetPhi(Double_t phi) { fPhi = phi; }
73  void SetNPrim(Int_t nPrim) { fNPrim = nPrim; }
74  void MarkSet(Bool_t isSet) { fIsSet = isSet; }
75  void SetVertex(Double_t x, Double_t y, Double_t z);
76  void SetVertex(const TVector3& vertex);
77 
78 
80  void Reset();
81 
82 
83 private:
84  UInt_t fRunId; // Run identifier
85  UInt_t fEventId; // Event identifier
86  Double32_t fX; // Primary vertex x [cm]
87  Double32_t fY; // Primary vertex y [cm]
88  Double32_t fZ; // Primary vertex z [cm]
89  Double32_t fT; // Event time [s]
90  Double32_t fB; // Impact parameter [fm] (if relevant)
91  Double32_t fPhi; // Event plane angle [rad] (if relevant)
92  Int_t fNPrim; // Number of input tracks
93  Bool_t fIsSet; // Flag whether variables are filled
94 
95 
97 };
98 
99 
100 inline void CbmMCEvent::SetVertex(Double_t x, Double_t y, Double_t z) {
101  fX = x;
102  fY = y;
103  fZ = z;
104 }
105 
106 
107 inline void CbmMCEvent::SetVertex(const TVector3& vertex) {
108  fX = vertex.X();
109  fY = vertex.Y();
110  fZ = vertex.Z();
111 }
112 
113 
114 #endif
CbmMCEvent::GetEventID
Int_t GetEventID() const
Definition: CbmMCEvent.h:56
CbmMCEvent::fZ
Double32_t fZ
Definition: CbmMCEvent.h:88
CbmMCEvent::fX
Double32_t fX
Definition: CbmMCEvent.h:86
CbmMCEvent::CbmMCEvent
CbmMCEvent()
Definition: CbmMCEvent.cxx:13
CbmMCEvent::GetB
Double_t GetB() const
Definition: CbmMCEvent.h:61
CbmMCEvent::GetNPrim
Int_t GetNPrim() const
Definition: CbmMCEvent.h:63
CbmMCEvent::SetB
void SetB(Double_t b)
Definition: CbmMCEvent.h:71
CbmMCEvent::fY
Double32_t fY
Definition: CbmMCEvent.h:87
CbmMCEvent::SetEventID
void SetEventID(Int_t eventId)
Definition: CbmMCEvent.h:69
CbmMCEvent::GetT
Double_t GetT() const
Definition: CbmMCEvent.h:60
CbmMCEvent::GetZ
Double_t GetZ() const
Definition: CbmMCEvent.h:59
CbmMCEvent::~CbmMCEvent
virtual ~CbmMCEvent()
Definition: CbmMCEvent.cxx:75
CbmMCEvent::SetPhi
void SetPhi(Double_t phi)
Definition: CbmMCEvent.h:72
CbmMCEvent::GetRunID
UInt_t GetRunID() const
Definition: CbmMCEvent.h:55
CbmMCEvent::fPhi
Double32_t fPhi
Definition: CbmMCEvent.h:91
CbmMCEvent::GetY
Double_t GetY() const
Definition: CbmMCEvent.h:58
CbmMCEvent::IsSet
Bool_t IsSet() const
Definition: CbmMCEvent.h:64
CbmMCEvent::MarkSet
void MarkSet(Bool_t isSet)
Definition: CbmMCEvent.h:74
CbmMCEvent::SetVertex
void SetVertex(Double_t x, Double_t y, Double_t z)
Definition: CbmMCEvent.h:100
CbmMCEvent::GetVertex
void GetVertex(TVector3 &vertex)
Definition: CbmMCEvent.h:65
CbmMCEvent::fIsSet
Bool_t fIsSet
Definition: CbmMCEvent.h:93
CbmMCEvent::GetX
Double_t GetX() const
Definition: CbmMCEvent.h:57
CbmMCEvent::fT
Double32_t fT
Definition: CbmMCEvent.h:89
CbmMCEvent::fEventId
UInt_t fEventId
Definition: CbmMCEvent.h:85
x
Double_t x
Definition: CbmMvdSensorDigiToHitTask.cxx:68
CbmMCEvent::Reset
void Reset()
Definition: CbmMCEvent.cxx:80
y
Double_t y
Definition: CbmMvdSensorDigiToHitTask.cxx:68
CbmMCEvent
Definition: CbmMCEvent.h:18
CbmMCEvent::fB
Double32_t fB
Definition: CbmMCEvent.h:90
CbmMCEvent::fNPrim
Int_t fNPrim
Definition: CbmMCEvent.h:92
CbmMCEvent::SetNPrim
void SetNPrim(Int_t nPrim)
Definition: CbmMCEvent.h:73
CbmMCEvent::SetTime
void SetTime(Double_t t)
Definition: CbmMCEvent.h:70
CbmMCEvent::fRunId
UInt_t fRunId
Definition: CbmMCEvent.h:84
CbmMCEvent::ClassDef
ClassDef(CbmMCEvent, 1)
CbmMCEvent::GetPhi
Double_t GetPhi() const
Definition: CbmMCEvent.h:62