File indexing completed on 2024-04-06 12:07:07
0001
0002 #ifndef DTCalibValidationFromMuons_H
0003 #define DTCalibValidationFromMuons_H
0004
0005
0006
0007
0008
0009
0010
0011
0012 #include "FWCore/Framework/interface/Frameworkfwd.h"
0013 #include "DataFormats/MuonDetId/interface/DTSuperLayerId.h"
0014 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0015 #include "FWCore/Framework/interface/LuminosityBlock.h"
0016
0017 #include "DQMServices/Core/interface/DQMStore.h"
0018 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0019
0020 #include "DataFormats/MuonDetId/interface/DTWireId.h"
0021 #include "DataFormats/DTRecHit/interface/DTRecHitCollection.h"
0022 #include "DataFormats/DTRecHit/interface/DTRecSegment2DCollection.h"
0023 #include "DataFormats/DTRecHit/interface/DTRecSegment4DCollection.h"
0024
0025 #include "DataFormats/MuonReco/interface/Muon.h"
0026 #include "DataFormats/MuonReco/interface/MuonFwd.h"
0027 #include "RecoMuon/TrackingTools/interface/MuonSegmentMatcher.h"
0028 #include "Geometry/Records/interface/MuonGeometryRecord.h"
0029
0030 #include "FWCore/Framework/interface/ESHandle.h"
0031
0032 #include <string>
0033 #include <map>
0034 #include <vector>
0035
0036
0037
0038
0039
0040 class DTGeometry;
0041 class DTChamber;
0042
0043
0044 class DTCalibValidationFromMuons : public DQMEDAnalyzer {
0045 public:
0046
0047 DTCalibValidationFromMuons(const edm::ParameterSet& pset);
0048
0049
0050 ~DTCalibValidationFromMuons() override;
0051
0052
0053 void dqmBeginRun(const edm::Run& r, const edm::EventSetup& c) override;
0054
0055
0056 void analyze(const edm::Event& event, const edm::EventSetup& setup) override;
0057
0058 protected:
0059 void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
0060
0061 private:
0062
0063
0064 edm::ParameterSet parameters;
0065 int wrongSegment;
0066 int rightSegment;
0067 int nevent;
0068
0069 edm::ESGetToken<DTGeometry, MuonGeometryRecord> muonGeomToken_;
0070 const DTGeometry* dtGeom;
0071
0072
0073 edm::EDGetTokenT<DTRecSegment4DCollection> segment4DToken_;
0074
0075
0076 edm::EDGetTokenT<reco::MuonCollection> muonToken_;
0077
0078
0079 float recHitDistFromWire(const DTRecHit1DPair& hitPair, const DTLayer* layer);
0080
0081 float recHitDistFromWire(const DTRecHit1D& recHit, const DTLayer* layer);
0082
0083 float recHitPosition(
0084 const DTRecHit1DPair& hitPair, const DTLayer* layer, const DTChamber* chamber, float segmPos, int sl);
0085
0086 float recHitPosition(const DTRecHit1D& recHit, const DTLayer* layer, const DTChamber* chamber, float segmPos, int sl);
0087
0088
0089 void compute(const DTGeometry* dtGeom, const DTRecSegment4D& segment);
0090
0091
0092 void bookHistos(DTSuperLayerId slId, int step);
0093
0094 void fillHistos(DTSuperLayerId slId,
0095 float distance,
0096 float residualOnDistance,
0097 float position,
0098 float residualOnPosition,
0099 int step);
0100
0101 std::map<std::pair<DTSuperLayerId, int>, std::vector<MonitorElement*> > histosPerSL;
0102 };
0103 #endif
0104
0105
0106
0107
0108