Fork me on GitHub

source: svn/trunk/Utilities/ExRootAnalysis/interface/BlockClasses.h@ 246

Last change on this file since 246 was 220, checked in by Xavier Rouby, 16 years ago

include statements have been cleaned

File size: 9.8 KB
Line 
1#ifndef BLOCKCLASSES_H
2#define BLOCKCLASSES_H
3
4/** \class BlockClasses
5 *
6 * Definition of classes to be stored in root tree.
7 * You can decide to have the objects in each event to be sorted according
8 * to one of the data member of the class. If you decide so then a class
9 * inheriting from class TCompare should be implemented.
10 * There are already several functions TCompare*** implemented
11 * (see BlockCompare.h).
12 * Function TCompareXX sorts objects by the variable "XX" that MUST be
13 * present in the data members of the Block TRoot class.
14 *
15 * $Date: 2009-02-02 11:32:12 $
16 * $Revision: 1.11 $
17 *
18 *
19 * \author P. Demin - UCL, Louvain-la-Neuve
20 *
21 */
22
23#include "TLorentzVector.h"
24#include "TObject.h"
25#include "BlockCompare.h"
26
27class TSortableObject: public TObject
28{
29public:
30 TSortableObject() {};
31 Bool_t IsSortable() const { return GetCompare() ? GetCompare()->IsSortable(this) : kFALSE; }
32 Int_t Compare(const TObject *obj) const { return GetCompare()->Compare(this, obj); }
33
34 virtual const TCompare *GetCompare() const = 0;
35
36 ClassDef(TSortableObject, 1)
37};
38
39//---------------------------------------------------------------------------
40//
41class TRootLHEFEvent: public TObject
42{
43public:
44 TRootLHEFEvent() {};
45
46 Long64_t Number; // event number
47
48 int Nparticles; // number of particles in the event | hepup.NUP
49 int ProcessID; // subprocess code for the event | hepup.IDPRUP
50
51 Double_t Weight; // weight for the event | hepup.XWGTUP
52 Double_t ScalePDF; // scale in GeV used in the calculation of the PDFs in the event | hepup.SCALUP
53 Double_t CouplingQED; // value of the QED coupling used in the event | hepup.AQEDUP
54 Double_t CouplingQCD; // value of the QCD coupling used in the event | hepup.AQCDUP
55
56 ClassDef(TRootLHEFEvent, 2)
57};
58
59//---------------------------------------------------------------------------
60
61class TRootLHEFParticle: public TSortableObject
62{
63public:
64 TRootLHEFParticle() {};
65 int PID; // particle HEP ID number | hepup.IDUP[number]
66 int Status; // particle status code | hepup.ISTUP[number]
67 int Mother1; // index for the particle first mother | hepup.MOTHUP[number][0]
68 int Mother2; // index for the particle last mother | hepup.MOTHUP[number][1]
69 int ColorLine1; // index for the particle color-line | hepup.ICOLUP[number][0]
70 int ColorLine2; // index for the particle anti-color-line | hepup.ICOLUP[number][1]
71
72 double Px; // particle momentum vector (x component) | hepup.PUP[number][0]
73 double Py; // particle momentum vector (y component) | hepup.PUP[number][1]
74 double Pz; // particle momentum vector (z component) | hepup.PUP[number][2]
75 double E; // particle energy | hepup.PUP[number][3]
76 double M; // particle mass | hepup.PUP[number][4]
77
78 double PT; // particle transverse momentum
79 double Eta; // particle pseudorapidity
80 double Phi; // particle azimuthal angle
81
82 double Rapidity; // particle rapidity
83
84 double LifeTime; // particle invariant lifetime
85 // (c*tau, distance from production to decay in mm)
86 // | hepup.VTIMUP[number]
87
88 double Spin; // cosine of the angle between the particle spin vector
89 // and the decaying particle 3-momentum,
90 // specified in the lab frame. | hepup.SPINUP[number]
91
92 static TCompare *fgCompare; //!
93 const TCompare *GetCompare() const { return fgCompare; }
94 ClassDef(TRootLHEFParticle, 2)
95
96};
97
98//---------------------------------------------------------------------------
99
100class TRootSelectorInfo: public TObject
101{
102public:
103 TRootSelectorInfo() {};
104 int Processed; // current number of processed events
105 int Accepted; // current number of accepted events
106
107 ClassDef(TRootSelectorInfo, 1)
108};
109
110
111class TRootGenEvent: public TObject
112{
113public:
114 TRootGenEvent() {};
115 Long64_t Number; // event number | hepevt.nevhep
116
117 static TCompare *fgCompare; //!
118 const TCompare *GetCompare() const { return fgCompare; }
119
120 ClassDef(TRootGenEvent, 1)
121};
122
123
124class TRootEvent: public TObject {
125
126public:
127 TRootEvent() {};
128 int Run; // run number [G3EventProxy::simSignal().id().runNumber()]
129 int Event; // event number [G3EventProxy::simSignal().id().eventInRun()]
130
131// Short_t L1Decision; // L1 trigger global decision [L1Trigger::decision()]
132// Short_t HLTDecision; // HLT trigger global decision [HighLevelTriggerResult::getGlobalDecision()]
133
134 ClassDef(TRootEvent, 1)
135};
136
137//---------------------------------------------------------------------------
138
139class TRootParticle: public TSortableObject {
140
141public:
142
143 TRootParticle() {};
144 float E; // particle energy in GeV
145 float Px; // particle momentum vector (x component) in GeV
146 float Py; // particle momentum vector (y component) in GeV
147 float Pz; // particle momentum vector (z component) in GeV
148
149 float PT; // particle transverse momentum in GeV
150 float Eta; // particle pseudorapidity
151 float Phi; // particle azimuthal angle in rad
152
153 void Set(const TLorentzVector& momentum);
154 void Set(const float px, const float py, const float pz, const float e);
155 static TCompare *fgCompare; //!
156 const TCompare *GetCompare() const { return fgCompare; }
157
158 ClassDef(TRootParticle, 1)
159};
160
161
162//---------------------------------------------------------------------------
163
164class TRootGenParticle: public TRootParticle {
165
166public:
167 TRootGenParticle() {};
168 int PID; // particle HEP ID number [RawHepEventParticle::pid()]
169 int Status; // particle status [RawHepEventParticle::status()]
170 int M1; // particle 1st mother [RawHepEventParticle::mother1() - 1]
171 int M2; // particle 2nd mother [RawHepEventParticle::mother2() - 1]
172 int D1; // particle 1st daughter [RawHepEventParticle::daughter1() - 1]
173 int D2; // particle 2nd daughter [RawHepEventParticle::daughter2() - 1]
174 float Charge; // electrical charge
175
176 float T; // particle vertex position (t component) [RawHepEventParticle::t()]
177 float X; // particle vertex position (x component) [RawHepEventParticle::x()]
178 float Y; // particle vertex position (y component) [RawHepEventParticle::y()]
179 float Z; // particle vertex position (z component) [RawHepEventParticle::z()]
180 float M;
181 static TCompare *fgCompare; //!
182
183 ClassDef(TRootGenParticle, 1)
184};
185
186//------------------------------------------------------------------------------
187
188class TRootElectron: public TRootParticle
189{
190public:
191 TRootElectron() {};
192 int Charge; // particle Charge [RawHepEventParticle::pid()]
193 static TCompare *fgCompare; //!
194
195 bool IsolFlag;
196
197 ClassDef(TRootElectron, 1)
198};
199
200//------------------------------------------------------------------------------
201
202class TRootPhoton: public TRootParticle
203{
204public:
205 TRootPhoton() {};
206 static TCompare *fgCompare; //!
207
208 ClassDef(TRootPhoton, 1)
209};
210
211
212//------------------------------------------------------------------------------
213
214class TRootMuon: public TRootParticle
215{
216public:
217 TRootMuon() {};
218 int Charge; // particle Charge [RawHepEventParticle::pid()]
219 bool IsolFlag;
220 static TCompare *fgCompare; //!
221
222 ClassDef(TRootMuon, 1)
223};
224
225//---------------------------------------------------------------------------
226
227class TRootTracks: public TRootParticle
228{
229public:
230 TRootTracks() : Etaout(0), Phiout(0) {};
231 static TCompare *fgCompare; //!
232
233// float X, Y, Z; // coordinates of the beginning of the track
234// float Xout, Yout, Zout; // coordinates of the end of the track
235 float Etaout, Phiout; // coordinates of the end of the track
236// void SetPosition(const float x, const float y, const float z) {X=x; Y=y; Z=z;}
237// void SetPositionOut(const float x, const float y, const float z) {Xout=x; Yout=y; Zout=z;}
238 ClassDef(TRootTracks, 1)
239};
240
241//---------------------------------------------------------------------------
242
243class TRootCalo: public TRootParticle
244{
245public:
246 TRootCalo() {};
247 static TCompare *fgCompare; //!
248
249 ClassDef(TRootCalo, 1)
250};
251
252//---------------------------------------------------------------------------
253class TRootZdcHits: public TRootParticle
254{
255public:
256 TRootZdcHits() {};
257 float T; // time of flight [s]
258 int side; // -1 or +1
259 static TCompare *fgCompare; //!
260
261 ClassDef(TRootZdcHits, 1)
262};
263
264//---------------------------------------------------------------------------
265
266class TRootJet: public TRootParticle
267{
268public:
269 TRootJet() {};
270 bool Btag;
271
272 static TCompare *fgCompare; //!
273
274 ClassDef(TRootJet, 1)
275};
276
277//---------------------------------------------------------------------------
278
279class TRootTauJet: public TRootParticle
280{
281public:
282 TRootTauJet() {};
283 static TCompare *fgCompare; //!
284
285 ClassDef(TRootTauJet, 1)
286};
287
288class TRootTrigger: public TSortableObject
289{
290public:
291 TRootTrigger() {};
292
293 int Accepted;
294
295 static TCompare *fgCompare; //!
296 const TCompare *GetCompare() const { return fgCompare; }
297
298 ClassDef(TRootTrigger, 1)
299};
300//---------------------------------------------------------------------------
301
302class TRootETmis: public TSortableObject
303{
304public:
305 TRootETmis() {};
306 float ET; // jet energy [RecJet::getEnergy()]
307 float Phi; // jet azimuthal angle [RecJet::getPhi()]
308 float Px;
309 float Py;
310
311 static TCompare *fgCompare; //!
312 const TCompare *GetCompare() const { return fgCompare; }
313
314 ClassDef(TRootETmis, 1)
315};
316
317//---------------------------------------------------------------------------
318
319class TRootRomanPotHits: public TSortableObject
320{
321public:
322 TRootRomanPotHits() {};
323 float T; // time of flight to the detector [s]
324 float S; // distance to the IP [m]
325 float E; // reconstructed energy [GeV]
326 float q2; // reconstructed squared momentum transfer [GeV^2]
327
328 float X; // horizontal distance to the beam [um]
329 float Y; // vertical distance to the beam [um]
330
331 float Tx; // angle of the momentum in the horizontal (x,z) plane [urad]
332 float Ty; // angle of the momentum in the verical (y,z) plane [urad]
333
334 int side; // -1 or 1
335
336 static TCompare *fgCompare; //!
337 const TCompare *GetCompare() const { return fgCompare; }
338
339 ClassDef(TRootRomanPotHits, 1)
340};
341
342//---------------------------------------------------------------------------
343
344#endif // BLOCKCLASSES_H
345
Note: See TracBrowser for help on using the repository browser.