Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-12-31 23:14:24

0001 #ifndef PhotonPostprocessing_H
0002 #define PhotonPostprocessing_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 #include "TFile.h"
0012 #include "TH1.h"
0013 #include "TH2.h"
0014 #include "TTree.h"
0015 #include "TVector3.h"
0016 #include "TProfile.h"
0017 //
0018 
0019 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0020 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0021 #include "FWCore/Framework/interface/Event.h"
0022 #include "FWCore/Framework/interface/EventSetup.h"
0023 
0024 //DQM services
0025 #include "DQMServices/Core/interface/DQMStore.h"
0026 #include "FWCore/ServiceRegistry/interface/Service.h"
0027 
0028 //
0029 
0030 #include <vector>
0031 
0032 /** \class PhotonPostprocessing
0033  **  
0034  **
0035  **  $Id: PhotonPostprocessing
0036  **  authors: 
0037  **   Nancy Marinelli, U. of Notre Dame, US  
0038  **     
0039  ***/
0040 
0041 // forward declarations
0042 class TFile;
0043 class TH1F;
0044 class TH2F;
0045 class TProfile;
0046 class TTree;
0047 
0048 class PhotonPostprocessing : public edm::one::EDAnalyzer<edm::one::WatchRuns> {
0049 public:
0050   typedef dqm::legacy::DQMStore DQMStore;
0051   typedef dqm::legacy::MonitorElement MonitorElement;
0052 
0053   //
0054   explicit PhotonPostprocessing(const edm::ParameterSet& pset);
0055   ~PhotonPostprocessing() override;
0056 
0057   void analyze(const edm::Event&, const edm::EventSetup&) override;
0058   void beginJob() override;
0059   void endJob() override;
0060   void beginRun(const edm::Run&, const edm::EventSetup&) override {}
0061   void endRun(const edm::Run&, const edm::EventSetup&) override;
0062 
0063 private:
0064   //
0065 
0066   void dividePlots(MonitorElement* dividend, MonitorElement* numerator, MonitorElement* denominator, std::string type);
0067   void dividePlots(MonitorElement* dividend, MonitorElement* numerator, double denominator);
0068   virtual void runPostprocessing();
0069 
0070   DQMStore* dbe_;
0071   int verbosity_;
0072 
0073   edm::ParameterSet parameters_;
0074 
0075   bool standAlone_;
0076   bool batch_;
0077   bool isRunCentrally_;
0078   bool fastSim_;
0079   std::string analyzerName_;
0080   std::string outputFileName_;
0081   std::string inputFileName_;
0082 
0083   std::stringstream currentFolder_;
0084 
0085   double etMin;
0086   double etMax;
0087   int etBin;
0088   double etaMin;
0089   double etaMax;
0090   int etaBin;
0091   int etaBin2;
0092   double phiMin;
0093   double phiMax;
0094   int phiBin;
0095   double rMin;
0096   double rMax;
0097   int rBin;
0098   double zMin;
0099   double zMax;
0100   int zBin;
0101 
0102   MonitorElement* phoRecoEffEta_;
0103   MonitorElement* phoRecoEffPhi_;
0104   MonitorElement* phoRecoEffEt_;
0105 
0106   MonitorElement* phoDeadChEta_;
0107   MonitorElement* phoDeadChPhi_;
0108   MonitorElement* phoDeadChEt_;
0109 
0110   MonitorElement* convEffEtaTwoTracks_;
0111   MonitorElement* convEffPhiTwoTracks_;
0112   MonitorElement* convEffRTwoTracks_;
0113   MonitorElement* convEffZTwoTracks_;
0114   MonitorElement* convEffEtTwoTracks_;
0115 
0116   MonitorElement* convEffEtaTwoTracksAndVtxProbGT0_;
0117   MonitorElement* convEffEtaTwoTracksAndVtxProbGT0005_;
0118   MonitorElement* convEffRTwoTracksAndVtxProbGT0_;
0119   MonitorElement* convEffRTwoTracksAndVtxProbGT0005_;
0120 
0121   MonitorElement* convEffEtaOneTrack_;
0122   MonitorElement* convEffPhiOneTrack_;
0123   MonitorElement* convEffROneTrack_;
0124   MonitorElement* convEffZOneTrack_;
0125   MonitorElement* convEffEtOneTrack_;
0126 
0127   MonitorElement* h_simConvEtaMTotal_;
0128   MonitorElement* h_simConvPhiMTotal_;
0129   MonitorElement* h_simConvRMTotal_;
0130   MonitorElement* h_simConvZMTotal_;
0131   MonitorElement* h_simConvEtMTotal_;
0132 
0133   MonitorElement* convEffEtaTotal_;
0134   MonitorElement* convEffPhiTotal_;
0135   MonitorElement* convEffRTotal_;
0136   MonitorElement* convEffZTotal_;
0137   MonitorElement* convEffEtTotal_;
0138 
0139   MonitorElement* convFakeRateEtaTwoTracks_;
0140   MonitorElement* convFakeRatePhiTwoTracks_;
0141   MonitorElement* convFakeRateRTwoTracks_;
0142   MonitorElement* convFakeRateZTwoTracks_;
0143   MonitorElement* convFakeRateEtTwoTracks_;
0144 
0145   MonitorElement* bkgRecoEffEta_;
0146   MonitorElement* bkgRecoEffPhi_;
0147   MonitorElement* bkgRecoEffEt_;
0148 
0149   MonitorElement* bkgDeadChEta_;
0150   MonitorElement* bkgDeadChPhi_;
0151   MonitorElement* bkgDeadChEt_;
0152 
0153   MonitorElement* convVsEt_[2];
0154 };
0155 
0156 #endif