Go to the documentation of this file.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 class DTLayerId;
00029
00030 class DTResidualCalibration: public edm::EDAnalyzer{
00031 public:
00033 DTResidualCalibration(const edm::ParameterSet& pset);
00035 virtual ~DTResidualCalibration();
00036
00037 void beginJob();
00038 void beginRun(const edm::Run&, const edm::EventSetup&);
00039 void endJob();
00040 void analyze(const edm::Event& event, const edm::EventSetup& setup);
00041
00042 protected:
00043
00044 private:
00045 float segmentToWireDistance(const DTRecHit1D& recHit1D, const DTRecSegment4D& segment);
00046
00047 void bookHistos(DTSuperLayerId slId);
00048 void bookHistos(DTLayerId slId);
00049
00050 void fillHistos(DTSuperLayerId slId, float distance, float residualOnDistance);
00051 void fillHistos(DTLayerId slId, float distance, float residualOnDistance);
00052
00053 DTSegmentSelector select_;
00054 edm::InputTag segment4DLabel_;
00055 std::string rootBaseDir_;
00056
00057 bool detailedAnalysis_;
00058 TFile* rootFile_;
00059
00060 const DTGeometry* dtGeom_;
00061
00062 std::map<DTSuperLayerId, std::vector<TH1F*> > histoMapTH1F_;
00063 std::map<DTSuperLayerId, std::vector<TH2F*> > histoMapTH2F_;
00064
00065 std::map<DTLayerId, std::vector<TH1F*> > histoMapPerLayerTH1F_;
00066 std::map<DTLayerId, std::vector<TH2F*> > histoMapPerLayerTH2F_;
00067 };
00068 #endif