File indexing completed on 2024-04-06 12:07:04
0001 #ifndef DTEfficiencyTest_H
0002 #define DTEfficiencyTest_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #include "FWCore/Framework/interface/Frameworkfwd.h"
0016 #include "DataFormats/Common/interface/Handle.h"
0017 #include "FWCore/Framework/interface/ESHandle.h"
0018 #include "FWCore/Framework/interface/Event.h"
0019 #include "FWCore/Framework/interface/MakerMacros.h"
0020 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0021 #include "FWCore/Framework/interface/LuminosityBlock.h"
0022
0023 #include "DQMServices/Core/interface/DQMStore.h"
0024 #include "FWCore/ServiceRegistry/interface/Service.h"
0025 #include "Geometry/Records/interface/MuonGeometryRecord.h"
0026 #include "DQMServices/Core/interface/DQMEDHarvester.h"
0027
0028 #include <memory>
0029 #include <iostream>
0030 #include <fstream>
0031 #include <string>
0032 #include <vector>
0033 #include <map>
0034
0035 class DTGeometry;
0036 class DTChamberId;
0037 class DTSuperLayerId;
0038 class DTLayerId;
0039
0040 class DTEfficiencyTest : public DQMEDHarvester {
0041 public:
0042
0043 DTEfficiencyTest(const edm::ParameterSet &ps);
0044
0045
0046 ~DTEfficiencyTest() override;
0047
0048 protected:
0049
0050 void beginRun(const edm::Run &r, const edm::EventSetup &c) override;
0051
0052 void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override;
0053
0054
0055
0056 void bookHistos(DQMStore::IBooker &, const DTLayerId &ch, int firstWire, int lastWire);
0057
0058
0059 void bookHistos(DQMStore::IBooker &, int wh);
0060
0061
0062 std::string getMEName(std::string histoTag, const DTLayerId &lID);
0063
0064
0065
0066 void dqmEndLuminosityBlock(DQMStore::IBooker &,
0067 DQMStore::IGetter &,
0068 edm::LuminosityBlock const &,
0069 edm::EventSetup const &) override;
0070
0071 private:
0072 int nevents;
0073 unsigned int nLumiSegs;
0074 int prescaleFactor;
0075 int run;
0076 int percentual;
0077
0078 edm::ParameterSet parameters;
0079
0080 edm::ESGetToken<DTGeometry, MuonGeometryRecord> muonGeomToken_;
0081 const DTGeometry *muonGeom;
0082
0083 std::map<DTLayerId, MonitorElement *> EfficiencyHistos;
0084 std::map<DTLayerId, MonitorElement *> UnassEfficiencyHistos;
0085
0086
0087 std::map<int, MonitorElement *> wheelHistos;
0088 std::map<int, MonitorElement *> wheelUnassHistos;
0089 };
0090
0091 #endif