CMS 3D CMS Logo

HistoPhoton.h

Go to the documentation of this file.
00001 #ifndef StarterKit_HistoPhoton_h
00002 #define StarterKit_HistoPhoton_h
00003 
00004 //------------------------------------------------------------
00005 // Title: HistoPhoton.h
00006 // Purpose: To histogram Photons
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 //   HistoPhoton ( TFile * file );
00018 //   Description: Constructor.
00019 //
00020 //   void fill( TK::Photon * );
00021 //   Description: Fill object. Will fill relevant photon variables
00022 //
00023 //   void write();
00024 //   Description: Write object to file in question.
00025 //
00026 //   ~HistoPhoton
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/Photon.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 HistoPhoton : public HistoGroup<Photon> {
00051 
00052   public:
00053     HistoPhoton( std::string dir = "photon",std::string group = "Photon",std::string pre="photon",
00054                  double pt1=0, double pt2=200, double m1=0, double m2=200,
00055                  TFileDirectory * parentDir=0 );
00056     virtual ~HistoPhoton();
00057 
00058 
00059     // fill a plain ol' photon:
00060     virtual void fill( const Photon *photon, uint iPart = 1, double weight = 1.0);
00061     virtual void fill( const Photon &photon, uint iPart = 1, double weight = 1.0 ) { fill(&photon, iPart,weight); }
00062 
00063     // fill a photon that is a shallow clone, and take kinematics from 
00064     // shallow clone but detector plots from the photon itself
00065     virtual void fill( const reco::ShallowClonePtrCandidate *photon, uint iPart = 1, double weight = 1.0 );
00066     virtual void fill( const reco::ShallowClonePtrCandidate &photon, uint iPart = 1, double weight = 1.0 )
00067     { fill(&photon, iPart, weight); }
00068 
00069     virtual void fillCollection( const std::vector<Photon> & coll, double weight = 1.0 );
00070 
00071     // Clear ntuple cache
00072     void clearVec();
00073   protected:
00074 
00075     float  phiNormalization( float& a);
00076 
00077 
00078     PhysVarHisto *    h_trackIso_;
00079     PhysVarHisto *    h_caloIso_;
00080 
00081 
00082     PhysVarHisto *    p_nTrackIsol_;
00083     PhysVarHisto *    p_trackPtSum_;
00084     PhysVarHisto *    p_ecalSum_;
00085     PhysVarHisto *    p_hcalSum_;
00086 
00087     PhysVarHisto *    h_nPho_[2][3];
00088     PhysVarHisto *    h_scEta_[2];
00089     PhysVarHisto *    h_scPhi_[2];
00090     PhysVarHisto *    h_scEtaPhi_[2];
00091 
00092     PhysVarHisto *    h_scE_[2][3];
00093     PhysVarHisto *    h_scEt_[2][3];
00094 
00095     PhysVarHisto *    h_r9_[2][3];
00096     PhysVarHisto *    h_phoE_[2][3];
00097     PhysVarHisto *    h_phoEt_[2][3];
00098     PhysVarHisto *    h_phoEta_[2];
00099     PhysVarHisto *    h_phoPhi_[2];
00100 
00101 //  conversion infos
00102 
00103     PhysVarHisto *    h_nConv_[2][3];
00104     PhysVarHisto *    h_convEta_[2];
00105     PhysVarHisto *    h_convPhi_[2];
00106     PhysVarHisto *    h_r9VsNofTracks_[2][3];
00107     PhysVarHisto *    h_EoverPTracks_[2][3];
00108     PhysVarHisto *    p_tk_nHitsVsEta_[2];
00109     PhysVarHisto *    h_tkChi2_[2];
00110     PhysVarHisto *    h_DPhiTracksAtVtx_[2][3];
00111     PhysVarHisto *    h_DCotTracks_[2][3];
00112     PhysVarHisto *    h_invMass_[2][3];
00113     PhysVarHisto *    h_DPhiTracksAtEcal_[2][3];
00114     PhysVarHisto *    h_DEtaTracksAtEcal_[2][3];
00115 
00116     PhysVarHisto *    h_convVtxRvsZ_[2];
00117     PhysVarHisto *    h_zPVFromTracks_[2];
00118 
00119   };
00120 
00121 }
00122 #endif

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