CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
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 analyze(const edm::Event& event, const edm::EventSetup& setup) override;
40 
41 protected:
42 private:
43  unsigned int nevent;
44  unsigned int segmok, segmbad;
45 
46  float segmentToWireDistance(const DTRecHit1D& recHit1D, const DTRecSegment4D& segment);
47  // Book a set of histograms for a given super-layer/layer
48  void bookHistos(DTSuperLayerId slId);
49  void bookHistos(DTLayerId slId);
50  // Fill a set of histograms for a given super-layer/layer
51  void fillHistos(DTSuperLayerId slId, float distance, float residualOnDistance);
52  void fillHistos(DTLayerId slId, float distance, float residualOnDistance);
53 
55  double histRange_;
58 
60  TFile* rootFile_;
61  // Geometry
64 
65  // Histograms per super-layer
66  std::map<DTSuperLayerId, TH1F*> histoMapTH1F_;
67  std::map<DTSuperLayerId, TH2F*> histoMapTH2F_;
68  // Histograms per layer
69  std::map<DTLayerId, TH1F*> histoMapPerLayerTH1F_;
70  std::map<DTLayerId, TH2F*> histoMapPerLayerTH2F_;
71 };
72 #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.
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: Run.h:45