CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/DataFormats/JetReco/interface/PFJet.h

Go to the documentation of this file.
00001 #ifndef JetReco_PFJet_h
00002 #define JetReco_PFJet_h
00003 
00017 #include "DataFormats/JetReco/interface/Jet.h"
00018 #include "DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h"
00019 #include "DataFormats/TrackReco/interface/TrackFwd.h"
00020 
00021 namespace reco {
00022 class PFJet : public Jet {
00023  public:
00024   struct Specific {
00025     Specific () :
00026        mChargedHadronEnergy (0),
00027        mNeutralHadronEnergy (0),
00028        mPhotonEnergy (0),
00029        mElectronEnergy (0),
00030        mMuonEnergy (0),
00031        mHFHadronEnergy (0),
00032        mHFEMEnergy (0),
00033 
00034        mChargedHadronMultiplicity (0),
00035        mNeutralHadronMultiplicity (0),
00036        mPhotonMultiplicity (0),
00037        mElectronMultiplicity (0),
00038        mMuonMultiplicity (0),
00039        mHFHadronMultiplicity (0),
00040        mHFEMMultiplicity (0),
00041 
00042        mChargedEmEnergy (0),
00043        mChargedMuEnergy (0),
00044        mNeutralEmEnergy (0),
00045        
00046        mChargedMultiplicity (0),
00047        mNeutralMultiplicity (0)
00048     {}
00049     float mChargedHadronEnergy;
00050     float mNeutralHadronEnergy;
00051     float mPhotonEnergy;
00052     float mElectronEnergy;
00053     float mMuonEnergy;
00054     float mHFHadronEnergy;
00055     float mHFEMEnergy;
00056 
00057     int mChargedHadronMultiplicity;
00058     int mNeutralHadronMultiplicity;
00059     int mPhotonMultiplicity;
00060     int mElectronMultiplicity;
00061     int mMuonMultiplicity;
00062     int mHFHadronMultiplicity;
00063     int mHFEMMultiplicity;
00064 
00065     //old (deprecated) data members
00066     //kept only for backwards compatibility:
00067     float mChargedEmEnergy;
00068     float mChargedMuEnergy;
00069     float mNeutralEmEnergy;
00070     int mChargedMultiplicity;
00071     int mNeutralMultiplicity;
00072  };
00073   
00075   PFJet() {}
00076   
00078   PFJet(const LorentzVector& fP4, const Point& fVertex, const Specific& fSpecific, 
00079           const Jet::Constituents& fConstituents);
00080 
00081   PFJet(const LorentzVector& fP4, const Point& fVertex, const Specific& fSpecific); 
00082 
00084   PFJet(const LorentzVector& fP4, const Specific& fSpecific, 
00085           const Jet::Constituents& fConstituents);
00086 
00087   
00088   virtual ~PFJet() {};
00089 
00091   float chargedHadronEnergy () const {return m_specific.mChargedHadronEnergy;}
00093   float  chargedHadronEnergyFraction () const {return chargedHadronEnergy () / energy ();}
00095   float neutralHadronEnergy () const {return m_specific.mNeutralHadronEnergy;}
00097   float neutralHadronEnergyFraction () const {return neutralHadronEnergy () / energy ();}
00099   float photonEnergy () const {return m_specific.mPhotonEnergy;}
00101   float photonEnergyFraction () const {return photonEnergy () / energy ();}
00103   float electronEnergy () const {return m_specific.mElectronEnergy;}
00105   float electronEnergyFraction () const {return electronEnergy () / energy ();}
00107   float muonEnergy () const {return m_specific.mMuonEnergy;}
00109   float muonEnergyFraction () const {return muonEnergy () / energy ();}
00111   float HFHadronEnergy () const {return m_specific.mHFHadronEnergy;}
00113   float HFHadronEnergyFraction () const {return HFHadronEnergy () / energy ();}
00115   float HFEMEnergy () const {return m_specific.mHFEMEnergy;}
00117   float HFEMEnergyFraction () const {return HFEMEnergy () / energy ();}
00118 
00120   int chargedHadronMultiplicity () const {return m_specific.mChargedHadronMultiplicity;}
00122   int neutralHadronMultiplicity () const {return m_specific.mNeutralHadronMultiplicity;}
00124   int photonMultiplicity () const {return m_specific.mPhotonMultiplicity;}
00126   int electronMultiplicity () const {return m_specific.mElectronMultiplicity;}
00128   int muonMultiplicity () const {return m_specific.mMuonMultiplicity;}
00130   int HFHadronMultiplicity () const {return m_specific.mHFHadronMultiplicity;}
00132   int HFEMMultiplicity () const {return m_specific.mHFEMMultiplicity;}
00133 
00135   float chargedEmEnergy () const {return m_specific.mChargedEmEnergy;}
00137   float chargedEmEnergyFraction () const {return chargedEmEnergy () / energy ();}
00139   float chargedMuEnergy () const {return m_specific.mChargedMuEnergy;}
00141   float chargedMuEnergyFraction () const {return chargedMuEnergy () / energy ();}
00143   float neutralEmEnergy () const {return m_specific.mNeutralEmEnergy;}
00145   float neutralEmEnergyFraction () const {return neutralEmEnergy () / energy ();}
00146   
00148   int chargedMultiplicity () const {return m_specific.mChargedMultiplicity;}
00150   int neutralMultiplicity () const {return m_specific.mNeutralMultiplicity;}
00151 
00152 
00154   virtual reco::PFCandidatePtr getPFConstituent (unsigned fIndex) const;
00155 
00157   virtual std::vector <reco::PFCandidatePtr> getPFConstituents () const;
00158 
00162   reco::TrackRefVector getTrackRefs() const; 
00163   
00164   // block accessors
00165   
00166   const Specific& getSpecific () const {return m_specific;}
00167 
00169   virtual PFJet* clone () const;
00170 
00172   virtual std::string print () const;
00173 
00174 
00175  private:
00177   virtual bool overlap( const Candidate & ) const;
00178   
00179   //Variables specific to to the PFJet class
00180   Specific m_specific;
00181 };
00182 
00183 // streamer
00184  std::ostream& operator<<(std::ostream& out, const reco::PFJet& jet);
00185 }
00186 // temporary fix before include_checcker runs globally
00187 #include "DataFormats/JetReco/interface/PFJetCollection.h" //INCLUDECHECKER:SKIP 
00188 #endif