Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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 ~Hit() override { }
26
27 ClassDefOverride(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 ~Track() override { }
42 Int_t GetNhit() const { return fNhit; }
43 TRefArray &GetHits() {return fHits; }
44
45 ClassDefOverride(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 ~Jet() override{ }
60
61 ClassDefOverride(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 ~JetEvent() override;
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 ="") override;
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 ClassDefOverride(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
float Float_t
Definition RtypesCore.h:57
const char Option_t
Definition RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition Rtypes.h:346
Option_t Option_t option
Definition JetEvent.h:16
Float_t fZ
Definition JetEvent.h:21
Float_t fX
Definition JetEvent.h:19
Float_t fY
Definition JetEvent.h:20
Hit()
Definition JetEvent.h:24
~Hit() override
Definition JetEvent.h:25
Int_t fNjet
Definition JetEvent.h:68
void Clear(Option_t *option="") override
Definition JetEvent.cxx:143
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
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
~JetEvent() override
Definition JetEvent.cxx:38
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
Jet()
Definition JetEvent.h:57
~Jet() override
Definition JetEvent.h:58
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.
Mother of all ROOT objects.
Definition TObject.h:41
An array of references to TObjects.
Definition TRefArray.h:33
Track()
Definition JetEvent.h:40
~Track() override
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