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-02-02 11:32:01 $
|
---|
14 | * $Revision: 1.7 $
|
---|
15 | *
|
---|
16 | *
|
---|
17 | * \author S. Ovyn - UCL, Louvain-la-Neuve
|
---|
18 | *
|
---|
19 | */
|
---|
20 |
|
---|
21 | #include "BlockClasses.h"
|
---|
22 | #include "BlockCompare.h"
|
---|
23 | #include "TLorentzVector.h"
|
---|
24 |
|
---|
25 | TCompare *TRootGenParticle::fgCompare = 0;
|
---|
26 | TCompare *TRootJet::fgCompare = TComparePT<TRootJet>::Instance();
|
---|
27 | TCompare *TRootElectron::fgCompare = TComparePT<TRootElectron>::Instance();
|
---|
28 | TCompare *TRootMuon::fgCompare = TComparePT<TRootMuon>::Instance();
|
---|
29 | TCompare *TRootPhoton::fgCompare = TComparePT<TRootPhoton>::Instance();
|
---|
30 | TCompare *TRootTauJet::fgCompare = TComparePT<TRootTauJet>::Instance();
|
---|
31 | TCompare *TRootTracks::fgCompare = TComparePT<TRootTracks>::Instance();
|
---|
32 | TCompare *TRootETmis::fgCompare = 0;
|
---|
33 | TCompare *TRootCalo::fgCompare = 0;
|
---|
34 | TCompare *TRootZdcHits::fgCompare = 0;
|
---|
35 | TCompare *TRootGenEvent:: fgCompare = 0;
|
---|
36 | TCompare *TRootParticle::fgCompare=0;
|
---|
37 | TCompare *TRootLHEFParticle::fgCompare = 0;
|
---|
38 | TCompare *TRootRomanPotHits::fgCompare =0;
|
---|
39 | TCompare *TRootTrigger::fgCompare =0;
|
---|
40 |
|
---|
41 | void TRootParticle::Set(const TLorentzVector& momentum) {
|
---|
42 | E = momentum.E();
|
---|
43 | Px = momentum.Px();
|
---|
44 | Py = momentum.Py();
|
---|
45 | Pz = momentum.Pz();
|
---|
46 | PT = momentum.Pt();
|
---|
47 | Eta = momentum.Eta();
|
---|
48 | Phi = momentum.Phi();
|
---|
49 | }
|
---|
50 |
|
---|
51 | void TRootParticle::Set(const float px, const float py, const float pz, const float e) {
|
---|
52 | TLorentzVector toFill;
|
---|
53 | toFill.SetPxPyPzE(px,py,pz,e);
|
---|
54 | E = e;
|
---|
55 | Px = px;
|
---|
56 | Py = py;
|
---|
57 | Pz = pz;
|
---|
58 | PT = toFill.Pt();
|
---|
59 | Eta = toFill.Eta();
|
---|
60 | Phi = toFill.Phi();
|
---|
61 | }
|
---|
62 |
|
---|
63 |
|
---|