00001 #ifndef DTChamberEfficiencyTest_H 00002 #define DTChamberEfficiencyTest_H 00003 00004 00016 #include "FWCore/Framework/interface/Frameworkfwd.h" 00017 #include <FWCore/Framework/interface/EDAnalyzer.h> 00018 #include "DataFormats/Common/interface/Handle.h" 00019 #include <FWCore/Framework/interface/ESHandle.h> 00020 #include <FWCore/Framework/interface/Event.h> 00021 #include <FWCore/Framework/interface/MakerMacros.h> 00022 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00023 #include <FWCore/Framework/interface/LuminosityBlock.h> 00024 00025 #include "DQMServices/Core/interface/DQMStore.h" 00026 #include "DQMServices/Core/interface/MonitorElement.h" 00027 #include "FWCore/ServiceRegistry/interface/Service.h" 00028 00029 00030 #include <memory> 00031 #include <iostream> 00032 #include <fstream> 00033 #include <string> 00034 #include <vector> 00035 #include <map> 00036 00037 class DTGeometry; 00038 class DTChamberId; 00039 class DTSuperLayerId; 00040 class DTLayerId; 00041 00042 class DTChamberEfficiencyTest: public edm::EDAnalyzer{ 00043 00044 public: 00045 00047 DTChamberEfficiencyTest(const edm::ParameterSet& ps); 00048 00050 virtual ~DTChamberEfficiencyTest(); 00051 00052 protected: 00053 00055 void beginJob(); 00056 00058 void beginRun(const edm::Run& run, const edm::EventSetup& setup); 00059 00061 void analyze(const edm::Event& e, const edm::EventSetup& c); 00062 00064 void endJob(); 00065 00067 void bookHistos(const DTChamberId & ch); 00068 00070 void bookHistos(); 00071 00073 std::string getMEName(std::string histoTag, const DTChamberId & chID); 00074 00075 00076 void beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context) ; 00077 00079 void endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& c); 00080 00081 00082 00083 00084 private: 00085 00086 int nevents; 00087 unsigned int nLumiSegs; 00088 int prescaleFactor; 00089 int run; 00090 00091 DQMStore* dbe; 00092 00093 edm::ParameterSet parameters; 00094 edm::ESHandle<DTGeometry> muonGeom; 00095 00096 std::map< std::string , MonitorElement* > xEfficiencyHistos; 00097 std::map< std::string , MonitorElement* > yEfficiencyHistos; 00098 std::map< std::string , MonitorElement* > xVSyEffHistos; 00099 std::map< int, MonitorElement* > summaryHistos; 00100 00101 }; 00102 00103 #endif