CMS 3D CMS Logo

/data/git/CMSSW_5_3_11_patch5/src/DataFormats/JetReco/interface/JPTJet.h

Go to the documentation of this file.
00001 #ifndef JetReco_JPTJet_h
00002 #define JetReco_JPTJet_h
00003 
00018 #include "DataFormats/JetReco/interface/Jet.h"
00019 #include "DataFormats/JetReco/interface/JetCollection.h"
00020 #include "DataFormats/JetReco/interface/CaloJet.h"
00021 #include "DataFormats/JetReco/interface/CaloJetCollection.h"
00022 #include "DataFormats/TrackReco/interface/Track.h"
00023 #include "DataFormats/TrackReco/interface/TrackFwd.h"
00024 #include "DataFormats/CaloTowers/interface/CaloTowerCollection.h"
00025 #include "DataFormats/Common/interface/Ref.h"
00026 #include "DataFormats/Common/interface/RefVector.h"
00027 
00028 namespace reco {
00029 class JPTJet : public Jet {
00030  public:
00031  
00032   struct Specific {
00033     Specific () :
00034          mZSPCor(0),
00035          mChargedHadronEnergy (0),       
00036          mNeutralHadronEnergy (0),
00037          mChargedEmEnergy (0),
00038          mNeutralEmEnergy (0),
00039          mResponseOfChargedWithEff (0),
00040          mResponseOfChargedWithoutEff (0),
00041          mSumPtOfChargedWithEff (0),
00042          mSumPtOfChargedWithoutEff (0),
00043          mSumEnergyOfChargedWithEff (0),
00044          mSumEnergyOfChargedWithoutEff (0),
00045          R2momtr (0),
00046          Eta2momtr (0),
00047          Phi2momtr (0),
00048          Pout (0),
00049          Zch (0)
00050     {}
00051     float mZSPCor;
00052     edm::RefToBase<reco::Jet> theCaloJetRef;    
00053     reco::TrackRefVector pionsInVertexInCalo;
00054     reco::TrackRefVector pionsInVertexOutCalo;
00055     reco::TrackRefVector pionsOutVertexInCalo;
00056     reco::TrackRefVector muonsInVertexInCalo;
00057     reco::TrackRefVector muonsInVertexOutCalo;
00058     reco::TrackRefVector muonsOutVertexInCalo;
00059     reco::TrackRefVector elecsInVertexInCalo;
00060     reco::TrackRefVector elecsInVertexOutCalo;
00061     reco::TrackRefVector elecsOutVertexInCalo;
00062     float mChargedHadronEnergy;
00063     float mNeutralHadronEnergy;
00064     float mChargedEmEnergy;
00065     float mNeutralEmEnergy;
00066     float  mResponseOfChargedWithEff;
00067     float  mResponseOfChargedWithoutEff;
00068     float  mSumPtOfChargedWithEff;
00069     float  mSumPtOfChargedWithoutEff;
00070     float  mSumEnergyOfChargedWithEff;
00071     float  mSumEnergyOfChargedWithoutEff;
00072     float R2momtr;
00073     float Eta2momtr;
00074     float Phi2momtr;
00075     float Pout;
00076     float Zch;
00077  };
00078    
00080   JPTJet() {}
00081   
00083   JPTJet(const LorentzVector& fP4, const Point& fVertex, const Specific& fSpecific, const Jet::Constituents& fConstituents); 
00084   
00086   JPTJet(const LorentzVector& fP4, const Specific& fSpecific, const Jet::Constituents& fConstituents);
00087   
00088   virtual ~JPTJet() {};
00089 
00090 
00092   float chargedHadronEnergy () const {return mspecific.mChargedHadronEnergy;}
00094   float  chargedHadronEnergyFraction () const {return chargedHadronEnergy () / energy ();}
00096   float neutralHadronEnergy () const {return mspecific.mNeutralHadronEnergy;}
00098   float neutralHadronEnergyFraction () const {return neutralHadronEnergy () / energy ();}
00100   float chargedEmEnergy () const {return mspecific.mChargedEmEnergy;}
00102   float chargedEmEnergyFraction () const {return chargedEmEnergy () / energy ();}
00104   float neutralEmEnergy () const {return mspecific.mNeutralEmEnergy;}
00106   float neutralEmEnergyFraction () const {return neutralEmEnergy () / energy ();}
00108   int chargedMultiplicity () const {return mspecific.muonsInVertexInCalo.size()+mspecific.muonsInVertexOutCalo.size()+
00109                                            mspecific.pionsInVertexInCalo.size()+mspecific.pionsInVertexOutCalo.size()+
00110                                            mspecific.elecsInVertexInCalo.size()+mspecific.elecsInVertexOutCalo.size();}
00112   int muonMultiplicity () const {return mspecific.muonsInVertexInCalo.size()+mspecific.muonsInVertexOutCalo.size();}
00114   int elecMultiplicity () const {return mspecific.elecsInVertexInCalo.size()+mspecific.elecsInVertexOutCalo.size();}
00116   const reco::TrackRefVector& getPionsInVertexInCalo() const{return mspecific.pionsInVertexInCalo;}
00117   const reco::TrackRefVector& getPionsInVertexOutCalo() const{return mspecific.pionsInVertexOutCalo;}
00118   const reco::TrackRefVector& getPionsOutVertexInCalo() const{return mspecific.pionsOutVertexInCalo;}
00119   const reco::TrackRefVector& getMuonsInVertexInCalo() const{return mspecific.muonsInVertexInCalo;}
00120   const reco::TrackRefVector& getMuonsInVertexOutCalo() const{return mspecific.muonsInVertexOutCalo;}
00121   const reco::TrackRefVector& getMuonsOutVertexInCalo() const{return mspecific.muonsOutVertexInCalo;}
00122   const reco::TrackRefVector& getElecsInVertexInCalo() const{return mspecific.elecsInVertexInCalo;}
00123   const reco::TrackRefVector& getElecsInVertexOutCalo() const{return mspecific.elecsInVertexOutCalo;}
00124   const reco::TrackRefVector& getElecsOutVertexInCalo() const{return mspecific.elecsOutVertexInCalo;}
00125   
00126 
00127   
00128   const float& getZSPCor() const {return mspecific.mZSPCor;} 
00129 
00130   const edm::RefToBase<reco::Jet>& getCaloJetRef() const {return mspecific.theCaloJetRef;}
00132   
00133   const Specific& getSpecific () const {return mspecific;}
00134   
00136   virtual JPTJet* clone () const;
00137   
00139   virtual void printJet () const;
00140   
00141   virtual std::string print () const;
00142   
00143  private:
00145   virtual bool overlap( const Candidate & ) const;
00146   
00147   //Variables specific to to the JPTJet class
00148  
00149   Specific mspecific;
00150   //reco::CaloJetRef theCaloJetRef;
00151 };
00152 
00153 // streamer
00154  //std::ostream& operator<<(std::ostream& out, const reco::JPTJet& jet);
00155 }
00156 // temporary fix before include_checcker runs globally
00157 #include "DataFormats/JetReco/interface/JPTJetCollection.h" //INCLUDECHECKER:SKIP
00158 #endif