CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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),
109  geomToken_(esConsumes<TrackerGeometry, TrackerDigiGeometryRecord, edm::Transition::BeginRun>()),
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);
177  Stub_Endcap_Disc->Fill(disc);
178  Stub_Endcap_Ring->Fill(ring);
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());
186  Stub_Endcap_Disc_Fw->Fill(disc);
187  Stub_Endcap_Ring_Fw[disc - 1]->Fill(ring);
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());
192  Stub_Endcap_Disc_Bw->Fill(disc);
193  Stub_Endcap_Ring_Bw[disc - 1]->Fill(ring);
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";
225  Stub_Endcap_Fw_XY = iBooker.book2D(HistoName,
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";
238  Stub_Endcap_Bw_XY = iBooker.book2D(HistoName,
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";
344  Stub_Endcap_Disc = iBooker.book1D(HistoName,
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";
354  Stub_Endcap_Disc_Fw = iBooker.book1D(HistoName,
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";
364  Stub_Endcap_Disc_Bw = iBooker.book1D(HistoName,
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";
374  Stub_Endcap_Ring = iBooker.book1D(HistoName,
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
385  Stub_Endcap_Ring_Fw[i] = iBooker.book1D(HistoName,
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
397  Stub_Endcap_Ring_Bw[i] = iBooker.book1D(HistoName,
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";
425  Stub_Endcap_Disc_W = iBooker.book2D(HistoName,
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";
437  Stub_Endcap_Ring_W = iBooker.book2D(HistoName,
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);
450  Stub_Endcap_Ring_W_Fw[i] = iBooker.book2D(HistoName,
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);
464  Stub_Endcap_Ring_W_Bw[i] = iBooker.book2D(HistoName,
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";
490  Stub_Endcap_Disc_O = iBooker.book2D(HistoName,
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";
502  Stub_Endcap_Ring_O = iBooker.book2D(HistoName,
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);
515  Stub_Endcap_Ring_O_Fw[i] = iBooker.book2D(HistoName,
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);
529  Stub_Endcap_Ring_O_Bw[i] = iBooker.book2D(HistoName,
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 
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
edm::EDGetTokenT< edmNew::DetSetVector< TTStub< Ref_Phase2TrackerDigi_ > > > tagTTStubsToken_
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
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)
const_iterator end(bool update=false) const
T perp() const
Definition: PV3DBase.h:69
unsigned int tidRing(const DetId &id) const
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
virtual const Topology & topology() const
Definition: GeomDet.cc:67
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
T y() const
Definition: PV3DBase.h:60
MonitorElement * Stub_Endcap_Ring_O_Fw[5]
std::string to_string(const V &value)
Definition: OMSAccess.h:71
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
void analyze(const edm::Event &, const edm::EventSetup &) override
void Fill(long long x)
bool getData(T &iHolder) const
Definition: EventSetup.h:122
int iEvent
Definition: GenABIO.cc:224
OuterTrackerMonitorTTStub(const edm::ParameterSet &)
MonitorElement * Stub_Endcap_Ring_O_Bw[5]
T z() const
Definition: PV3DBase.h:61
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
Transition
Definition: Transition.h:12
static constexpr auto TOB
bool isValid() const
Definition: HandleBase.h:70
Class to store the L1 Track Trigger stubs.
Definition: TTStub.h:22
const TrackerGeomDet * idToDet(DetId) const override
Definition: DetId.h:17
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:212
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
std::string HistoName
unsigned int layer(const DetId &id) const
T eta() const
Definition: PV3DBase.h:73
void dqmBeginRun(const edm::Run &iRun, const edm::EventSetup &iSetup) override
MonitorElement * Stub_Endcap_Ring_W_Bw[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
T x() const
Definition: PV3DBase.h:59
static constexpr auto TID
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
const_iterator begin(bool update=false) const
Definition: Run.h:45
MonitorElement * Stub_Endcap_Ring_W_Fw[5]
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)