CMS 3D CMS Logo

HistoMET.h

Go to the documentation of this file.
00001 #ifndef StarterKit_HistoMET_h
00002 #define StarterKit_HistoMET_h
00003 
00004 //------------------------------------------------------------
00005 // Title: HistoMET.h
00006 // Purpose: To histogram METs
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 //   HistoMET ( TFile * file );
00018 //   Description: Constructor.
00019 //
00020 //   void fill( TK::MET * );
00021 //   Description: Fill object. Will fill relevant jet variables
00022 //
00023 //   void write();
00024 //   Description: Write object to file in question.
00025 //
00026 //   ~HistoMET
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/MET.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 HistoMET : public HistoGroup<MET> {
00051 
00052   public:
00053     HistoMET( std::string dir = "met", std::string group = "MET",
00054               std::string pre = "met",
00055               double pt1=0, double pt2=200, double m1=0, double m2=200,
00056               TFileDirectory * parentDir=0 );
00057     virtual ~HistoMET();
00058 
00059     // fill a plain ol' met:
00060     virtual void fill( const MET *met, uint iPart = 1, double weight = 1.0 );
00061     virtual void fill( const MET &met, uint iPart = 1, double weight = 1.0 ) { fill(&met, iPart, weight); }
00062 
00063     // fill a met that is a shallow clone, and take kinematics from 
00064     // shallow clone but detector plots from the met itself
00065     virtual void fill( const reco::ShallowClonePtrCandidate *met, uint iPart = 1, double weight = 1.0 );
00066     virtual void fill( const reco::ShallowClonePtrCandidate &met, uint iPart = 1, double weight = 1.0 )
00067     { fill(&met, iPart,weight); }
00068 
00069     virtual void fillCollection( const std::vector<MET> & coll, double weight = 1.0 );
00070 
00071     // Clear ntuple cache
00072     void clearVec();
00073 
00074   protected:
00075     
00076     PhysVarHisto * h_sumEt_;
00077     PhysVarHisto * h_mEtSig_;
00078     PhysVarHisto * h_eLongitudinal_;
00079 
00080     PhysVarHisto * h_maxEtInEmTowers_;     
00081     PhysVarHisto * h_maxEtInHadTowers_;    
00082     PhysVarHisto * h_etFractionHadronic_; 
00083     PhysVarHisto * h_emEtFraction_;        
00084     PhysVarHisto * h_hadEtInHB_;           
00085     PhysVarHisto * h_hadEtInHO_;           
00086     PhysVarHisto * h_hadEtInHE_;           
00087     PhysVarHisto * h_hadEtInHF_;           
00088     PhysVarHisto * h_emEtInEB_;            
00089     PhysVarHisto * h_emEtInEE_;            
00090     PhysVarHisto * h_emEtInHF_;            
00091 
00092     PhysVarHisto* jetME_;
00093 
00094     PhysVarHisto* hNevents_;
00095     PhysVarHisto* hCaloMEx_;
00096     PhysVarHisto* hCaloMEy_;
00097     PhysVarHisto* hCaloEz_;
00098     PhysVarHisto* hCaloMET_;
00099     PhysVarHisto* hCaloMETPhi_;
00100     PhysVarHisto* hCaloHadEtInEB_;
00101     PhysVarHisto* hCaloHadEtInEE_;
00102 
00103 
00104   };
00105 
00106 }
00107 #endif

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