Fork me on GitHub

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

Last change on this file since 446 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
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 int pid;
357
358 ClassDef(TRootZdcHits, 1)
359};
360*/
361
362// gen-level info stored for forward detectors
363// this class is similar to TRootParticle, but for the member names
364class TRootGenFwdParticle: public TSortableObject {
365
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
395{
396public:
397
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;
403 float T; // time of flight [s]
404 int side; // -1 or +1
405 static TCompare *fgCompare; //!
406 bool hadronic_hit; // true if neutron, false if photon
407
408 ClassDef(TRootZdcHits, 2)
409};
410
411
412//---------------------------------------------------------------------------
413
414class TRootTauJet: public TRootParticle
415{
416public:
417 TRootTauJet() {};
418 float Charge; // normally, using the charge of the track ; here using gen-level tau charge
419 int NTracks;
420
421 float EHoverEE;
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
426
427// float Eta; // particle pseudorapidity
428// float Phi; // particle azimuthal angle in rad
429
430 void Set(const TLorentzVector& momentum);// { return TRootParticle::Set(momentum); }
431
432 static TCompare *fgCompare; //!
433
434 // float PT; // particle transverse momentum in GeV
435
436 ClassDef(TRootTauJet, 1)
437};
438
439//---------------------------------------------------------------------------
440
441class TRootJet: public TRootParticle
442{
443public:
444 TRootJet() {};
445
446 static TCompare *fgCompare; //!
447
448 bool Btag;
449 int NTracks;
450
451 float EHoverEE;
452 ClassDef(TRootJet, 1)
453};
454
455//------------------------------------------------------------------------------
456
457class TRootTrigger: public TSortableObject
458{
459public:
460 TRootTrigger() {};
461
462 int Accepted;
463
464 static TCompare *fgCompare; //!
465 const TCompare *GetCompare() const { return fgCompare; }
466
467 ClassDef(TRootTrigger, 1)
468};
469//---------------------------------------------------------------------------
470
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
488//class TRootRomanPotHits: public TSortableObject
489class TRootRomanPotHits: public TRootGenFwdParticle
490{
491public:
492 TRootRomanPotHits() {};
493 // float T; // time of flight to the detector [s]
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
504 float T; // time of flight to the detector [s]
505 int side; // -1 or 1
506
507 static TCompare *fgCompare; //!
508 //const TCompare *GetCompare() const { return fgCompare; }
509
510 ClassDef(TRootRomanPotHits, 2)
511};
512
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
528#endif // BLOCKCLASSES_H
529
Note: See TracBrowser for help on using the repository browser.