File indexing completed on 2024-04-06 12:09:17
0001 #ifndef DTtTrigDBValidation_H
0002 #define DTtTrigDBValidation_H
0003
0004 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0005 #include "DQMServices/Core/interface/DQMStore.h"
0006 #include "FWCore/Framework/interface/ESHandle.h"
0007 #include "FWCore/Framework/interface/Frameworkfwd.h"
0008 #include "FWCore/Framework/interface/MakerMacros.h"
0009 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0010 #include "FWCore/ServiceRegistry/interface/Service.h"
0011 #include "RecoMuon/TrackingTools/interface/MuonServiceProxy.h"
0012
0013 #include "DataFormats/MuonDetId/interface/DTSuperLayerId.h"
0014 #include "Geometry/DTGeometry/interface/DTGeometry.h"
0015 #include "Geometry/Records/interface/MuonGeometryRecord.h"
0016 #include "CondFormats/DTObjects/interface/DTTtrig.h"
0017 #include "CondFormats/DataRecord/interface/DTTtrigRcd.h"
0018 #include <fstream>
0019 #include <string>
0020 #include <vector>
0021
0022
0023 class TFile;
0024
0025 class DTtTrigDBValidation : public DQMEDAnalyzer {
0026 public:
0027
0028 DTtTrigDBValidation(const edm::ParameterSet &pset);
0029
0030
0031 ~DTtTrigDBValidation() override;
0032
0033
0034 void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
0035 void analyze(const edm::Event &, const edm::EventSetup &) override;
0036
0037 private:
0038
0039 std::string metname_;
0040
0041 edm::ESGetToken<DTTtrig, DTTtrigRcd> labelDBRef_;
0042 edm::ESGetToken<DTTtrig, DTTtrigRcd> labelDB_;
0043 const DTTtrig *DTTtrigRefMap;
0044 const DTTtrig *DTTtrigMap;
0045
0046 int lowerLimit_;
0047 int higherLimit_;
0048
0049
0050 edm::ESGetToken<DTGeometry, MuonGeometryRecord> muonGeomToken_;
0051 const DTGeometry *dtGeom;
0052
0053
0054 std::map<DTSuperLayerId, std::pair<float, float>> tTrigRefMap_;
0055 std::map<DTSuperLayerId, std::pair<float, float>> tTrigMap_;
0056
0057
0058 std::map<std::pair<int, int>, MonitorElement *> tTrigDiffHistos_;
0059 std::map<int, MonitorElement *> tTrigDiffWheel_;
0060
0061 void bookHistos(DQMStore::IBooker &, int, int);
0062 void bookHistos(DQMStore::IBooker &, int wheel);
0063
0064 int stationFromBin(int bin) const;
0065
0066 int slFromBin(int bin) const;
0067 };
0068 #endif