Fork me on GitHub

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

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

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

File size: 16.8 KB
RevLine 
[3]1#ifndef BLOCKCLASSES_H
2#define BLOCKCLASSES_H
3
[268]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***********************************************************************/
[3]34
35#include "TLorentzVector.h"
36#include "TObject.h"
[220]37#include "BlockCompare.h"
[264]38#include "interface/D_Constants.h"
39#include "interface/CaloUtil.h"
[3]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
[192]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]
[378]91 double Charge; // particle charge
[3]92
[192]93 double PT; // particle transverse momentum
94 double Eta; // particle pseudorapidity
95 double Phi; // particle azimuthal angle
[3]96
[192]97 double Rapidity; // particle rapidity
[3]98
[192]99 double LifeTime; // particle invariant lifetime
[3]100 // (c*tau, distance from production to decay in mm)
101 // | hepup.VTIMUP[number]
102
[192]103 double Spin; // cosine of the angle between the particle spin vector
[3]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);
[176]168 void Set(const float px, const float py, const float pz, const float e);
[264]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);
[3]171 static TCompare *fgCompare; //!
172 const TCompare *GetCompare() const { return fgCompare; }
[264]173 float PT; // particle transverse momentum in GeV
[3]174
175 ClassDef(TRootParticle, 1)
176};
177
[270]178//--------------------------------------------------------------------------
[318]179class TRootGenParticle;
[350]180
181namespace TRootC {
[270]182class GenParticle: public TRootParticle {
183
184public:
185 GenParticle() {};
[318]186 GenParticle(const TRootGenParticle& p);
[270]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};
[350]207}
[270]208
[3]209//---------------------------------------------------------------------------
210
211class TRootGenParticle: public TRootParticle {
212
213public:
[378]214 TRootGenParticle() {_initialised=false; M=-9999.; }
[323]215 TRootGenParticle(const int pid): PID(pid) {_initialised=false;}
[350]216 TRootGenParticle(TRootC::GenParticle* part);
[270]217
[3]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()]
[56]229 float M;
[264]230 void setFractions();
231 const float getFem() {if(!_initialised) setFractions(); return _Fem;}
232 const float getFhad() {if(!_initialised) setFractions(); return _Fhad;}
233
[270]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;};
[264]237
[375]238 void print();//
239
[3]240 static TCompare *fgCompare; //!
[270]241
242 float Charge; // electrical charge
[264]243 protected:
244 float _Fem, _Fhad; // fractions of energy deposit
245 bool _initialised;
[3]246 ClassDef(TRootGenParticle, 1)
247};
248
[264]249
[3]250//------------------------------------------------------------------------------
251
[323]252class TRootElectron: public TRootParticle {
[3]253public:
[323]254 TRootElectron():Charge(-999), IsolFlag(false), IsolPt(UNDEFINED), EtaCalo(UNDEFINED), PhiCalo(UNDEFINED), EHoverEE(UNDEFINED){};
255 static TCompare *fgCompare; //!
[3]256 int Charge; // particle Charge [RawHepEventParticle::pid()]
[323]257 bool IsolFlag; // stores the result of the isolation test
258 float IsolPt; // sum of pt around the electron, for isolation criteria
[270]259 float EtaCalo; // particle pseudorapidity when entering the calo,
260 float PhiCalo; // particle azimuthal angle in rad when entering the calo
[323]261 float EHoverEE;
262
[270]263 void SetEtaPhiCalo(const float eta, const float phi) {EtaCalo=eta; PhiCalo=phi;};
264
[3]265 ClassDef(TRootElectron, 1)
266};
267
268//------------------------------------------------------------------------------
269
[323]270class TRootPhoton: public TRootParticle {
[3]271public:
[323]272 TRootPhoton() : EHoverEE(UNDEFINED) {};
[3]273 static TCompare *fgCompare; //!
274
[310]275 float EHoverEE;
[3]276 ClassDef(TRootPhoton, 1)
277};
278
279
280//------------------------------------------------------------------------------
281
[323]282class TRootMuon: public TRootParticle {
[3]283public:
[323]284 TRootMuon():Charge(-999), IsolFlag(false), IsolPt(UNDEFINED), EtaCalo(UNDEFINED), PhiCalo(UNDEFINED),
285 EHoverEE(UNDEFINED), EtRatio(UNDEFINED) {};
286 static TCompare *fgCompare; //!
[3]287 int Charge; // particle Charge [RawHepEventParticle::pid()]
[29]288 bool IsolFlag;
[323]289 float IsolPt;
[270]290 float EtaCalo; // particle pseudorapidity when entering the calo,
291 float PhiCalo; // particle azimuthal angle in rad when entering the calo
[323]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
[270]295 void SetEtaPhiCalo(const float eta, const float phi) {EtaCalo=eta; PhiCalo=phi;};
[3]296 ClassDef(TRootMuon, 1)
297};
298
299//---------------------------------------------------------------------------
300
[290]301class TRootTracks : public TSortableObject {
[264]302 public:
[268]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);
[290]307 void Set(const float inEta, const float inPhi, const float outEta, const float outPhi, const float pt, const float charge);
[264]308 const TLorentzVector GetFourVector() const;
[290]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;}
[264]313
[268]314 static TCompare *fgCompare; //!
[290]315 const TCompare *GetCompare() const { return fgCompare; }
[268]316
[290]317 float Eta, Phi; // (eta,phi) at the beginning of the track
[264]318 float EtaOuter, PhiOuter; // (eta,phi) at the end of the track
[290]319 float PT, E, Px, Py, Pz; // transverse momentum
320 float Charge;
[268]321 ClassDef(TRootTracks, 1)
[264]322};
323
[3]324//---------------------------------------------------------------------------
325
[267]326class TRootCalo: public TSortableObject
327{
328//class TRootCalo: public TRootParticle {
[264]329 public:
[267]330 float Eta;
331 float Phi;
332 float E;
[264]333 TRootCalo() ;
334 TRootCalo(const TRootCalo& cal);
335 TRootCalo& operator=(const TRootCalo& cal);
336 void set(const D_CaloTower& cal);
337 static TCompare *fgCompare; //!
[267]338 const TCompare *GetCompare() const { return fgCompare; }
[264]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
[3]347//---------------------------------------------------------------------------
[378]348
349class TRootZdcHits: public TRootParticle
[3]350{
351public:
[378]352 TRootZdcHits() {};
353 float T; // time of flight [s]
354 int side; // -1 or +1
355 static TCompare *fgCompare; //!
[370]356
[378]357 ClassDef(TRootZdcHits, 1)
358};
359
360
361/*class TRootZdcHits: public TSortableObject
362{
363public:
364
[370]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;
[3]371 float T; // time of flight [s]
372 int side; // -1 or +1
373 static TCompare *fgCompare; //!
[370]374 bool hadronic_hit; // true if neutron, false if photon
[3]375
[370]376 ClassDef(TRootZdcHits, 2)
[3]377};
[378]378*/
[3]379
380//---------------------------------------------------------------------------
381
[277]382class TRootTauJet: public TRootParticle
[3]383{
384public:
[267]385 TRootTauJet() {};
[290]386 float Charge; // normally, using the charge of the track ; here using gen-level tau charge
[307]387 int NTracks;
[3]388
[310]389 float EHoverEE;
[277]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
[267]394
[277]395// float Eta; // particle pseudorapidity
396// float Phi; // particle azimuthal angle in rad
[267]397
398 void Set(const TLorentzVector& momentum);// { return TRootParticle::Set(momentum); }
399
[3]400 static TCompare *fgCompare; //!
401
[277]402 // float PT; // particle transverse momentum in GeV
[267]403
404 ClassDef(TRootTauJet, 1)
[3]405};
406
407//---------------------------------------------------------------------------
408
[277]409class TRootJet: public TRootParticle
[3]410{
411public:
[267]412 TRootJet() {};
413
[3]414 static TCompare *fgCompare; //!
415
[267]416 bool Btag;
[307]417 int NTracks;
[310]418
419 float EHoverEE;
[267]420 ClassDef(TRootJet, 1)
[3]421};
422
[267]423//------------------------------------------------------------------------------
424
[67]425class TRootTrigger: public TSortableObject
426{
427public:
428 TRootTrigger() {};
429
[72]430 int Accepted;
[67]431
[70]432 static TCompare *fgCompare; //!
433 const TCompare *GetCompare() const { return fgCompare; }
434
[67]435 ClassDef(TRootTrigger, 1)
436};
437//---------------------------------------------------------------------------
438
[3]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() {};
[370]460 // float T; // time of flight to the detector [s]
[3]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
[378]471 float T; // time of flight to the detector [s]
[3]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
[370]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
[3]495#endif // BLOCKCLASSES_H
496
Note: See TracBrowser for help on using the repository browser.