00001 #ifndef CalibMuon_DTCalibration_DTResidualCalibration_h 00002 #define CalibMuon_DTCalibration_DTResidualCalibration_h 00003 00011 #include "FWCore/Framework/interface/EDAnalyzer.h" 00012 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00013 #include "FWCore/Framework/interface/Frameworkfwd.h" 00014 #include "FWCore/Utilities/interface/InputTag.h" 00015 #include "FWCore/Framework/interface/ESHandle.h" 00016 00017 #include "CalibMuon/DTCalibration/interface/DTSegmentSelector.h" 00018 00019 #include <string> 00020 #include <vector> 00021 #include <map> 00022 00023 class TFile; 00024 class TH1F; 00025 class TH2F; 00026 class DTGeometry; 00027 class DTSuperLayerId; 00028 00029 class DTResidualCalibration: public edm::EDAnalyzer{ 00030 public: 00032 DTResidualCalibration(const edm::ParameterSet& pset); 00034 virtual ~DTResidualCalibration(); 00035 00036 void beginJob(); 00037 void beginRun(const edm::Run&, const edm::EventSetup&); 00038 void endJob(); 00039 void analyze(const edm::Event& event, const edm::EventSetup& setup); 00040 00041 protected: 00042 00043 private: 00044 float segmentToWireDistance(const DTRecHit1D& recHit1D, const DTRecSegment4D& segment); 00045 // Book a set of histograms for a give chamber 00046 void bookHistos(DTSuperLayerId slId); 00047 // Fill a set of histograms for a give chamber 00048 void fillHistos(DTSuperLayerId slId, float distance, float residualOnDistance); 00049 00050 DTSegmentSelector select_; 00051 edm::InputTag segment4DLabel_; 00052 std::string rootBaseDir_; 00053 00054 TFile* rootFile_; 00055 // Geometry 00056 const DTGeometry* dtGeom_; 00057 00058 std::map<DTSuperLayerId, std::vector<TH1F*> > histoMapTH1F_; 00059 std::map<DTSuperLayerId, std::vector<TH2F*> > histoMapTH2F_; 00060 }; 00061 #endif