CMS 3D CMS Logo

HistoElectron.h

Go to the documentation of this file.
00001 #ifndef StarterKit_HistoElectron_h
00002 #define StarterKit_HistoElectron_h
00003 
00004 //------------------------------------------------------------
00005 // Title: HistoElectron.h
00006 // Purpose: To histogram Electrons
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 //   HistoElectron ( TFile * file );
00018 //   Description: Constructor.
00019 //
00020 //   void fill( TK::Electron * );
00021 //   Description: Fill object. Will fill relevant electron variables
00022 //
00023 //   void write();
00024 //   Description: Write object to file in question.
00025 //
00026 //   ~HistoElectron
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/Electron.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 HistoElectron : public HistoGroup<Electron> {
00051 
00052   public:
00053     HistoElectron( std::string dir = "electron", std::string group = "Electron",
00054                    std::string pre = "e",
00055                    double pt1=0, double pt2=200, double m1=0, double m2=200 ,
00056                    TFileDirectory * parentDir=0);
00057     virtual ~HistoElectron();
00058 
00059     // fill a plain ol' electron:
00060     virtual void fill( const Electron *electron, uint iPart = 1, double weight = 1.0 );
00061     virtual void fill( const Electron &electron, uint iPart = 1, double weight = 1.0 ) { fill(&electron, iPart,weight); }
00062 
00063     // fill a electron that is a shallow clone, and take kinematics from 
00064     // shallow clone but detector plots from the electron itself
00065     virtual void fill( const reco::ShallowClonePtrCandidate *electron, uint iPart = 1, double weight = 1.0 );
00066     virtual void fill( const reco::ShallowClonePtrCandidate &electron, uint iPart = 1, double weight = 1.0 )
00067     { fill(&electron, iPart,weight); }
00068 
00069     virtual void fillCollection( const std::vector<Electron> & coll, double weight = 1.0 );
00070 
00071     // Clear ntuple cache
00072     void clearVec();
00073   protected:
00074 
00075     PhysVarHisto *    h_trackIso_;
00076     PhysVarHisto *    h_caloIso_;
00077     PhysVarHisto *    h_leptonID_;
00078 
00079     PhysVarHisto *    h_ele_matchingObjectEta_;
00080     PhysVarHisto *    h_ele_matchingObjectPt_;
00081     PhysVarHisto *    h_ele_matchingObjectPhi_;
00082     PhysVarHisto *    h_ele_matchingObjectZ_;
00083 
00084     PhysVarHisto *    h_ele_matchingObjectEta_matched_;
00085     PhysVarHisto *    h_ele_matchingObjectPt_matched_;
00086     PhysVarHisto *    h_ele_matchingObjectPhi_matched_;
00087     PhysVarHisto *    h_ele_matchingObjectZ_matched_;
00088 
00089     // electron basic quantities
00090     PhysVarHisto *    h_ele_vertexP_;
00091     PhysVarHisto *    h_ele_vertexPt_;
00092     PhysVarHisto *    h_ele_vertexEta_;
00093     PhysVarHisto *    h_ele_vertexPhi_;
00094     PhysVarHisto *    h_ele_vertexX_;
00095     PhysVarHisto *    h_ele_vertexY_;
00096     PhysVarHisto *    h_ele_vertexZ_;
00097     PhysVarHisto *    h_ele_charge_;
00098 
00099     //  electron matching and ID
00100     PhysVarHisto *    h_ele_EoP_;
00101     PhysVarHisto *    h_ele_EoPout_;
00102     PhysVarHisto *    h_ele_dEtaSc_propVtx_;
00103     PhysVarHisto *    h_ele_dPhiSc_propVtx_;
00104     PhysVarHisto *    h_ele_dPhiCl_propOut_;
00105     PhysVarHisto *    h_ele_HoE_;
00106     PhysVarHisto *    h_ele_PinMnPout_mode_;
00107     PhysVarHisto *    h_ele_classes_;
00108     PhysVarHisto *    h_ele_eta_golden_;
00109     PhysVarHisto *    h_ele_eta_shower_;
00110     PhysVarHisto *    h_ele_eta_goldenFrac_;
00111     PhysVarHisto *    h_ele_eta_showerFrac_;
00112 
00113 
00114     PhysVarHisto *    h_ele_eta_;
00115 
00116 
00117     //electron track
00118     PhysVarHisto *    h_ele_foundHits_;
00119     PhysVarHisto *    h_ele_chi2_;
00120 
00121     //efficiencies
00122     PhysVarHisto *    h_ele_etaEff_;
00123     PhysVarHisto *    h_ele_ptEff_;
00124     PhysVarHisto *    h_ele_phiEff_;
00125     PhysVarHisto *    h_ele_zEff_;
00126 
00127 
00128 
00129   };
00130 
00131 }
00132 #endif

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