Fork me on GitHub

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

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

better constructors for muon/electron/photon. IsolPt and EtRatio added for muons/electrons

File size: 15.7 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
92 double PT; // particle transverse momentum
93 double Eta; // particle pseudorapidity
94 double Phi; // particle azimuthal angle
95
96 double Rapidity; // particle rapidity
97
98 double LifeTime; // particle invariant lifetime
99 // (c*tau, distance from production to decay in mm)
100 // | hepup.VTIMUP[number]
101
102 double Spin; // cosine of the angle between the particle spin vector
103 // and the decaying particle 3-momentum,
104 // specified in the lab frame. | hepup.SPINUP[number]
105
106 static TCompare *fgCompare; //!
107 const TCompare *GetCompare() const { return fgCompare; }
108 ClassDef(TRootLHEFParticle, 2)
109
110};
111
112//---------------------------------------------------------------------------
113
114class TRootSelectorInfo: public TObject
115{
116public:
117 TRootSelectorInfo() {};
118 int Processed; // current number of processed events
119 int Accepted; // current number of accepted events
120
121 ClassDef(TRootSelectorInfo, 1)
122};
123
124
125class TRootGenEvent: public TObject
126{
127public:
128 TRootGenEvent() {};
129 Long64_t Number; // event number | hepevt.nevhep
130
131 static TCompare *fgCompare; //!
132 const TCompare *GetCompare() const { return fgCompare; }
133
134 ClassDef(TRootGenEvent, 1)
135};
136
137
138class TRootEvent: public TObject {
139
140public:
141 TRootEvent() {};
142 int Run; // run number [G3EventProxy::simSignal().id().runNumber()]
143 int Event; // event number [G3EventProxy::simSignal().id().eventInRun()]
144
145// Short_t L1Decision; // L1 trigger global decision [L1Trigger::decision()]
146// Short_t HLTDecision; // HLT trigger global decision [HighLevelTriggerResult::getGlobalDecision()]
147
148 ClassDef(TRootEvent, 1)
149};
150
151//---------------------------------------------------------------------------
152
153class TRootParticle: public TSortableObject {
154
155public:
156
157 TRootParticle() {};
158 float E; // particle energy in GeV
159 float Px; // particle momentum vector (x component) in GeV
160 float Py; // particle momentum vector (y component) in GeV
161 float Pz; // particle momentum vector (z component) in GeV
162
163 float Eta; // particle pseudorapidity
164 float Phi; // particle azimuthal angle in rad
165
166 void Set(const TLorentzVector& momentum);
167 void Set(const float px, const float py, const float pz, const float e);
168 void SetEtaPhi(const float eta, const float phi) {Eta=eta; Phi=phi;};
169 void SetEtaPhiEET(const float eta, const float phi, const float e, const float et);
170 static TCompare *fgCompare; //!
171 const TCompare *GetCompare() const { return fgCompare; }
172 float PT; // particle transverse momentum in GeV
173
174 ClassDef(TRootParticle, 1)
175};
176
177//--------------------------------------------------------------------------
178class TRootGenParticle;
179class GenParticle: public TRootParticle {
180
181public:
182 GenParticle() {};
183 GenParticle(const TRootGenParticle& p);
184 int PID; // particle HEP ID number [RawHepEventParticle::pid()]
185 int Status; // particle status [RawHepEventParticle::status()]
186 int M1; // particle 1st mother [RawHepEventParticle::mother1() - 1]
187 int M2; // particle 2nd mother [RawHepEventParticle::mother2() - 1]
188 int D1; // particle 1st daughter [RawHepEventParticle::daughter1() - 1]
189 int D2; // particle 2nd daughter [RawHepEventParticle::daughter2() - 1]
190
191 float Charge;
192
193 float T; // particle vertex position (t component) [RawHepEventParticle::t()]
194 float X; // particle vertex position (x component) [RawHepEventParticle::x()]
195 float Y; // particle vertex position (y component) [RawHepEventParticle::y()]
196 float Z; // particle vertex position (z component) [RawHepEventParticle::z()]
197 float M;
198
199
200 static TCompare *fgCompare; //!
201
202 ClassDef(GenParticle, 1)
203};
204
205//---------------------------------------------------------------------------
206
207class TRootGenParticle: public TRootParticle {
208
209public:
210 TRootGenParticle() {_initialised=false;}
211 TRootGenParticle(const int pid): PID(pid) {_initialised=false;}
212 TRootGenParticle(GenParticle* part);
213
214 int PID; // particle HEP ID number [RawHepEventParticle::pid()]
215 int Status; // particle status [RawHepEventParticle::status()]
216 int M1; // particle 1st mother [RawHepEventParticle::mother1() - 1]
217 int M2; // particle 2nd mother [RawHepEventParticle::mother2() - 1]
218 int D1; // particle 1st daughter [RawHepEventParticle::daughter1() - 1]
219 int D2; // particle 2nd daughter [RawHepEventParticle::daughter2() - 1]
220
221 float T; // particle vertex position (t component) [RawHepEventParticle::t()]
222 float X; // particle vertex position (x component) [RawHepEventParticle::x()]
223 float Y; // particle vertex position (y component) [RawHepEventParticle::y()]
224 float Z; // particle vertex position (z component) [RawHepEventParticle::z()]
225 float M;
226 void setFractions();
227 const float getFem() {if(!_initialised) setFractions(); return _Fem;}
228 const float getFhad() {if(!_initialised) setFractions(); return _Fhad;}
229
230 float EtaCalo; // particle pseudorapidity when entering the calo,
231 float PhiCalo; // particle azimuthal angle in rad when entering the calo
232 void SetEtaPhiCalo(const float eta, const float phi) {EtaCalo=eta; PhiCalo=phi;};
233
234 static TCompare *fgCompare; //!
235
236 float Charge; // electrical charge
237 protected:
238 float _Fem, _Fhad; // fractions of energy deposit
239 bool _initialised;
240 ClassDef(TRootGenParticle, 1)
241};
242
243
244//------------------------------------------------------------------------------
245
246class TRootElectron: public TRootParticle {
247public:
248 TRootElectron():Charge(-999), IsolFlag(false), IsolPt(UNDEFINED), EtaCalo(UNDEFINED), PhiCalo(UNDEFINED), EHoverEE(UNDEFINED){};
249 static TCompare *fgCompare; //!
250 int Charge; // particle Charge [RawHepEventParticle::pid()]
251 bool IsolFlag; // stores the result of the isolation test
252 float IsolPt; // sum of pt around the electron, for isolation criteria
253 float EtaCalo; // particle pseudorapidity when entering the calo,
254 float PhiCalo; // particle azimuthal angle in rad when entering the calo
255 float EHoverEE;
256
257 void SetEtaPhiCalo(const float eta, const float phi) {EtaCalo=eta; PhiCalo=phi;};
258
259 ClassDef(TRootElectron, 1)
260};
261
262//------------------------------------------------------------------------------
263
264class TRootPhoton: public TRootParticle {
265public:
266 TRootPhoton() : EHoverEE(UNDEFINED) {};
267 static TCompare *fgCompare; //!
268
269 float EHoverEE;
270 ClassDef(TRootPhoton, 1)
271};
272
273
274//------------------------------------------------------------------------------
275
276class TRootMuon: public TRootParticle {
277public:
278 TRootMuon():Charge(-999), IsolFlag(false), IsolPt(UNDEFINED), EtaCalo(UNDEFINED), PhiCalo(UNDEFINED),
279 EHoverEE(UNDEFINED), EtRatio(UNDEFINED) {};
280 static TCompare *fgCompare; //!
281 int Charge; // particle Charge [RawHepEventParticle::pid()]
282 bool IsolFlag;
283 float IsolPt;
284 float EtaCalo; // particle pseudorapidity when entering the calo,
285 float PhiCalo; // particle azimuthal angle in rad when entering the calo
286 float EHoverEE; // hadronic energy over electromagnetic energy
287 float EtRatio; // calo Et in NxN-tower grid around the muon over the muon Et
288
289 void SetEtaPhiCalo(const float eta, const float phi) {EtaCalo=eta; PhiCalo=phi;};
290 ClassDef(TRootMuon, 1)
291};
292
293//---------------------------------------------------------------------------
294
295class TRootTracks : public TSortableObject {
296 public:
297 TRootTracks(); // needed for storage in ExRootAnalysis
298 TRootTracks(const TRootTracks& track);
299 TRootTracks(const float inEta, const float inPhi, const float outEta, const float outPhi, const float pt);
300 TRootTracks& operator=(const TRootTracks& track);
301 void Set(const float inEta, const float inPhi, const float outEta, const float outPhi, const float pt, const float charge);
302 const TLorentzVector GetFourVector() const;
303 const float getEta() const {return Eta;}
304 const float getPhi() const {return Phi;}
305 const float getEtaOuter() const {return EtaOuter;}
306 const float getPhiOuter() const {return PhiOuter;}
307
308 static TCompare *fgCompare; //!
309 const TCompare *GetCompare() const { return fgCompare; }
310
311 float Eta, Phi; // (eta,phi) at the beginning of the track
312 float EtaOuter, PhiOuter; // (eta,phi) at the end of the track
313 float PT, E, Px, Py, Pz; // transverse momentum
314 float Charge;
315 ClassDef(TRootTracks, 1)
316};
317
318//---------------------------------------------------------------------------
319
320class TRootCalo: public TSortableObject
321{
322//class TRootCalo: public TRootParticle {
323 public:
324 float Eta;
325 float Phi;
326 float E;
327 TRootCalo() ;
328 TRootCalo(const TRootCalo& cal);
329 TRootCalo& operator=(const TRootCalo& cal);
330 void set(const D_CaloTower& cal);
331 static TCompare *fgCompare; //!
332 const TCompare *GetCompare() const { return fgCompare; }
333 const float getET() const {return ET;}
334
335 protected:
336 float E_em, E_had; // electromagnetic and hadronic components of the tower energy
337 float ET; // total energy and transverse energy
338 ClassDef(TRootCalo, 1)
339};
340
341//---------------------------------------------------------------------------
342class TRootZdcHits: public TRootParticle
343{
344public:
345 TRootZdcHits() {};
346 float T; // time of flight [s]
347 int side; // -1 or +1
348 static TCompare *fgCompare; //!
349
350 ClassDef(TRootZdcHits, 1)
351};
352
353//---------------------------------------------------------------------------
354
355class TRootTauJet: public TRootParticle
356{
357public:
358 TRootTauJet() {};
359 float Charge; // normally, using the charge of the track ; here using gen-level tau charge
360 int NTracks;
361
362 float EHoverEE;
363// float E; // particle energy in GeV
364// float Px; // particle momentum vector (x component) in GeV
365// float Py; // particle momentum vector (y component) in GeV
366// float Pz; // particle momentum vector (z component) in GeV
367
368// float Eta; // particle pseudorapidity
369// float Phi; // particle azimuthal angle in rad
370
371 void Set(const TLorentzVector& momentum);// { return TRootParticle::Set(momentum); }
372
373 static TCompare *fgCompare; //!
374
375 // float PT; // particle transverse momentum in GeV
376
377 ClassDef(TRootTauJet, 1)
378};
379
380//---------------------------------------------------------------------------
381
382class TRootJet: public TRootParticle
383{
384public:
385 TRootJet() {};
386
387 static TCompare *fgCompare; //!
388
389 bool Btag;
390 int NTracks;
391
392 float EHoverEE;
393 ClassDef(TRootJet, 1)
394};
395
396//------------------------------------------------------------------------------
397
398class TRootTrigger: public TSortableObject
399{
400public:
401 TRootTrigger() {};
402
403 int Accepted;
404
405 static TCompare *fgCompare; //!
406 const TCompare *GetCompare() const { return fgCompare; }
407
408 ClassDef(TRootTrigger, 1)
409};
410//---------------------------------------------------------------------------
411
412class TRootETmis: public TSortableObject
413{
414public:
415 TRootETmis() {};
416 float ET; // jet energy [RecJet::getEnergy()]
417 float Phi; // jet azimuthal angle [RecJet::getPhi()]
418 float Px;
419 float Py;
420
421 static TCompare *fgCompare; //!
422 const TCompare *GetCompare() const { return fgCompare; }
423
424 ClassDef(TRootETmis, 1)
425};
426
427//---------------------------------------------------------------------------
428
429class TRootRomanPotHits: public TSortableObject
430{
431public:
432 TRootRomanPotHits() {};
433 float T; // time of flight to the detector [s]
434 float S; // distance to the IP [m]
435 float E; // reconstructed energy [GeV]
436 float q2; // reconstructed squared momentum transfer [GeV^2]
437
438 float X; // horizontal distance to the beam [um]
439 float Y; // vertical distance to the beam [um]
440
441 float Tx; // angle of the momentum in the horizontal (x,z) plane [urad]
442 float Ty; // angle of the momentum in the verical (y,z) plane [urad]
443
444 int side; // -1 or 1
445
446 static TCompare *fgCompare; //!
447 const TCompare *GetCompare() const { return fgCompare; }
448
449 ClassDef(TRootRomanPotHits, 1)
450};
451
452#endif // BLOCKCLASSES_H
453
Note: See TracBrowser for help on using the repository browser.