File indexing completed on 2024-04-06 12:09:17
0001 #ifndef DTt0DBValidation_H
0002 #define DTt0DBValidation_H
0003
0004
0005
0006
0007
0008
0009
0010 #include "DQMServices/Core/interface/DQMStore.h"
0011 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0012 #include "FWCore/Framework/interface/ESHandle.h"
0013 #include "FWCore/Framework/interface/Frameworkfwd.h"
0014 #include "FWCore/Framework/interface/MakerMacros.h"
0015 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0016 #include "FWCore/ServiceRegistry/interface/Service.h"
0017 #include "RecoMuon/TrackingTools/interface/MuonServiceProxy.h"
0018
0019 #include "DataFormats/MuonDetId/interface/DTLayerId.h"
0020 #include "DataFormats/MuonDetId/interface/DTWireId.h"
0021 #include "Geometry/DTGeometry/interface/DTGeometry.h"
0022 #include "Geometry/Records/interface/MuonGeometryRecord.h"
0023 #include "CondFormats/DataRecord/interface/DTT0Rcd.h"
0024
0025 #include <fstream>
0026 #include <string>
0027 #include <vector>
0028
0029 class DTT0;
0030 class TFile;
0031
0032 class DTt0DBValidation : public edm::one::EDAnalyzer<edm::one::SharedResources, edm::one::WatchRuns> {
0033 public:
0034 typedef dqm::legacy::MonitorElement MonitorElement;
0035 typedef dqm::legacy::DQMStore DQMStore;
0036
0037 DTt0DBValidation(const edm::ParameterSet &pset);
0038
0039
0040 ~DTt0DBValidation() override;
0041
0042
0043
0044 void beginRun(const edm::Run &run, const edm::EventSetup &setup) override;
0045 void endRun(edm::Run const &, edm::EventSetup const &) override;
0046 void endJob() override;
0047 void analyze(const edm::Event &event, const edm::EventSetup &setup) override {}
0048
0049 private:
0050 void bookHistos(DTLayerId lId, int firstWire, int lastWire);
0051 void bookHistos(int wheel);
0052
0053 DQMStore *dbe_;
0054
0055 std::string metname_;
0056
0057 edm::ESGetToken<DTT0, DTT0Rcd> labelDBRef_;
0058 edm::ESGetToken<DTT0, DTT0Rcd> labelDB_;
0059
0060
0061 bool outputMEsInRootFile_;
0062 std::string outputFileName_;
0063
0064 std::string t0TestName_;
0065
0066
0067 edm::ESGetToken<DTGeometry, MuonGeometryRecord> muonGeomToken_;
0068 const DTGeometry *dtGeom;
0069
0070
0071 const DTT0 *tZeroRefMap_;
0072 const DTT0 *tZeroMap_;
0073
0074
0075 std::map<DTWireId, std::vector<float>> t0RefMap_;
0076 std::map<DTWireId, std::vector<float>> t0Map_;
0077
0078
0079 std::map<DTLayerId, MonitorElement *> t0DiffHistos_;
0080
0081
0082 std::map<int, MonitorElement *> wheelSummary_;
0083 };
0084 #endif