CMS 3D CMS Logo

DTResidualCalibration.h
Go to the documentation of this file.
1 #ifndef CalibMuon_DTCalibration_DTResidualCalibration_h
2 #define CalibMuon_DTCalibration_DTResidualCalibration_h
3 
14 
17 
18 #include <string>
19 #include <vector>
20 #include <map>
21 
22 class TFile;
23 class TH1F;
24 class TH2F;
25 class DTGeometry;
26 class DTSuperLayerId;
27 class DTLayerId;
28 
29 class DTResidualCalibration : public edm::one::EDAnalyzer<edm::one::WatchRuns> {
30 public:
34  ~DTResidualCalibration() override;
35 
36  void beginJob() override;
37  void beginRun(const edm::Run&, const edm::EventSetup&) override;
38  void endJob() override;
39  void endRun(const edm::Run&, const edm::EventSetup&) override{};
40  void analyze(const edm::Event& event, const edm::EventSetup& setup) override;
41 
42 protected:
43 private:
44  unsigned int nevent;
45  unsigned int segmok, segmbad;
46 
47  float segmentToWireDistance(const DTRecHit1D& recHit1D, const DTRecSegment4D& segment);
48  // Book a set of histograms for a given super-layer/layer
49  void bookHistos(DTSuperLayerId slId);
50  void bookHistos(DTLayerId slId);
51  // Fill a set of histograms for a given super-layer/layer
52  void fillHistos(DTSuperLayerId slId, float distance, float residualOnDistance);
53  void fillHistos(DTLayerId slId, float distance, float residualOnDistance);
54 
56  double histRange_;
59 
61  TFile* rootFile_;
62  // Geometry
65 
66  // Histograms per super-layer
67  std::map<DTSuperLayerId, TH1F*> histoMapTH1F_;
68  std::map<DTSuperLayerId, TH2F*> histoMapTH2F_;
69  // Histograms per layer
70  std::map<DTLayerId, TH1F*> histoMapPerLayerTH1F_;
71  std::map<DTLayerId, TH2F*> histoMapPerLayerTH2F_;
72 };
73 #endif
void endRun(const edm::Run &, const edm::EventSetup &) override
std::map< DTSuperLayerId, TH1F * > histoMapTH1F_
std::map< DTLayerId, TH2F * > histoMapPerLayerTH2F_
DTSegmentSelector * select_
void fillHistos(DTSuperLayerId slId, float distance, float residualOnDistance)
void bookHistos(DTSuperLayerId slId)
DTResidualCalibration(const edm::ParameterSet &pset)
Constructor.
const edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomToken_
void beginRun(const edm::Run &, const edm::EventSetup &) override
~DTResidualCalibration() override
Destructor.
std::map< DTSuperLayerId, TH2F * > histoMapTH2F_
void analyze(const edm::Event &event, const edm::EventSetup &setup) override
const DTGeometry * dtGeom_
float segmentToWireDistance(const DTRecHit1D &recHit1D, const DTRecSegment4D &segment)
std::map< DTLayerId, TH1F * > histoMapPerLayerTH1F_
Definition: event.py:1
Definition: Run.h:45