00001 #ifndef DTEfficiencyTest_H
00002 #define DTEfficiencyTest_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 DTEfficiencyTest: public edm::EDAnalyzer{
00043
00044 public:
00045
00047 DTEfficiencyTest(const edm::ParameterSet& ps);
00048
00050 virtual ~DTEfficiencyTest();
00051
00052 protected:
00053
00055 void beginJob(const edm::EventSetup& c);
00056
00058 void analyze(const edm::Event& e, const edm::EventSetup& c);
00059
00061 void endJob();
00062
00064 void bookHistos(const DTLayerId & ch, int firstWire, int lastWire);
00065
00067 void bookHistos(int wh);
00068
00070 std::string getMEName(std::string histoTag, const DTLayerId & lID);
00071
00072
00073 void beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context) ;
00074
00076 void endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& c);
00077
00078
00079
00080 private:
00081
00082 int nevents;
00083 unsigned int nLumiSegs;
00084 int prescaleFactor;
00085 int run;
00086 int percentual;
00087
00088 DQMStore* dbe;
00089
00090 edm::ParameterSet parameters;
00091 edm::ESHandle<DTGeometry> muonGeom;
00092
00093 std::map< DTLayerId , MonitorElement* > EfficiencyHistos;
00094 std::map< DTLayerId , MonitorElement* > UnassEfficiencyHistos;
00095
00096
00097 std::map< int, MonitorElement* > wheelHistos;
00098 std::map< int, MonitorElement* > wheelUnassHistos;
00099
00100 };
00101
00102 #endif