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
16class Hit : public TObject {
17
18public:
19 Float_t fX; //X of hit
20 Float_t fY; //Y of hit
21 Float_t fZ; //Z of hit
22
23public:
24 Hit() { }
25 virtual ~Hit() { }
26
27 ClassDef(Hit,1) //A track hit
28};
29
30class Track : public TObject {
31
32public:
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
39public:
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
49class Jet : public TObject {
50
51public:
52 Double_t fPt; //Pt of jet
53 Double_t fPhi; //Phi of jet
54 TRefArray fTracks; //List of tracks in the jet
55
56public:
57 Jet() { }
58 virtual ~Jet(){ }
60
61 ClassDef(Jet,1) //Jet class
62};
63
64class JetEvent : public TObject {
65
66private:
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
82public:
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
double Double_t
Definition: RtypesCore.h:57
float Float_t
Definition: RtypesCore.h:55
const char Option_t
Definition: RtypesCore.h:64
#define ClassDef(name, id)
Definition: Rtypes.h:322
Definition: JetEvent.h:16
Float_t fZ
Definition: JetEvent.h:21
virtual ~Hit()
Definition: JetEvent.h:25
Float_t fX
Definition: JetEvent.h:19
Float_t fY
Definition: JetEvent.h:20
Hit()
Definition: JetEvent.h:24
Int_t fNjet
Definition: JetEvent.h:68
TClonesArray * GetJets() const
Definition: JetEvent.h:96
Int_t GetNtrack() const
Definition: JetEvent.h:89
TClonesArray * fHitsB
Definition: JetEvent.h:75
static TClonesArray * fgTracks
Definition: JetEvent.h:78
Int_t GetNjet() const
Definition: JetEvent.h:88
TClonesArray * fJets
Definition: JetEvent.h:72
Int_t fNhitA
Definition: JetEvent.h:70
Jet * AddJet()
Add a new Jet to the list of tracks for this event.
Definition: JetEvent.cxx:102
Hit * AddHitB()
Add a new hit to the list of hits in detector B.
Definition: JetEvent.cxx:134
virtual ~JetEvent()
Definition: JetEvent.cxx:38
static TClonesArray * fgJets
Definition: JetEvent.h:77
static TClonesArray * fgHitsB
Definition: JetEvent.h:80
Int_t fNhitB
Definition: JetEvent.h:71
Int_t fNtrack
Definition: JetEvent.h:69
JetEvent()
Create a JetEvent object.
Definition: JetEvent.cxx:24
Hit * AddHitA()
Add a new hit to the list of hits in detector A.
Definition: JetEvent.cxx:124
static TClonesArray * fgHitsA
Definition: JetEvent.h:79
TClonesArray * fHitsA
Definition: JetEvent.h:74
TClonesArray * fTracks
Definition: JetEvent.h:73
Int_t GetNhitB() const
Definition: JetEvent.h:91
Int_t GetNhitA() const
Definition: JetEvent.h:90
Track * AddTrack()
Add a new track to the list of tracks for this event.
Definition: JetEvent.cxx:113
TVector3 fVertex
Definition: JetEvent.h:67
void Reset(Option_t *option="")
Static function to reset all static objects for this event.
Definition: JetEvent.cxx:154
void Clear(Option_t *option="")
Definition: JetEvent.cxx:143
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
Definition: JetEvent.h:49
virtual ~Jet()
Definition: JetEvent.h:58
Jet()
Definition: JetEvent.h:57
TRefArray fTracks
Definition: JetEvent.h:54
Double_t fPhi
Definition: JetEvent.h:53
Double_t fPt
Definition: JetEvent.h:52
TRefArray & GetTracks()
Definition: JetEvent.h:59
An array of clone (identical) objects.
Definition: TClonesArray.h:32
Mother of all ROOT objects.
Definition: TObject.h:37
An array of references to TObjects.
Definition: TRefArray.h:39
TVector3 is a general three vector class, which can be used for the description of different vectors ...
Definition: TVector3.h:22
Definition: JetEvent.h:30
Track()
Definition: JetEvent.h:40
virtual ~Track()
Definition: JetEvent.h:41
Float_t fPx
Definition: JetEvent.h:33
TRefArray & GetHits()
Definition: JetEvent.h:43
Int_t GetNhit() const
Definition: JetEvent.h:42
Float_t fPy
Definition: JetEvent.h:34
Float_t fPz
Definition: JetEvent.h:35
Int_t fNhit
Definition: JetEvent.h:36
TRefArray fHits
Definition: JetEvent.h:37