CMS 3D CMS Logo

HistoJet.h

Go to the documentation of this file.
00001 #ifndef StarterKit_HistoJet_h
00002 #define StarterKit_HistoJet_h
00003 
00004 //------------------------------------------------------------
00005 // Title: HistoJet.h
00006 // Purpose: To histogram Jets
00007 //
00008 // Authors:
00009 // Liz Sexton-Kennedy <sexton@fnal.gov>
00010 // Eric Vaandering <ewv@fnal.gov >
00011 // Petar Maksimovic <petar@jhu.edu>
00012 // Sal Rappoccio <rappocc@fnal.gov>
00013 //------------------------------------------------------------
00014 //
00015 // Interface:
00016 //
00017 //   HistoJet ( TFile * file );
00018 //   Description: Constructor.
00019 //
00020 //   void fill( TK::Jet * );
00021 //   Description: Fill object. Will fill relevant jet variables
00022 //
00023 //   void write();
00024 //   Description: Write object to file in question.
00025 //
00026 //   ~HistoJet
00027 //    Description: Destructor. Deallocates memory.
00028 //
00029 //------------------------------------------------------------
00030 //
00031 // Modification History:
00032 //
00033 //   -29Nov07: Sal Rappoccio: Creation of the object
00034 //------------------------------------------------------------
00035 
00036 
00037 // CMSSW include files
00038 #include "DataFormats/PatCandidates/interface/Jet.h"
00039 #include "PhysicsTools/StarterKit/interface/HistoGroup.h"
00040 
00041 // STL include files
00042 #include <string>
00043 
00044 // ROOT include files
00045 #include <TH1D.h>
00046 #include <TFile.h>
00047 
00048 namespace pat {
00049 
00050   class HistoJet : public HistoGroup<Jet> {
00051 
00052   public:
00053     HistoJet( std::string dir = "jet",std::string group = "Jet",
00054               std::string pre="jet",
00055               double pt1=0, double pt2=200, double m1=0, double m2=200,
00056               TFileDirectory * parentDir=0 );
00057     virtual ~HistoJet();
00058 
00059 
00060     // fill a plain ol' jet:
00061     virtual void fill( const Jet *jet, uint iPart = 1, double weight = 1.0 );
00062     virtual void fill( const Jet &jet, uint iPart = 1, double weight = 1.0 ) { fill(&jet, iPart,weight); }
00063 
00064     // fill a jet that is a shallow clone, and take kinematics from 
00065     // shallow clone but detector plots from the jet itself
00066     virtual void fill( const reco::ShallowClonePtrCandidate *jet, uint iPart = 1, double weight = 1.0 );
00067     virtual void fill( const reco::ShallowClonePtrCandidate &jet, uint iPart = 1, double weight = 1.0 )
00068     { fill(&jet, iPart, weight); }
00069 
00070     virtual void fillCollection( const std::vector<Jet> & coll, double weight = 1.0 );
00071 
00072     // Clear ntuple cache
00073     void clearVec();
00074   protected:
00075     PhysVarHisto *    h_jetFlavour_;
00076     PhysVarHisto *    h_BDiscriminant_;
00077     PhysVarHisto *    h_jetCharge_;
00078     PhysVarHisto *    h_nTrk_;
00079 
00080     PhysVarHisto *    jetME_;
00081 
00082    // Generic Jet Parameters
00083 //    PhysVarHisto *    mEta_;
00084 //    PhysVarHisto *    mPhi_;
00085     PhysVarHisto *    mE_;
00086     PhysVarHisto *    mP_;
00087 //    PhysVarHisto *    mPt_;
00088     PhysVarHisto *    mPt_1_;
00089     PhysVarHisto *    mPt_2_;
00090     PhysVarHisto *    mPt_3_;
00091 //    PhysVarHisto *    mMass_;
00092     PhysVarHisto *    mConstituents_;
00093 
00094  // Leading Jet Parameters
00095     PhysVarHisto *    mEtaFirst_;
00096     PhysVarHisto *    mPhiFirst_;
00097     PhysVarHisto *    mEFirst_;
00098     PhysVarHisto *    mPtFirst_;
00099 
00100  // CaloJet specific
00101     PhysVarHisto *    mMaxEInEmTowers_;
00102     PhysVarHisto *    mMaxEInHadTowers_;
00103     PhysVarHisto *    mHadEnergyInHO_;
00104     PhysVarHisto *    mHadEnergyInHB_;
00105     PhysVarHisto *    mHadEnergyInHF_;
00106     PhysVarHisto *    mHadEnergyInHE_;
00107     PhysVarHisto *    mEmEnergyInEB_;
00108     PhysVarHisto *    mEmEnergyInEE_;
00109     PhysVarHisto *    mEmEnergyInHF_;
00110     PhysVarHisto *    mEnergyFractionHadronic_;
00111     PhysVarHisto *    mEnergyFractionEm_;
00112     PhysVarHisto *    mN90_;
00113 /*
00114   // PFlowJet specific
00115     PhysVarHisto *    mChargedHadronEnergy_;
00116     PhysVarHisto *    mNeutralHadronEnergy_;
00117     PhysVarHisto *    mChargedEmEnergy_;
00118     PhysVarHisto *    mChargedMuEnergy_;
00119     PhysVarHisto *    mNeutralEmEnergy_;
00120     PhysVarHisto *    mChargedMultiplicity_;
00121     PhysVarHisto *    mNeutralMultiplicity_;
00122     PhysVarHisto *    mMuonMultiplicity_;
00123 
00124     PhysVarHisto *    mNeutralFraction_;
00125 */
00126 
00127   };
00128 
00129 }
00130 #endif

Generated on Tue Jun 9 17:41:51 2009 for CMSSW by  doxygen 1.5.4