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-12-02 19:50:30 $
|
---|
14 | * $Revision: 1.3 $
|
---|
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 | TCompare *TRootTrigger::fgCompare =0;
|
---|
39 |
|
---|
40 | void TRootParticle::Set(const TLorentzVector& momentum) {
|
---|
41 | E = momentum.E();
|
---|
42 | Px = momentum.Px();
|
---|
43 | Py = momentum.Py();
|
---|
44 | Pz = momentum.Pz();
|
---|
45 | PT = momentum.Pt();
|
---|
46 | Eta = momentum.Eta();
|
---|
47 | Phi = momentum.Phi();
|
---|
48 | }
|
---|
49 |
|
---|