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 <memory>
22 #include <numeric>
23 #include <vector>
24 
25 // user include files
34 
40 
46 
49 
51 public:
53  ~OuterTrackerMonitorTTStub() 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 
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 ------------
204  edm::Run const &run,
205  edm::EventSetup const &es) {
207  const int numDiscs = 5;
208  iBooker.setCurrentFolder(topFolderName_ + "/Stubs/Position");
209 
210  edm::ParameterSet psTTStub_Barrel_XY = conf_.getParameter<edm::ParameterSet>("TH2TTStub_Position");
211  HistoName = "Stub_Barrel_XY";
212  Stub_Barrel_XY = iBooker.book2D(HistoName,
213  HistoName,
214  psTTStub_Barrel_XY.getParameter<int32_t>("Nbinsx"),
215  psTTStub_Barrel_XY.getParameter<double>("xmin"),
216  psTTStub_Barrel_XY.getParameter<double>("xmax"),
217  psTTStub_Barrel_XY.getParameter<int32_t>("Nbinsy"),
218  psTTStub_Barrel_XY.getParameter<double>("ymin"),
219  psTTStub_Barrel_XY.getParameter<double>("ymax"));
220  Stub_Barrel_XY->setAxisTitle("L1 Stub Barrel position x [cm]", 1);
221  Stub_Barrel_XY->setAxisTitle("L1 Stub Barrel position y [cm]", 2);
222 
223  edm::ParameterSet psTTStub_Endcap_Fw_XY = conf_.getParameter<edm::ParameterSet>("TH2TTStub_Position");
224  HistoName = "Stub_Endcap_Fw_XY";
226  HistoName,
227  psTTStub_Endcap_Fw_XY.getParameter<int32_t>("Nbinsx"),
228  psTTStub_Endcap_Fw_XY.getParameter<double>("xmin"),
229  psTTStub_Endcap_Fw_XY.getParameter<double>("xmax"),
230  psTTStub_Endcap_Fw_XY.getParameter<int32_t>("Nbinsy"),
231  psTTStub_Endcap_Fw_XY.getParameter<double>("ymin"),
232  psTTStub_Endcap_Fw_XY.getParameter<double>("ymax"));
233  Stub_Endcap_Fw_XY->setAxisTitle("L1 Stub Endcap position x [cm]", 1);
234  Stub_Endcap_Fw_XY->setAxisTitle("L1 Stub Endcap position y [cm]", 2);
235 
236  edm::ParameterSet psTTStub_Endcap_Bw_XY = conf_.getParameter<edm::ParameterSet>("TH2TTStub_Position");
237  HistoName = "Stub_Endcap_Bw_XY";
239  HistoName,
240  psTTStub_Endcap_Bw_XY.getParameter<int32_t>("Nbinsx"),
241  psTTStub_Endcap_Bw_XY.getParameter<double>("xmin"),
242  psTTStub_Endcap_Bw_XY.getParameter<double>("xmax"),
243  psTTStub_Endcap_Bw_XY.getParameter<int32_t>("Nbinsy"),
244  psTTStub_Endcap_Bw_XY.getParameter<double>("ymin"),
245  psTTStub_Endcap_Bw_XY.getParameter<double>("ymax"));
246  Stub_Endcap_Bw_XY->setAxisTitle("L1 Stub Endcap position x [cm]", 1);
247  Stub_Endcap_Bw_XY->setAxisTitle("L1 Stub Endcap position y [cm]", 2);
248 
249  // TTStub #rho vs. z
250  edm::ParameterSet psTTStub_RZ = conf_.getParameter<edm::ParameterSet>("TH2TTStub_RZ");
251  HistoName = "Stub_RZ";
252  Stub_RZ = iBooker.book2D(HistoName,
253  HistoName,
254  psTTStub_RZ.getParameter<int32_t>("Nbinsx"),
255  psTTStub_RZ.getParameter<double>("xmin"),
256  psTTStub_RZ.getParameter<double>("xmax"),
257  psTTStub_RZ.getParameter<int32_t>("Nbinsy"),
258  psTTStub_RZ.getParameter<double>("ymin"),
259  psTTStub_RZ.getParameter<double>("ymax"));
260  Stub_RZ->setAxisTitle("L1 Stub position z [cm]", 1);
261  Stub_RZ->setAxisTitle("L1 Stub position #rho [cm]", 2);
262 
263  iBooker.setCurrentFolder(topFolderName_ + "/Stubs");
264  // TTStub eta
265  edm::ParameterSet psTTStub_Eta = conf_.getParameter<edm::ParameterSet>("TH1TTStub_Eta");
266  HistoName = "Stub_Eta";
267  Stub_Eta = iBooker.book1D(HistoName,
268  HistoName,
269  psTTStub_Eta.getParameter<int32_t>("Nbinsx"),
270  psTTStub_Eta.getParameter<double>("xmin"),
271  psTTStub_Eta.getParameter<double>("xmax"));
272  Stub_Eta->setAxisTitle("#eta", 1);
273  Stub_Eta->setAxisTitle("# L1 Stubs ", 2);
274 
275  // TTStub phi
276  edm::ParameterSet psTTStub_Phi = conf_.getParameter<edm::ParameterSet>("TH1TTStub_Phi");
277  HistoName = "Stub_Phi";
278  Stub_Phi = iBooker.book1D(HistoName,
279  HistoName,
280  psTTStub_Phi.getParameter<int32_t>("Nbinsx"),
281  psTTStub_Phi.getParameter<double>("xmin"),
282  psTTStub_Phi.getParameter<double>("xmax"));
283  Stub_Phi->setAxisTitle("#phi", 1);
284  Stub_Phi->setAxisTitle("# L1 Stubs ", 2);
285 
286  // TTStub R
287  edm::ParameterSet psTTStub_R = conf_.getParameter<edm::ParameterSet>("TH1TTStub_R");
288  HistoName = "Stub_R";
289  Stub_R = iBooker.book1D(HistoName,
290  HistoName,
291  psTTStub_R.getParameter<int32_t>("Nbinsx"),
292  psTTStub_R.getParameter<double>("xmin"),
293  psTTStub_R.getParameter<double>("xmax"));
294  Stub_R->setAxisTitle("R", 1);
295  Stub_R->setAxisTitle("# L1 Stubs ", 2);
296 
297  // TTStub trigger bend
298  edm::ParameterSet psTTStub_bend = conf_.getParameter<edm::ParameterSet>("TH1TTStub_bend");
299  HistoName = "Stub_bendFE";
300  Stub_bendFE = iBooker.book1D(HistoName,
301  HistoName,
302  psTTStub_bend.getParameter<int32_t>("Nbinsx"),
303  psTTStub_bend.getParameter<double>("xmin"),
304  psTTStub_bend.getParameter<double>("xmax"));
305  Stub_bendFE->setAxisTitle("Trigger bend", 1);
306  Stub_bendFE->setAxisTitle("# L1 Stubs ", 2);
307 
308  // TTStub hardware bend
309  HistoName = "Stub_bendBE";
310  Stub_bendBE = iBooker.book1D(HistoName,
311  HistoName,
312  psTTStub_bend.getParameter<int32_t>("Nbinsx"),
313  psTTStub_bend.getParameter<double>("xmin"),
314  psTTStub_bend.getParameter<double>("xmax"));
315  Stub_bendBE->setAxisTitle("Hardware bend", 1);
316  Stub_bendBE->setAxisTitle("# L1 Stubs ", 2);
317 
318  // TTStub, is PS?
319  edm::ParameterSet psTTStub_isPS = conf_.getParameter<edm::ParameterSet>("TH1TTStub_isPS");
320  HistoName = "Stub_isPS";
321  Stub_isPS = iBooker.book1D(HistoName,
322  HistoName,
323  psTTStub_isPS.getParameter<int32_t>("Nbinsx"),
324  psTTStub_isPS.getParameter<double>("xmin"),
325  psTTStub_isPS.getParameter<double>("xmax"));
326  Stub_isPS->setAxisTitle("Is PS?", 1);
327  Stub_isPS->setAxisTitle("# L1 Stubs ", 2);
328 
329  iBooker.setCurrentFolder(topFolderName_ + "/Stubs/NStubs");
330  // TTStub barrel stack
331  edm::ParameterSet psTTStub_Barrel = conf_.getParameter<edm::ParameterSet>("TH1TTStub_Layers");
332  HistoName = "NStubs_Barrel";
333  Stub_Barrel = iBooker.book1D(HistoName,
334  HistoName,
335  psTTStub_Barrel.getParameter<int32_t>("Nbinsx"),
336  psTTStub_Barrel.getParameter<double>("xmin"),
337  psTTStub_Barrel.getParameter<double>("xmax"));
338  Stub_Barrel->setAxisTitle("Barrel Layer", 1);
339  Stub_Barrel->setAxisTitle("# L1 Stubs ", 2);
340 
341  // TTStub Endcap stack
342  edm::ParameterSet psTTStub_ECDisc = conf_.getParameter<edm::ParameterSet>("TH1TTStub_Discs");
343  HistoName = "NStubs_Endcap_Disc";
345  HistoName,
346  psTTStub_ECDisc.getParameter<int32_t>("Nbinsx"),
347  psTTStub_ECDisc.getParameter<double>("xmin"),
348  psTTStub_ECDisc.getParameter<double>("xmax"));
349  Stub_Endcap_Disc->setAxisTitle("Endcap Disc", 1);
350  Stub_Endcap_Disc->setAxisTitle("# L1 Stubs ", 2);
351 
352  // TTStub Endcap stack
353  HistoName = "NStubs_Endcap_Disc_Fw";
355  HistoName,
356  psTTStub_ECDisc.getParameter<int32_t>("Nbinsx"),
357  psTTStub_ECDisc.getParameter<double>("xmin"),
358  psTTStub_ECDisc.getParameter<double>("xmax"));
359  Stub_Endcap_Disc_Fw->setAxisTitle("Forward Endcap Disc", 1);
360  Stub_Endcap_Disc_Fw->setAxisTitle("# L1 Stubs ", 2);
361 
362  // TTStub Endcap stack
363  HistoName = "NStubs_Endcap_Disc_Bw";
365  HistoName,
366  psTTStub_ECDisc.getParameter<int32_t>("Nbinsx"),
367  psTTStub_ECDisc.getParameter<double>("xmin"),
368  psTTStub_ECDisc.getParameter<double>("xmax"));
369  Stub_Endcap_Disc_Bw->setAxisTitle("Backward Endcap Disc", 1);
370  Stub_Endcap_Disc_Bw->setAxisTitle("# L1 Stubs ", 2);
371 
372  edm::ParameterSet psTTStub_ECRing = conf_.getParameter<edm::ParameterSet>("TH1TTStub_Rings");
373  HistoName = "NStubs_Endcap_Ring";
375  HistoName,
376  psTTStub_ECRing.getParameter<int32_t>("Nbinsx"),
377  psTTStub_ECRing.getParameter<double>("xmin"),
378  psTTStub_ECRing.getParameter<double>("xmax"));
379  Stub_Endcap_Ring->setAxisTitle("Endcap Ring", 1);
380  Stub_Endcap_Ring->setAxisTitle("# L1 Stubs ", 2);
381 
382  for (int i = 0; i < numDiscs; i++) {
383  HistoName = "NStubs_Disc+" + std::to_string(i + 1);
384  // TTStub Endcap stack
386  HistoName,
387  psTTStub_ECRing.getParameter<int32_t>("Nbinsx"),
388  psTTStub_ECRing.getParameter<double>("xmin"),
389  psTTStub_ECRing.getParameter<double>("xmax"));
390  Stub_Endcap_Ring_Fw[i]->setAxisTitle("Endcap Ring", 1);
391  Stub_Endcap_Ring_Fw[i]->setAxisTitle("# L1 Stubs ", 2);
392  }
393 
394  for (int i = 0; i < numDiscs; i++) {
395  HistoName = "NStubs_Disc-" + std::to_string(i + 1);
396  // TTStub Endcap stack
398  HistoName,
399  psTTStub_ECRing.getParameter<int32_t>("Nbinsx"),
400  psTTStub_ECRing.getParameter<double>("xmin"),
401  psTTStub_ECRing.getParameter<double>("xmax"));
402  Stub_Endcap_Ring_Bw[i]->setAxisTitle("Endcap Ring", 1);
403  Stub_Endcap_Ring_Bw[i]->setAxisTitle("# L1 Stubs ", 2);
404  }
405 
406  // TTStub displ/offset
407  edm::ParameterSet psTTStub_Barrel_2D = conf_.getParameter<edm::ParameterSet>("TH2TTStub_DisOf_Layer");
408  edm::ParameterSet psTTStub_ECDisc_2D = conf_.getParameter<edm::ParameterSet>("TH2TTStub_DisOf_Disc");
409  edm::ParameterSet psTTStub_ECRing_2D = conf_.getParameter<edm::ParameterSet>("TH2TTStub_DisOf_Ring");
410 
411  iBooker.setCurrentFolder(topFolderName_ + "/Stubs/Width");
412  HistoName = "Stub_Width_Barrel";
413  Stub_Barrel_W = iBooker.book2D(HistoName,
414  HistoName,
415  psTTStub_Barrel_2D.getParameter<int32_t>("Nbinsx"),
416  psTTStub_Barrel_2D.getParameter<double>("xmin"),
417  psTTStub_Barrel_2D.getParameter<double>("xmax"),
418  psTTStub_Barrel_2D.getParameter<int32_t>("Nbinsy"),
419  psTTStub_Barrel_2D.getParameter<double>("ymin"),
420  psTTStub_Barrel_2D.getParameter<double>("ymax"));
421  Stub_Barrel_W->setAxisTitle("Barrel Layer", 1);
422  Stub_Barrel_W->setAxisTitle("Displacement - Offset", 2);
423 
424  HistoName = "Stub_Width_Endcap_Disc";
426  HistoName,
427  psTTStub_ECDisc_2D.getParameter<int32_t>("Nbinsx"),
428  psTTStub_ECDisc_2D.getParameter<double>("xmin"),
429  psTTStub_ECDisc_2D.getParameter<double>("xmax"),
430  psTTStub_ECDisc_2D.getParameter<int32_t>("Nbinsy"),
431  psTTStub_ECDisc_2D.getParameter<double>("ymin"),
432  psTTStub_ECDisc_2D.getParameter<double>("ymax"));
433  Stub_Endcap_Disc_W->setAxisTitle("Endcap Disc", 1);
434  Stub_Endcap_Disc_W->setAxisTitle("Displacement - Offset", 2);
435 
436  HistoName = "Stub_Width_Endcap_Ring";
438  HistoName,
439  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsx"),
440  psTTStub_ECRing_2D.getParameter<double>("xmin"),
441  psTTStub_ECRing_2D.getParameter<double>("xmax"),
442  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsy"),
443  psTTStub_ECRing_2D.getParameter<double>("ymin"),
444  psTTStub_ECRing_2D.getParameter<double>("ymax"));
445  Stub_Endcap_Ring_W->setAxisTitle("Endcap Ring", 1);
446  Stub_Endcap_Ring_W->setAxisTitle("Trigger Offset", 2);
447 
448  for (int i = 0; i < numDiscs; i++) {
449  HistoName = "Stub_Width_Disc+" + std::to_string(i + 1);
451  HistoName,
452  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsx"),
453  psTTStub_ECRing_2D.getParameter<double>("xmin"),
454  psTTStub_ECRing_2D.getParameter<double>("xmax"),
455  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsy"),
456  psTTStub_ECRing_2D.getParameter<double>("ymin"),
457  psTTStub_ECRing_2D.getParameter<double>("ymax"));
458  Stub_Endcap_Ring_W_Fw[i]->setAxisTitle("Endcap Ring", 1);
459  Stub_Endcap_Ring_W_Fw[i]->setAxisTitle("Displacement - Offset", 2);
460  }
461 
462  for (int i = 0; i < numDiscs; i++) {
463  HistoName = "Stub_Width_Disc-" + std::to_string(i + 1);
465  HistoName,
466  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsx"),
467  psTTStub_ECRing_2D.getParameter<double>("xmin"),
468  psTTStub_ECRing_2D.getParameter<double>("xmax"),
469  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsy"),
470  psTTStub_ECRing_2D.getParameter<double>("ymin"),
471  psTTStub_ECRing_2D.getParameter<double>("ymax"));
472  Stub_Endcap_Ring_W_Bw[i]->setAxisTitle("Endcap Ring", 1);
473  Stub_Endcap_Ring_W_Bw[i]->setAxisTitle("Displacement - Offset", 2);
474  }
475 
476  iBooker.setCurrentFolder(topFolderName_ + "/Stubs/Offset");
477  HistoName = "Stub_Offset_Barrel";
478  Stub_Barrel_O = iBooker.book2D(HistoName,
479  HistoName,
480  psTTStub_Barrel_2D.getParameter<int32_t>("Nbinsx"),
481  psTTStub_Barrel_2D.getParameter<double>("xmin"),
482  psTTStub_Barrel_2D.getParameter<double>("xmax"),
483  psTTStub_Barrel_2D.getParameter<int32_t>("Nbinsy"),
484  psTTStub_Barrel_2D.getParameter<double>("ymin"),
485  psTTStub_Barrel_2D.getParameter<double>("ymax"));
486  Stub_Barrel_O->setAxisTitle("Barrel Layer", 1);
487  Stub_Barrel_O->setAxisTitle("Trigger Offset", 2);
488 
489  HistoName = "Stub_Offset_Endcap_Disc";
491  HistoName,
492  psTTStub_ECDisc_2D.getParameter<int32_t>("Nbinsx"),
493  psTTStub_ECDisc_2D.getParameter<double>("xmin"),
494  psTTStub_ECDisc_2D.getParameter<double>("xmax"),
495  psTTStub_ECDisc_2D.getParameter<int32_t>("Nbinsy"),
496  psTTStub_ECDisc_2D.getParameter<double>("ymin"),
497  psTTStub_ECDisc_2D.getParameter<double>("ymax"));
498  Stub_Endcap_Disc_O->setAxisTitle("Endcap Disc", 1);
499  Stub_Endcap_Disc_O->setAxisTitle("Trigger Offset", 2);
500 
501  HistoName = "Stub_Offset_Endcap_Ring";
503  HistoName,
504  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsx"),
505  psTTStub_ECRing_2D.getParameter<double>("xmin"),
506  psTTStub_ECRing_2D.getParameter<double>("xmax"),
507  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsy"),
508  psTTStub_ECRing_2D.getParameter<double>("ymin"),
509  psTTStub_ECRing_2D.getParameter<double>("ymax"));
510  Stub_Endcap_Ring_O->setAxisTitle("Endcap Ring", 1);
511  Stub_Endcap_Ring_O->setAxisTitle("Trigger Offset", 2);
512 
513  for (int i = 0; i < numDiscs; i++) {
514  HistoName = "Stub_Offset_Disc+" + std::to_string(i + 1);
516  HistoName,
517  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsx"),
518  psTTStub_ECRing_2D.getParameter<double>("xmin"),
519  psTTStub_ECRing_2D.getParameter<double>("xmax"),
520  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsy"),
521  psTTStub_ECRing_2D.getParameter<double>("ymin"),
522  psTTStub_ECRing_2D.getParameter<double>("ymax"));
523  Stub_Endcap_Ring_O_Fw[i]->setAxisTitle("Endcap Ring", 1);
524  Stub_Endcap_Ring_O_Fw[i]->setAxisTitle("Trigger Offset", 2);
525  }
526 
527  for (int i = 0; i < numDiscs; i++) {
528  HistoName = "Stub_Offset_Disc-" + std::to_string(i + 1);
530  HistoName,
531  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsx"),
532  psTTStub_ECRing_2D.getParameter<double>("xmin"),
533  psTTStub_ECRing_2D.getParameter<double>("xmax"),
534  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsy"),
535  psTTStub_ECRing_2D.getParameter<double>("ymin"),
536  psTTStub_ECRing_2D.getParameter<double>("ymax"));
537  Stub_Endcap_Ring_O_Bw[i]->setAxisTitle("Endcap Ring", 1);
538  Stub_Endcap_Ring_O_Bw[i]->setAxisTitle("Trigger Offset", 2);
539  }
540 }
541 
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
OuterTrackerMonitorTTStub::tTopo_
const TrackerTopology * tTopo_
Definition: OuterTrackerMonitorTTStub.cc:103
Point2DBase
Definition: Point2DBase.h:9
OuterTrackerMonitorTTStub::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: OuterTrackerMonitorTTStub.cc:129
OuterTrackerMonitorTTStub
Definition: OuterTrackerMonitorTTStub.cc:50
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:117
TTTypes.h
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
edm::Run
Definition: Run.h:45
edm::EDGetTokenT
Definition: EDGetToken.h:33
edm
HLT enums.
Definition: AlignableModifier.h:19
TrackerTopology
Definition: TrackerTopology.h:16
OuterTrackerMonitorTTStub::Stub_bendFE
MonitorElement * Stub_bendFE
Definition: OuterTrackerMonitorTTStub.cc:78
OuterTrackerMonitorTTStub::topoToken_
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
Definition: OuterTrackerMonitorTTStub.cc:101
OuterTrackerMonitorTTStub::Stub_Endcap_Disc
MonitorElement * Stub_Endcap_Disc
Definition: OuterTrackerMonitorTTStub.cc:67
OuterTrackerMonitorTTStub::Stub_R
MonitorElement * Stub_R
Definition: OuterTrackerMonitorTTStub.cc:77
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:704
OuterTrackerMonitorTTStub::Stub_bendBE
MonitorElement * Stub_bendBE
Definition: OuterTrackerMonitorTTStub.cc:79
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:545
Topology::localPosition
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
OuterTrackerMonitorTTStub::Stub_Barrel_XY
MonitorElement * Stub_Barrel_XY
Definition: OuterTrackerMonitorTTStub.cc:60
OuterTrackerMonitorTTStub::Stub_Endcap_Fw_XY
MonitorElement * Stub_Endcap_Fw_XY
Definition: OuterTrackerMonitorTTStub.cc:61
edm::Handle
Definition: AssociativeIterator.h:50
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
TrackerTopologyRcd.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
OuterTrackerMonitorTTStub::dqmBeginRun
void dqmBeginRun(const edm::Run &iRun, const edm::EventSetup &iSetup) override
Definition: OuterTrackerMonitorTTStub.cc:122
Service.h
TrackerDigiGeometryRecord
Definition: TrackerDigiGeometryRecord.h:16
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
OuterTrackerMonitorTTStub::Stub_Phi
MonitorElement * Stub_Phi
Definition: OuterTrackerMonitorTTStub.cc:76
edmNew::DetSet
Definition: DetSetNew.h:22
OuterTrackerMonitorTTStub::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: OuterTrackerMonitorTTStub.cc:203
OuterTrackerMonitorTTStub::OuterTrackerMonitorTTStub
OuterTrackerMonitorTTStub(const edm::ParameterSet &)
Definition: OuterTrackerMonitorTTStub.cc:107
OuterTrackerMonitorTTStub::topFolderName_
std::string topFolderName_
Definition: OuterTrackerMonitorTTStub.cc:99
Point3DBase< float, GlobalTag >
EDGetToken.h
OuterTrackerMonitorTTStub::Stub_RZ
MonitorElement * Stub_RZ
Definition: OuterTrackerMonitorTTStub.cc:63
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
OuterTrackerMonitorTTStub::Stub_Endcap_Ring
MonitorElement * Stub_Endcap_Ring
Definition: OuterTrackerMonitorTTStub.cc:70
DQMEDAnalyzer
Definition: DQMEDAnalyzer.py:1
TrackerDigiGeometryRecord.h
OuterTrackerMonitorTTStub::Stub_Endcap_Disc_Bw
MonitorElement * Stub_Endcap_Disc_Bw
Definition: OuterTrackerMonitorTTStub.cc:69
edm::ParameterSet
Definition: ParameterSet.h:47
edm::Transition
Transition
Definition: Transition.h:12
Event.h
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:72
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:58
OuterTrackerMonitorTTStub::Stub_Eta
MonitorElement * Stub_Eta
Definition: OuterTrackerMonitorTTStub.cc:75
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord >
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
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
OuterTrackerMonitorTTStub::geomToken_
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
Definition: OuterTrackerMonitorTTStub.cc:100
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:62
edmNew::DetSetVector::end
const_iterator end(bool update=false) const
Definition: DetSetVectorNew.h:550
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:71
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:68
OuterTrackerMonitorTTStub::Stub_isPS
MonitorElement * Stub_isPS
Definition: OuterTrackerMonitorTTStub.cc:80
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
DeDxTools::esConsumes
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
edm::Event
Definition: Event.h:73
OuterTrackerMonitorTTStub::tkGeom_
const TrackerGeometry * tkGeom_
Definition: OuterTrackerMonitorTTStub.cc:102
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:66