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 
16 
17 #include <string>
18 #include <vector>
19 #include <map>
20 
21 class TFile;
22 class TH1F;
23 class TH2F;
24 class DTGeometry;
25 class DTSuperLayerId;
26 class DTLayerId;
27 
29 public:
33  ~DTResidualCalibration() override;
34 
35  void beginJob() override;
36  void beginRun(const edm::Run&, const edm::EventSetup&) override;
37  void endJob() override;
38  void analyze(const edm::Event& event, const edm::EventSetup& setup) override;
39 
40 protected:
41 private:
42  unsigned int nevent;
43  unsigned int segmok, segmbad;
44 
45  float segmentToWireDistance(const DTRecHit1D& recHit1D, const DTRecSegment4D& segment);
46  // Book a set of histograms for a given super-layer/layer
47  void bookHistos(DTSuperLayerId slId);
48  void bookHistos(DTLayerId slId);
49  // Fill a set of histograms for a given super-layer/layer
50  void fillHistos(DTSuperLayerId slId, float distance, float residualOnDistance);
51  void fillHistos(DTLayerId slId, float distance, float residualOnDistance);
52 
54  double histRange_;
57 
59  TFile* rootFile_;
60  // Geometry
62  // Histograms per super-layer
63  std::map<DTSuperLayerId, TH1F*> histoMapTH1F_;
64  std::map<DTSuperLayerId, TH2F*> histoMapTH2F_;
65  // Histograms per layer
66  std::map<DTLayerId, TH1F*> histoMapPerLayerTH1F_;
67  std::map<DTLayerId, TH2F*> histoMapPerLayerTH2F_;
68 };
69 #endif
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.
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