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: 2009-01-12 23:36:06 $
|
---|
14 | * $Revision: 1.6 $
|
---|
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 | #include "TLorentzVector.h"
|
---|
25 |
|
---|
26 | TCompare *TRootGenParticle::fgCompare = 0;
|
---|
27 | TCompare *TRootJet::fgCompare = TComparePT<TRootJet>::Instance();
|
---|
28 | TCompare *TRootElectron::fgCompare = TComparePT<TRootElectron>::Instance();
|
---|
29 | TCompare *TRootMuon::fgCompare = TComparePT<TRootMuon>::Instance();
|
---|
30 | TCompare *TRootPhoton::fgCompare = TComparePT<TRootPhoton>::Instance();
|
---|
31 | TCompare *TRootTauJet::fgCompare = TComparePT<TRootTauJet>::Instance();
|
---|
32 | TCompare *TRootTracks::fgCompare = TComparePT<TRootTracks>::Instance();
|
---|
33 | TCompare *TRootETmis::fgCompare = 0;
|
---|
34 | TCompare *TRootCalo::fgCompare = 0;
|
---|
35 | TCompare *TRootZdcHits::fgCompare = 0;
|
---|
36 | TCompare *TRootGenEvent:: fgCompare = 0;
|
---|
37 | TCompare *TRootParticle::fgCompare=0;
|
---|
38 | TCompare *TRootLHEFParticle::fgCompare = 0;
|
---|
39 | TCompare *TRootRomanPotHits::fgCompare =0;
|
---|
40 | TCompare *TRootTrigger::fgCompare =0;
|
---|
41 |
|
---|
42 | void TRootParticle::Set(const TLorentzVector& momentum) {
|
---|
43 | E = momentum.E();
|
---|
44 | Px = momentum.Px();
|
---|
45 | Py = momentum.Py();
|
---|
46 | Pz = momentum.Pz();
|
---|
47 | PT = momentum.Pt();
|
---|
48 | Eta = momentum.Eta();
|
---|
49 | Phi = momentum.Phi();
|
---|
50 | }
|
---|
51 |
|
---|
52 | void TRootParticle::Set(const float px, const float py, const float pz, const float e) {
|
---|
53 | TLorentzVector toFill;
|
---|
54 | toFill.SetPxPyPzE(px,py,pz,e);
|
---|
55 | E = e;
|
---|
56 | Px = px;
|
---|
57 | Py = py;
|
---|
58 | Pz = pz;
|
---|
59 | PT = toFill.Pt();
|
---|
60 | Eta = toFill.Eta();
|
---|
61 | Phi = toFill.Phi();
|
---|
62 | }
|
---|
63 |
|
---|
64 |
|
---|