CMS 3D CMS Logo

Phase2OTMonitorTTStub.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: SiOuterTracker
4 // Class: SiOuterTracker
5 //
14 //
15 // Original Author: Isis Marina Van Parijs
16 // Created: Fri, 24 Oct 2014 12:31:31 GMT
17 //
18 //
19 
20 // system include files
21 #include <memory>
22 #include <numeric>
23 #include <vector>
24 
25 // user include files
34 
40 
46 
49 
51 public:
52  explicit Phase2OTMonitorTTStub(const edm::ParameterSet &);
53  ~Phase2OTMonitorTTStub() override;
54  void analyze(const edm::Event &, const edm::EventSetup &) override;
55  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
56  void dqmBeginRun(const edm::Run &iRun, const edm::EventSetup &iSetup) override;
57  static void fillDescriptions(edm::ConfigurationDescriptions &descriptions);
58  // TTStub stacks
59  // Global position of the stubs
60  MonitorElement *Stub_Barrel_XY = nullptr; // TTStub barrel y vs x
61  MonitorElement *Stub_Endcap_Fw_XY = nullptr; // TTStub Forward Endcap y vs. x
62  MonitorElement *Stub_Endcap_Bw_XY = nullptr; // TTStub Backward Endcap y vs. x
63  MonitorElement *Stub_RZ = nullptr; // TTStub #rho vs. z
64 
65  // Number of stubs
66  MonitorElement *Stub_Barrel = nullptr; // TTStub per layer
67  MonitorElement *Stub_Endcap_Disc = nullptr; // TTStubs per disc
68  MonitorElement *Stub_Endcap_Disc_Fw = nullptr; // TTStub per disc
69  MonitorElement *Stub_Endcap_Disc_Bw = nullptr; // TTStub per disc
70  MonitorElement *Stub_Endcap_Ring = nullptr; // TTStubs per ring
71  MonitorElement *Stub_Endcap_Ring_Fw[5] = {nullptr, nullptr, nullptr, nullptr, nullptr}; // TTStubs per EC ring
72  MonitorElement *Stub_Endcap_Ring_Bw[5] = {nullptr, nullptr, nullptr, nullptr, nullptr}; // TTStub per EC ring
73 
74  // Stub distribution
75  MonitorElement *Stub_Eta = nullptr; // TTstub eta distribution
76  MonitorElement *Stub_Phi = nullptr; // TTstub phi distribution
77  MonitorElement *Stub_R = nullptr; // TTstub r distribution
78  MonitorElement *Stub_bendFE = nullptr; // TTstub trigger bend
79  MonitorElement *Stub_bendBE = nullptr; // TTstub hardware bend
80  MonitorElement *Stub_isPS = nullptr; // is this stub a PS module?
81 
82  // STUB Displacement - offset
83  MonitorElement *Stub_Barrel_W = nullptr; // TTstub Pos-Corr Displacement (layer)
84  MonitorElement *Stub_Barrel_O = nullptr; // TTStub Offset (layer)
85  MonitorElement *Stub_Endcap_Disc_W = nullptr; // TTstub Pos-Corr Displacement (disc)
86  MonitorElement *Stub_Endcap_Disc_O = nullptr; // TTStub Offset (disc)
87  MonitorElement *Stub_Endcap_Ring_W = nullptr; // TTstub Pos-Corr Displacement (EC ring)
88  MonitorElement *Stub_Endcap_Ring_O = nullptr; // TTStub Offset (EC ring)
90  nullptr, nullptr, nullptr, nullptr, nullptr}; // TTstub Pos-Corr Displacement (EC ring)
91  MonitorElement *Stub_Endcap_Ring_O_Fw[5] = {nullptr, nullptr, nullptr, nullptr, nullptr}; // TTStub Offset (EC ring)
93  nullptr, nullptr, nullptr, nullptr, nullptr}; // TTstub Pos-Corr Displacement (EC ring)
94  MonitorElement *Stub_Endcap_Ring_O_Bw[5] = {nullptr, nullptr, nullptr, nullptr, nullptr}; // TTStub Offset (EC ring)
95 
96 private:
102  const TrackerGeometry *tkGeom_ = nullptr;
103  const TrackerTopology *tTopo_ = nullptr;
104 };
105 
106 // constructors and destructor
108  : conf_(iConfig),
110  topoToken_(esConsumes<TrackerTopology, TrackerTopologyRcd, edm::Transition::BeginRun>()) {
111  // now do what ever initialization is needed
112  topFolderName_ = conf_.getParameter<std::string>("TopFolderName");
114  consumes<edmNew::DetSetVector<TTStub<Ref_Phase2TrackerDigi_>>>(conf_.getParameter<edm::InputTag>("TTStubs"));
115 }
116 
118  // do anything here that needs to be done at desctruction time
119  // (e.g. close files, deallocate resources etc.)
120 }
121 
123  tkGeom_ = &(iSetup.getData(geomToken_));
124  tTopo_ = &(iSetup.getData(topoToken_));
125 }
126 // member functions
127 
128 // ------------ method called for each event ------------
132  iEvent.getByToken(tagTTStubsToken_, Phase2TrackerDigiTTStubHandle);
133 
135  typename edmNew::DetSetVector<TTStub<Ref_Phase2TrackerDigi_>>::const_iterator inputIter;
136  typename edmNew::DetSet<TTStub<Ref_Phase2TrackerDigi_>>::const_iterator contentIter;
137  // Adding protection
138  if (!Phase2TrackerDigiTTStubHandle.isValid())
139  return;
140 
141  for (inputIter = Phase2TrackerDigiTTStubHandle->begin(); inputIter != Phase2TrackerDigiTTStubHandle->end();
142  ++inputIter) {
143  for (contentIter = inputIter->begin(); contentIter != inputIter->end(); ++contentIter) {
146  edmNew::makeRefTo(Phase2TrackerDigiTTStubHandle, contentIter);
147 
149  // tempStubRef->getDetId() gives the stackDetId, not rawId
150  DetId detIdStub = tkGeom_->idToDet((tempStubRef->clusterRef(0))->getDetId())->geographicalId();
151 
153  double rawBend = tempStubRef->rawBend();
154  double bendOffset = tempStubRef->bendOffset();
155 
157  MeasurementPoint mp = (tempStubRef->clusterRef(0))->findAverageLocalCoordinates();
158  const GeomDet *theGeomDet = tkGeom_->idToDet(detIdStub);
159  Global3DPoint posStub = theGeomDet->surface().toGlobal(theGeomDet->topology().localPosition(mp));
160 
161  Stub_Eta->Fill(posStub.eta());
162  Stub_Phi->Fill(posStub.phi());
163  Stub_R->Fill(posStub.perp());
164  Stub_RZ->Fill(posStub.z(), posStub.perp());
165  Stub_bendFE->Fill(tempStubRef->bendFE());
166  Stub_bendBE->Fill(tempStubRef->bendBE());
167  Stub_isPS->Fill(tempStubRef->moduleTypePS());
168 
169  if (detIdStub.subdetId() == static_cast<int>(StripSubdetector::TOB)) { // Phase 2 Outer Tracker Barrel
170  Stub_Barrel->Fill(tTopo_->layer(detIdStub));
171  Stub_Barrel_XY->Fill(posStub.x(), posStub.y());
172  Stub_Barrel_W->Fill(tTopo_->layer(detIdStub), rawBend - bendOffset);
173  Stub_Barrel_O->Fill(tTopo_->layer(detIdStub), bendOffset);
174  } else if (detIdStub.subdetId() == static_cast<int>(StripSubdetector::TID)) { // Phase 2 Outer Tracker Endcap
175  int disc = tTopo_->layer(detIdStub); // returns wheel
176  int ring = tTopo_->tidRing(detIdStub);
179  Stub_Endcap_Disc_W->Fill(disc, rawBend - bendOffset);
180  Stub_Endcap_Ring_W->Fill(ring, rawBend - bendOffset);
181  Stub_Endcap_Disc_O->Fill(disc, bendOffset);
182  Stub_Endcap_Ring_O->Fill(ring, bendOffset);
183 
184  if (posStub.z() > 0) {
185  Stub_Endcap_Fw_XY->Fill(posStub.x(), posStub.y());
188  Stub_Endcap_Ring_W_Fw[disc - 1]->Fill(ring, rawBend - bendOffset);
189  Stub_Endcap_Ring_O_Fw[disc - 1]->Fill(ring, bendOffset);
190  } else {
191  Stub_Endcap_Bw_XY->Fill(posStub.x(), posStub.y());
194  Stub_Endcap_Ring_W_Bw[disc - 1]->Fill(ring, rawBend - bendOffset);
195  Stub_Endcap_Ring_O_Bw[disc - 1]->Fill(ring, bendOffset);
196  }
197  }
198  }
199  }
200 } // end of method
201 
202 // ------------ method called when starting to processes a run ------------
205  const int numDiscs = 5;
206  iBooker.setCurrentFolder(topFolderName_ + "/Stubs/Position");
207 
208  edm::ParameterSet psTTStub_Barrel_XY = conf_.getParameter<edm::ParameterSet>("TH2TTStub_Position");
209  HistoName = "Stub_Barrel_XY";
210  Stub_Barrel_XY = iBooker.book2D(HistoName,
211  HistoName,
212  psTTStub_Barrel_XY.getParameter<int32_t>("Nbinsx"),
213  psTTStub_Barrel_XY.getParameter<double>("xmin"),
214  psTTStub_Barrel_XY.getParameter<double>("xmax"),
215  psTTStub_Barrel_XY.getParameter<int32_t>("Nbinsy"),
216  psTTStub_Barrel_XY.getParameter<double>("ymin"),
217  psTTStub_Barrel_XY.getParameter<double>("ymax"));
218  Stub_Barrel_XY->setAxisTitle("L1 Stub Barrel position x [cm]", 1);
219  Stub_Barrel_XY->setAxisTitle("L1 Stub Barrel position y [cm]", 2);
220 
221  edm::ParameterSet psTTStub_Endcap_Fw_XY = conf_.getParameter<edm::ParameterSet>("TH2TTStub_Position");
222  HistoName = "Stub_Endcap_Fw_XY";
224  HistoName,
225  psTTStub_Endcap_Fw_XY.getParameter<int32_t>("Nbinsx"),
226  psTTStub_Endcap_Fw_XY.getParameter<double>("xmin"),
227  psTTStub_Endcap_Fw_XY.getParameter<double>("xmax"),
228  psTTStub_Endcap_Fw_XY.getParameter<int32_t>("Nbinsy"),
229  psTTStub_Endcap_Fw_XY.getParameter<double>("ymin"),
230  psTTStub_Endcap_Fw_XY.getParameter<double>("ymax"));
231  Stub_Endcap_Fw_XY->setAxisTitle("L1 Stub Endcap position x [cm]", 1);
232  Stub_Endcap_Fw_XY->setAxisTitle("L1 Stub Endcap position y [cm]", 2);
233 
234  edm::ParameterSet psTTStub_Endcap_Bw_XY = conf_.getParameter<edm::ParameterSet>("TH2TTStub_Position");
235  HistoName = "Stub_Endcap_Bw_XY";
237  HistoName,
238  psTTStub_Endcap_Bw_XY.getParameter<int32_t>("Nbinsx"),
239  psTTStub_Endcap_Bw_XY.getParameter<double>("xmin"),
240  psTTStub_Endcap_Bw_XY.getParameter<double>("xmax"),
241  psTTStub_Endcap_Bw_XY.getParameter<int32_t>("Nbinsy"),
242  psTTStub_Endcap_Bw_XY.getParameter<double>("ymin"),
243  psTTStub_Endcap_Bw_XY.getParameter<double>("ymax"));
244  Stub_Endcap_Bw_XY->setAxisTitle("L1 Stub Endcap position x [cm]", 1);
245  Stub_Endcap_Bw_XY->setAxisTitle("L1 Stub Endcap position y [cm]", 2);
246 
247  // TTStub #rho vs. z
248  edm::ParameterSet psTTStub_RZ = conf_.getParameter<edm::ParameterSet>("TH2TTStub_RZ");
249  HistoName = "Stub_RZ";
250  Stub_RZ = iBooker.book2D(HistoName,
251  HistoName,
252  psTTStub_RZ.getParameter<int32_t>("Nbinsx"),
253  psTTStub_RZ.getParameter<double>("xmin"),
254  psTTStub_RZ.getParameter<double>("xmax"),
255  psTTStub_RZ.getParameter<int32_t>("Nbinsy"),
256  psTTStub_RZ.getParameter<double>("ymin"),
257  psTTStub_RZ.getParameter<double>("ymax"));
258  Stub_RZ->setAxisTitle("L1 Stub position z [cm]", 1);
259  Stub_RZ->setAxisTitle("L1 Stub position #rho [cm]", 2);
260 
261  iBooker.setCurrentFolder(topFolderName_ + "/Stubs");
262  // TTStub eta
263  edm::ParameterSet psTTStub_Eta = conf_.getParameter<edm::ParameterSet>("TH1TTStub_Eta");
264  HistoName = "Stub_Eta";
265  Stub_Eta = iBooker.book1D(HistoName,
266  HistoName,
267  psTTStub_Eta.getParameter<int32_t>("Nbinsx"),
268  psTTStub_Eta.getParameter<double>("xmin"),
269  psTTStub_Eta.getParameter<double>("xmax"));
270  Stub_Eta->setAxisTitle("#eta", 1);
271  Stub_Eta->setAxisTitle("# L1 Stubs ", 2);
272 
273  // TTStub phi
274  edm::ParameterSet psTTStub_Phi = conf_.getParameter<edm::ParameterSet>("TH1TTStub_Phi");
275  HistoName = "Stub_Phi";
276  Stub_Phi = iBooker.book1D(HistoName,
277  HistoName,
278  psTTStub_Phi.getParameter<int32_t>("Nbinsx"),
279  psTTStub_Phi.getParameter<double>("xmin"),
280  psTTStub_Phi.getParameter<double>("xmax"));
281  Stub_Phi->setAxisTitle("#phi", 1);
282  Stub_Phi->setAxisTitle("# L1 Stubs ", 2);
283 
284  // TTStub R
285  edm::ParameterSet psTTStub_R = conf_.getParameter<edm::ParameterSet>("TH1TTStub_R");
286  HistoName = "Stub_R";
287  Stub_R = iBooker.book1D(HistoName,
288  HistoName,
289  psTTStub_R.getParameter<int32_t>("Nbinsx"),
290  psTTStub_R.getParameter<double>("xmin"),
291  psTTStub_R.getParameter<double>("xmax"));
292  Stub_R->setAxisTitle("R", 1);
293  Stub_R->setAxisTitle("# L1 Stubs ", 2);
294 
295  // TTStub trigger bend
296  edm::ParameterSet psTTStub_bend = conf_.getParameter<edm::ParameterSet>("TH1TTStub_bend");
297  HistoName = "Stub_bendFE";
298  Stub_bendFE = iBooker.book1D(HistoName,
299  HistoName,
300  psTTStub_bend.getParameter<int32_t>("Nbinsx"),
301  psTTStub_bend.getParameter<double>("xmin"),
302  psTTStub_bend.getParameter<double>("xmax"));
303  Stub_bendFE->setAxisTitle("Trigger bend", 1);
304  Stub_bendFE->setAxisTitle("# L1 Stubs ", 2);
305 
306  // TTStub hardware bend
307  HistoName = "Stub_bendBE";
308  Stub_bendBE = iBooker.book1D(HistoName,
309  HistoName,
310  psTTStub_bend.getParameter<int32_t>("Nbinsx"),
311  psTTStub_bend.getParameter<double>("xmin"),
312  psTTStub_bend.getParameter<double>("xmax"));
313  Stub_bendBE->setAxisTitle("Hardware bend", 1);
314  Stub_bendBE->setAxisTitle("# L1 Stubs ", 2);
315 
316  // TTStub, is PS?
317  edm::ParameterSet psTTStub_isPS = conf_.getParameter<edm::ParameterSet>("TH1TTStub_isPS");
318  HistoName = "Stub_isPS";
319  Stub_isPS = iBooker.book1D(HistoName,
320  HistoName,
321  psTTStub_isPS.getParameter<int32_t>("Nbinsx"),
322  psTTStub_isPS.getParameter<double>("xmin"),
323  psTTStub_isPS.getParameter<double>("xmax"));
324  Stub_isPS->setAxisTitle("Is PS?", 1);
325  Stub_isPS->setAxisTitle("# L1 Stubs ", 2);
326 
327  iBooker.setCurrentFolder(topFolderName_ + "/Stubs/NStubs");
328  // TTStub barrel stack
329  edm::ParameterSet psTTStub_Barrel = conf_.getParameter<edm::ParameterSet>("TH1TTStub_Layers");
330  HistoName = "NStubs_Barrel";
331  Stub_Barrel = iBooker.book1D(HistoName,
332  HistoName,
333  psTTStub_Barrel.getParameter<int32_t>("Nbinsx"),
334  psTTStub_Barrel.getParameter<double>("xmin"),
335  psTTStub_Barrel.getParameter<double>("xmax"));
336  Stub_Barrel->setAxisTitle("Barrel Layer", 1);
337  Stub_Barrel->setAxisTitle("# L1 Stubs ", 2);
338 
339  // TTStub Endcap stack
340  edm::ParameterSet psTTStub_ECDisc = conf_.getParameter<edm::ParameterSet>("TH1TTStub_Discs");
341  HistoName = "NStubs_Endcap_Disc";
343  HistoName,
344  psTTStub_ECDisc.getParameter<int32_t>("Nbinsx"),
345  psTTStub_ECDisc.getParameter<double>("xmin"),
346  psTTStub_ECDisc.getParameter<double>("xmax"));
347  Stub_Endcap_Disc->setAxisTitle("Endcap Disc", 1);
348  Stub_Endcap_Disc->setAxisTitle("# L1 Stubs ", 2);
349 
350  // TTStub Endcap stack
351  HistoName = "NStubs_Endcap_Disc_Fw";
353  HistoName,
354  psTTStub_ECDisc.getParameter<int32_t>("Nbinsx"),
355  psTTStub_ECDisc.getParameter<double>("xmin"),
356  psTTStub_ECDisc.getParameter<double>("xmax"));
357  Stub_Endcap_Disc_Fw->setAxisTitle("Forward Endcap Disc", 1);
358  Stub_Endcap_Disc_Fw->setAxisTitle("# L1 Stubs ", 2);
359 
360  // TTStub Endcap stack
361  HistoName = "NStubs_Endcap_Disc_Bw";
363  HistoName,
364  psTTStub_ECDisc.getParameter<int32_t>("Nbinsx"),
365  psTTStub_ECDisc.getParameter<double>("xmin"),
366  psTTStub_ECDisc.getParameter<double>("xmax"));
367  Stub_Endcap_Disc_Bw->setAxisTitle("Backward Endcap Disc", 1);
368  Stub_Endcap_Disc_Bw->setAxisTitle("# L1 Stubs ", 2);
369 
370  edm::ParameterSet psTTStub_ECRing = conf_.getParameter<edm::ParameterSet>("TH1TTStub_Rings");
371  HistoName = "NStubs_Endcap_Ring";
373  HistoName,
374  psTTStub_ECRing.getParameter<int32_t>("Nbinsx"),
375  psTTStub_ECRing.getParameter<double>("xmin"),
376  psTTStub_ECRing.getParameter<double>("xmax"));
377  Stub_Endcap_Ring->setAxisTitle("Endcap Ring", 1);
378  Stub_Endcap_Ring->setAxisTitle("# L1 Stubs ", 2);
379 
380  for (int i = 0; i < numDiscs; i++) {
381  HistoName = "NStubs_Disc+" + std::to_string(i + 1);
382  // TTStub Endcap stack
384  HistoName,
385  psTTStub_ECRing.getParameter<int32_t>("Nbinsx"),
386  psTTStub_ECRing.getParameter<double>("xmin"),
387  psTTStub_ECRing.getParameter<double>("xmax"));
388  Stub_Endcap_Ring_Fw[i]->setAxisTitle("Endcap Ring", 1);
389  Stub_Endcap_Ring_Fw[i]->setAxisTitle("# L1 Stubs ", 2);
390  }
391 
392  for (int i = 0; i < numDiscs; i++) {
393  HistoName = "NStubs_Disc-" + std::to_string(i + 1);
394  // TTStub Endcap stack
396  HistoName,
397  psTTStub_ECRing.getParameter<int32_t>("Nbinsx"),
398  psTTStub_ECRing.getParameter<double>("xmin"),
399  psTTStub_ECRing.getParameter<double>("xmax"));
400  Stub_Endcap_Ring_Bw[i]->setAxisTitle("Endcap Ring", 1);
401  Stub_Endcap_Ring_Bw[i]->setAxisTitle("# L1 Stubs ", 2);
402  }
403 
404  // TTStub displ/offset
405  edm::ParameterSet psTTStub_Barrel_2D = conf_.getParameter<edm::ParameterSet>("TH2TTStub_DisOf_Layer");
406  edm::ParameterSet psTTStub_ECDisc_2D = conf_.getParameter<edm::ParameterSet>("TH2TTStub_DisOf_Disc");
407  edm::ParameterSet psTTStub_ECRing_2D = conf_.getParameter<edm::ParameterSet>("TH2TTStub_DisOf_Ring");
408 
409  iBooker.setCurrentFolder(topFolderName_ + "/Stubs/Width");
410  HistoName = "Stub_Width_Barrel";
411  Stub_Barrel_W = iBooker.book2D(HistoName,
412  HistoName,
413  psTTStub_Barrel_2D.getParameter<int32_t>("Nbinsx"),
414  psTTStub_Barrel_2D.getParameter<double>("xmin"),
415  psTTStub_Barrel_2D.getParameter<double>("xmax"),
416  psTTStub_Barrel_2D.getParameter<int32_t>("Nbinsy"),
417  psTTStub_Barrel_2D.getParameter<double>("ymin"),
418  psTTStub_Barrel_2D.getParameter<double>("ymax"));
419  Stub_Barrel_W->setAxisTitle("Barrel Layer", 1);
420  Stub_Barrel_W->setAxisTitle("Displacement - Offset", 2);
421 
422  HistoName = "Stub_Width_Endcap_Disc";
424  HistoName,
425  psTTStub_ECDisc_2D.getParameter<int32_t>("Nbinsx"),
426  psTTStub_ECDisc_2D.getParameter<double>("xmin"),
427  psTTStub_ECDisc_2D.getParameter<double>("xmax"),
428  psTTStub_ECDisc_2D.getParameter<int32_t>("Nbinsy"),
429  psTTStub_ECDisc_2D.getParameter<double>("ymin"),
430  psTTStub_ECDisc_2D.getParameter<double>("ymax"));
431  Stub_Endcap_Disc_W->setAxisTitle("Endcap Disc", 1);
432  Stub_Endcap_Disc_W->setAxisTitle("Displacement - Offset", 2);
433 
434  HistoName = "Stub_Width_Endcap_Ring";
436  HistoName,
437  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsx"),
438  psTTStub_ECRing_2D.getParameter<double>("xmin"),
439  psTTStub_ECRing_2D.getParameter<double>("xmax"),
440  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsy"),
441  psTTStub_ECRing_2D.getParameter<double>("ymin"),
442  psTTStub_ECRing_2D.getParameter<double>("ymax"));
443  Stub_Endcap_Ring_W->setAxisTitle("Endcap Ring", 1);
444  Stub_Endcap_Ring_W->setAxisTitle("Trigger Offset", 2);
445 
446  for (int i = 0; i < numDiscs; i++) {
447  HistoName = "Stub_Width_Disc+" + std::to_string(i + 1);
449  HistoName,
450  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsx"),
451  psTTStub_ECRing_2D.getParameter<double>("xmin"),
452  psTTStub_ECRing_2D.getParameter<double>("xmax"),
453  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsy"),
454  psTTStub_ECRing_2D.getParameter<double>("ymin"),
455  psTTStub_ECRing_2D.getParameter<double>("ymax"));
456  Stub_Endcap_Ring_W_Fw[i]->setAxisTitle("Endcap Ring", 1);
457  Stub_Endcap_Ring_W_Fw[i]->setAxisTitle("Displacement - Offset", 2);
458  }
459 
460  for (int i = 0; i < numDiscs; i++) {
461  HistoName = "Stub_Width_Disc-" + std::to_string(i + 1);
463  HistoName,
464  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsx"),
465  psTTStub_ECRing_2D.getParameter<double>("xmin"),
466  psTTStub_ECRing_2D.getParameter<double>("xmax"),
467  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsy"),
468  psTTStub_ECRing_2D.getParameter<double>("ymin"),
469  psTTStub_ECRing_2D.getParameter<double>("ymax"));
470  Stub_Endcap_Ring_W_Bw[i]->setAxisTitle("Endcap Ring", 1);
471  Stub_Endcap_Ring_W_Bw[i]->setAxisTitle("Displacement - Offset", 2);
472  }
473 
474  iBooker.setCurrentFolder(topFolderName_ + "/Stubs/Offset");
475  HistoName = "Stub_Offset_Barrel";
476  Stub_Barrel_O = iBooker.book2D(HistoName,
477  HistoName,
478  psTTStub_Barrel_2D.getParameter<int32_t>("Nbinsx"),
479  psTTStub_Barrel_2D.getParameter<double>("xmin"),
480  psTTStub_Barrel_2D.getParameter<double>("xmax"),
481  psTTStub_Barrel_2D.getParameter<int32_t>("Nbinsy"),
482  psTTStub_Barrel_2D.getParameter<double>("ymin"),
483  psTTStub_Barrel_2D.getParameter<double>("ymax"));
484  Stub_Barrel_O->setAxisTitle("Barrel Layer", 1);
485  Stub_Barrel_O->setAxisTitle("Trigger Offset", 2);
486 
487  HistoName = "Stub_Offset_Endcap_Disc";
489  HistoName,
490  psTTStub_ECDisc_2D.getParameter<int32_t>("Nbinsx"),
491  psTTStub_ECDisc_2D.getParameter<double>("xmin"),
492  psTTStub_ECDisc_2D.getParameter<double>("xmax"),
493  psTTStub_ECDisc_2D.getParameter<int32_t>("Nbinsy"),
494  psTTStub_ECDisc_2D.getParameter<double>("ymin"),
495  psTTStub_ECDisc_2D.getParameter<double>("ymax"));
496  Stub_Endcap_Disc_O->setAxisTitle("Endcap Disc", 1);
497  Stub_Endcap_Disc_O->setAxisTitle("Trigger Offset", 2);
498 
499  HistoName = "Stub_Offset_Endcap_Ring";
501  HistoName,
502  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsx"),
503  psTTStub_ECRing_2D.getParameter<double>("xmin"),
504  psTTStub_ECRing_2D.getParameter<double>("xmax"),
505  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsy"),
506  psTTStub_ECRing_2D.getParameter<double>("ymin"),
507  psTTStub_ECRing_2D.getParameter<double>("ymax"));
508  Stub_Endcap_Ring_O->setAxisTitle("Endcap Ring", 1);
509  Stub_Endcap_Ring_O->setAxisTitle("Trigger Offset", 2);
510 
511  for (int i = 0; i < numDiscs; i++) {
512  HistoName = "Stub_Offset_Disc+" + std::to_string(i + 1);
514  HistoName,
515  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsx"),
516  psTTStub_ECRing_2D.getParameter<double>("xmin"),
517  psTTStub_ECRing_2D.getParameter<double>("xmax"),
518  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsy"),
519  psTTStub_ECRing_2D.getParameter<double>("ymin"),
520  psTTStub_ECRing_2D.getParameter<double>("ymax"));
521  Stub_Endcap_Ring_O_Fw[i]->setAxisTitle("Endcap Ring", 1);
522  Stub_Endcap_Ring_O_Fw[i]->setAxisTitle("Trigger Offset", 2);
523  }
524 
525  for (int i = 0; i < numDiscs; i++) {
526  HistoName = "Stub_Offset_Disc-" + std::to_string(i + 1);
528  HistoName,
529  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsx"),
530  psTTStub_ECRing_2D.getParameter<double>("xmin"),
531  psTTStub_ECRing_2D.getParameter<double>("xmax"),
532  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsy"),
533  psTTStub_ECRing_2D.getParameter<double>("ymin"),
534  psTTStub_ECRing_2D.getParameter<double>("ymax"));
535  Stub_Endcap_Ring_O_Bw[i]->setAxisTitle("Endcap Ring", 1);
536  Stub_Endcap_Ring_O_Bw[i]->setAxisTitle("Trigger Offset", 2);
537  }
538 }
540  // Phase2OTMonitorTTStub
542  {
544  psd0.add<int>("Nbinsx", 960);
545  psd0.add<double>("xmax", 120);
546  psd0.add<double>("xmin", -120);
547  psd0.add<int>("Nbinsy", 960);
548  psd0.add<double>("ymax", 120);
549  psd0.add<double>("ymin", -120);
550  desc.add<edm::ParameterSetDescription>("TH2TTStub_Position", psd0);
551  }
552  {
554  psd0.add<int>("Nbinsx", 900);
555  psd0.add<double>("xmax", 300);
556  psd0.add<double>("xmin", -300);
557  psd0.add<int>("Nbinsy", 900);
558  psd0.add<double>("ymax", 120);
559  psd0.add<double>("ymin", 0);
560  desc.add<edm::ParameterSetDescription>("TH2TTStub_RZ", psd0);
561  }
562  {
564  psd0.add<int>("Nbinsx", 45);
565  psd0.add<double>("xmin", -5);
566  psd0.add<double>("xmax", 5);
567  desc.add<edm::ParameterSetDescription>("TH1TTStub_Eta", psd0);
568  }
569  {
571  psd0.add<int>("Nbinsx", 60);
572  psd0.add<double>("xmin", -3.5);
573  psd0.add<double>("xmax", 3.5);
574  desc.add<edm::ParameterSetDescription>("TH1TTStub_Phi", psd0);
575  }
576  {
578  psd0.add<int>("Nbinsx", 45);
579  psd0.add<double>("xmin", 0);
580  psd0.add<double>("xmax", 120);
581  desc.add<edm::ParameterSetDescription>("TH1TTStub_R", psd0);
582  }
583  {
585  psd0.add<int>("Nbinsx", 69);
586  psd0.add<double>("xmin", -8.625);
587  psd0.add<double>("xmax", 8.625);
588  desc.add<edm::ParameterSetDescription>("TH1TTStub_bend", psd0);
589  }
590  {
592  psd0.add<int>("Nbinsx", 2);
593  psd0.add<double>("xmin", 0.0);
594  psd0.add<double>("xmax", 2.0);
595  desc.add<edm::ParameterSetDescription>("TH1TTStub_isPS", psd0);
596  }
597  {
599  psd0.add<int>("Nbinsx", 7);
600  psd0.add<double>("xmin", 0.5);
601  psd0.add<double>("xmax", 7.5);
602  desc.add<edm::ParameterSetDescription>("TH1TTStub_Layers", psd0);
603  }
604  {
606  psd0.add<int>("Nbinsx", 6);
607  psd0.add<double>("xmin", 0.5);
608  psd0.add<double>("xmax", 6.5);
609  desc.add<edm::ParameterSetDescription>("TH1TTStub_Discs", psd0);
610  }
611  {
613  psd0.add<int>("Nbinsx", 16);
614  psd0.add<double>("xmin", 0.5);
615  psd0.add<double>("xmax", 16.5);
616  desc.add<edm::ParameterSetDescription>("TH1TTStub_Rings", psd0);
617  }
618  {
620  psd0.add<int>("Nbinsx", 6);
621  psd0.add<double>("xmax", 6.5);
622  psd0.add<double>("xmin", 0.5);
623  psd0.add<int>("Nbinsy", 43);
624  psd0.add<double>("ymax", 10.75);
625  psd0.add<double>("ymin", -10.75);
626  desc.add<edm::ParameterSetDescription>("TH2TTStub_DisOf_Layer", psd0);
627  }
628  {
630  psd0.add<int>("Nbinsx", 5);
631  psd0.add<double>("xmax", 5.5);
632  psd0.add<double>("xmin", 0.5);
633  psd0.add<int>("Nbinsy", 43);
634  psd0.add<double>("ymax", 10.75);
635  psd0.add<double>("ymin", -10.75);
636  desc.add<edm::ParameterSetDescription>("TH2TTStub_DisOf_Disc", psd0);
637  }
638  {
640  psd0.add<int>("Nbinsx", 16);
641  psd0.add<double>("xmax", 16.5);
642  psd0.add<double>("xmin", 0.5);
643  psd0.add<int>("Nbinsy", 43);
644  psd0.add<double>("ymax", 10.75);
645  psd0.add<double>("ymin", -10.75);
646  desc.add<edm::ParameterSetDescription>("TH2TTStub_DisOf_Ring", psd0);
647  }
648  desc.add<std::string>("TopFolderName", "TrackerPhase2OTStub");
649  desc.add<edm::InputTag>("TTStubs", edm::InputTag("TTStubsFromPhase2TrackerDigis", "StubAccepted"));
650  descriptions.add("Phase2OTMonitorTTStub", desc);
651  // or use the following to generate the label from the module's C++ type
652  //descriptions.addWithDefaultLabel(desc);
653 }
654 
const TrackerGeometry * tkGeom_
edm::Ref< typename HandleT::element_type, typename HandleT::element_type::value_type::value_type > makeRefTo(const HandleT &iHandle, typename HandleT::element_type::value_type::const_iterator itIter)
MonitorElement * Stub_Endcap_Disc_W
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
T perp() const
Definition: PV3DBase.h:69
MonitorElement * Stub_Endcap_Disc_Fw
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
T z() const
Definition: PV3DBase.h:61
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
virtual const Topology & topology() const
Definition: GeomDet.cc:67
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
Phase2OTMonitorTTStub(const edm::ParameterSet &)
T eta() const
Definition: PV3DBase.h:73
MonitorElement * Stub_Endcap_Ring_O
MonitorElement * Stub_Endcap_Ring_O_Bw[5]
MonitorElement * Stub_Endcap_Ring_W_Bw[5]
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
static std::string to_string(const XMLCh *ch)
unsigned int layer(const DetId &id) const
const_iterator end(bool update=false) const
void Fill(long long x)
MonitorElement * Stub_Endcap_Ring_Bw[5]
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
int iEvent
Definition: GenABIO.cc:224
MonitorElement * Stub_Endcap_Disc_O
MonitorElement * Stub_Endcap_Disc
void dqmBeginRun(const edm::Run &iRun, const edm::EventSetup &iSetup) override
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
MonitorElement * Stub_Endcap_Ring_Fw[5]
Transition
Definition: Transition.h:12
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
static constexpr auto TOB
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Class to store the L1 Track Trigger stubs.
Definition: TTStub.h:22
const TrackerGeomDet * idToDet(DetId) const override
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
Definition: DetId.h:17
const_iterator begin(bool update=false) const
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:221
MonitorElement * Stub_Barrel_W
MonitorElement * Stub_Endcap_Ring_W
MonitorElement * Stub_Endcap_Fw_XY
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::string HistoName
bool isValid() const
Definition: HandleBase.h:70
MonitorElement * Stub_Barrel_XY
MonitorElement * Stub_Endcap_Bw_XY
HLT enums.
MonitorElement * Stub_Barrel_O
edm::EDGetTokenT< edmNew::DetSetVector< TTStub< Ref_Phase2TrackerDigi_ > > > tagTTStubsToken_
unsigned int tidRing(const DetId &id) const
MonitorElement * Stub_Endcap_Ring_W_Fw[5]
const TrackerTopology * tTopo_
MonitorElement * Stub_Endcap_Ring
MonitorElement * Stub_Endcap_Ring_O_Fw[5]
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
void analyze(const edm::Event &, const edm::EventSetup &) override
static constexpr auto TID
Definition: Run.h:45
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement * Stub_Endcap_Disc_Bw