#ifndef BLOCKCLASSES_H #define BLOCKCLASSES_H /*********************************************************************** ** ** ** /----------------------------------------------\ ** ** | Delphes, a framework for the fast simulation | ** ** | of a generic collider experiment | ** ** \----------------------------------------------/ ** ** ** ** ** ** This package uses: ** ** ------------------ ** ** FastJet algorithm: Phys. Lett. B641 (2006) [hep-ph/0512210] ** ** Hector: JINST 2:P09005 (2007) [physics.acc-ph:0707.1198v2] ** ** FROG: [hep-ex/0901.2718v1] ** ** ** ** ------------------------------------------------------------------ ** ** ** ** Main authors: ** ** ------------- ** ** ** ** Severine Ovyn Xavier Rouby ** ** severine.ovyn@uclouvain.be xavier.rouby@cern ** ** ** ** Center for Particle Physics and Phenomenology (CP3) ** ** Universite catholique de Louvain (UCL) ** ** Louvain-la-Neuve, Belgium ** ** ** ** Copyright (C) 2008-2009, ** ** All rights reserved. ** ** ** ***********************************************************************/ #include "TLorentzVector.h" #include "TObject.h" #include "BlockCompare.h" #include "interface/D_Constants.h" #include "interface/CaloUtil.h" class TSortableObject: public TObject { public: TSortableObject() {}; Bool_t IsSortable() const { return GetCompare() ? GetCompare()->IsSortable(this) : kFALSE; } Int_t Compare(const TObject *obj) const { return GetCompare()->Compare(this, obj); } virtual const TCompare *GetCompare() const = 0; ClassDef(TSortableObject, 1) }; //--------------------------------------------------------------------------- // class TRootLHEFEvent: public TObject { public: TRootLHEFEvent() {}; Long64_t Number; // event number int Nparticles; // number of particles in the event | hepup.NUP int ProcessID; // subprocess code for the event | hepup.IDPRUP Double_t Weight; // weight for the event | hepup.XWGTUP Double_t ScalePDF; // scale in GeV used in the calculation of the PDFs in the event | hepup.SCALUP Double_t CouplingQED; // value of the QED coupling used in the event | hepup.AQEDUP Double_t CouplingQCD; // value of the QCD coupling used in the event | hepup.AQCDUP ClassDef(TRootLHEFEvent, 2) }; //--------------------------------------------------------------------------- class TRootLHEFParticle: public TSortableObject { public: TRootLHEFParticle() {}; int PID; // particle HEP ID number | hepup.IDUP[number] int Status; // particle status code | hepup.ISTUP[number] int Mother1; // index for the particle first mother | hepup.MOTHUP[number][0] int Mother2; // index for the particle last mother | hepup.MOTHUP[number][1] int ColorLine1; // index for the particle color-line | hepup.ICOLUP[number][0] int ColorLine2; // index for the particle anti-color-line | hepup.ICOLUP[number][1] double Px; // particle momentum vector (x component) | hepup.PUP[number][0] double Py; // particle momentum vector (y component) | hepup.PUP[number][1] double Pz; // particle momentum vector (z component) | hepup.PUP[number][2] double E; // particle energy | hepup.PUP[number][3] double M; // particle mass | hepup.PUP[number][4] double Charge; // particle charge double PT; // particle transverse momentum double Eta; // particle pseudorapidity double Phi; // particle azimuthal angle double Rapidity; // particle rapidity double LifeTime; // particle invariant lifetime // (c*tau, distance from production to decay in mm) // | hepup.VTIMUP[number] double Spin; // cosine of the angle between the particle spin vector // and the decaying particle 3-momentum, // specified in the lab frame. | hepup.SPINUP[number] static TCompare *fgCompare; //! const TCompare *GetCompare() const { return fgCompare; } ClassDef(TRootLHEFParticle, 2) }; //--------------------------------------------------------------------------- class TRootSelectorInfo: public TObject { public: TRootSelectorInfo() {}; int Processed; // current number of processed events int Accepted; // current number of accepted events ClassDef(TRootSelectorInfo, 1) }; class TRootGenEvent: public TObject { public: TRootGenEvent() {}; Long64_t Number; // event number | hepevt.nevhep static TCompare *fgCompare; //! const TCompare *GetCompare() const { return fgCompare; } ClassDef(TRootGenEvent, 1) }; class TRootEvent: public TObject { public: TRootEvent() {}; int Run; // run number [G3EventProxy::simSignal().id().runNumber()] int Event; // event number [G3EventProxy::simSignal().id().eventInRun()] // Short_t L1Decision; // L1 trigger global decision [L1Trigger::decision()] // Short_t HLTDecision; // HLT trigger global decision [HighLevelTriggerResult::getGlobalDecision()] ClassDef(TRootEvent, 1) }; //--------------------------------------------------------------------------- class TRootParticle: public TSortableObject { public: TRootParticle() {}; float E; // particle energy in GeV float Px; // particle momentum vector (x component) in GeV float Py; // particle momentum vector (y component) in GeV float Pz; // particle momentum vector (z component) in GeV float Eta; // particle pseudorapidity float Phi; // particle azimuthal angle in rad void Set(const TLorentzVector& momentum); void Set(const float px, const float py, const float pz, const float e); void SetEtaPhi(const float eta, const float phi) {Eta=eta; Phi=phi;}; void SetEtaPhiEET(const float eta, const float phi, const float e, const float et); static TCompare *fgCompare; //! const TCompare *GetCompare() const { return fgCompare; } float PT; // particle transverse momentum in GeV ClassDef(TRootParticle, 1) }; //-------------------------------------------------------------------------- class TRootGenParticle; namespace TRootC { class GenParticle: public TRootParticle { public: GenParticle() {}; GenParticle(const TRootGenParticle& p); int PID; // particle HEP ID number [RawHepEventParticle::pid()] int Status; // particle status [RawHepEventParticle::status()] int M1; // particle 1st mother [RawHepEventParticle::mother1() - 1] int M2; // particle 2nd mother [RawHepEventParticle::mother2() - 1] int D1; // particle 1st daughter [RawHepEventParticle::daughter1() - 1] int D2; // particle 2nd daughter [RawHepEventParticle::daughter2() - 1] float Charge; float T; // particle vertex position (t component) [RawHepEventParticle::t()] float X; // particle vertex position (x component) [RawHepEventParticle::x()] float Y; // particle vertex position (y component) [RawHepEventParticle::y()] float Z; // particle vertex position (z component) [RawHepEventParticle::z()] float M; static TCompare *fgCompare; //! ClassDef(GenParticle, 1) }; } //--------------------------------------------------------------------------- class TRootGenParticle: public TRootParticle { public: TRootGenParticle() {_initialised=false; M=-9999.; } TRootGenParticle(const int pid): PID(pid) {_initialised=false;} TRootGenParticle(TRootC::GenParticle* part); int PID; // particle HEP ID number [RawHepEventParticle::pid()] int Status; // particle status [RawHepEventParticle::status()] int M1; // particle 1st mother [RawHepEventParticle::mother1() - 1] int M2; // particle 2nd mother [RawHepEventParticle::mother2() - 1] int D1; // particle 1st daughter [RawHepEventParticle::daughter1() - 1] int D2; // particle 2nd daughter [RawHepEventParticle::daughter2() - 1] float T; // particle vertex position (t component) [RawHepEventParticle::t()] float X; // particle vertex position (x component) [RawHepEventParticle::x()] float Y; // particle vertex position (y component) [RawHepEventParticle::y()] float Z; // particle vertex position (z component) [RawHepEventParticle::z()] float M; void setFractions(); const float getFem() {if(!_initialised) setFractions(); return _Fem;} const float getFhad() {if(!_initialised) setFractions(); return _Fhad;} float EtaCalo; // particle pseudorapidity when entering the calo, float PhiCalo; // particle azimuthal angle in rad when entering the calo void SetEtaPhiCalo(const float eta, const float phi) {EtaCalo=eta; PhiCalo=phi;}; void print();// static TCompare *fgCompare; //! float Charge; // electrical charge protected: float _Fem, _Fhad; // fractions of energy deposit bool _initialised; ClassDef(TRootGenParticle, 1) }; //------------------------------------------------------------------------------ class TRootElectron: public TRootParticle { public: TRootElectron():Charge(-999), IsolFlag(false), IsolPt(UNDEFINED), EtaCalo(UNDEFINED), PhiCalo(UNDEFINED), EHoverEE(UNDEFINED){}; static TCompare *fgCompare; //! int Charge; // particle Charge [RawHepEventParticle::pid()] bool IsolFlag; // stores the result of the isolation test float IsolPt; // sum of pt around the electron, for isolation criteria float EtaCalo; // particle pseudorapidity when entering the calo, float PhiCalo; // particle azimuthal angle in rad when entering the calo float EHoverEE; void SetEtaPhiCalo(const float eta, const float phi) {EtaCalo=eta; PhiCalo=phi;}; ClassDef(TRootElectron, 1) }; //------------------------------------------------------------------------------ class TRootPhoton: public TRootParticle { public: TRootPhoton() : EHoverEE(UNDEFINED) {}; static TCompare *fgCompare; //! float EHoverEE; ClassDef(TRootPhoton, 1) }; //------------------------------------------------------------------------------ class TRootMuon: public TRootParticle { public: TRootMuon():Charge(-999), IsolFlag(false), IsolPt(UNDEFINED), EtaCalo(UNDEFINED), PhiCalo(UNDEFINED), EHoverEE(UNDEFINED), EtRatio(UNDEFINED) {}; static TCompare *fgCompare; //! int Charge; // particle Charge [RawHepEventParticle::pid()] bool IsolFlag; float IsolPt; float EtaCalo; // particle pseudorapidity when entering the calo, float PhiCalo; // particle azimuthal angle in rad when entering the calo float EHoverEE; // hadronic energy over electromagnetic energy float EtRatio; // calo Et in NxN-tower grid around the muon over the muon Et void SetEtaPhiCalo(const float eta, const float phi) {EtaCalo=eta; PhiCalo=phi;}; ClassDef(TRootMuon, 1) }; //--------------------------------------------------------------------------- class TRootTracks : public TSortableObject { public: TRootTracks(); // needed for storage in ExRootAnalysis TRootTracks(const TRootTracks& track); TRootTracks(const float inEta, const float inPhi, const float outEta, const float outPhi, const float pt); TRootTracks& operator=(const TRootTracks& track); void Set(const float inEta, const float inPhi, const float outEta, const float outPhi, const float pt, const float charge); const TLorentzVector GetFourVector() const; const float getEta() const {return Eta;} const float getPhi() const {return Phi;} const float getEtaOuter() const {return EtaOuter;} const float getPhiOuter() const {return PhiOuter;} static TCompare *fgCompare; //! const TCompare *GetCompare() const { return fgCompare; } float Eta, Phi; // (eta,phi) at the beginning of the track float EtaOuter, PhiOuter; // (eta,phi) at the end of the track float PT, E, Px, Py, Pz; // transverse momentum float Charge; ClassDef(TRootTracks, 1) }; //--------------------------------------------------------------------------- class TRootCalo: public TSortableObject { //class TRootCalo: public TRootParticle { public: float Eta; float Phi; float E; TRootCalo() ; TRootCalo(const TRootCalo& cal); TRootCalo& operator=(const TRootCalo& cal); void set(const D_CaloTower& cal); static TCompare *fgCompare; //! const TCompare *GetCompare() const { return fgCompare; } const float getET() const {return ET;} protected: float E_em, E_had; // electromagnetic and hadronic components of the tower energy float ET; // total energy and transverse energy ClassDef(TRootCalo, 1) }; //--------------------------------------------------------------------------- class TRootZdcHits: public TRootParticle { public: TRootZdcHits() {}; float T; // time of flight [s] int side; // -1 or +1 static TCompare *fgCompare; //! int pid; ClassDef(TRootZdcHits, 1) }; /*class TRootZdcHits: public TSortableObject { public: TRootZdcHits() {}; // do not put anything for the default constructor-- ExRootAnalysis constrain!!! TRootZdcHits(const float e, const float t, const int side, const bool had); TRootZdcHits(const TRootZdcHits& zdc); TRootZdcHits& operator=(const TRootZdcHits& zdc); const TCompare *GetCompare() const { return fgCompare; } float E; float T; // time of flight [s] int side; // -1 or +1 static TCompare *fgCompare; //! bool hadronic_hit; // true if neutron, false if photon ClassDef(TRootZdcHits, 2) }; */ //--------------------------------------------------------------------------- class TRootTauJet: public TRootParticle { public: TRootTauJet() {}; float Charge; // normally, using the charge of the track ; here using gen-level tau charge int NTracks; float EHoverEE; // float E; // particle energy in GeV // float Px; // particle momentum vector (x component) in GeV // float Py; // particle momentum vector (y component) in GeV // float Pz; // particle momentum vector (z component) in GeV // float Eta; // particle pseudorapidity // float Phi; // particle azimuthal angle in rad void Set(const TLorentzVector& momentum);// { return TRootParticle::Set(momentum); } static TCompare *fgCompare; //! // float PT; // particle transverse momentum in GeV ClassDef(TRootTauJet, 1) }; //--------------------------------------------------------------------------- class TRootJet: public TRootParticle { public: TRootJet() {}; static TCompare *fgCompare; //! bool Btag; int NTracks; float EHoverEE; ClassDef(TRootJet, 1) }; //------------------------------------------------------------------------------ class TRootTrigger: public TSortableObject { public: TRootTrigger() {}; int Accepted; static TCompare *fgCompare; //! const TCompare *GetCompare() const { return fgCompare; } ClassDef(TRootTrigger, 1) }; //--------------------------------------------------------------------------- class TRootETmis: public TSortableObject { public: TRootETmis() {}; float ET; // jet energy [RecJet::getEnergy()] float Phi; // jet azimuthal angle [RecJet::getPhi()] float Px; float Py; static TCompare *fgCompare; //! const TCompare *GetCompare() const { return fgCompare; } ClassDef(TRootETmis, 1) }; //--------------------------------------------------------------------------- class TRootRomanPotHits: public TSortableObject { public: TRootRomanPotHits() {}; // float T; // time of flight to the detector [s] float S; // distance to the IP [m] float E; // reconstructed energy [GeV] float q2; // reconstructed squared momentum transfer [GeV^2] float X; // horizontal distance to the beam [um] float Y; // vertical distance to the beam [um] float Tx; // angle of the momentum in the horizontal (x,z) plane [urad] float Ty; // angle of the momentum in the verical (y,z) plane [urad] float T; // time of flight to the detector [s] int side; // -1 or 1 int pid; static TCompare *fgCompare; //! const TCompare *GetCompare() const { return fgCompare; } ClassDef(TRootRomanPotHits, 1) }; //--------------------------------------------------------------------------- class TRootForwardTaggerHits : public TRootRomanPotHits { public: TRootForwardTaggerHits() {}; float T; // time of flight to the detector [s] static TCompare *fgCompare; //! const TCompare *GetCompare() const { return fgCompare; } ClassDef(TRootForwardTaggerHits, 1) }; #endif // BLOCKCLASSES_H