#ifndef BLOCKCLASSES_H #define BLOCKCLASSES_H /** \class BlockClasses * * Definition of classes to be stored in root tree. * You can decide to have the objects in each event to be sorted according * to one of the data member of the class. If you decide so then a class * inheriting from class TCompare should be implemented. * There are already several functions TCompare*** implemented * (see BlockCompare.h). * Function TCompareXX sorts objects by the variable "XX" that MUST be * present in the data members of the Block TRoot class. * * $Date: 2008-12-03 16:22:42 $ * $Revision: 1.7 $ * * * \author P. Demin - UCL, Louvain-la-Neuve * */ // Dependencies (#includes) #include "TLorentzVector.h" #include "TRef.h" #include "TObject.h" #include "TRefArray.h" #include "Utilities/ExRootAnalysis/interface/BlockCompare.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_t Px; // particle momentum vector (x component) | hepup.PUP[number][0] Double_t Py; // particle momentum vector (y component) | hepup.PUP[number][1] Double_t Pz; // particle momentum vector (z component) | hepup.PUP[number][2] Double_t E; // particle energy | hepup.PUP[number][3] Double_t M; // particle mass | hepup.PUP[number][4] Double_t PT; // particle transverse momentum Double_t Eta; // particle pseudorapidity Double_t Phi; // particle azimuthal angle Double_t Rapidity; // particle rapidity Double_t LifeTime; // particle invariant lifetime // (c*tau, distance from production to decay in mm) // | hepup.VTIMUP[number] Double_t 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 PT; // particle transverse momentum in GeV float Eta; // particle pseudorapidity float Phi; // particle azimuthal angle in rad void Set(const TLorentzVector& momentum); void Set(float px,float py,float pz, float e); static TCompare *fgCompare; //! const TCompare *GetCompare() const { return fgCompare; } ClassDef(TRootParticle, 1) }; //--------------------------------------------------------------------------- class TRootGenParticle: public TRootParticle { public: TRootGenParticle() {}; 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; // electrical 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(TRootGenParticle, 1) }; //------------------------------------------------------------------------------ class TRootElectron: public TRootParticle { public: TRootElectron() {}; int Charge; // particle Charge [RawHepEventParticle::pid()] static TCompare *fgCompare; //! bool IsolFlag; ClassDef(TRootElectron, 1) }; //------------------------------------------------------------------------------ class TRootPhoton: public TRootParticle { public: TRootPhoton() {}; static TCompare *fgCompare; //! ClassDef(TRootPhoton, 1) }; //------------------------------------------------------------------------------ class TRootMuon: public TRootParticle { public: TRootMuon() {}; int Charge; // particle Charge [RawHepEventParticle::pid()] bool IsolFlag; static TCompare *fgCompare; //! ClassDef(TRootMuon, 1) }; //--------------------------------------------------------------------------- class TRootTracks: public TRootParticle { public: TRootTracks() {}; static TCompare *fgCompare; //! ClassDef(TRootTracks, 1) }; //--------------------------------------------------------------------------- class TRootCalo: public TRootParticle { public: TRootCalo() {}; static TCompare *fgCompare; //! ClassDef(TRootCalo, 1) }; //--------------------------------------------------------------------------- class TRootZdcHits: public TRootParticle { public: TRootZdcHits() {}; float T; // time of flight [s] int side; // -1 or +1 static TCompare *fgCompare; //! ClassDef(TRootZdcHits, 1) }; //--------------------------------------------------------------------------- class TRootJet: public TRootParticle { public: TRootJet() {}; bool Btag; static TCompare *fgCompare; //! ClassDef(TRootJet, 1) }; //--------------------------------------------------------------------------- class TRootTauJet: public TRootParticle { public: TRootTauJet() {}; static TCompare *fgCompare; //! ClassDef(TRootTauJet, 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] int side; // -1 or 1 static TCompare *fgCompare; //! const TCompare *GetCompare() const { return fgCompare; } ClassDef(TRootRomanPotHits, 1) }; //--------------------------------------------------------------------------- #endif // BLOCKCLASSES_H