Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef ConversionPostprocessing_H
0002 #define ConversionPostprocessing_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 ConversionPostprocessing
0033  **  
0034  **
0035  **  $Id: ConversionPostprocessing
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 ConversionPostprocessing : public edm::one::EDAnalyzer<edm::one::WatchRuns> {
0049 public:
0050   typedef dqm::legacy::DQMStore DQMStore;
0051   typedef dqm::legacy::MonitorElement MonitorElement;
0052   //
0053   explicit ConversionPostprocessing(const edm::ParameterSet& pset);
0054   ~ConversionPostprocessing() override;
0055 
0056   void analyze(const edm::Event&, const edm::EventSetup&) override;
0057   void beginJob() override;
0058   void endJob() override;
0059   void beginRun(const edm::Run&, const edm::EventSetup&) override {}
0060   void endRun(const edm::Run&, const edm::EventSetup&) override;
0061 
0062 private:
0063   //
0064 
0065   void dividePlots(MonitorElement* dividend, MonitorElement* numerator, MonitorElement* denominator, std::string type);
0066   void dividePlots(MonitorElement* dividend, MonitorElement* numerator, double denominator);
0067   virtual void runPostprocessing();
0068 
0069   DQMStore* dbe_;
0070   int verbosity_;
0071 
0072   edm::ParameterSet parameters_;
0073 
0074   bool standAlone_;
0075   bool batch_;
0076   std::string outputFileName_;
0077   std::string inputFileName_;
0078 
0079   std::stringstream currentFolder_;
0080 
0081   double etMin;
0082   double etMax;
0083   int etBin;
0084   double etaMin;
0085   double etaMax;
0086   int etaBin;
0087   int etaBin2;
0088   double phiMin;
0089   double phiMax;
0090   int phiBin;
0091   double rMin;
0092   double rMax;
0093   int rBin;
0094   double zMin;
0095   double zMax;
0096   int zBin;
0097 
0098   MonitorElement* convEffEtaTwoTracks_;
0099   MonitorElement* convEffPhiTwoTracks_;
0100   MonitorElement* convEffRTwoTracks_;
0101   MonitorElement* convEffZTwoTracks_;
0102   MonitorElement* convEffEtTwoTracks_;
0103 
0104   MonitorElement* convEffEtaTwoTracksAndVtxProbGT0_;
0105   MonitorElement* convEffEtaTwoTracksAndVtxProbGT0005_;
0106   MonitorElement* convEffRTwoTracksAndVtxProbGT0_;
0107   MonitorElement* convEffRTwoTracksAndVtxProbGT0005_;
0108 
0109   MonitorElement* convFakeRateEtaTwoTracks_;
0110   MonitorElement* convFakeRatePhiTwoTracks_;
0111   MonitorElement* convFakeRateRTwoTracks_;
0112   MonitorElement* convFakeRateZTwoTracks_;
0113   MonitorElement* convFakeRateEtTwoTracks_;
0114 };
0115 
0116 #endif