/** \class BlockClasses * * Initialization of static fgCompare functions. At the moment a number of * functions TCompare*** are 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. * By default most objects are sorted by PT or ET. * Only calorimeter cells and basic cluster are sorted by E * TRootGenParticle particle is not sorted by default * to preserve mother-dautherlinks between particles. * * $Date: 2008-12-04 12:12:04 $ * $Revision: 1.5 $ * * * \author S. Ovyn - UCL, Louvain-la-Neuve * */ #include "Utilities/ExRootAnalysis/interface/BlockClasses.h" #include "Utilities/ExRootAnalysis/interface/BlockCompare.h" #include "TLorentzVector.h" TCompare *TRootGenParticle::fgCompare = 0; TCompare *TRootJet::fgCompare = TComparePT::Instance(); TCompare *TRootElectron::fgCompare = TComparePT::Instance(); TCompare *TRootMuon::fgCompare = TComparePT::Instance(); TCompare *TRootPhoton::fgCompare = TComparePT::Instance(); TCompare *TRootTauJet::fgCompare = TComparePT::Instance(); TCompare *TRootTracks::fgCompare = TComparePT::Instance(); TCompare *TRootETmis::fgCompare = 0; TCompare *TRootCalo::fgCompare = 0; TCompare *TRootZdcHits::fgCompare = 0; TCompare *TRootGenEvent:: fgCompare = 0; TCompare *TRootParticle::fgCompare=0; TCompare *TRootLHEFParticle::fgCompare = 0; TCompare *TRootRomanPotHits::fgCompare =0; TCompare *TRootTrigger::fgCompare =0; void TRootParticle::Set(const TLorentzVector& momentum) { E = momentum.E(); Px = momentum.Px(); Py = momentum.Py(); Pz = momentum.Pz(); PT = momentum.Pt(); Eta = momentum.Eta(); Phi = momentum.Phi(); } void TRootParticle::Set(float px,float py,float pz, float e) { TLorentzVector toFill; toFill.SetPxPyPzE(px,py,pz,e); E = e; Px = px; Py = py; Pz = pz; PT = toFill.Pt(); Eta = toFill.Eta(); Phi = toFill.Phi(); }