CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/DQMOffline/CalibMuon/interface/DTt0DBValidation.h

Go to the documentation of this file.
00001 #ifndef DTt0DBValidation_H
00002 #define DTt0DBValidation_H
00003 
00012 #include "FWCore/Framework/interface/Frameworkfwd.h"
00013 #include "FWCore/Framework/interface/EDAnalyzer.h"
00014 #include "FWCore/Framework/interface/ESHandle.h"
00015 #include "FWCore/Framework/interface/MakerMacros.h"
00016 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00017 #include "FWCore/ServiceRegistry/interface/Service.h"
00018 #include "DQMServices/Core/interface/DQMStore.h"
00019 #include "DQMServices/Core/interface/MonitorElement.h"
00020 #include "RecoMuon/TrackingTools/interface/MuonServiceProxy.h"
00021 
00022 #include "DataFormats/MuonDetId/interface/DTLayerId.h"
00023 #include "DataFormats/MuonDetId/interface/DTWireId.h"
00024 #include "Geometry/DTGeometry/interface/DTGeometry.h"
00025 
00026 #include <string>
00027 #include <fstream>
00028 #include <vector>
00029 
00030 class DTT0;
00031 class TFile;
00032 
00033 class DTt0DBValidation : public edm::EDAnalyzer {
00034 public:
00036   DTt0DBValidation(const edm::ParameterSet& pset);
00037 
00039   virtual ~DTt0DBValidation();
00040 
00042   //Read the DTGeometry and the t0 DB
00043   void beginRun(const edm::Run& run, const edm::EventSetup& setup);
00044   void analyze(const edm::Event& event, const edm::EventSetup& setup) {}
00045   //Do the real work
00046   void endJob();
00047   void bookHistos(DTLayerId lId, int firstWire, int lastWire);
00048   void bookHistos(int wheel);
00049 
00050 protected:
00051 
00052 private:
00053 
00054   DQMStore* dbe;
00055   edm::ParameterSet parameters;
00056   // Switch for verbosity
00057   std::string metname;
00058   // The DB label
00059   std::string labelDBRef;
00060   std::string labelDB;
00061   // The file which will contain the difference plot
00062   std::string outputFileName;
00063 
00064   // The DTGeometry
00065   edm::ESHandle<DTGeometry> dtGeom;
00066 
00067   // The t0 map
00068   const DTT0 *tZeroMap;
00069   const DTT0 *tZeroRefMap;
00070  
00071   // Map of the t0 and sigma per wire
00072   std::map<DTWireId, std::vector<float> > t0RefMap;
00073   std::map<DTWireId, std::vector<float> > t0Map;
00074 
00075   // Map of the t0 difference histos per layer
00076   std::map<DTLayerId, MonitorElement* > t0DiffHistos;
00077 
00078   // summary histos
00079   std::map<int, MonitorElement* > wheelSummary;
00080 };
00081 #endif