Fork me on GitHub

source: svn/trunk/Utilities/ExRootAnalysis/src/BlockClasses.cc@ 233

Last change on this file since 233 was 220, checked in by Xavier Rouby, 16 years ago

include statements have been cleaned

File size: 2.0 KB
RevLine 
[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 *
[220]13 * $Date: 2009-02-02 11:32:01 $
14 * $Revision: 1.7 $
[3]15 *
16 *
17 * \author S. Ovyn - UCL, Louvain-la-Neuve
18 *
19 */
20
[220]21#include "BlockClasses.h"
22#include "BlockCompare.h"
[73]23#include "TLorentzVector.h"
24
[3]25TCompare *TRootGenParticle::fgCompare = 0;
26TCompare *TRootJet::fgCompare = TComparePT<TRootJet>::Instance();
27TCompare *TRootElectron::fgCompare = TComparePT<TRootElectron>::Instance();
28TCompare *TRootMuon::fgCompare = TComparePT<TRootMuon>::Instance();
29TCompare *TRootPhoton::fgCompare = TComparePT<TRootPhoton>::Instance();
30TCompare *TRootTauJet::fgCompare = TComparePT<TRootTauJet>::Instance();
31TCompare *TRootTracks::fgCompare = TComparePT<TRootTracks>::Instance();
32TCompare *TRootETmis::fgCompare = 0;
33TCompare *TRootCalo::fgCompare = 0;
34TCompare *TRootZdcHits::fgCompare = 0;
35TCompare *TRootGenEvent:: fgCompare = 0;
36TCompare *TRootParticle::fgCompare=0;
37TCompare *TRootLHEFParticle::fgCompare = 0;
38TCompare *TRootRomanPotHits::fgCompare =0;
[67]39TCompare *TRootTrigger::fgCompare =0;
[3]40
41void 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}
[85]50
[176]51void TRootParticle::Set(const float px, const float py, const float pz, const float e) {
[73]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}
[3]62
[73]63
Note: See TracBrowser for help on using the repository browser.