ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/PFJet.h
Revision: 1.5
Committed: Wed Sep 9 03:38:26 2009 UTC (15 years, 7 months ago) by bendavid
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_012i, Mit_012h, Mit_012g, Mit_012f, Mit_012e, Mit_012d, Mit_012c, Mit_012b, Mit_012a, Mit_012, Mit_011a
Changes since 1.4: +2 -1 lines
Log Message:
Add MakeCopy functions and cleaned up some jetmet getters and setters

File Contents

# Content
1 //--------------------------------------------------------------------------------------------------
2 // $Id: PFJet.h,v 1.4 2009/03/20 09:37:17 loizides Exp $
3 //
4 // PFJet
5 //
6 // This class holds information about reconstructed jet based on pf candidates.
7 //
8 // Authors: J.Bendavid
9 //--------------------------------------------------------------------------------------------------
10
11 #ifndef MITANA_DATATREE_PFJET_H
12 #define MITANA_DATATREE_PFJET_H
13
14 #include "MitAna/DataTree/interface/Jet.h"
15 #include "MitAna/DataCont/interface/RefArray.h"
16 #include "MitAna/DataTree/interface/PFCandidate.h"
17
18 namespace mithep
19 {
20 class PFJet : public Jet
21 {
22 public:
23 PFJet() : fChargedHadronEnergy(0), fNeutralHadronEnergy(0), fChargedEmEnergy(0),
24 fNeutralEmEnergy(0), fMuonEnergy(0), fChargedMultiplicity(0),
25 fNeutralMultiplicity(0), fMuonMultiplicity(0) {}
26 PFJet(Double_t px, Double_t py, Double_t pz, Double_t e) :
27 Jet(px,py,pz,e),
28 fChargedHadronEnergy(0), fNeutralHadronEnergy(0), fChargedEmEnergy(0),
29 fNeutralEmEnergy(0), fMuonEnergy(0), fChargedMultiplicity(0),
30 fNeutralMultiplicity(0), fMuonMultiplicity(0) {}
31
32 void AddPFCand(const PFCandidate *p) { fPFCands.Add(p); }
33 Double_t ChargedEmEnergy() const { return fChargedEmEnergy; }
34 Double_t ChargedHadronEnergy() const { return fChargedHadronEnergy; }
35 Double_t MuonEnergy() const { return fMuonEnergy; }
36 UInt_t ChargedMultiplicity() const { return fChargedMultiplicity; }
37 Bool_t HasPFCand(const PFCandidate *p) const { return fPFCands.HasObject(p); }
38 Jet *MakeCopy() const { return new PFJet(*this); }
39 UInt_t NConstituents() const { return NPFCands(); }
40 Double_t NeutralEmEnergy() const { return fNeutralEmEnergy; }
41 Double_t NeutralHadronEnergy() const { return fNeutralHadronEnergy; }
42 UInt_t NeutralMultiplicity() const { return fNeutralMultiplicity; }
43 UInt_t NPFCands() const { return fPFCands.Entries(); }
44 UInt_t MuonMultiplicity() const { return fMuonMultiplicity; }
45 EObjType ObjType() const { return kPFJet; }
46 const PFCandidate *PFCand(UInt_t i) const { return fPFCands.At(i); }
47 void SetChargedEmEnergy(Double_t e) { fChargedEmEnergy = e; }
48 void SetChargedHadronEnergy(Double_t e) { fChargedHadronEnergy = e; }
49 void SetChargedMuEnergy(Double_t e) { fMuonEnergy = e; }
50 void SetChargedMultiplicity(UInt_t n) { fChargedMultiplicity = n; }
51 void SetMuonMultiplicity(UInt_t n) { fMuonMultiplicity = n; }
52 void SetNeutralEmEnergy(Double_t e) { fNeutralEmEnergy = e; }
53 void SetNeutralHadronEnergy(Double_t e) { fNeutralHadronEnergy = e; }
54 void SetNeutralMultiplicity(UInt_t n) { fNeutralMultiplicity = n; }
55
56 protected:
57
58 Double32_t fChargedHadronEnergy; //[0,0,14]charged hadron energy
59 Double32_t fNeutralHadronEnergy; //[0,0,14]neutral hadron energy
60 Double32_t fChargedEmEnergy; //[0,0,14]charged em energy
61 Double32_t fNeutralEmEnergy; //[0,0,14]neutral em energy
62 Double32_t fMuonEnergy; //[0,0,14]muon energy
63 UInt_t fChargedMultiplicity; //number of charged constituents
64 UInt_t fNeutralMultiplicity; //number of neutral constituents
65 UInt_t fMuonMultiplicity; //number of muon constituents
66 RefArray<PFCandidate> fPFCands; //pf candidates in the jet
67
68 ClassDef(PFJet, 1) // PFJet class
69 };
70 }
71 #endif