[3] | 1 | /** \class BlockClasses
|
---|
| 2 | *
|
---|
| 3 | * Initialization of static fgCompare functions. At the moment a number of
|
---|
| 4 | * functions TCompare*** are implemented (see BlockCompare.h).
|
---|
| 5 | * Function TCompareXX sorts objects
|
---|
| 6 | * by the variable "XX" that MUST be present in the data members of the
|
---|
| 7 | * Block TRoot class.
|
---|
| 8 | * By default most objects are sorted by PT or ET.
|
---|
| 9 | * Only calorimeter cells and basic cluster are sorted by E
|
---|
| 10 | * TRootGenParticle particle is not sorted by default
|
---|
| 11 | * to preserve mother-dautherlinks between particles.
|
---|
| 12 | *
|
---|
| 13 | * $Date: 2008-11-04 10:32:26 $
|
---|
| 14 | * $Revision: 1.1 $
|
---|
| 15 | *
|
---|
| 16 | *
|
---|
| 17 | * \author S. Ovyn - UCL, Louvain-la-Neuve
|
---|
| 18 | *
|
---|
| 19 | */
|
---|
| 20 |
|
---|
| 21 | #include "Utilities/ExRootAnalysis/interface/BlockClasses.h"
|
---|
| 22 | #include "Utilities/ExRootAnalysis/interface/BlockCompare.h"
|
---|
| 23 |
|
---|
| 24 | TCompare *TRootGenParticle::fgCompare = 0;
|
---|
| 25 | TCompare *TRootJet::fgCompare = TComparePT<TRootJet>::Instance();
|
---|
| 26 | TCompare *TRootElectron::fgCompare = TComparePT<TRootElectron>::Instance();
|
---|
| 27 | TCompare *TRootMuon::fgCompare = TComparePT<TRootMuon>::Instance();
|
---|
| 28 | TCompare *TRootPhoton::fgCompare = TComparePT<TRootPhoton>::Instance();
|
---|
| 29 | TCompare *TRootTauJet::fgCompare = TComparePT<TRootTauJet>::Instance();
|
---|
| 30 | TCompare *TRootTracks::fgCompare = TComparePT<TRootTracks>::Instance();
|
---|
| 31 | TCompare *TRootETmis::fgCompare = 0;
|
---|
| 32 | TCompare *TRootCalo::fgCompare = 0;
|
---|
| 33 | TCompare *TRootZdcHits::fgCompare = 0;
|
---|
| 34 | TCompare *TRootGenEvent:: fgCompare = 0;
|
---|
| 35 | TCompare *TRootParticle::fgCompare=0;
|
---|
| 36 | TCompare *TRootLHEFParticle::fgCompare = 0;
|
---|
| 37 | TCompare *TRootRomanPotHits::fgCompare =0;
|
---|
| 38 |
|
---|
| 39 | void TRootParticle::Set(const TLorentzVector& momentum) {
|
---|
| 40 | E = momentum.E();
|
---|
| 41 | Px = momentum.Px();
|
---|
| 42 | Py = momentum.Py();
|
---|
| 43 | Pz = momentum.Pz();
|
---|
| 44 | PT = momentum.Pt();
|
---|
| 45 | Eta = momentum.Eta();
|
---|
| 46 | Phi = momentum.Phi();
|
---|
| 47 | }
|
---|
| 48 |
|
---|