File: JetEvent.h

package info (click to toggle)
root-system 5.34.00-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 190,532 kB
  • sloc: cpp: 1,401,904; ansic: 217,182; xml: 25,899; sh: 19,215; fortran: 12,570; python: 7,311; makefile: 7,216; ruby: 553; csh: 317; objc: 88; perl: 85; sql: 14; tcl: 4
file content (121 lines) | stat: -rw-r--r-- 3,165 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
#ifndef ROOT_JetEvent
#define ROOT_JetEvent

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// JetEvent                                                             //
//                                                                      //
// Description of the event and track parameters                        //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#include "TClonesArray.h"
#include "TRefArray.h"
#include "TVector3.h"

class Hit : public TObject {

public:
   Float_t      fX;           //X of hit
   Float_t      fY;           //Y of hit
   Float_t      fZ;           //Z of hit

public:
   Hit() { }
   virtual ~Hit() { }
   
   ClassDef(Hit,1)  //A track hit
};

class Track : public TObject {

public:
   Float_t      fPx;           //X component of the momentum
   Float_t      fPy;           //Y component of the momentum
   Float_t      fPz;           //Z component of the momentum
   Int_t        fNhit;         //Number of hits for this track
   TRefArray    fHits;         //List of Hits for this track

public:
   Track() { }
   virtual ~Track() { }
   Int_t         GetNhit() const { return fNhit; }
   TRefArray   &GetHits()  {return fHits; }
   
   ClassDef(Track,1)  //A track segment
};


class Jet : public TObject {

public:
   Double_t   fPt;       //Pt of jet
   Double_t   fPhi;      //Phi of jet
   TRefArray  fTracks;   //List of tracks in the jet

public:
   Jet() { }
   virtual ~Jet(){ }
   TRefArray   &GetTracks() {return fTracks; }

   ClassDef(Jet,1)  //Jet class
};

class JetEvent : public TObject {

private:
   TVector3       fVertex;            //vertex coordinates
   Int_t          fNjet;              //Number of jets
   Int_t          fNtrack;            //Number of tracks
   Int_t          fNhitA;             //Number of hist in detector A
   Int_t          fNhitB;             //Number of hist in detector B
   TClonesArray  *fJets;              //->array with all jets
   TClonesArray  *fTracks;            //->array with all tracks
   TClonesArray  *fHitsA;             //->array of hits in detector A
   TClonesArray  *fHitsB;             //->array of hits in detector B
      
   static TClonesArray *fgJets;
   static TClonesArray *fgTracks;
   static TClonesArray *fgHitsA;
   static TClonesArray *fgHitsB;

public:
   JetEvent();
   virtual ~JetEvent();
   void          Build(Int_t jetm=3, Int_t trackm=10, Int_t hitam=100, Int_t hitbm=10);
   void          Clear(Option_t *option ="");
   void          Reset(Option_t *option ="");
   Int_t         GetNjet()   const { return fNjet; }
   Int_t         GetNtrack() const { return fNtrack; }
   Int_t         GetNhitA()  const { return fNhitA; }
   Int_t         GetNhitB()  const { return fNhitB; }
   Jet          *AddJet();
   Track        *AddTrack();
   Hit          *AddHitA();
   Hit          *AddHitB();
   TClonesArray *GetJets() const { return fJets; }
   
   ClassDef(JetEvent,1)  //Event structure
};

#endif