CMS 3D CMS Logo

DTCalibValidationFromMuons.h
Go to the documentation of this file.
1 
2 #ifndef DTCalibValidationFromMuons_H
3 #define DTCalibValidationFromMuons_H
4 
17 
21 
26 
30 
31 
33 
34 #include <string>
35 #include <map>
36 #include <vector>
37 
38 
39 // To remove into CMSSW versions before 20X; removed in CMSSW 10_5_X onwards
40 //class DQMStore;
41 // To add into CMSSW versions before 20X
42 //class DaqMonitorBEInterface;
43 
44 class MonitorElement;
45 class DTGeometry;
46 class DTChamber;
47 
48 // FR class DTCalibValidationFromMuons: public edm::EDAnalyzer{
50 
51  public:
54 
56  ~DTCalibValidationFromMuons() override;
57 
59  void dqmBeginRun(const edm::Run& r, const edm::EventSetup& c) override;
60 
61  // Operations
62  void analyze(const edm::Event& event, const edm::EventSetup& setup) override;
63 
64 
65  protected:
66  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
67 
68 
69  private:
70 
71  // Switch for verbosity
72  //bool debug;
76  int nevent;
77  // the geometry
79 
80  // Label of 4D segments in the event
82 
83  // Label of muons in the event
85 
86  // Compute the distance from wire (cm) of a hits in a DTRecHit1DPair
87  float recHitDistFromWire(const DTRecHit1DPair& hitPair, const DTLayer* layer);
88  // Compute the distance from wire (cm) of a hits in a DTRecHit1D
89  float recHitDistFromWire(const DTRecHit1D& recHit, const DTLayer* layer);
90  // Compute the position with respect to the wire (cm) of a hits in a DTRecHit1DPair
91  float recHitPosition(const DTRecHit1DPair& hitPair, const DTLayer* layer, const DTChamber* chamber, float segmPos, int sl);
92  // Compute the position with respect to the wire (cm) of a hits in a DTRecHit1D
93  float recHitPosition(const DTRecHit1D& recHit, const DTLayer* layer, const DTChamber* chamber, float segmPos, int sl);
94 
95  // Does the real job
96  void compute(const DTGeometry *dtGeom, const DTRecSegment4D& segment);
97 
98  // Book a set of histograms for a give chamber
99  void bookHistos(DTSuperLayerId slId, int step);
100  // Fill a set of histograms for a give chamber
101  void fillHistos(DTSuperLayerId slId,
102  float distance,
103  float residualOnDistance,
104  float position,
105  float residualOnPosition,
106  int step);
107 
108  std::map<std::pair<DTSuperLayerId,int>, std::vector<MonitorElement*> > histosPerSL;
109 
110 };
111 #endif
112 
113 
114 /* Local Variables: */
115 /* show-trailing-whitespace: t */
116 /* truncate-lines: t */
117 /* End: */
void analyze(const edm::Event &event, const edm::EventSetup &setup) override
edm::ESHandle< DTGeometry > dtGeom
std::map< std::pair< DTSuperLayerId, int >, std::vector< MonitorElement * > > histosPerSL
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)
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:2
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)
float recHitDistFromWire(const DTRecHit1DPair &hitPair, const DTLayer *layer)
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
~DTCalibValidationFromMuons() override
Destructor.
static int position[264][3]
Definition: ReadPGInfo.cc:509
step
Definition: StallMonitor.cc:94
edm::EDGetTokenT< DTRecSegment4DCollection > segment4DToken_
Definition: event.py:1
Definition: Run.h:45