ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/GenJet.h
Revision: 1.4
Committed: Wed Feb 18 15:38:54 2009 UTC (16 years, 2 months ago) by loizides
Content type: text/plain
Branch: MAIN
Changes since 1.3: +17 -9 lines
Log Message:
Reworked particle interface to cache FourVectorM

File Contents

# User Rev Content
1 sixie 1.1 //--------------------------------------------------------------------------------------------------
2 loizides 1.4 // $Id: GenJet.h,v 1.3 2008/12/09 17:47:00 loizides Exp $
3 sixie 1.1 //
4     // GenJet
5     //
6 loizides 1.3 // This class holds information about reconstructed jets at generation level.
7 sixie 1.1 //
8     // Authors: S.Xie
9     //--------------------------------------------------------------------------------------------------
10    
11     #ifndef MITANA_DATATREE_GENJET_H
12     #define MITANA_DATATREE_GENJET_H
13    
14     #include "MitAna/DataTree/interface/Particle.h"
15    
16     namespace mithep
17     {
18     class GenJet : public Particle
19     {
20     public:
21 loizides 1.2 GenJet() : fHadEnergy(0), fEmEnergy(0), fInvisibleEnergy(0),
22     fAuxiliaryEnergy(0), fMatchedMCFlavor(0) {}
23     GenJet(Double_t px, Double_t py, Double_t pz, Double_t e) :
24     fMom(px,py,pz,e), fHadEnergy(0), fEmEnergy(0), fInvisibleEnergy(0),
25     fAuxiliaryEnergy(0), fMatchedMCFlavor(0) {}
26 sixie 1.1
27 loizides 1.3 Double_t AuxiliaryEnergy() const { return fAuxiliaryEnergy; }
28 sixie 1.1 Double_t Charge() const { return 0; }
29 loizides 1.3 Double_t EmEnergy() const { return fEmEnergy; }
30 sixie 1.1 Double_t HadEnergy() const { return fHadEnergy; }
31     Double_t InvisibleEnergy() const { return fInvisibleEnergy; }
32     Int_t MatchedMCFlavor() const { return fMatchedMCFlavor; }
33 loizides 1.3 EObjType ObjType() const { return kGenJet; }
34 sixie 1.1 void SetHadEnergy(Double_t val) { fHadEnergy = val; }
35     void SetEmEnergy(Double_t val) { fEmEnergy = val; }
36     void SetInvisibleEnergy(Double_t val) { fInvisibleEnergy = val; }
37     void SetAuxiliaryEnergy(Double_t val) { fAuxiliaryEnergy = val; }
38     void SetMatchedMCFlavor(Int_t flavor) { fMatchedMCFlavor = flavor; }
39    
40     protected:
41 loizides 1.4 void GetMom() const;
42    
43     FourVector fMom; //four momentum of jet
44     Double_t fHadEnergy; //hadronic energy
45     Double_t fEmEnergy; //electromagnetic
46     Double_t fInvisibleEnergy; //invisible energy (mu, nu)
47     Double_t fAuxiliaryEnergy; //anything else (eg. undecayed sigmas)
48     Int_t fMatchedMCFlavor; //pdg ID of the quark flavor that the jet matched to
49 sixie 1.1
50 loizides 1.3 ClassDef(GenJet, 1) // Jet class at generation level
51 sixie 1.1 };
52     }
53 loizides 1.4
54     //--------------------------------------------------------------------------------------------------
55     inline void mithep::GenJet::GetMom() const
56     {
57     // Get momentum values from stored values.
58    
59     fCachedMom.SetCoordinates(fMom.Pt(),fMom.Eta(),fMom.Phi(),fMom.M());
60     }
61 sixie 1.1 #endif