Fork me on GitHub

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

Last change on this file since 378 was 378, checked in by Xavier Rouby, 15 years ago

if TRootGenParticle::M not initialised, set to -9999 ; Zdc: switch back to old version

File size: 16.8 KB
Line 
1#ifndef BLOCKCLASSES_H
2#define BLOCKCLASSES_H
3
4/***********************************************************************
5** **
6** /----------------------------------------------\ **
7** | Delphes, a framework for the fast simulation | **
8** | of a generic collider experiment | **
9** \----------------------------------------------/ **
10** **
11** **
12** This package uses: **
13** ------------------ **
14** FastJet algorithm: Phys. Lett. B641 (2006) [hep-ph/0512210] **
15** Hector: JINST 2:P09005 (2007) [physics.acc-ph:0707.1198v2] **
16** FROG: [hep-ex/0901.2718v1] **
17** **
18** ------------------------------------------------------------------ **
19** **
20** Main authors: **
21** ------------- **
22** **
23** Severine Ovyn Xavier Rouby **
24** severine.ovyn@uclouvain.be xavier.rouby@cern **
25** **
26** Center for Particle Physics and Phenomenology (CP3) **
27** Universite catholique de Louvain (UCL) **
28** Louvain-la-Neuve, Belgium **
29** **
30** Copyright (C) 2008-2009, **
31** All rights reserved. **
32** **
33***********************************************************************/
34
35#include "TLorentzVector.h"
36#include "TObject.h"
37#include "BlockCompare.h"
38#include "interface/D_Constants.h"
39#include "interface/CaloUtil.h"
40
41class TSortableObject: public TObject
42{
43public:
44 TSortableObject() {};
45 Bool_t IsSortable() const { return GetCompare() ? GetCompare()->IsSortable(this) : kFALSE; }
46 Int_t Compare(const TObject *obj) const { return GetCompare()->Compare(this, obj); }
47
48 virtual const TCompare *GetCompare() const = 0;
49
50 ClassDef(TSortableObject, 1)
51};
52
53//---------------------------------------------------------------------------
54//
55class TRootLHEFEvent: public TObject
56{
57public:
58 TRootLHEFEvent() {};
59
60 Long64_t Number; // event number
61
62 int Nparticles; // number of particles in the event | hepup.NUP
63 int ProcessID; // subprocess code for the event | hepup.IDPRUP
64
65 Double_t Weight; // weight for the event | hepup.XWGTUP
66 Double_t ScalePDF; // scale in GeV used in the calculation of the PDFs in the event | hepup.SCALUP
67 Double_t CouplingQED; // value of the QED coupling used in the event | hepup.AQEDUP
68 Double_t CouplingQCD; // value of the QCD coupling used in the event | hepup.AQCDUP
69
70 ClassDef(TRootLHEFEvent, 2)
71};
72
73//---------------------------------------------------------------------------
74
75class TRootLHEFParticle: public TSortableObject
76{
77public:
78 TRootLHEFParticle() {};
79 int PID; // particle HEP ID number | hepup.IDUP[number]
80 int Status; // particle status code | hepup.ISTUP[number]
81 int Mother1; // index for the particle first mother | hepup.MOTHUP[number][0]
82 int Mother2; // index for the particle last mother | hepup.MOTHUP[number][1]
83 int ColorLine1; // index for the particle color-line | hepup.ICOLUP[number][0]
84 int ColorLine2; // index for the particle anti-color-line | hepup.ICOLUP[number][1]
85
86 double Px; // particle momentum vector (x component) | hepup.PUP[number][0]
87 double Py; // particle momentum vector (y component) | hepup.PUP[number][1]
88 double Pz; // particle momentum vector (z component) | hepup.PUP[number][2]
89 double E; // particle energy | hepup.PUP[number][3]
90 double M; // particle mass | hepup.PUP[number][4]
91 double Charge; // particle charge
92
93 double PT; // particle transverse momentum
94 double Eta; // particle pseudorapidity
95 double Phi; // particle azimuthal angle
96
97 double Rapidity; // particle rapidity
98
99 double LifeTime; // particle invariant lifetime
100 // (c*tau, distance from production to decay in mm)
101 // | hepup.VTIMUP[number]
102
103 double Spin; // cosine of the angle between the particle spin vector
104 // and the decaying particle 3-momentum,
105 // specified in the lab frame. | hepup.SPINUP[number]
106
107 static TCompare *fgCompare; //!
108 const TCompare *GetCompare() const { return fgCompare; }
109 ClassDef(TRootLHEFParticle, 2)
110
111};
112
113//---------------------------------------------------------------------------
114
115class TRootSelectorInfo: public TObject
116{
117public:
118 TRootSelectorInfo() {};
119 int Processed; // current number of processed events
120 int Accepted; // current number of accepted events
121
122 ClassDef(TRootSelectorInfo, 1)
123};
124
125
126class TRootGenEvent: public TObject
127{
128public:
129 TRootGenEvent() {};
130 Long64_t Number; // event number | hepevt.nevhep
131
132 static TCompare *fgCompare; //!
133 const TCompare *GetCompare() const { return fgCompare; }
134
135 ClassDef(TRootGenEvent, 1)
136};
137
138
139class TRootEvent: public TObject {
140
141public:
142 TRootEvent() {};
143 int Run; // run number [G3EventProxy::simSignal().id().runNumber()]
144 int Event; // event number [G3EventProxy::simSignal().id().eventInRun()]
145
146// Short_t L1Decision; // L1 trigger global decision [L1Trigger::decision()]
147// Short_t HLTDecision; // HLT trigger global decision [HighLevelTriggerResult::getGlobalDecision()]
148
149 ClassDef(TRootEvent, 1)
150};
151
152//---------------------------------------------------------------------------
153
154class TRootParticle: public TSortableObject {
155
156public:
157
158 TRootParticle() {};
159 float E; // particle energy in GeV
160 float Px; // particle momentum vector (x component) in GeV
161 float Py; // particle momentum vector (y component) in GeV
162 float Pz; // particle momentum vector (z component) in GeV
163
164 float Eta; // particle pseudorapidity
165 float Phi; // particle azimuthal angle in rad
166
167 void Set(const TLorentzVector& momentum);
168 void Set(const float px, const float py, const float pz, const float e);
169 void SetEtaPhi(const float eta, const float phi) {Eta=eta; Phi=phi;};
170 void SetEtaPhiEET(const float eta, const float phi, const float e, const float et);
171 static TCompare *fgCompare; //!
172 const TCompare *GetCompare() const { return fgCompare; }
173 float PT; // particle transverse momentum in GeV
174
175 ClassDef(TRootParticle, 1)
176};
177
178//--------------------------------------------------------------------------
179class TRootGenParticle;
180
181namespace TRootC {
182class GenParticle: public TRootParticle {
183
184public:
185 GenParticle() {};
186 GenParticle(const TRootGenParticle& p);
187 int PID; // particle HEP ID number [RawHepEventParticle::pid()]
188 int Status; // particle status [RawHepEventParticle::status()]
189 int M1; // particle 1st mother [RawHepEventParticle::mother1() - 1]
190 int M2; // particle 2nd mother [RawHepEventParticle::mother2() - 1]
191 int D1; // particle 1st daughter [RawHepEventParticle::daughter1() - 1]
192 int D2; // particle 2nd daughter [RawHepEventParticle::daughter2() - 1]
193
194 float Charge;
195
196 float T; // particle vertex position (t component) [RawHepEventParticle::t()]
197 float X; // particle vertex position (x component) [RawHepEventParticle::x()]
198 float Y; // particle vertex position (y component) [RawHepEventParticle::y()]
199 float Z; // particle vertex position (z component) [RawHepEventParticle::z()]
200 float M;
201
202
203 static TCompare *fgCompare; //!
204
205 ClassDef(GenParticle, 1)
206};
207}
208
209//---------------------------------------------------------------------------
210
211class TRootGenParticle: public TRootParticle {
212
213public:
214 TRootGenParticle() {_initialised=false; M=-9999.; }
215 TRootGenParticle(const int pid): PID(pid) {_initialised=false;}
216 TRootGenParticle(TRootC::GenParticle* part);
217
218 int PID; // particle HEP ID number [RawHepEventParticle::pid()]
219 int Status; // particle status [RawHepEventParticle::status()]
220 int M1; // particle 1st mother [RawHepEventParticle::mother1() - 1]
221 int M2; // particle 2nd mother [RawHepEventParticle::mother2() - 1]
222 int D1; // particle 1st daughter [RawHepEventParticle::daughter1() - 1]
223 int D2; // particle 2nd daughter [RawHepEventParticle::daughter2() - 1]
224
225 float T; // particle vertex position (t component) [RawHepEventParticle::t()]
226 float X; // particle vertex position (x component) [RawHepEventParticle::x()]
227 float Y; // particle vertex position (y component) [RawHepEventParticle::y()]
228 float Z; // particle vertex position (z component) [RawHepEventParticle::z()]
229 float M;
230 void setFractions();
231 const float getFem() {if(!_initialised) setFractions(); return _Fem;}
232 const float getFhad() {if(!_initialised) setFractions(); return _Fhad;}
233
234 float EtaCalo; // particle pseudorapidity when entering the calo,
235 float PhiCalo; // particle azimuthal angle in rad when entering the calo
236 void SetEtaPhiCalo(const float eta, const float phi) {EtaCalo=eta; PhiCalo=phi;};
237
238 void print();//
239
240 static TCompare *fgCompare; //!
241
242 float Charge; // electrical charge
243 protected:
244 float _Fem, _Fhad; // fractions of energy deposit
245 bool _initialised;
246 ClassDef(TRootGenParticle, 1)
247};
248
249
250//------------------------------------------------------------------------------
251
252class TRootElectron: public TRootParticle {
253public:
254 TRootElectron():Charge(-999), IsolFlag(false), IsolPt(UNDEFINED), EtaCalo(UNDEFINED), PhiCalo(UNDEFINED), EHoverEE(UNDEFINED){};
255 static TCompare *fgCompare; //!
256 int Charge; // particle Charge [RawHepEventParticle::pid()]
257 bool IsolFlag; // stores the result of the isolation test
258 float IsolPt; // sum of pt around the electron, for isolation criteria
259 float EtaCalo; // particle pseudorapidity when entering the calo,
260 float PhiCalo; // particle azimuthal angle in rad when entering the calo
261 float EHoverEE;
262
263 void SetEtaPhiCalo(const float eta, const float phi) {EtaCalo=eta; PhiCalo=phi;};
264
265 ClassDef(TRootElectron, 1)
266};
267
268//------------------------------------------------------------------------------
269
270class TRootPhoton: public TRootParticle {
271public:
272 TRootPhoton() : EHoverEE(UNDEFINED) {};
273 static TCompare *fgCompare; //!
274
275 float EHoverEE;
276 ClassDef(TRootPhoton, 1)
277};
278
279
280//------------------------------------------------------------------------------
281
282class TRootMuon: public TRootParticle {
283public:
284 TRootMuon():Charge(-999), IsolFlag(false), IsolPt(UNDEFINED), EtaCalo(UNDEFINED), PhiCalo(UNDEFINED),
285 EHoverEE(UNDEFINED), EtRatio(UNDEFINED) {};
286 static TCompare *fgCompare; //!
287 int Charge; // particle Charge [RawHepEventParticle::pid()]
288 bool IsolFlag;
289 float IsolPt;
290 float EtaCalo; // particle pseudorapidity when entering the calo,
291 float PhiCalo; // particle azimuthal angle in rad when entering the calo
292 float EHoverEE; // hadronic energy over electromagnetic energy
293 float EtRatio; // calo Et in NxN-tower grid around the muon over the muon Et
294
295 void SetEtaPhiCalo(const float eta, const float phi) {EtaCalo=eta; PhiCalo=phi;};
296 ClassDef(TRootMuon, 1)
297};
298
299//---------------------------------------------------------------------------
300
301class TRootTracks : public TSortableObject {
302 public:
303 TRootTracks(); // needed for storage in ExRootAnalysis
304 TRootTracks(const TRootTracks& track);
305 TRootTracks(const float inEta, const float inPhi, const float outEta, const float outPhi, const float pt);
306 TRootTracks& operator=(const TRootTracks& track);
307 void Set(const float inEta, const float inPhi, const float outEta, const float outPhi, const float pt, const float charge);
308 const TLorentzVector GetFourVector() const;
309 const float getEta() const {return Eta;}
310 const float getPhi() const {return Phi;}
311 const float getEtaOuter() const {return EtaOuter;}
312 const float getPhiOuter() const {return PhiOuter;}
313
314 static TCompare *fgCompare; //!
315 const TCompare *GetCompare() const { return fgCompare; }
316
317 float Eta, Phi; // (eta,phi) at the beginning of the track
318 float EtaOuter, PhiOuter; // (eta,phi) at the end of the track
319 float PT, E, Px, Py, Pz; // transverse momentum
320 float Charge;
321 ClassDef(TRootTracks, 1)
322};
323
324//---------------------------------------------------------------------------
325
326class TRootCalo: public TSortableObject
327{
328//class TRootCalo: public TRootParticle {
329 public:
330 float Eta;
331 float Phi;
332 float E;
333 TRootCalo() ;
334 TRootCalo(const TRootCalo& cal);
335 TRootCalo& operator=(const TRootCalo& cal);
336 void set(const D_CaloTower& cal);
337 static TCompare *fgCompare; //!
338 const TCompare *GetCompare() const { return fgCompare; }
339 const float getET() const {return ET;}
340
341 protected:
342 float E_em, E_had; // electromagnetic and hadronic components of the tower energy
343 float ET; // total energy and transverse energy
344 ClassDef(TRootCalo, 1)
345};
346
347//---------------------------------------------------------------------------
348
349class TRootZdcHits: public TRootParticle
350{
351public:
352 TRootZdcHits() {};
353 float T; // time of flight [s]
354 int side; // -1 or +1
355 static TCompare *fgCompare; //!
356
357 ClassDef(TRootZdcHits, 1)
358};
359
360
361/*class TRootZdcHits: public TSortableObject
362{
363public:
364
365 TRootZdcHits() {}; // do not put anything for the default constructor-- ExRootAnalysis constrain!!!
366 TRootZdcHits(const float e, const float t, const int side, const bool had);
367 TRootZdcHits(const TRootZdcHits& zdc);
368 TRootZdcHits& operator=(const TRootZdcHits& zdc);
369 const TCompare *GetCompare() const { return fgCompare; }
370 float E;
371 float T; // time of flight [s]
372 int side; // -1 or +1
373 static TCompare *fgCompare; //!
374 bool hadronic_hit; // true if neutron, false if photon
375
376 ClassDef(TRootZdcHits, 2)
377};
378*/
379
380//---------------------------------------------------------------------------
381
382class TRootTauJet: public TRootParticle
383{
384public:
385 TRootTauJet() {};
386 float Charge; // normally, using the charge of the track ; here using gen-level tau charge
387 int NTracks;
388
389 float EHoverEE;
390// float E; // particle energy in GeV
391// float Px; // particle momentum vector (x component) in GeV
392// float Py; // particle momentum vector (y component) in GeV
393// float Pz; // particle momentum vector (z component) in GeV
394
395// float Eta; // particle pseudorapidity
396// float Phi; // particle azimuthal angle in rad
397
398 void Set(const TLorentzVector& momentum);// { return TRootParticle::Set(momentum); }
399
400 static TCompare *fgCompare; //!
401
402 // float PT; // particle transverse momentum in GeV
403
404 ClassDef(TRootTauJet, 1)
405};
406
407//---------------------------------------------------------------------------
408
409class TRootJet: public TRootParticle
410{
411public:
412 TRootJet() {};
413
414 static TCompare *fgCompare; //!
415
416 bool Btag;
417 int NTracks;
418
419 float EHoverEE;
420 ClassDef(TRootJet, 1)
421};
422
423//------------------------------------------------------------------------------
424
425class TRootTrigger: public TSortableObject
426{
427public:
428 TRootTrigger() {};
429
430 int Accepted;
431
432 static TCompare *fgCompare; //!
433 const TCompare *GetCompare() const { return fgCompare; }
434
435 ClassDef(TRootTrigger, 1)
436};
437//---------------------------------------------------------------------------
438
439class TRootETmis: public TSortableObject
440{
441public:
442 TRootETmis() {};
443 float ET; // jet energy [RecJet::getEnergy()]
444 float Phi; // jet azimuthal angle [RecJet::getPhi()]
445 float Px;
446 float Py;
447
448 static TCompare *fgCompare; //!
449 const TCompare *GetCompare() const { return fgCompare; }
450
451 ClassDef(TRootETmis, 1)
452};
453
454//---------------------------------------------------------------------------
455
456class TRootRomanPotHits: public TSortableObject
457{
458public:
459 TRootRomanPotHits() {};
460 // float T; // time of flight to the detector [s]
461 float S; // distance to the IP [m]
462 float E; // reconstructed energy [GeV]
463 float q2; // reconstructed squared momentum transfer [GeV^2]
464
465 float X; // horizontal distance to the beam [um]
466 float Y; // vertical distance to the beam [um]
467
468 float Tx; // angle of the momentum in the horizontal (x,z) plane [urad]
469 float Ty; // angle of the momentum in the verical (y,z) plane [urad]
470
471 float T; // time of flight to the detector [s]
472 int side; // -1 or 1
473
474 static TCompare *fgCompare; //!
475 const TCompare *GetCompare() const { return fgCompare; }
476
477 ClassDef(TRootRomanPotHits, 1)
478};
479
480//---------------------------------------------------------------------------
481
482class TRootForwardTaggerHits : public TRootRomanPotHits
483{
484public:
485 TRootForwardTaggerHits() {};
486 float T; // time of flight to the detector [s]
487
488 static TCompare *fgCompare; //!
489 const TCompare *GetCompare() const { return fgCompare; }
490
491 ClassDef(TRootForwardTaggerHits, 1)
492};
493
494
495#endif // BLOCKCLASSES_H
496
Note: See TracBrowser for help on using the repository browser.