Fork me on GitHub

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

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

modifs in ZDC and RomanPot classes. New leaves in the branches

File size: 18.0 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//---------------------------------------------------------------------------
[408]348/*
[378]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; //!
[387]356 int pid;
[370]357
[378]358 ClassDef(TRootZdcHits, 1)
359};
[408]360*/
[378]361
[408]362// gen-level info stored for forward detectors
363// this class is similar to TRootParticle, but for the member names
364class TRootGenFwdParticle: public TSortableObject {
[378]365
[408]366public:
367
368 TRootGenFwdParticle() {};
369 TRootGenFwdParticle(const TRootGenFwdParticle& p);
370 TRootGenFwdParticle& operator=(const TRootGenFwdParticle& p);
371 float genE; // particle energy in GeV
372 float genPx; // particle momentum vector (x component) in GeV
373 float genPy; // particle momentum vector (y component) in GeV
374 float genPz; // particle momentum vector (z component) in GeV
375 float genPT; // particle transverse momentum in GeV
376
377 float genEta; // particle pseudorapidity
378 float genPhi; // particle azimuthal angle in rad
379 int pid;
380
381 void Set(const TLorentzVector& momentum); // initialises the gen-level data
382 void Set(const float px, const float py, const float pz, const float e);
383 void SetEtaPhi(const float eta, const float phi) {genEta=eta; genPhi=phi;};
384 void SetEtaPhiEET(const float eta, const float phi, const float e, const float et);
385 static TCompare *fgCompare; //!
386 const TCompare *GetCompare() const { return fgCompare; }
387
388 ClassDef(TRootGenFwdParticle, 1)
389};
390
391
392
393//class TRootZdcHits: public TSortableObject
394class TRootZdcHits: public TRootGenFwdParticle
[378]395{
396public:
397
[370]398 TRootZdcHits() {}; // do not put anything for the default constructor-- ExRootAnalysis constrain!!!
399 TRootZdcHits(const float e, const float t, const int side, const bool had);
400 TRootZdcHits(const TRootZdcHits& zdc);
401 TRootZdcHits& operator=(const TRootZdcHits& zdc);
402 float E;
[3]403 float T; // time of flight [s]
404 int side; // -1 or +1
405 static TCompare *fgCompare; //!
[370]406 bool hadronic_hit; // true if neutron, false if photon
[3]407
[370]408 ClassDef(TRootZdcHits, 2)
[3]409};
410
[408]411
[3]412//---------------------------------------------------------------------------
413
[277]414class TRootTauJet: public TRootParticle
[3]415{
416public:
[267]417 TRootTauJet() {};
[290]418 float Charge; // normally, using the charge of the track ; here using gen-level tau charge
[307]419 int NTracks;
[3]420
[310]421 float EHoverEE;
[277]422// float E; // particle energy in GeV
423// float Px; // particle momentum vector (x component) in GeV
424// float Py; // particle momentum vector (y component) in GeV
425// float Pz; // particle momentum vector (z component) in GeV
[267]426
[277]427// float Eta; // particle pseudorapidity
428// float Phi; // particle azimuthal angle in rad
[267]429
430 void Set(const TLorentzVector& momentum);// { return TRootParticle::Set(momentum); }
431
[3]432 static TCompare *fgCompare; //!
433
[277]434 // float PT; // particle transverse momentum in GeV
[267]435
436 ClassDef(TRootTauJet, 1)
[3]437};
438
439//---------------------------------------------------------------------------
440
[277]441class TRootJet: public TRootParticle
[3]442{
443public:
[267]444 TRootJet() {};
445
[3]446 static TCompare *fgCompare; //!
447
[267]448 bool Btag;
[307]449 int NTracks;
[310]450
451 float EHoverEE;
[267]452 ClassDef(TRootJet, 1)
[3]453};
454
[267]455//------------------------------------------------------------------------------
456
[67]457class TRootTrigger: public TSortableObject
458{
459public:
460 TRootTrigger() {};
461
[72]462 int Accepted;
[67]463
[70]464 static TCompare *fgCompare; //!
465 const TCompare *GetCompare() const { return fgCompare; }
466
[67]467 ClassDef(TRootTrigger, 1)
468};
469//---------------------------------------------------------------------------
470
[3]471class TRootETmis: public TSortableObject
472{
473public:
474 TRootETmis() {};
475 float ET; // jet energy [RecJet::getEnergy()]
476 float Phi; // jet azimuthal angle [RecJet::getPhi()]
477 float Px;
478 float Py;
479
480 static TCompare *fgCompare; //!
481 const TCompare *GetCompare() const { return fgCompare; }
482
483 ClassDef(TRootETmis, 1)
484};
485
486//---------------------------------------------------------------------------
487
[408]488//class TRootRomanPotHits: public TSortableObject
489class TRootRomanPotHits: public TRootGenFwdParticle
[3]490{
491public:
492 TRootRomanPotHits() {};
[370]493 // float T; // time of flight to the detector [s]
[3]494 float S; // distance to the IP [m]
495 float E; // reconstructed energy [GeV]
496 float q2; // reconstructed squared momentum transfer [GeV^2]
497
498 float X; // horizontal distance to the beam [um]
499 float Y; // vertical distance to the beam [um]
500
501 float Tx; // angle of the momentum in the horizontal (x,z) plane [urad]
502 float Ty; // angle of the momentum in the verical (y,z) plane [urad]
503
[378]504 float T; // time of flight to the detector [s]
[3]505 int side; // -1 or 1
506
507 static TCompare *fgCompare; //!
[408]508 //const TCompare *GetCompare() const { return fgCompare; }
[3]509
[408]510 ClassDef(TRootRomanPotHits, 2)
[3]511};
512
[370]513//---------------------------------------------------------------------------
514
515class TRootForwardTaggerHits : public TRootRomanPotHits
516{
517public:
518 TRootForwardTaggerHits() {};
519 float T; // time of flight to the detector [s]
520
521 static TCompare *fgCompare; //!
522 const TCompare *GetCompare() const { return fgCompare; }
523
524 ClassDef(TRootForwardTaggerHits, 1)
525};
526
527
[3]528#endif // BLOCKCLASSES_H
529
Note: See TracBrowser for help on using the repository browser.