CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DTCalibValidationFromMuons.h
Go to the documentation of this file.
1 
2 #ifndef DTCalibValidationFromMuons_H
3 #define DTCalibValidationFromMuons_H
4 
17 
20 
25 
30 
32 
33 #include <string>
34 #include <map>
35 #include <vector>
36 
37 // To remove into CMSSW versions before 20X; removed in CMSSW 10_5_X onwards
38 // To add into CMSSW versions before 20X
39 //class DaqMonitorBEInterface;
40 
41 class DTGeometry;
42 class DTChamber;
43 
44 // FR class DTCalibValidationFromMuons: public edm::EDAnalyzer{
46 public:
49 
51  ~DTCalibValidationFromMuons() override;
52 
54  void dqmBeginRun(const edm::Run& r, const edm::EventSetup& c) override;
55 
56  // Operations
57  void analyze(const edm::Event& event, const edm::EventSetup& setup) override;
58 
59 protected:
60  void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
61 
62 private:
63  // Switch for verbosity
64  //bool debug;
68  int nevent;
69  // the geometry
72 
73  // Label of 4D segments in the event
75 
76  // Label of muons in the event
78 
79  // Compute the distance from wire (cm) of a hits in a DTRecHit1DPair
80  float recHitDistFromWire(const DTRecHit1DPair& hitPair, const DTLayer* layer);
81  // Compute the distance from wire (cm) of a hits in a DTRecHit1D
82  float recHitDistFromWire(const DTRecHit1D& recHit, const DTLayer* layer);
83  // Compute the position with respect to the wire (cm) of a hits in a DTRecHit1DPair
84  float recHitPosition(
85  const DTRecHit1DPair& hitPair, const DTLayer* layer, const DTChamber* chamber, float segmPos, int sl);
86  // Compute the position with respect to the wire (cm) of a hits in a DTRecHit1D
87  float recHitPosition(const DTRecHit1D& recHit, const DTLayer* layer, const DTChamber* chamber, float segmPos, int sl);
88 
89  // Does the real job
90  void compute(const DTGeometry* dtGeom, const DTRecSegment4D& segment);
91 
92  // Book a set of histograms for a give chamber
93  void bookHistos(DTSuperLayerId slId, int step);
94  // Fill a set of histograms for a give chamber
95  void fillHistos(DTSuperLayerId slId,
96  float distance,
97  float residualOnDistance,
98  float position,
99  float residualOnPosition,
100  int step);
101 
102  std::map<std::pair<DTSuperLayerId, int>, std::vector<MonitorElement*> > histosPerSL;
103 };
104 #endif
105 
106 /* Local Variables: */
107 /* show-trailing-whitespace: t */
108 /* truncate-lines: t */
109 /* End: */
void analyze(const edm::Event &event, const edm::EventSetup &setup) override
const edm::EventSetup & c
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)
constexpr std::array< uint8_t, layerIndexSize > layer
void compute(const DTGeometry *dtGeom, const DTRecSegment4D &segment)
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: Run.h:45