Logo ROOT  
Reference Guide
JetEvent.h
Go to the documentation of this file.
1 #ifndef ROOT_JetEvent
2 #define ROOT_JetEvent
3 
4 //////////////////////////////////////////////////////////////////////////
5 // //
6 // JetEvent //
7 // //
8 // Description of the event and track parameters //
9 // //
10 //////////////////////////////////////////////////////////////////////////
11 
12 #include "TClonesArray.h"
13 #include "TRefArray.h"
14 #include "TVector3.h"
15 
16 class Hit : public TObject {
17 
18 public:
19  Float_t fX; //X of hit
20  Float_t fY; //Y of hit
21  Float_t fZ; //Z of hit
22 
23 public:
24  Hit() { }
25  virtual ~Hit() { }
26 
27  ClassDef(Hit,1) //A track hit
28 };
29 
30 class Track : public TObject {
31 
32 public:
33  Float_t fPx; //X component of the momentum
34  Float_t fPy; //Y component of the momentum
35  Float_t fPz; //Z component of the momentum
36  Int_t fNhit; //Number of hits for this track
37  TRefArray fHits; //List of Hits for this track
38 
39 public:
40  Track() { }
41  virtual ~Track() { }
42  Int_t GetNhit() const { return fNhit; }
43  TRefArray &GetHits() {return fHits; }
44 
45  ClassDef(Track,1) //A track segment
46 };
47 
48 
49 class Jet : public TObject {
50 
51 public:
52  Double_t fPt; //Pt of jet
53  Double_t fPhi; //Phi of jet
54  TRefArray fTracks; //List of tracks in the jet
55 
56 public:
57  Jet() { }
58  virtual ~Jet(){ }
59  TRefArray &GetTracks() {return fTracks; }
60 
61  ClassDef(Jet,1) //Jet class
62 };
63 
64 class JetEvent : public TObject {
65 
66 private:
67  TVector3 fVertex; //vertex coordinates
68  Int_t fNjet; //Number of jets
69  Int_t fNtrack; //Number of tracks
70  Int_t fNhitA; //Number of hist in detector A
71  Int_t fNhitB; //Number of hist in detector B
72  TClonesArray *fJets; //->array with all jets
73  TClonesArray *fTracks; //->array with all tracks
74  TClonesArray *fHitsA; //->array of hits in detector A
75  TClonesArray *fHitsB; //->array of hits in detector B
76 
81 
82 public:
83  JetEvent();
84  virtual ~JetEvent();
85  void Build(Int_t jetm=3, Int_t trackm=10, Int_t hitam=100, Int_t hitbm=10);
86  void Clear(Option_t *option ="");
87  void Reset(Option_t *option ="");
88  Int_t GetNjet() const { return fNjet; }
89  Int_t GetNtrack() const { return fNtrack; }
90  Int_t GetNhitA() const { return fNhitA; }
91  Int_t GetNhitB() const { return fNhitB; }
92  Jet *AddJet();
93  Track *AddTrack();
94  Hit *AddHitA();
95  Hit *AddHitB();
96  TClonesArray *GetJets() const { return fJets; }
97 
98  ClassDef(JetEvent,1) //Event structure
99 };
100 
101 #endif
102 
103 
104 
105 
106 
107 
108 
109 
110 
111 
112 
113 
114 
115 
116 
117 
118 
119 
120 
121 
TVector3
TVector3 is a general three vector class, which can be used for the description of different vectors ...
Definition: TVector3.h:22
TRefArray.h
JetEvent::fHitsA
TClonesArray * fHitsA
Definition: JetEvent.h:74
JetEvent::fgTracks
static TClonesArray * fgTracks
Definition: JetEvent.h:78
Track::fHits
TRefArray fHits
Definition: JetEvent.h:37
Option_t
const char Option_t
Definition: RtypesCore.h:66
JetEvent::AddJet
Jet * AddJet()
Add a new Jet to the list of tracks for this event.
Definition: JetEvent.cxx:102
JetEvent::fVertex
TVector3 fVertex
Definition: JetEvent.h:67
Track::fPx
Float_t fPx
Definition: JetEvent.h:33
JetEvent::GetNjet
Int_t GetNjet() const
Definition: JetEvent.h:88
JetEvent::fJets
TClonesArray * fJets
Definition: JetEvent.h:72
Float_t
float Float_t
Definition: RtypesCore.h:57
Track
Definition: JetEvent.h:30
JetEvent::fgJets
static TClonesArray * fgJets
Definition: JetEvent.h:77
JetEvent::Build
void Build(Int_t jetm=3, Int_t trackm=10, Int_t hitam=100, Int_t hitbm=10)
Build one event.
Definition: JetEvent.cxx:46
TRefArray
An array of references to TObjects.
Definition: TRefArray.h:39
JetEvent::fNhitB
Int_t fNhitB
Definition: JetEvent.h:71
JetEvent::fTracks
TClonesArray * fTracks
Definition: JetEvent.h:73
JetEvent::fNhitA
Int_t fNhitA
Definition: JetEvent.h:70
TClonesArray.h
Track::fNhit
Int_t fNhit
Definition: JetEvent.h:36
TVector3.h
JetEvent::GetNhitB
Int_t GetNhitB() const
Definition: JetEvent.h:91
Hit
Definition: JetEvent.h:16
Track::GetNhit
Int_t GetNhit() const
Definition: JetEvent.h:42
JetEvent::fgHitsA
static TClonesArray * fgHitsA
Definition: JetEvent.h:79
Hit::Hit
Hit()
Definition: JetEvent.h:24
Hit::fY
Float_t fY
Definition: JetEvent.h:20
JetEvent::AddTrack
Track * AddTrack()
Add a new track to the list of tracks for this event.
Definition: JetEvent.cxx:113
JetEvent::JetEvent
JetEvent()
Create a JetEvent object.
Definition: JetEvent.cxx:24
JetEvent::fgHitsB
static TClonesArray * fgHitsB
Definition: JetEvent.h:80
JetEvent::Clear
void Clear(Option_t *option="")
Definition: JetEvent.cxx:143
Track::~Track
virtual ~Track()
Definition: JetEvent.h:41
Hit::fX
Float_t fX
Definition: JetEvent.h:19
Track::fPy
Float_t fPy
Definition: JetEvent.h:34
JetEvent::GetNhitA
Int_t GetNhitA() const
Definition: JetEvent.h:90
JetEvent::fHitsB
TClonesArray * fHitsB
Definition: JetEvent.h:75
JetEvent::AddHitB
Hit * AddHitB()
Add a new hit to the list of hits in detector B.
Definition: JetEvent.cxx:134
JetEvent::AddHitA
Hit * AddHitA()
Add a new hit to the list of hits in detector A.
Definition: JetEvent.cxx:124
Track::fPz
Float_t fPz
Definition: JetEvent.h:35
JetEvent::GetJets
TClonesArray * GetJets() const
Definition: JetEvent.h:96
JetEvent
Definition: JetEvent.h:64
Double_t
double Double_t
Definition: RtypesCore.h:59
Hit::~Hit
virtual ~Hit()
Definition: JetEvent.h:25
JetEvent::fNjet
Int_t fNjet
Definition: JetEvent.h:68
Track::Track
Track()
Definition: JetEvent.h:40
TObject
Mother of all ROOT objects.
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
JetEvent::~JetEvent
virtual ~JetEvent()
Definition: JetEvent.cxx:38
JetEvent::GetNtrack
Int_t GetNtrack() const
Definition: JetEvent.h:89
JetEvent::fNtrack
Int_t fNtrack
Definition: JetEvent.h:69
Hit::fZ
Float_t fZ
Definition: JetEvent.h:21
TClonesArray
An array of clone (identical) objects.
Definition: TClonesArray.h:29
JetEvent::Reset
void Reset(Option_t *option="")
Static function to reset all static objects for this event.
Definition: JetEvent.cxx:154
int
Track::GetHits
TRefArray & GetHits()
Definition: JetEvent.h:43