CMS 3D CMS Logo

DTCalibValidationFromMuons.h
Go to the documentation of this file.
1 
2 #ifndef DTCalibValidationFromMuons_H
3 #define DTCalibValidationFromMuons_H
4 
16 
19 
24 
29 
31 
32 #include <string>
33 #include <map>
34 #include <vector>
35 
36 // To remove into CMSSW versions before 20X; removed in CMSSW 10_5_X onwards
37 // To add into CMSSW versions before 20X
38 //class DaqMonitorBEInterface;
39 
40 class DTGeometry;
41 class DTChamber;
42 
43 // FR class DTCalibValidationFromMuons: public edm::EDAnalyzer{
45 public:
48 
50  ~DTCalibValidationFromMuons() override;
51 
53  void dqmBeginRun(const edm::Run& r, const edm::EventSetup& c) override;
54 
55  // Operations
56  void analyze(const edm::Event& event, const edm::EventSetup& setup) override;
57 
58 protected:
59  void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
60 
61 private:
62  // Switch for verbosity
63  //bool debug;
67  int nevent;
68  // the geometry
71 
72  // Label of 4D segments in the event
74 
75  // Label of muons in the event
77 
78  // Compute the distance from wire (cm) of a hits in a DTRecHit1DPair
79  float recHitDistFromWire(const DTRecHit1DPair& hitPair, const DTLayer* layer);
80  // Compute the distance from wire (cm) of a hits in a DTRecHit1D
81  float recHitDistFromWire(const DTRecHit1D& recHit, const DTLayer* layer);
82  // Compute the position with respect to the wire (cm) of a hits in a DTRecHit1DPair
83  float recHitPosition(
84  const DTRecHit1DPair& hitPair, const DTLayer* layer, const DTChamber* chamber, float segmPos, int sl);
85  // Compute the position with respect to the wire (cm) of a hits in a DTRecHit1D
86  float recHitPosition(const DTRecHit1D& recHit, const DTLayer* layer, const DTChamber* chamber, float segmPos, int sl);
87 
88  // Does the real job
89  void compute(const DTGeometry* dtGeom, const DTRecSegment4D& segment);
90 
91  // Book a set of histograms for a give chamber
92  void bookHistos(DTSuperLayerId slId, int step);
93  // Fill a set of histograms for a give chamber
94  void fillHistos(DTSuperLayerId slId,
95  float distance,
96  float residualOnDistance,
97  float position,
98  float residualOnPosition,
99  int step);
100 
101  std::map<std::pair<DTSuperLayerId, int>, std::vector<MonitorElement*> > histosPerSL;
102 };
103 #endif
104 
105 /* Local Variables: */
106 /* show-trailing-whitespace: t */
107 /* truncate-lines: t */
108 /* End: */
void analyze(const edm::Event &event, const edm::EventSetup &setup) override
void fillHistos(DTSuperLayerId slId, float distance, float residualOnDistance, float position, float residualOnPosition, int step)
float recHitPosition(const DTRecHit1DPair &hitPair, const DTLayer *layer, const DTChamber *chamber, float segmPos, int sl)
DTCalibValidationFromMuons(const edm::ParameterSet &pset)
Constructor.
edm::EDGetTokenT< reco::MuonCollection > muonToken_
void dqmBeginRun(const edm::Run &r, const edm::EventSetup &c) override
BeginRun.
void bookHistos(DTSuperLayerId slId, int step)
void compute(const DTGeometry *dtGeom, const DTRecSegment4D &segment)
constexpr std::array< uint8_t, layerIndexSize< TrackerTraits > > layer
float recHitDistFromWire(const DTRecHit1DPair &hitPair, const DTLayer *layer)
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
std::map< std::pair< DTSuperLayerId, int >, std::vector< MonitorElement * > > histosPerSL
edm::ESGetToken< DTGeometry, MuonGeometryRecord > muonGeomToken_
~DTCalibValidationFromMuons() override
Destructor.
static int position[264][3]
Definition: ReadPGInfo.cc:289
step
Definition: StallMonitor.cc:98
edm::EDGetTokenT< DTRecSegment4DCollection > segment4DToken_
Definition: event.py:1
Definition: Run.h:45