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