CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/DQMOffline/EGamma/plugins/PhotonOfflineClient.h

Go to the documentation of this file.
00001 #ifndef PhotonOfflineClient_H
00002 #define PhotonOfflineClient_H
00003 
00004 #include "FWCore/ServiceRegistry/interface/Service.h"
00005 #include "CommonTools/UtilAlgos/interface/TFileService.h"
00006 //
00007 #include "FWCore/Framework/interface/MakerMacros.h"
00008 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00009 #include "FWCore/Utilities/interface/Exception.h"
00010 
00011 // EgammaCoreTools
00012 #include "RecoEcal/EgammaCoreTools/interface/PositionCalc.h"
00013 
00014 
00015 #include "TFile.h"
00016 #include "TH1.h"
00017 #include "TH2.h"
00018 #include "TTree.h"
00019 #include "TVector3.h"
00020 #include "TProfile.h"
00021 //
00022 
00023 
00024 #include "FWCore/Framework/interface/EDAnalyzer.h"
00025 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00026 #include "FWCore/Framework/interface/Event.h"
00027 #include "FWCore/Framework/interface/EventSetup.h"
00028 
00029 //DQM services
00030 #include "DQMServices/Core/interface/DQMStore.h"
00031 #include "FWCore/ServiceRegistry/interface/Service.h"
00032 #include "DQMServices/Core/interface/MonitorElement.h"
00033 
00034 //
00035 
00036 #include <vector>
00037 #include <string>
00038 
00051 // forward declarations
00052 class TFile;
00053 class TH1F;
00054 class TH2F;
00055 class TProfile;
00056 class TTree;
00057 
00058 
00059 class PhotonOfflineClient : public edm::EDAnalyzer
00060 {
00061 
00062  public:
00063    
00064   //
00065   explicit PhotonOfflineClient( const edm::ParameterSet& pset ) ;
00066   virtual ~PhotonOfflineClient();
00067                                    
00068       
00069   virtual void analyze(const edm::Event&, const edm::EventSetup&  ) ;
00070   virtual void beginJob() ;
00071   virtual void endJob() ;
00072   virtual void endLuminosityBlock( const edm::LuminosityBlock& , const edm::EventSetup& ) ;
00073   virtual void endRun(const edm::Run& , const edm::EventSetup& ) ;
00074   virtual void runClient();
00075 
00076   MonitorElement* bookHisto(std::string histoName, std::string title, int bin, double min, double max);
00077 
00078   std::vector<std::vector<MonitorElement*> > book2DHistoVector(std::string histoType, std::string histoName, std::string title, 
00079                                                                int xbin, double xmin, double xmax,
00080                                                                int ybin=1,double ymin=1, double ymax=2);
00081   std::vector<std::vector<std::vector<MonitorElement*> > > book3DHistoVector(std::string histoType, std::string histoName, std::string title, 
00082                                                                int xbin, double xmin, double xmax,
00083                                                                int ybin=1,double ymin=1, double ymax=2);
00084 
00085 
00086 
00087   MonitorElement* retrieveHisto(std::string dir, std::string name);
00088 
00089  private:
00090 
00091   MonitorElement* p_efficiencyVsEtaLoose_;
00092   MonitorElement* p_efficiencyVsEtLoose_;
00093   MonitorElement* p_efficiencyVsEtaTight_;
00094   MonitorElement* p_efficiencyVsEtTight_;
00095   MonitorElement* p_efficiencyVsEtaHLT_;
00096   MonitorElement* p_efficiencyVsEtHLT_;
00097 
00098   MonitorElement* p_convFractionVsEtaLoose_;
00099   MonitorElement* p_convFractionVsEtLoose_;
00100   MonitorElement* p_convFractionVsEtaTight_;
00101   MonitorElement* p_convFractionVsEtTight_;
00102 
00103   std::vector<std::vector<MonitorElement*> > p_convFractionVsEta_;
00104   std::vector<std::vector<std::vector<MonitorElement*> > > p_convFractionVsPhi_;
00105   std::vector<std::vector<MonitorElement*> > p_convFractionVsEt_;
00106 
00107   std::vector<std::vector<MonitorElement*> > p_badChannelsFractionVsEta_;
00108   std::vector<std::vector<MonitorElement*> > p_badChannelsFractionVsPhi_;
00109   std::vector<std::vector<MonitorElement*> > p_badChannelsFractionVsEt_;
00110 
00111   MonitorElement* p_vertexReconstructionEfficiencyVsEta_;
00112 
00113 
00114   void dividePlots(MonitorElement* dividend, MonitorElement* numerator, MonitorElement* denominator);
00115   void dividePlots(MonitorElement* dividend, MonitorElement* numerator, double denominator); 
00116 
00117 
00118   DQMStore *dbe_;
00119   int verbosity_;
00120 
00121   edm::ParameterSet parameters_;
00122 
00123   double cutStep_;
00124   int numberOfSteps_;
00125   bool minimalSetOfHistos_;
00126   bool excludeBkgHistos_;
00127 
00128   double etMin;
00129   double etMax;
00130   int    etBin;
00131   double etaMin;
00132   double etaMax;
00133   int    etaBin;
00134   double phiMin;
00135   double phiMax;
00136   int    phiBin;
00137 
00138   bool   standAlone_;
00139   bool   batch_;
00140 
00141   std::string outputFileName_;
00142   std::string inputFileName_;
00143 
00144   std::stringstream currentFolder_;
00145 
00146   int histo_index_photons_;
00147   int histo_index_conversions_;
00148   int histo_index_efficiency_;
00149   int histo_index_invMass_;
00150   
00151   std::vector<std::string> types_;
00152   std::vector<std::string> parts_;
00153 
00154 
00155 };
00156 
00157 
00158 
00159 
00160 
00161 #endif