Fork me on GitHub

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

Last change on this file since 696 was 567, checked in by Xavier Rouby, 14 years ago

version 1.9

File size: 18.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
75//---------------------------------------------------------------------------
76/*
77class TRootLHEFParticle: public TSortableObject
78{
79public:
80 TRootLHEFParticle() {};
81 int PID; // particle HEP ID number | hepup.IDUP[number]
82 int Status; // particle status code | hepup.ISTUP[number]
83 int Mother1; // index for the particle first mother | hepup.MOTHUP[number][0]
84 int Mother2; // index for the particle last mother | hepup.MOTHUP[number][1]
85 int ColorLine1; // index for the particle color-line | hepup.ICOLUP[number][0]
86 int ColorLine2; // index for the particle anti-color-line | hepup.ICOLUP[number][1]
87
88 double Px; // particle momentum vector (x component) | hepup.PUP[number][0]
89 double Py; // particle momentum vector (y component) | hepup.PUP[number][1]
90 double Pz; // particle momentum vector (z component) | hepup.PUP[number][2]
91 double E; // particle energy | hepup.PUP[number][3]
92 double M; // particle mass | hepup.PUP[number][4]
93 double Charge; // particle charge
94
95 double PT; // particle transverse momentum
96 double Eta; // particle pseudorapidity
97 double Phi; // particle azimuthal angle
98
99 double Rapidity; // particle rapidity
100
101 double LifeTime; // particle invariant lifetime
102 // (c*tau, distance from production to decay in mm)
103 // | hepup.VTIMUP[number]
104
105 double Spin; // cosine of the angle between the particle spin vector
106 // and the decaying particle 3-momentum,
107 // specified in the lab frame. | hepup.SPINUP[number]
108
109 static TCompare *fgCompare; //!
110 const TCompare *GetCompare() const { return fgCompare; }
111 ClassDef(TRootLHEFParticle, 2)
112
113};
114*/
115//---------------------------------------------------------------------------
116
117class TRootSelectorInfo: public TObject
118{
119public:
120 TRootSelectorInfo() {};
121 int Processed; // current number of processed events
122 int Accepted; // current number of accepted events
123
124 ClassDef(TRootSelectorInfo, 1)
125};
126
127
128class TRootGenEvent: public TObject
129{
130public:
131 TRootGenEvent() {};
132 Long64_t Number; // event number | hepevt.nevhep
133
134 static TCompare *fgCompare; //!
135 const TCompare *GetCompare() const { return fgCompare; }
136
137 ClassDef(TRootGenEvent, 1)
138};
139
140
141class TRootEvent: public TObject {
142
143public:
144 TRootEvent() {};
145 int Run; // run number [G3EventProxy::simSignal().id().runNumber()]
146 int Event; // event number [G3EventProxy::simSignal().id().eventInRun()]
147
148// Short_t L1Decision; // L1 trigger global decision [L1Trigger::decision()]
149// Short_t HLTDecision; // HLT trigger global decision [HighLevelTriggerResult::getGlobalDecision()]
150
151 ClassDef(TRootEvent, 1)
152};
153
154//---------------------------------------------------------------------------
155
156class TRootParticle: public TSortableObject {
157
158public:
159
160 TRootParticle() {};
161 float E; // particle energy in GeV
162 float Px; // particle momentum vector (x component) in GeV
163 float Py; // particle momentum vector (y component) in GeV
164 float Pz; // particle momentum vector (z component) in GeV
165
166 float Eta; // particle pseudorapidity
167 float Phi; // particle azimuthal angle in rad
168
169 void Set(const TLorentzVector& momentum);
170 void Set(const float px, const float py, const float pz, const float e);
171 void SetEtaPhi(const float eta, const float phi) {Eta=eta; Phi=phi;};
172 void SetEtaPhiEET(const float eta, const float phi, const float e, const float et);
173 static TCompare *fgCompare; //!
174 const TCompare *GetCompare() const { return fgCompare; }
175 float PT; // particle transverse momentum in GeV
176
177 ClassDef(TRootParticle, 1)
178};
179
180//--------------------------------------------------------------------------
181class TRootGenParticle;
182
183namespace TRootC {
184class GenParticle: public TRootParticle {
185
186public:
187 GenParticle() {};
188 GenParticle(const TRootGenParticle& p);
189 int PID; // particle HEP ID number [RawHepEventParticle::pid()]
190 int Status; // particle status [RawHepEventParticle::status()]
191 int M1; // particle 1st mother [RawHepEventParticle::mother1() - 1]
192 int M2; // particle 2nd mother [RawHepEventParticle::mother2() - 1]
193 int D1; // particle 1st daughter [RawHepEventParticle::daughter1() - 1]
194 int D2; // particle 2nd daughter [RawHepEventParticle::daughter2() - 1]
195
196 float Charge;
197
198 float T; // particle vertex position (t component) [RawHepEventParticle::t()]
199 float X; // particle vertex position (x component) [RawHepEventParticle::x()]
200 float Y; // particle vertex position (y component) [RawHepEventParticle::y()]
201 float Z; // particle vertex position (z component) [RawHepEventParticle::z()]
202 float M;
203
204
205 static TCompare *fgCompare; //!
206
207 ClassDef(GenParticle, 1)
208};
209}
210
211//---------------------------------------------------------------------------
212
213class TRootGenParticle: public TRootParticle {
214
215public:
216 TRootGenParticle() {_initialised=false; M=-9999.; }
217 TRootGenParticle(const int pid): PID(pid) {_initialised=false;}
218 TRootGenParticle(TRootC::GenParticle* part);
219
220 int PID; // particle HEP ID number [RawHepEventParticle::pid()]
221 int Status; // particle status [RawHepEventParticle::status()]
222 int M1; // particle 1st mother [RawHepEventParticle::mother1() - 1]
223 int M2; // particle 2nd mother [RawHepEventParticle::mother2() - 1]
224 int D1; // particle 1st daughter [RawHepEventParticle::daughter1() - 1]
225 int D2; // particle 2nd daughter [RawHepEventParticle::daughter2() - 1]
226
227 float T; // particle vertex position (t component) [RawHepEventParticle::t()]
228 float X; // particle vertex position (x component) [RawHepEventParticle::x()]
229 float Y; // particle vertex position (y component) [RawHepEventParticle::y()]
230 float Z; // particle vertex position (z component) [RawHepEventParticle::z()]
231 float M;
232 void setFractions();
233 const float getFem() {if(!_initialised) setFractions(); return _Fem;}
234 const float getFhad() {if(!_initialised) setFractions(); return _Fhad;}
235
236 float EtaCalo; // particle pseudorapidity when entering the calo,
237 float PhiCalo; // particle azimuthal angle in rad when entering the calo
238 void SetEtaPhiCalo(const float eta, const float phi) {EtaCalo=eta; PhiCalo=phi;};
239
240 void print();//
241
242 static TCompare *fgCompare; //!
243
244 float Charge; // electrical charge
245 protected:
246 float _Fem, _Fhad; // fractions of energy deposit
247 bool _initialised;
248 ClassDef(TRootGenParticle, 1)
249};
250
251
252//------------------------------------------------------------------------------
253
254class TRootElectron: public TRootParticle {
255public:
256 TRootElectron():Charge(-999), IsolFlag(false), EtaCalo(UNDEFINED), PhiCalo(UNDEFINED), EHoverEE(UNDEFINED){};
257 static TCompare *fgCompare; //!
258 int Charge; // particle Charge [RawHepEventParticle::pid()]
259 bool IsolFlag; // stores the result of the isolation test
260 float EtaCalo; // particle pseudorapidity when entering the calo,
261 float PhiCalo; // particle azimuthal angle in rad when entering the calo
262 float EHoverEE;
263 float EtRatio;
264 float SumEt;
265 float SumPt;
266
267 void SetEtaPhiCalo(const float eta, const float phi) {EtaCalo=eta; PhiCalo=phi;};
268
269 ClassDef(TRootElectron, 1)
270};
271
272//------------------------------------------------------------------------------
273
274class TRootPhoton: public TRootParticle {
275public:
276 TRootPhoton() : EHoverEE(UNDEFINED) {};
277 static TCompare *fgCompare; //!
278
279 float EHoverEE;
280 ClassDef(TRootPhoton, 1)
281};
282
283
284//------------------------------------------------------------------------------
285
286class TRootMuon: public TRootParticle {
287public:
288 TRootMuon():Charge(-999), IsolFlag(false), EtaCalo(UNDEFINED), PhiCalo(UNDEFINED), EHoverEE(UNDEFINED), EtRatio(UNDEFINED) {};
289 static TCompare *fgCompare; //!
290 int Charge; // particle Charge [RawHepEventParticle::pid()]
291 bool IsolFlag;
292 float EtaCalo; // particle pseudorapidity when entering the calo,
293 float PhiCalo; // particle azimuthal angle in rad when entering the calo
294 float EHoverEE; // hadronic energy over electromagnetic energy
295 float EtRatio; // calo Et in NxN-tower grid around the muon over the muon Et
296 float SumEt;
297 float SumPt;
298
299 void SetEtaPhiCalo(const float eta, const float phi) {EtaCalo=eta; PhiCalo=phi;};
300 ClassDef(TRootMuon, 1)
301};
302
303//---------------------------------------------------------------------------
304
305class TRootTracks : public TSortableObject {
306 public:
307 TRootTracks(); // needed for storage in ExRootAnalysis
308 TRootTracks(const TRootTracks& track);
309 TRootTracks(const float inEta, const float inPhi, const float outEta, const float outPhi, const float pt);
310 TRootTracks& operator=(const TRootTracks& track);
311 void Set(const float inEta, const float inPhi, const float outEta, const float outPhi, const float pt, const float charge);
312 const TLorentzVector GetFourVector() const;
313 const float getEta() const {return Eta;}
314 const float getPhi() const {return Phi;}
315 const float getEtaOuter() const {return EtaOuter;}
316 const float getPhiOuter() const {return PhiOuter;}
317
318 static TCompare *fgCompare; //!
319 const TCompare *GetCompare() const { return fgCompare; }
320
321 float Eta, Phi; // (eta,phi) at the beginning of the track
322 float EtaOuter, PhiOuter; // (eta,phi) at the end of the track
323 float PT, E, Px, Py, Pz; // transverse momentum
324 float Charge;
325 float Vx,Vy,Vz;
326 ClassDef(TRootTracks, 1)
327};
328
329//---------------------------------------------------------------------------
330
331class TRootCalo: public TSortableObject
332{
333//class TRootCalo: public TRootParticle {
334 public:
335 float Eta;
336 float Phi;
337 float E;
338 TRootCalo() ;
339 TRootCalo(const TRootCalo& cal);
340 TRootCalo& operator=(const TRootCalo& cal);
341 void set(const D_CaloTower& cal);
342 static TCompare *fgCompare; //!
343 const TCompare *GetCompare() const { return fgCompare; }
344 const float getET() const {return ET;}
345
346 protected:
347 float E_em, E_had; // electromagnetic and hadronic components of the tower energy
348 float ET; // total energy and transverse energy
349 ClassDef(TRootCalo, 1)
350};
351
352//---------------------------------------------------------------------------
353/*
354class TRootZdcHits: public TRootParticle
355{
356public:
357 TRootZdcHits() {};
358 float T; // time of flight [s]
359 int side; // -1 or +1
360 static TCompare *fgCompare; //!
361 int pid;
362
363 ClassDef(TRootZdcHits, 1)
364};
365*/
366
367// gen-level info stored for forward detectors
368// this class is similar to TRootParticle, but for the member names
369class TRootGenFwdParticle: public TSortableObject {
370
371public:
372
373 TRootGenFwdParticle() {};
374 TRootGenFwdParticle(const TRootGenFwdParticle& p);
375 TRootGenFwdParticle& operator=(const TRootGenFwdParticle& p);
376 float genE; // particle energy in GeV
377 float genPx; // particle momentum vector (x component) in GeV
378 float genPy; // particle momentum vector (y component) in GeV
379 float genPz; // particle momentum vector (z component) in GeV
380 float genPT; // particle transverse momentum in GeV
381
382 float genEta; // particle pseudorapidity
383 float genPhi; // particle azimuthal angle in rad
384 int pid;
385
386 void Set(const TLorentzVector& momentum); // initialises the gen-level data
387 void Set(const float px, const float py, const float pz, const float e);
388 void SetEtaPhi(const float eta, const float phi) {genEta=eta; genPhi=phi;};
389 void SetEtaPhiEET(const float eta, const float phi, const float e, const float et);
390 static TCompare *fgCompare; //!
391 const TCompare *GetCompare() const { return fgCompare; }
392
393 ClassDef(TRootGenFwdParticle, 1)
394};
395
396
397
398//class TRootZdcHits: public TSortableObject
399class TRootZdcHits: public TRootGenFwdParticle
400{
401public:
402
403 TRootZdcHits() {}; // do not put anything for the default constructor-- ExRootAnalysis constrain!!!
404 TRootZdcHits(const float e, const float t, const int side, const bool had);
405 TRootZdcHits(const TRootZdcHits& zdc);
406 TRootZdcHits& operator=(const TRootZdcHits& zdc);
407 float E;
408 float T; // time of flight [s]
409 int side; // -1 or +1
410 static TCompare *fgCompare; //!
411 bool hadronic_hit; // true if neutron, false if photon
412
413 ClassDef(TRootZdcHits, 2)
414};
415
416
417//---------------------------------------------------------------------------
418
419class TRootTauJet: public TRootParticle
420{
421public:
422 TRootTauJet() {};
423 float Charge; // normally, using the charge of the track ; here using gen-level tau charge
424 int NTracks;
425 int NCalo;
426
427 float EHoverEE;
428// float E; // particle energy in GeV
429// float Px; // particle momentum vector (x component) in GeV
430// float Py; // particle momentum vector (y component) in GeV
431// float Pz; // particle momentum vector (z component) in GeV
432
433// float Eta; // particle pseudorapidity
434// float Phi; // particle azimuthal angle in rad
435
436 void Set(const TLorentzVector& momentum);// { return TRootParticle::Set(momentum); }
437
438 static TCompare *fgCompare; //!
439
440 // float PT; // particle transverse momentum in GeV
441
442 ClassDef(TRootTauJet, 1)
443};
444
445//---------------------------------------------------------------------------
446
447class TRootJet: public TRootParticle
448{
449public:
450 TRootJet() {};
451
452 static TCompare *fgCompare; //!
453
454 bool Btag;
455 int NTracks;
456 int NCalo;
457
458 float EHoverEE;
459 ClassDef(TRootJet, 1)
460};
461
462//------------------------------------------------------------------------------
463
464class TRootTrigger: public TSortableObject
465{
466public:
467 TRootTrigger() {};
468
469 int Accepted;
470
471 static TCompare *fgCompare; //!
472 const TCompare *GetCompare() const { return fgCompare; }
473
474 ClassDef(TRootTrigger, 1)
475};
476//---------------------------------------------------------------------------
477
478class TRootETmis: public TSortableObject
479{
480public:
481 TRootETmis() {};
482 float ET; // jet energy [RecJet::getEnergy()]
483 float Phi; // jet azimuthal angle [RecJet::getPhi()]
484 float Px;
485 float Py;
486
487 static TCompare *fgCompare; //!
488 const TCompare *GetCompare() const { return fgCompare; }
489
490 ClassDef(TRootETmis, 1)
491};
492
493//---------------------------------------------------------------------------
494
495//class TRootRomanPotHits: public TSortableObject
496class TRootRomanPotHits: public TRootGenFwdParticle
497{
498public:
499 TRootRomanPotHits() {};
500 // float T; // time of flight to the detector [s]
501 float S; // distance to the IP [m]
502 float E; // reconstructed energy [GeV]
503 float q2; // reconstructed squared momentum transfer [GeV^2]
504
505 float X; // horizontal distance to the beam [um]
506 float Y; // vertical distance to the beam [um]
507
508 float Tx; // angle of the momentum in the horizontal (x,z) plane [urad]
509 float Ty; // angle of the momentum in the verical (y,z) plane [urad]
510
511 float T; // time of flight to the detector [s]
512 int side; // -1 or 1
513
514 static TCompare *fgCompare; //!
515 //const TCompare *GetCompare() const { return fgCompare; }
516
517 ClassDef(TRootRomanPotHits, 2)
518};
519
520//---------------------------------------------------------------------------
521
522class TRootForwardTaggerHits : public TRootRomanPotHits
523{
524public:
525 TRootForwardTaggerHits() {};
526 float T; // time of flight to the detector [s]
527
528 static TCompare *fgCompare; //!
529 const TCompare *GetCompare() const { return fgCompare; }
530
531 ClassDef(TRootForwardTaggerHits, 1)
532};
533
534
535
536
537class TRootLHEFParticle: public TRootC::GenParticle
538{
539public:
540 TRootLHEFParticle() {};
541 int ColorLine1; // index for the particle color-line | hepup.ICOLUP[number][0]
542 int ColorLine2; // index for the particle anti-color-line | hepup.ICOLUP[number][1]
543
544 double Rapidity; // particle rapidity
545 double LifeTime; // particle invariant lifetime
546 // (c*tau, distance from production to decay in mm)
547 // | hepup.VTIMUP[number]
548
549 double Spin; // cosine of the angle between the particle spin vector
550 // and the decaying particle 3-momentum,
551 // specified in the lab frame. | hepup.SPINUP[number]
552
553 static TCompare *fgCompare; //!
554 const TCompare *GetCompare() const { return fgCompare; }
555 ClassDef(TRootLHEFParticle, 2)
556
557};
558
559#endif // BLOCKCLASSES_H
560
Note: See TracBrowser for help on using the repository browser.