Fork me on GitHub

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

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

new classes

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