Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-05-20 22:34:16

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 // class DTTtrig;
0023 class TFile;
0024 
0025 class DTtTrigDBValidation : public DQMEDAnalyzer {
0026 public:
0027   /// Constructor
0028   DTtTrigDBValidation(const edm::ParameterSet &pset);
0029 
0030   /// Destructor
0031   ~DTtTrigDBValidation() override;
0032 
0033   /// Operations
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   // Switch for verbosity
0039   std::string metname_;
0040   // The DB label
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   // The DTGeometry
0050   edm::ESGetToken<DTGeometry, MuonGeometryRecord> muonGeomToken_;
0051   const DTGeometry *dtGeom;
0052 
0053   // Map of the tTrig and sigma by super-layer
0054   std::map<DTSuperLayerId, std::pair<float, float>> tTrigRefMap_;
0055   std::map<DTSuperLayerId, std::pair<float, float>> tTrigMap_;
0056 
0057   // Map of the tTrig difference histos by (wheel,sector)
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   // Compute the station from the bin number of mean and sigma histos
0064   int stationFromBin(int bin) const;
0065   // Compute the sl from the bin number of mean and sigma histos
0066   int slFromBin(int bin) const;
0067 };
0068 #endif