Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:09:22

0001 #ifndef PhotonOfflineClient_H
0002 #define PhotonOfflineClient_H
0003 
0004 #include "FWCore/ServiceRegistry/interface/Service.h"
0005 #include "CommonTools/UtilAlgos/interface/TFileService.h"
0006 //
0007 #include "FWCore/Framework/interface/MakerMacros.h"
0008 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0009 #include "FWCore/Utilities/interface/Exception.h"
0010 
0011 // EgammaCoreTools
0012 #include "RecoEcal/EgammaCoreTools/interface/PositionCalc.h"
0013 
0014 #include "TFile.h"
0015 #include "TH1.h"
0016 #include "TH2.h"
0017 #include "TTree.h"
0018 #include "TVector3.h"
0019 #include "TProfile.h"
0020 //
0021 
0022 #include "DQMServices/Core/interface/DQMEDHarvester.h"
0023 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0024 #include "FWCore/Framework/interface/Event.h"
0025 #include "FWCore/Framework/interface/EventSetup.h"
0026 
0027 //DQM services
0028 #include "DQMServices/Core/interface/DQMStore.h"
0029 #include "FWCore/ServiceRegistry/interface/Service.h"
0030 
0031 //
0032 
0033 #include "RooGlobalFunc.h"
0034 #include "RooRealVar.h"
0035 #include "RooDataSet.h"
0036 #include "RooBreitWigner.h"
0037 #include "RooDataHist.h"
0038 #include "RooFitResult.h"
0039 
0040 #include <vector>
0041 #include <string>
0042 
0043 /** \class PhotonOfflineClient
0044  **  
0045  **
0046  **  $Id: PhotonOfflineClient
0047  **  authors: 
0048  **   Nancy Marinelli, U. of Notre Dame, US
0049  **   Jamie Antonelli, U. of Notre Dame, US
0050  **   
0051  ***/
0052 
0053 // forward declarations
0054 class TFile;
0055 class TH1F;
0056 class TH2F;
0057 class TProfile;
0058 class TTree;
0059 
0060 class PhotonOfflineClient : public DQMEDHarvester {
0061 public:
0062   //
0063   explicit PhotonOfflineClient(const edm::ParameterSet& pset);
0064   ~PhotonOfflineClient() override;
0065 
0066   void dqmEndJob(DQMStore::IBooker&, DQMStore::IGetter&) override;
0067 
0068   virtual void runClient(DQMStore::IBooker& iBooker, DQMStore::IGetter& iGetter);
0069   MonitorElement* bookHisto(
0070       DQMStore::IBooker& iBooker, std::string histoName, std::string title, int bin, double min, double max);
0071 
0072   void book2DHistoVector(DQMStore::IBooker& iBooker,
0073                          std::vector<std::vector<MonitorElement*> >& vecOfHist,
0074                          std::string histoType,
0075                          std::string histoName,
0076                          std::string title,
0077                          int xbin,
0078                          double xmin,
0079                          double xmax,
0080                          int ybin = 1,
0081                          double ymin = 1,
0082                          double ymax = 2);
0083   void book3DHistoVector(DQMStore::IBooker& iBooker,
0084                          std::vector<std::vector<std::vector<MonitorElement*> > >& vecOfHist,
0085                          std::string histoType,
0086                          std::string histoName,
0087                          std::string title,
0088                          int xbin,
0089                          double xmin,
0090                          double xmax,
0091                          int ybin = 1,
0092                          double ymin = 1,
0093                          double ymax = 2);
0094 
0095   MonitorElement* retrieveHisto(DQMStore::IGetter& iGetter, std::string dir, std::string name);
0096 
0097 private:
0098   std::string analyzerName_;
0099   MonitorElement* p_efficiencyVsEtaLoose_;
0100   MonitorElement* p_efficiencyVsEtLoose_;
0101   MonitorElement* p_efficiencyVsEtaTight_;
0102   MonitorElement* p_efficiencyVsEtTight_;
0103   MonitorElement* p_efficiencyVsEtaHLT_;
0104   MonitorElement* p_efficiencyVsEtHLT_;
0105 
0106   MonitorElement* p_convFractionVsEtaLoose_;
0107   MonitorElement* p_convFractionVsEtLoose_;
0108   MonitorElement* p_convFractionVsEtaTight_;
0109   MonitorElement* p_convFractionVsEtTight_;
0110 
0111   std::vector<std::vector<MonitorElement*> > p_convFractionVsEta_;
0112   std::vector<std::vector<std::vector<MonitorElement*> > > p_convFractionVsPhi_;
0113   std::vector<std::vector<MonitorElement*> > p_convFractionVsEt_;
0114 
0115   std::vector<std::vector<MonitorElement*> > p_badChannelsFractionVsEta_;
0116   std::vector<std::vector<MonitorElement*> > p_badChannelsFractionVsPhi_;
0117   std::vector<std::vector<MonitorElement*> > p_badChannelsFractionVsEt_;
0118 
0119   MonitorElement* p_vertexReconstructionEfficiencyVsEta_;
0120 
0121   void dividePlots(MonitorElement* dividend, MonitorElement* numerator, MonitorElement* denominator);
0122   void dividePlots(MonitorElement* dividend, MonitorElement* numerator, double denominator);
0123 
0124   int verbosity_;
0125 
0126   edm::ParameterSet parameters_;
0127 
0128   double cutStep_;
0129   int numberOfSteps_;
0130   bool minimalSetOfHistos_;
0131   bool excludeBkgHistos_;
0132 
0133   double etMin;
0134   double etMax;
0135   int etBin;
0136   double etaMin;
0137   double etaMax;
0138   int etaBin;
0139   double phiMin;
0140   double phiMax;
0141   int phiBin;
0142 
0143   bool standAlone_;
0144   bool batch_;
0145 
0146   std::string outputFileName_;
0147   std::string inputFileName_;
0148 
0149   std::stringstream currentFolder_;
0150 
0151   int histo_index_photons_;
0152   int histo_index_conversions_;
0153   int histo_index_efficiency_;
0154   int histo_index_invMass_;
0155 
0156   std::vector<std::string> types_;
0157   std::vector<std::string> parts_;
0158 };
0159 
0160 #endif