CMS 3D CMS Logo

OuterTrackerMonitorTTStub.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 <fstream>
22 #include <iostream>
23 #include <memory>
24 #include <numeric>
25 #include <vector>
26 
27 // user include files
48 
50 public:
52  ~OuterTrackerMonitorTTStub() override;
53  void analyze(const edm::Event &, const edm::EventSetup &) override;
54  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
55 
56  // TTStub stacks
57  // Global position of the stubs
58  MonitorElement *Stub_Barrel_XY = nullptr; // TTStub barrel y vs x
59  MonitorElement *Stub_Endcap_Fw_XY = nullptr; // TTStub Forward Endcap y vs. x
60  MonitorElement *Stub_Endcap_Bw_XY = nullptr; // TTStub Backward Endcap y vs. x
61  MonitorElement *Stub_RZ = nullptr; // TTStub #rho vs. z
62 
63  // Number of stubs
64  MonitorElement *Stub_Barrel = nullptr; // TTStub per layer
65  MonitorElement *Stub_Endcap_Disc = nullptr; // TTStubs per disc
66  MonitorElement *Stub_Endcap_Disc_Fw = nullptr; // TTStub per disc
67  MonitorElement *Stub_Endcap_Disc_Bw = nullptr; // TTStub per disc
68  MonitorElement *Stub_Endcap_Ring = nullptr; // TTStubs per ring
69  MonitorElement *Stub_Endcap_Ring_Fw[5] = {nullptr, nullptr, nullptr, nullptr, nullptr}; // TTStubs per EC ring
70  MonitorElement *Stub_Endcap_Ring_Bw[5] = {nullptr, nullptr, nullptr, nullptr, nullptr}; // TTStub per EC ring
71 
72  // Stub distribution
73  MonitorElement *Stub_Eta = nullptr; // TTstub eta distribution
74  MonitorElement *Stub_Phi = nullptr; // TTstub phi distribution
75  MonitorElement *Stub_R = nullptr; // TTstub r distribution
76  MonitorElement *Stub_bendFE = nullptr; // TTstub trigger bend
77  MonitorElement *Stub_bendBE = nullptr; // TTstub hardware bend
78  MonitorElement *Stub_rawBend = nullptr; // TTstub raw bend
79  MonitorElement *Stub_bendOffset = nullptr; // TTstub bend offset
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:
100 };
101 
102 // constructors and destructor
104  // now do what ever initialization is needed
105  topFolderName_ = conf_.getParameter<std::string>("TopFolderName");
107  consumes<edmNew::DetSetVector<TTStub<Ref_Phase2TrackerDigi_>>>(conf_.getParameter<edm::InputTag>("TTStubs"));
108 }
109 
111  // do anything here that needs to be done at desctruction time
112  // (e.g. close files, deallocate resources etc.)
113 }
114 
115 // member functions
116 
117 // ------------ method called for each event ------------
121  iEvent.getByToken(tagTTStubsToken_, Phase2TrackerDigiTTStubHandle);
122 
124  edm::ESHandle<TrackerTopology> tTopoHandle;
125  const TrackerTopology *tTopo;
126  iSetup.get<TrackerTopologyRcd>().get(tTopoHandle);
127  tTopo = tTopoHandle.product();
128 
129  edm::ESHandle<TrackerGeometry> tGeometryHandle;
130  const TrackerGeometry *theTrackerGeometry;
131  iSetup.get<TrackerDigiGeometryRecord>().get(tGeometryHandle);
132  theTrackerGeometry = tGeometryHandle.product();
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 = theTrackerGeometry->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 = theTrackerGeometry->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_rawBend->Fill(rawBend);
168  Stub_bendOffset->Fill(bendOffset);
169  Stub_isPS->Fill(tempStubRef->moduleTypePS());
170 
171  if (detIdStub.subdetId() == static_cast<int>(StripSubdetector::TOB)) { // Phase 2 Outer Tracker Barrel
172  Stub_Barrel->Fill(tTopo->layer(detIdStub));
173  Stub_Barrel_XY->Fill(posStub.x(), posStub.y());
174  Stub_Barrel_W->Fill(tTopo->layer(detIdStub), rawBend - bendOffset);
175  Stub_Barrel_O->Fill(tTopo->layer(detIdStub), bendOffset);
176  } else if (detIdStub.subdetId() == static_cast<int>(StripSubdetector::TID)) { // Phase 2 Outer Tracker Endcap
177  int disc = tTopo->layer(detIdStub); // returns wheel
178  int ring = tTopo->tidRing(detIdStub);
181  Stub_Endcap_Disc_W->Fill(disc, rawBend - bendOffset);
182  Stub_Endcap_Ring_W->Fill(ring, rawBend - bendOffset);
183  Stub_Endcap_Disc_O->Fill(disc, bendOffset);
184  Stub_Endcap_Ring_O->Fill(ring, bendOffset);
185 
186  if (posStub.z() > 0) {
187  Stub_Endcap_Fw_XY->Fill(posStub.x(), posStub.y());
190  Stub_Endcap_Ring_W_Fw[disc - 1]->Fill(ring, rawBend - bendOffset);
191  Stub_Endcap_Ring_O_Fw[disc - 1]->Fill(ring, bendOffset);
192  } else {
193  Stub_Endcap_Bw_XY->Fill(posStub.x(), posStub.y());
196  Stub_Endcap_Ring_W_Bw[disc - 1]->Fill(ring, rawBend - bendOffset);
197  Stub_Endcap_Ring_O_Bw[disc - 1]->Fill(ring, bendOffset);
198  }
199  }
200  }
201  }
202 } // end of method
203 
204 // ------------ method called when starting to processes a run ------------
206  edm::Run const &run,
207  edm::EventSetup const &es) {
209  const int numDiscs = 5;
210  iBooker.setCurrentFolder(topFolderName_ + "/Stubs/Position");
211 
212  edm::ParameterSet psTTStub_Barrel_XY = conf_.getParameter<edm::ParameterSet>("TH2TTStub_Position");
213  HistoName = "Stub_Barrel_XY";
214  Stub_Barrel_XY = iBooker.book2D(HistoName,
215  HistoName,
216  psTTStub_Barrel_XY.getParameter<int32_t>("Nbinsx"),
217  psTTStub_Barrel_XY.getParameter<double>("xmin"),
218  psTTStub_Barrel_XY.getParameter<double>("xmax"),
219  psTTStub_Barrel_XY.getParameter<int32_t>("Nbinsy"),
220  psTTStub_Barrel_XY.getParameter<double>("ymin"),
221  psTTStub_Barrel_XY.getParameter<double>("ymax"));
222  Stub_Barrel_XY->setAxisTitle("L1 Stub Barrel position x [cm]", 1);
223  Stub_Barrel_XY->setAxisTitle("L1 Stub Barrel position y [cm]", 2);
224 
225  edm::ParameterSet psTTStub_Endcap_Fw_XY = conf_.getParameter<edm::ParameterSet>("TH2TTStub_Position");
226  HistoName = "Stub_Endcap_Fw_XY";
228  HistoName,
229  psTTStub_Endcap_Fw_XY.getParameter<int32_t>("Nbinsx"),
230  psTTStub_Endcap_Fw_XY.getParameter<double>("xmin"),
231  psTTStub_Endcap_Fw_XY.getParameter<double>("xmax"),
232  psTTStub_Endcap_Fw_XY.getParameter<int32_t>("Nbinsy"),
233  psTTStub_Endcap_Fw_XY.getParameter<double>("ymin"),
234  psTTStub_Endcap_Fw_XY.getParameter<double>("ymax"));
235  Stub_Endcap_Fw_XY->setAxisTitle("L1 Stub Endcap position x [cm]", 1);
236  Stub_Endcap_Fw_XY->setAxisTitle("L1 Stub Endcap position y [cm]", 2);
237 
238  edm::ParameterSet psTTStub_Endcap_Bw_XY = conf_.getParameter<edm::ParameterSet>("TH2TTStub_Position");
239  HistoName = "Stub_Endcap_Bw_XY";
241  HistoName,
242  psTTStub_Endcap_Bw_XY.getParameter<int32_t>("Nbinsx"),
243  psTTStub_Endcap_Bw_XY.getParameter<double>("xmin"),
244  psTTStub_Endcap_Bw_XY.getParameter<double>("xmax"),
245  psTTStub_Endcap_Bw_XY.getParameter<int32_t>("Nbinsy"),
246  psTTStub_Endcap_Bw_XY.getParameter<double>("ymin"),
247  psTTStub_Endcap_Bw_XY.getParameter<double>("ymax"));
248  Stub_Endcap_Bw_XY->setAxisTitle("L1 Stub Endcap position x [cm]", 1);
249  Stub_Endcap_Bw_XY->setAxisTitle("L1 Stub Endcap position y [cm]", 2);
250 
251  // TTStub #rho vs. z
252  edm::ParameterSet psTTStub_RZ = conf_.getParameter<edm::ParameterSet>("TH2TTStub_RZ");
253  HistoName = "Stub_RZ";
254  Stub_RZ = iBooker.book2D(HistoName,
255  HistoName,
256  psTTStub_RZ.getParameter<int32_t>("Nbinsx"),
257  psTTStub_RZ.getParameter<double>("xmin"),
258  psTTStub_RZ.getParameter<double>("xmax"),
259  psTTStub_RZ.getParameter<int32_t>("Nbinsy"),
260  psTTStub_RZ.getParameter<double>("ymin"),
261  psTTStub_RZ.getParameter<double>("ymax"));
262  Stub_RZ->setAxisTitle("L1 Stub position z [cm]", 1);
263  Stub_RZ->setAxisTitle("L1 Stub position #rho [cm]", 2);
264 
265  iBooker.setCurrentFolder(topFolderName_ + "/Stubs");
266  // TTStub eta
267  edm::ParameterSet psTTStub_Eta = conf_.getParameter<edm::ParameterSet>("TH1TTStub_Eta");
268  HistoName = "Stub_Eta";
269  Stub_Eta = iBooker.book1D(HistoName,
270  HistoName,
271  psTTStub_Eta.getParameter<int32_t>("Nbinsx"),
272  psTTStub_Eta.getParameter<double>("xmin"),
273  psTTStub_Eta.getParameter<double>("xmax"));
274  Stub_Eta->setAxisTitle("#eta", 1);
275  Stub_Eta->setAxisTitle("# L1 Stubs ", 2);
276 
277  // TTStub phi
278  edm::ParameterSet psTTStub_Phi = conf_.getParameter<edm::ParameterSet>("TH1TTStub_Phi");
279  HistoName = "Stub_Phi";
280  Stub_Phi = iBooker.book1D(HistoName,
281  HistoName,
282  psTTStub_Phi.getParameter<int32_t>("Nbinsx"),
283  psTTStub_Phi.getParameter<double>("xmin"),
284  psTTStub_Phi.getParameter<double>("xmax"));
285  Stub_Phi->setAxisTitle("#phi", 1);
286  Stub_Phi->setAxisTitle("# L1 Stubs ", 2);
287 
288  // TTStub R
289  edm::ParameterSet psTTStub_R = conf_.getParameter<edm::ParameterSet>("TH1TTStub_R");
290  HistoName = "Stub_R";
291  Stub_R = iBooker.book1D(HistoName,
292  HistoName,
293  psTTStub_R.getParameter<int32_t>("Nbinsx"),
294  psTTStub_R.getParameter<double>("xmin"),
295  psTTStub_R.getParameter<double>("xmax"));
296  Stub_R->setAxisTitle("R", 1);
297  Stub_R->setAxisTitle("# L1 Stubs ", 2);
298 
299  // TTStub trigger bend
300  edm::ParameterSet psTTStub_bend = conf_.getParameter<edm::ParameterSet>("TH1TTStub_bend");
301  HistoName = "Stub_bendFE";
302  Stub_bendFE = iBooker.book1D(HistoName,
303  HistoName,
304  psTTStub_bend.getParameter<int32_t>("Nbinsx"),
305  psTTStub_bend.getParameter<double>("xmin"),
306  psTTStub_bend.getParameter<double>("xmax"));
307  Stub_bendFE->setAxisTitle("Trigger bend", 1);
308  Stub_bendFE->setAxisTitle("# L1 Stubs ", 2);
309 
310  // TTStub hardware bend
311  HistoName = "Stub_bendBE";
312  Stub_bendBE = iBooker.book1D(HistoName,
313  HistoName,
314  psTTStub_bend.getParameter<int32_t>("Nbinsx"),
315  psTTStub_bend.getParameter<double>("xmin"),
316  psTTStub_bend.getParameter<double>("xmax"));
317  Stub_bendBE->setAxisTitle("Hardware bend", 1);
318  Stub_bendBE->setAxisTitle("# L1 Stubs ", 2);
319 
320  // TTStub raw bend
321  HistoName = "Stub_rawBend";
322  Stub_rawBend = iBooker.book1D(HistoName,
323  HistoName,
324  psTTStub_bend.getParameter<int32_t>("Nbinsx"),
325  psTTStub_bend.getParameter<double>("xmin"),
326  psTTStub_bend.getParameter<double>("xmax"));
327  Stub_rawBend->setAxisTitle("Raw bend", 1);
328  Stub_rawBend->setAxisTitle("# L1 Stubs ", 2);
329 
330  // TTStub bend offset
331  HistoName = "Stub_bendOffset";
332  Stub_bendOffset = iBooker.book1D(HistoName,
333  HistoName,
334  psTTStub_bend.getParameter<int32_t>("Nbinsx"),
335  psTTStub_bend.getParameter<double>("xmin"),
336  psTTStub_bend.getParameter<double>("xmax"));
337  Stub_bendOffset->setAxisTitle("Bend offset", 1);
338  Stub_bendOffset->setAxisTitle("# L1 Stubs ", 2);
339 
340  // TTStub, is PS?
341  edm::ParameterSet psTTStub_isPS = conf_.getParameter<edm::ParameterSet>("TH1TTStub_isPS");
342  HistoName = "Stub_isPS";
343  Stub_isPS = iBooker.book1D(HistoName,
344  HistoName,
345  psTTStub_isPS.getParameter<int32_t>("Nbinsx"),
346  psTTStub_isPS.getParameter<double>("xmin"),
347  psTTStub_isPS.getParameter<double>("xmax"));
348  Stub_isPS->setAxisTitle("Is PS?", 1);
349  Stub_isPS->setAxisTitle("# L1 Stubs ", 2);
350 
351  iBooker.setCurrentFolder(topFolderName_ + "/Stubs/NStubs");
352  // TTStub barrel stack
353  edm::ParameterSet psTTStub_Barrel = conf_.getParameter<edm::ParameterSet>("TH1TTStub_Layers");
354  HistoName = "NStubs_Barrel";
355  Stub_Barrel = iBooker.book1D(HistoName,
356  HistoName,
357  psTTStub_Barrel.getParameter<int32_t>("Nbinsx"),
358  psTTStub_Barrel.getParameter<double>("xmin"),
359  psTTStub_Barrel.getParameter<double>("xmax"));
360  Stub_Barrel->setAxisTitle("Barrel Layer", 1);
361  Stub_Barrel->setAxisTitle("# L1 Stubs ", 2);
362 
363  // TTStub Endcap stack
364  edm::ParameterSet psTTStub_ECDisc = conf_.getParameter<edm::ParameterSet>("TH1TTStub_Discs");
365  HistoName = "NStubs_Endcap_Disc";
367  HistoName,
368  psTTStub_ECDisc.getParameter<int32_t>("Nbinsx"),
369  psTTStub_ECDisc.getParameter<double>("xmin"),
370  psTTStub_ECDisc.getParameter<double>("xmax"));
371  Stub_Endcap_Disc->setAxisTitle("Endcap Disc", 1);
372  Stub_Endcap_Disc->setAxisTitle("# L1 Stubs ", 2);
373 
374  // TTStub Endcap stack
375  HistoName = "NStubs_Endcap_Disc_Fw";
377  HistoName,
378  psTTStub_ECDisc.getParameter<int32_t>("Nbinsx"),
379  psTTStub_ECDisc.getParameter<double>("xmin"),
380  psTTStub_ECDisc.getParameter<double>("xmax"));
381  Stub_Endcap_Disc_Fw->setAxisTitle("Forward Endcap Disc", 1);
382  Stub_Endcap_Disc_Fw->setAxisTitle("# L1 Stubs ", 2);
383 
384  // TTStub Endcap stack
385  HistoName = "NStubs_Endcap_Disc_Bw";
387  HistoName,
388  psTTStub_ECDisc.getParameter<int32_t>("Nbinsx"),
389  psTTStub_ECDisc.getParameter<double>("xmin"),
390  psTTStub_ECDisc.getParameter<double>("xmax"));
391  Stub_Endcap_Disc_Bw->setAxisTitle("Backward Endcap Disc", 1);
392  Stub_Endcap_Disc_Bw->setAxisTitle("# L1 Stubs ", 2);
393 
394  edm::ParameterSet psTTStub_ECRing = conf_.getParameter<edm::ParameterSet>("TH1TTStub_Rings");
395  HistoName = "NStubs_Endcap_Ring";
397  HistoName,
398  psTTStub_ECRing.getParameter<int32_t>("Nbinsx"),
399  psTTStub_ECRing.getParameter<double>("xmin"),
400  psTTStub_ECRing.getParameter<double>("xmax"));
401  Stub_Endcap_Ring->setAxisTitle("Endcap Ring", 1);
402  Stub_Endcap_Ring->setAxisTitle("# L1 Stubs ", 2);
403 
404  for (int i = 0; i < numDiscs; i++) {
405  HistoName = "NStubs_Disc+" + std::to_string(i + 1);
406  // TTStub Endcap stack
408  HistoName,
409  psTTStub_ECRing.getParameter<int32_t>("Nbinsx"),
410  psTTStub_ECRing.getParameter<double>("xmin"),
411  psTTStub_ECRing.getParameter<double>("xmax"));
412  Stub_Endcap_Ring_Fw[i]->setAxisTitle("Endcap Ring", 1);
413  Stub_Endcap_Ring_Fw[i]->setAxisTitle("# L1 Stubs ", 2);
414  }
415 
416  for (int i = 0; i < numDiscs; i++) {
417  HistoName = "NStubs_Disc-" + std::to_string(i + 1);
418  // TTStub Endcap stack
420  HistoName,
421  psTTStub_ECRing.getParameter<int32_t>("Nbinsx"),
422  psTTStub_ECRing.getParameter<double>("xmin"),
423  psTTStub_ECRing.getParameter<double>("xmax"));
424  Stub_Endcap_Ring_Bw[i]->setAxisTitle("Endcap Ring", 1);
425  Stub_Endcap_Ring_Bw[i]->setAxisTitle("# L1 Stubs ", 2);
426  }
427 
428  // TTStub displ/offset
429  edm::ParameterSet psTTStub_Barrel_2D = conf_.getParameter<edm::ParameterSet>("TH2TTStub_DisOf_Layer");
430  edm::ParameterSet psTTStub_ECDisc_2D = conf_.getParameter<edm::ParameterSet>("TH2TTStub_DisOf_Disc");
431  edm::ParameterSet psTTStub_ECRing_2D = conf_.getParameter<edm::ParameterSet>("TH2TTStub_DisOf_Ring");
432 
433  iBooker.setCurrentFolder(topFolderName_ + "/Stubs/Width");
434  HistoName = "Stub_Width_Barrel";
435  Stub_Barrel_W = iBooker.book2D(HistoName,
436  HistoName,
437  psTTStub_Barrel_2D.getParameter<int32_t>("Nbinsx"),
438  psTTStub_Barrel_2D.getParameter<double>("xmin"),
439  psTTStub_Barrel_2D.getParameter<double>("xmax"),
440  psTTStub_Barrel_2D.getParameter<int32_t>("Nbinsy"),
441  psTTStub_Barrel_2D.getParameter<double>("ymin"),
442  psTTStub_Barrel_2D.getParameter<double>("ymax"));
443  Stub_Barrel_W->setAxisTitle("Barrel Layer", 1);
444  Stub_Barrel_W->setAxisTitle("Displacement - Offset", 2);
445 
446  HistoName = "Stub_Width_Endcap_Disc";
448  HistoName,
449  psTTStub_ECDisc_2D.getParameter<int32_t>("Nbinsx"),
450  psTTStub_ECDisc_2D.getParameter<double>("xmin"),
451  psTTStub_ECDisc_2D.getParameter<double>("xmax"),
452  psTTStub_ECDisc_2D.getParameter<int32_t>("Nbinsy"),
453  psTTStub_ECDisc_2D.getParameter<double>("ymin"),
454  psTTStub_ECDisc_2D.getParameter<double>("ymax"));
455  Stub_Endcap_Disc_W->setAxisTitle("Endcap Disc", 1);
456  Stub_Endcap_Disc_W->setAxisTitle("Displacement - Offset", 2);
457 
458  HistoName = "Stub_Width_Endcap_Ring";
460  HistoName,
461  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsx"),
462  psTTStub_ECRing_2D.getParameter<double>("xmin"),
463  psTTStub_ECRing_2D.getParameter<double>("xmax"),
464  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsy"),
465  psTTStub_ECRing_2D.getParameter<double>("ymin"),
466  psTTStub_ECRing_2D.getParameter<double>("ymax"));
467  Stub_Endcap_Ring_W->setAxisTitle("Endcap Ring", 1);
468  Stub_Endcap_Ring_W->setAxisTitle("Trigger Offset", 2);
469 
470  for (int i = 0; i < numDiscs; i++) {
471  HistoName = "Stub_Width_Disc+" + std::to_string(i + 1);
473  HistoName,
474  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsx"),
475  psTTStub_ECRing_2D.getParameter<double>("xmin"),
476  psTTStub_ECRing_2D.getParameter<double>("xmax"),
477  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsy"),
478  psTTStub_ECRing_2D.getParameter<double>("ymin"),
479  psTTStub_ECRing_2D.getParameter<double>("ymax"));
480  Stub_Endcap_Ring_W_Fw[i]->setAxisTitle("Endcap Ring", 1);
481  Stub_Endcap_Ring_W_Fw[i]->setAxisTitle("Displacement - Offset", 2);
482  }
483 
484  for (int i = 0; i < numDiscs; i++) {
485  HistoName = "Stub_Width_Disc-" + std::to_string(i + 1);
487  HistoName,
488  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsx"),
489  psTTStub_ECRing_2D.getParameter<double>("xmin"),
490  psTTStub_ECRing_2D.getParameter<double>("xmax"),
491  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsy"),
492  psTTStub_ECRing_2D.getParameter<double>("ymin"),
493  psTTStub_ECRing_2D.getParameter<double>("ymax"));
494  Stub_Endcap_Ring_W_Bw[i]->setAxisTitle("Endcap Ring", 1);
495  Stub_Endcap_Ring_W_Bw[i]->setAxisTitle("Displacement - Offset", 2);
496  }
497 
498  iBooker.setCurrentFolder(topFolderName_ + "/Stubs/Offset");
499  HistoName = "Stub_Offset_Barrel";
500  Stub_Barrel_O = iBooker.book2D(HistoName,
501  HistoName,
502  psTTStub_Barrel_2D.getParameter<int32_t>("Nbinsx"),
503  psTTStub_Barrel_2D.getParameter<double>("xmin"),
504  psTTStub_Barrel_2D.getParameter<double>("xmax"),
505  psTTStub_Barrel_2D.getParameter<int32_t>("Nbinsy"),
506  psTTStub_Barrel_2D.getParameter<double>("ymin"),
507  psTTStub_Barrel_2D.getParameter<double>("ymax"));
508  Stub_Barrel_O->setAxisTitle("Barrel Layer", 1);
509  Stub_Barrel_O->setAxisTitle("Trigger Offset", 2);
510 
511  HistoName = "Stub_Offset_Endcap_Disc";
513  HistoName,
514  psTTStub_ECDisc_2D.getParameter<int32_t>("Nbinsx"),
515  psTTStub_ECDisc_2D.getParameter<double>("xmin"),
516  psTTStub_ECDisc_2D.getParameter<double>("xmax"),
517  psTTStub_ECDisc_2D.getParameter<int32_t>("Nbinsy"),
518  psTTStub_ECDisc_2D.getParameter<double>("ymin"),
519  psTTStub_ECDisc_2D.getParameter<double>("ymax"));
520  Stub_Endcap_Disc_O->setAxisTitle("Endcap Disc", 1);
521  Stub_Endcap_Disc_O->setAxisTitle("Trigger Offset", 2);
522 
523  HistoName = "Stub_Offset_Endcap_Ring";
525  HistoName,
526  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsx"),
527  psTTStub_ECRing_2D.getParameter<double>("xmin"),
528  psTTStub_ECRing_2D.getParameter<double>("xmax"),
529  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsy"),
530  psTTStub_ECRing_2D.getParameter<double>("ymin"),
531  psTTStub_ECRing_2D.getParameter<double>("ymax"));
532  Stub_Endcap_Ring_O->setAxisTitle("Endcap Ring", 1);
533  Stub_Endcap_Ring_O->setAxisTitle("Trigger Offset", 2);
534 
535  for (int i = 0; i < numDiscs; i++) {
536  HistoName = "Stub_Offset_Disc+" + std::to_string(i + 1);
538  HistoName,
539  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsx"),
540  psTTStub_ECRing_2D.getParameter<double>("xmin"),
541  psTTStub_ECRing_2D.getParameter<double>("xmax"),
542  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsy"),
543  psTTStub_ECRing_2D.getParameter<double>("ymin"),
544  psTTStub_ECRing_2D.getParameter<double>("ymax"));
545  Stub_Endcap_Ring_O_Fw[i]->setAxisTitle("Endcap Ring", 1);
546  Stub_Endcap_Ring_O_Fw[i]->setAxisTitle("Trigger Offset", 2);
547  }
548 
549  for (int i = 0; i < numDiscs; i++) {
550  HistoName = "Stub_Offset_Disc-" + std::to_string(i + 1);
552  HistoName,
553  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsx"),
554  psTTStub_ECRing_2D.getParameter<double>("xmin"),
555  psTTStub_ECRing_2D.getParameter<double>("xmax"),
556  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsy"),
557  psTTStub_ECRing_2D.getParameter<double>("ymin"),
558  psTTStub_ECRing_2D.getParameter<double>("ymax"));
559  Stub_Endcap_Ring_O_Bw[i]->setAxisTitle("Endcap Ring", 1);
560  Stub_Endcap_Ring_O_Bw[i]->setAxisTitle("Trigger Offset", 2);
561  }
562 }
563 
OuterTrackerMonitorTTStub::Stub_Endcap_Ring_W_Bw
MonitorElement * Stub_Endcap_Ring_W_Bw[5]
Definition: OuterTrackerMonitorTTStub.cc:92
TrackerGeometry::idToDet
const TrackerGeomDet * idToDet(DetId) const override
Definition: TrackerGeometry.cc:193
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
Point2DBase
Definition: Point2DBase.h:9
OuterTrackerMonitorTTStub::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: OuterTrackerMonitorTTStub.cc:118
OuterTrackerMonitorTTStub
Definition: OuterTrackerMonitorTTStub.cc:49
mps_fire.i
i
Definition: mps_fire.py:428
OuterTrackerMonitorTTStub::tagTTStubsToken_
edm::EDGetTokenT< edmNew::DetSetVector< TTStub< Ref_Phase2TrackerDigi_ > > > tagTTStubsToken_
Definition: OuterTrackerMonitorTTStub.cc:98
StripGeomDetUnit.h
MessageLogger.h
TrackerGeometry.h
GeomDet
Definition: GeomDet.h:27
ESHandle.h
OuterTrackerMonitorTTStub::~OuterTrackerMonitorTTStub
~OuterTrackerMonitorTTStub() override
Definition: OuterTrackerMonitorTTStub.cc:110
TTTypes.h
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
edm::Run
Definition: Run.h:45
edm::EDGetTokenT
Definition: EDGetToken.h:33
TrackerTopology
Definition: TrackerTopology.h:16
OuterTrackerMonitorTTStub::Stub_bendFE
MonitorElement * Stub_bendFE
Definition: OuterTrackerMonitorTTStub.cc:76
OuterTrackerMonitorTTStub::Stub_Endcap_Disc
MonitorElement * Stub_Endcap_Disc
Definition: OuterTrackerMonitorTTStub.cc:65
OuterTrackerMonitorTTStub::Stub_R
MonitorElement * Stub_R
Definition: OuterTrackerMonitorTTStub.cc:75
edmNew::makeRefTo
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)
Definition: DetSetVectorNew.h:689
OuterTrackerMonitorTTStub::Stub_bendBE
MonitorElement * Stub_bendBE
Definition: OuterTrackerMonitorTTStub.cc:77
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
OuterTrackerMonitorTTStub::Stub_Barrel_O
MonitorElement * Stub_Barrel_O
Definition: OuterTrackerMonitorTTStub.cc:84
OuterTrackerMonitorTTStub::Stub_Endcap_Ring_O_Bw
MonitorElement * Stub_Endcap_Ring_O_Bw[5]
Definition: OuterTrackerMonitorTTStub.cc:94
DQMStore.h
TrackerTopology::layer
unsigned int layer(const DetId &id) const
Definition: TrackerTopology.cc:47
GeomDet::topology
virtual const Topology & topology() const
Definition: GeomDet.cc:67
edmNew::DetSetVector::begin
const_iterator begin(bool update=false) const
Definition: DetSetVectorNew.h:530
Topology::localPosition
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
dqm::legacy::MonitorElement
Definition: MonitorElement.h:461
EDAnalyzer.h
OuterTrackerMonitorTTStub::Stub_Barrel_XY
MonitorElement * Stub_Barrel_XY
Definition: OuterTrackerMonitorTTStub.cc:58
OuterTrackerMonitorTTStub::Stub_Endcap_Fw_XY
MonitorElement * Stub_Endcap_Fw_XY
Definition: OuterTrackerMonitorTTStub.cc:59
edm::Handle
Definition: AssociativeIterator.h:50
OuterTrackerMonitorTTStub::Stub_rawBend
MonitorElement * Stub_rawBend
Definition: OuterTrackerMonitorTTStub.cc:78
TtSemiLepEvtBuilder_cfi.disc
disc
Definition: TtSemiLepEvtBuilder_cfi.py:60
TrackerTopology::tidRing
unsigned int tidRing(const DetId &id) const
Definition: TrackerTopology.h:218
edm::Ref
Definition: AssociativeIterator.h:58
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
OuterTrackerMonitorTTStub::conf_
edm::ParameterSet conf_
Definition: OuterTrackerMonitorTTStub.cc:97
DetId
Definition: DetId.h:17
GeomDet::surface
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
MakerMacros.h
TrackerTopology.h
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
Service.h
TrackerDigiGeometryRecord
Definition: TrackerDigiGeometryRecord.h:15
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
TTStub
Class to store the L1 Track Trigger stubs.
Definition: TTStub.h:22
Surface::toGlobal
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
edm::ESHandle< TrackerTopology >
OuterTrackerMonitorTTStub::Stub_Phi
MonitorElement * Stub_Phi
Definition: OuterTrackerMonitorTTStub.cc:74
edmNew::DetSet
Definition: DetSetNew.h:22
OuterTrackerMonitorTTStub::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: OuterTrackerMonitorTTStub.cc:205
OuterTrackerMonitorTTStub::OuterTrackerMonitorTTStub
OuterTrackerMonitorTTStub(const edm::ParameterSet &)
Definition: OuterTrackerMonitorTTStub.cc:103
OuterTrackerMonitorTTStub::topFolderName_
std::string topFolderName_
Definition: OuterTrackerMonitorTTStub.cc:99
Point3DBase< float, GlobalTag >
EDGetToken.h
OuterTrackerMonitorTTStub::Stub_RZ
MonitorElement * Stub_RZ
Definition: OuterTrackerMonitorTTStub.cc:61
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
DQMEDAnalyzer.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
OuterTrackerMonitorTTStub::Stub_Endcap_Ring
MonitorElement * Stub_Endcap_Ring
Definition: OuterTrackerMonitorTTStub.cc:68
DQMEDAnalyzer
Definition: DQMEDAnalyzer.py:1
TrackerDigiGeometryRecord.h
OuterTrackerMonitorTTStub::Stub_Endcap_Disc_Bw
MonitorElement * Stub_Endcap_Disc_Bw
Definition: OuterTrackerMonitorTTStub.cc:67
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
OuterTrackerMonitorTTStub::Stub_bendOffset
MonitorElement * Stub_bendOffset
Definition: OuterTrackerMonitorTTStub.cc:79
OuterTrackerMonitorTTStub::Stub_Endcap_Disc_W
MonitorElement * Stub_Endcap_Disc_W
Definition: OuterTrackerMonitorTTStub.cc:85
PV3DBase::eta
T eta() const
Definition: PV3DBase.h:73
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
OuterTrackerMonitorTTStub::Stub_Endcap_Ring_Bw
MonitorElement * Stub_Endcap_Ring_Bw[5]
Definition: OuterTrackerMonitorTTStub.cc:70
iEvent
int iEvent
Definition: GenABIO.cc:224
cscdqm::HistoName
std::string HistoName
Definition: CSCDQM_HistoDef.h:32
OuterTrackerMonitorTTStub::Stub_Endcap_Ring_W
MonitorElement * Stub_Endcap_Ring_W
Definition: OuterTrackerMonitorTTStub.cc:87
edm::EventSetup
Definition: EventSetup.h:57
get
#define get
OuterTrackerMonitorTTStub::Stub_Eta
MonitorElement * Stub_Eta
Definition: OuterTrackerMonitorTTStub.cc:73
OuterTrackerMonitorTTStub::Stub_Endcap_Ring_O
MonitorElement * Stub_Endcap_Ring_O
Definition: OuterTrackerMonitorTTStub.cc:88
OuterTrackerMonitorTTStub::Stub_Endcap_Ring_W_Fw
MonitorElement * Stub_Endcap_Ring_W_Fw[5]
Definition: OuterTrackerMonitorTTStub.cc:89
GeomDet.h
edmNew::DetSetVector
Definition: DetSetNew.h:13
writedatasetfile.run
run
Definition: writedatasetfile.py:27
Frameworkfwd.h
OuterTrackerMonitorTTStub::Stub_Endcap_Bw_XY
MonitorElement * Stub_Endcap_Bw_XY
Definition: OuterTrackerMonitorTTStub.cc:60
edmNew::DetSetVector::end
const_iterator end(bool update=false) const
Definition: DetSetVectorNew.h:535
OuterTrackerMonitorTTStub::Stub_Endcap_Disc_O
MonitorElement * Stub_Endcap_Disc_O
Definition: OuterTrackerMonitorTTStub.cc:86
dqm::implementation::IBooker::book2D
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:177
OuterTrackerMonitorTTStub::Stub_Endcap_Ring_Fw
MonitorElement * Stub_Endcap_Ring_Fw[5]
Definition: OuterTrackerMonitorTTStub.cc:69
relativeConstraints.ring
ring
Definition: relativeConstraints.py:68
StripSubdetector::TOB
static constexpr auto TOB
Definition: StripSubdetector.h:18
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
dqm::implementation::IBooker
Definition: DQMStore.h:43
TTStub.h
TrackerTopologyRcd
Definition: TrackerTopologyRcd.h:10
ParameterSet.h
OuterTrackerMonitorTTStub::Stub_Endcap_Disc_Fw
MonitorElement * Stub_Endcap_Disc_Fw
Definition: OuterTrackerMonitorTTStub.cc:66
OuterTrackerMonitorTTStub::Stub_isPS
MonitorElement * Stub_isPS
Definition: OuterTrackerMonitorTTStub.cc:80
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
edm::Event
Definition: Event.h:73
dqm::impl::MonitorElement::setAxisTitle
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:800
StripSubdetector.h
PV3DBase::perp
T perp() const
Definition: PV3DBase.h:69
DetSetVectorNew.h
edm::InputTag
Definition: InputTag.h:15
PV3DBase::phi
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
StripSubdetector::TID
static constexpr auto TID
Definition: StripSubdetector.h:17
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
OuterTrackerMonitorTTStub::Stub_Barrel_W
MonitorElement * Stub_Barrel_W
Definition: OuterTrackerMonitorTTStub.cc:83
TrackerGeometry
Definition: TrackerGeometry.h:14
OuterTrackerMonitorTTStub::Stub_Endcap_Ring_O_Fw
MonitorElement * Stub_Endcap_Ring_O_Fw[5]
Definition: OuterTrackerMonitorTTStub.cc:91
OuterTrackerMonitorTTStub::Stub_Barrel
MonitorElement * Stub_Barrel
Definition: OuterTrackerMonitorTTStub.cc:64