ndhep  0.1.1
 All Classes Functions Variables Pages
Event.hh
1 #pragma once
2 
3 #include <TObject.h>
4 #include <TClonesArray.h>
5 #include "Track.hh"
6 
7 namespace NDHep
8 {
15 
16 class Event : public TObject
17 {
18 
19 public:
20  Event();
21  Event(Long64_t id, Double_t vx = 0.0, Double_t vy = 0.0,
22  Double_t vz = 0.0);
23  virtual ~Event();
24 
66 
67  Long64_t GetID() const { return fID; }
68  Double_t GetVx() const { return fVx; }
69  Double_t GetVy() const { return fVy; }
70  Double_t GetVz() const { return fVz; }
71 
72  void SetID(Long64_t id) { fID = id; }
73  void SetVx(Double_t vx) { fVx = vx; }
74  void SetVy(Double_t vy) { fVy = vy; }
75  void SetVz(Double_t vz) { fVz = vz; }
76 
77  Long64_t GetNTrack() const { return fNTracks; }
78  Track *GetTrack(Long64_t id) { return (Track *)fTracks->At(id); }
79  Track *AddTrack();
80 
81  virtual void Print(Option_t *option = "") const;
82  virtual void Clear(Option_t *option = "");
83 
84  void BuildVertexRandom();
85 
86 private:
87  Long64_t fID;
88  Double_t fVx;
89  Double_t fVy;
90  Double_t fVz;
91  Int_t fNTracks;
92 
94  TClonesArray *fTracks; //->
95 
96  // TODO
98  Event(const Event &);
99  Event &operator=(const Event &);
100 
102  ClassDef(Event, 1);
104 };
105 
106 } // namespace NDHep
Long64_t GetID() const
Event ID.
Definition: Event.hh:67
Event & operator=(const Event &)
not implemented
Int_t fNTracks
Number of tracks.
Definition: Event.hh:91
Double_t GetVz() const
Vertex z component.
Definition: Event.hh:70
void BuildVertexRandom()
Definition: Event.cc:86
Long64_t GetNTrack() const
Definition: Event.hh:77
TClonesArray * fTracks
Array with all tracks.
Definition: Event.hh:94
void SetVz(Double_t vz)
Definition: Event.hh:75
Double_t GetVx() const
Vertex x component.
Definition: Event.hh:68
Double_t fVx
Vertex x.
Definition: Event.hh:88
Event object.
Definition: Event.hh:16
void SetID(Long64_t id)
Definition: Event.hh:72
void SetVy(Double_t vy)
Definition: Event.hh:74
Double_t GetVy() const
Vertex y component.
Definition: Event.hh:69
Track object.
Definition: Track.hh:14
Long64_t fID
ID of event.
Definition: Event.hh:87
Track * AddTrack()
Definition: Event.cc:41
virtual ~Event()
Definition: Event.cc:31
Track * GetTrack(Long64_t id)
Definition: Event.hh:78
void SetVx(Double_t vx)
Definition: Event.hh:73
Double_t fVz
Vertex z.
Definition: Event.hh:90
virtual void Print(Option_t *option="") const
Definition: Event.cc:48
Double_t fVy
Vertex y.
Definition: Event.hh:89
virtual void Clear(Option_t *option="")
Definition: Event.cc:72