CMS 3D CMS Logo

OuterTrackerMonitorTTStub.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: Phase2OuterTracker
4 // Class: Phase2OuterTracker
5 //
13 //
14 // Original Author: Isis Marina Van Parijs
15 // Created: Fri, 24 Oct 2014 12:31:31 GMT
16 // $Id$
17 //
18 //
19 
20 
21 // system include files
22 #include <memory>
23 #include <vector>
24 #include <numeric>
25 #include <iostream>
26 #include <fstream>
27 
28 // user include files
39 
40 
41 //
42 // constructors and destructor
43 //
45 : dqmStore_(edm::Service<DQMStore>().operator->()), conf_(iConfig)
46 {
47  //now do what ever initialization is needed
48  topFolderName_ = conf_.getParameter<std::string>("TopFolderName");
49  tagTTStubsToken_ = consumes<edmNew::DetSetVector< TTStub< Ref_Phase2TrackerDigi_ > > > (conf_.getParameter<edm::InputTag>("TTStubs") );
50 }
51 
52 
54 {
55 
56  // do anything here that needs to be done at desctruction time
57  // (e.g. close files, deallocate resources etc.)
58 
59 }
60 
61 
62 //
63 // member functions
64 //
65 
66 // ------------ method called for each event ------------
67 void
69 {
72  iEvent.getByToken( tagTTStubsToken_, Phase2TrackerDigiTTStubHandle );
73 
76  const TrackerTopology* tTopo;
77  iSetup.get< TrackerTopologyRcd >().get(tTopoHandle);
78  tTopo = tTopoHandle.product();
79 
80  edm::ESHandle< TrackerGeometry > tGeometryHandle;
81  const TrackerGeometry* theTrackerGeometry;
82  iSetup.get< TrackerDigiGeometryRecord >().get( tGeometryHandle );
83  theTrackerGeometry = tGeometryHandle.product();
84 
85 
87  typename edmNew::DetSetVector< TTStub< Ref_Phase2TrackerDigi_ > >::const_iterator inputIter;
88  typename edmNew::DetSet< TTStub< Ref_Phase2TrackerDigi_ > >::const_iterator contentIter;
89  //Adding protection
90  if ( !Phase2TrackerDigiTTStubHandle.isValid() ) return;
91 
92  for ( inputIter = Phase2TrackerDigiTTStubHandle->begin();
93  inputIter != Phase2TrackerDigiTTStubHandle->end();
94  ++inputIter )
95  {
96  for ( contentIter = inputIter->begin(); contentIter != inputIter->end(); ++contentIter )
97  {
100 
102  // tempStubRef->getDetId() gives the stackDetId, not rawId
103  DetId detIdStub = theTrackerGeometry->idToDet( (tempStubRef->getClusterRef(0))->getDetId() )->geographicalId();
104 
106  double displStub = tempStubRef->getTriggerDisplacement();
107  double offsetStub = tempStubRef->getTriggerOffset();
108 
110  MeasurementPoint mp = (tempStubRef->getClusterRef(0))->findAverageLocalCoordinates();
111  const GeomDet* theGeomDet = theTrackerGeometry->idToDet(detIdStub);
112  Global3DPoint posStub = theGeomDet->surface().toGlobal( theGeomDet->topology().localPosition(mp) );
113 
114  double eta = posStub.eta();
115 
116  Stub_Eta->Fill(eta);
117  Stub_RZ->Fill( posStub.z(), posStub.perp() );
118 
119  if ( detIdStub.subdetId() == static_cast<int>(StripSubdetector::TOB) ) // Phase 2 Outer Tracker Barrel
120  {
121  Stub_Barrel->Fill(tTopo->layer(detIdStub));
122 
123  Stub_Barrel_XY->Fill( posStub.x(), posStub.y() );
124  Stub_Barrel_XY_Zoom->Fill( posStub.x(), posStub.y() );
125 
126  Stub_Barrel_W->Fill(tTopo->layer(detIdStub), displStub - offsetStub);
127  Stub_Barrel_O->Fill(tTopo->layer(detIdStub), offsetStub);
128  }
129  else if ( detIdStub.subdetId() == static_cast<int>(StripSubdetector::TID) ) // Phase 2 Outer Tracker Endcap
130  {
131  int disc = tTopo->layer(detIdStub); // returns wheel
132  int ring = tTopo->tidRing(detIdStub);
133  Stub_Endcap_Disc->Fill(disc);
134  Stub_Endcap_Ring->Fill(ring);
135  Stub_Endcap_Disc_W->Fill(disc, displStub - offsetStub);
136  Stub_Endcap_Ring_W->Fill(ring, displStub - offsetStub);
137  Stub_Endcap_Disc_O->Fill(disc, offsetStub);
138  Stub_Endcap_Ring_O->Fill(ring, offsetStub);
139 
140  if ( posStub.z() > 0 )
141  {
142  Stub_Endcap_Fw_XY->Fill( posStub.x(), posStub.y() );
143  Stub_Endcap_Fw_RZ_Zoom->Fill( posStub.z(), posStub.perp() );
144  Stub_Endcap_Disc_Fw->Fill(disc);
145  Stub_Endcap_Ring_Fw[disc-1]->Fill(ring);
146  Stub_Endcap_Ring_W_Fw[disc-1]->Fill(ring, displStub - offsetStub);
147  Stub_Endcap_Ring_O_Fw[disc-1]->Fill(ring, offsetStub);
148  }
149  else
150  {
151  Stub_Endcap_Bw_XY->Fill( posStub.x(), posStub.y() );
152  Stub_Endcap_Bw_RZ_Zoom->Fill( posStub.z(), posStub.perp() );
153  Stub_Endcap_Disc_Bw->Fill(disc);
154  Stub_Endcap_Ring_Bw[disc-1]->Fill(ring);
155  Stub_Endcap_Ring_W_Bw[disc-1]->Fill(ring, displStub - offsetStub);
156  Stub_Endcap_Ring_O_Bw[disc-1]->Fill(ring, offsetStub);
157  }
158  }
159  }
160  }
161 } // end of method
162 
163 
164 // ------------ method called when starting to processes a run ------------
165 void
167 {
169 
170  dqmStore_->setCurrentFolder(topFolderName_+"/Stubs/Position");
171 
172 
176 
177  edm::ParameterSet psTTStub_Barrel_XY = conf_.getParameter<edm::ParameterSet>("TH2TTStub_Position");
178  HistoName = "Stub_Barrel_XY";
179  Stub_Barrel_XY = dqmStore_->book2D(HistoName, HistoName,
180  psTTStub_Barrel_XY.getParameter<int32_t>("Nbinsx"),
181  psTTStub_Barrel_XY.getParameter<double>("xmin"),
182  psTTStub_Barrel_XY.getParameter<double>("xmax"),
183  psTTStub_Barrel_XY.getParameter<int32_t>("Nbinsy"),
184  psTTStub_Barrel_XY.getParameter<double>("ymin"),
185  psTTStub_Barrel_XY.getParameter<double>("ymax"));
186  Stub_Barrel_XY->setAxisTitle("L1 Stub Barrel position x [cm]", 1);
187  Stub_Barrel_XY->setAxisTitle("L1 Stub Barrel position y [cm]", 2);
188 
189  edm::ParameterSet psTTStub_Barrel_XY_Zoom = conf_.getParameter<edm::ParameterSet>("TH2TTStub_Barrel_XY_Zoom");
190  HistoName = "Stub_Barrel_XY_Zoom";
191  Stub_Barrel_XY_Zoom = dqmStore_->book2D(HistoName, HistoName,
192  psTTStub_Barrel_XY_Zoom.getParameter<int32_t>("Nbinsx"),
193  psTTStub_Barrel_XY_Zoom.getParameter<double>("xmin"),
194  psTTStub_Barrel_XY_Zoom.getParameter<double>("xmax"),
195  psTTStub_Barrel_XY_Zoom.getParameter<int32_t>("Nbinsy"),
196  psTTStub_Barrel_XY_Zoom.getParameter<double>("ymin"),
197  psTTStub_Barrel_XY_Zoom.getParameter<double>("ymax"));
198  Stub_Barrel_XY_Zoom->setAxisTitle("L1 Stub Barrel position x [cm]", 1);
199  Stub_Barrel_XY_Zoom->setAxisTitle("L1 Stub Barrel position y [cm]", 2);
200 
201 
202  edm::ParameterSet psTTStub_Endcap_Fw_XY = conf_.getParameter<edm::ParameterSet>("TH2TTStub_Position");
203  HistoName = "Stub_Endcap_Fw_XY";
204  Stub_Endcap_Fw_XY = dqmStore_->book2D(HistoName, HistoName,
205  psTTStub_Endcap_Fw_XY.getParameter<int32_t>("Nbinsx"),
206  psTTStub_Endcap_Fw_XY.getParameter<double>("xmin"),
207  psTTStub_Endcap_Fw_XY.getParameter<double>("xmax"),
208  psTTStub_Endcap_Fw_XY.getParameter<int32_t>("Nbinsy"),
209  psTTStub_Endcap_Fw_XY.getParameter<double>("ymin"),
210  psTTStub_Endcap_Fw_XY.getParameter<double>("ymax"));
211  Stub_Endcap_Fw_XY->setAxisTitle("L1 Stub Endcap position x [cm]", 1);
212  Stub_Endcap_Fw_XY->setAxisTitle("L1 Stub Endcap position y [cm]", 2);
213 
214 
215  edm::ParameterSet psTTStub_Endcap_Bw_XY = conf_.getParameter<edm::ParameterSet>("TH2TTStub_Position");
216  HistoName = "Stub_Endcap_Bw_XY";
217  Stub_Endcap_Bw_XY = dqmStore_->book2D(HistoName, HistoName,
218  psTTStub_Endcap_Bw_XY.getParameter<int32_t>("Nbinsx"),
219  psTTStub_Endcap_Bw_XY.getParameter<double>("xmin"),
220  psTTStub_Endcap_Bw_XY.getParameter<double>("xmax"),
221  psTTStub_Endcap_Bw_XY.getParameter<int32_t>("Nbinsy"),
222  psTTStub_Endcap_Bw_XY.getParameter<double>("ymin"),
223  psTTStub_Endcap_Bw_XY.getParameter<double>("ymax"));
224  Stub_Endcap_Bw_XY->setAxisTitle("L1 Stub Endcap position x [cm]", 1);
225  Stub_Endcap_Bw_XY->setAxisTitle("L1 Stub Endcap position y [cm]", 2);
226 
227  //TTStub #rho vs. z
228  edm::ParameterSet psTTStub_RZ = conf_.getParameter<edm::ParameterSet>("TH2TTStub_RZ");
229  HistoName = "Stub_RZ";
230  Stub_RZ = dqmStore_->book2D(HistoName, HistoName,
231  psTTStub_RZ.getParameter<int32_t>("Nbinsx"),
232  psTTStub_RZ.getParameter<double>("xmin"),
233  psTTStub_RZ.getParameter<double>("xmax"),
234  psTTStub_RZ.getParameter<int32_t>("Nbinsy"),
235  psTTStub_RZ.getParameter<double>("ymin"),
236  psTTStub_RZ.getParameter<double>("ymax"));
237  Stub_RZ->setAxisTitle("L1 Stub position z [cm]", 1);
238  Stub_RZ->setAxisTitle("L1 Stub position #rho [cm]", 2);
239 
240  //TTStub Forward Endcap #rho vs. z
241  edm::ParameterSet psTTStub_Endcap_Fw_RZ_Zoom = conf_.getParameter<edm::ParameterSet>("TH2TTStub_Endcap_Fw_RZ_Zoom");
242  HistoName = "Stub_Endcap_Fw_RZ_Zoom";
243  Stub_Endcap_Fw_RZ_Zoom = dqmStore_->book2D(HistoName, HistoName,
244  psTTStub_Endcap_Fw_RZ_Zoom.getParameter<int32_t>("Nbinsx"),
245  psTTStub_Endcap_Fw_RZ_Zoom.getParameter<double>("xmin"),
246  psTTStub_Endcap_Fw_RZ_Zoom.getParameter<double>("xmax"),
247  psTTStub_Endcap_Fw_RZ_Zoom.getParameter<int32_t>("Nbinsy"),
248  psTTStub_Endcap_Fw_RZ_Zoom.getParameter<double>("ymin"),
249  psTTStub_Endcap_Fw_RZ_Zoom.getParameter<double>("ymax"));
250  Stub_Endcap_Fw_RZ_Zoom->setAxisTitle("L1 Stub Endcap position z [cm]", 1);
251  Stub_Endcap_Fw_RZ_Zoom->setAxisTitle("L1 Stub Endcap position #rho [cm]", 2);
252 
253  //TTStub Backward Endcap #rho vs. z
254  edm::ParameterSet psTTStub_Endcap_Bw_RZ_Zoom = conf_.getParameter<edm::ParameterSet>("TH2TTStub_Endcap_Bw_RZ_Zoom");
255  HistoName = "Stub_Endcap_Bw_RZ_Zoom";
256  Stub_Endcap_Bw_RZ_Zoom = dqmStore_->book2D(HistoName, HistoName,
257  psTTStub_Endcap_Bw_RZ_Zoom.getParameter<int32_t>("Nbinsx"),
258  psTTStub_Endcap_Bw_RZ_Zoom.getParameter<double>("xmin"),
259  psTTStub_Endcap_Bw_RZ_Zoom.getParameter<double>("xmax"),
260  psTTStub_Endcap_Bw_RZ_Zoom.getParameter<int32_t>("Nbinsy"),
261  psTTStub_Endcap_Bw_RZ_Zoom.getParameter<double>("ymin"),
262  psTTStub_Endcap_Bw_RZ_Zoom.getParameter<double>("ymax"));
263  Stub_Endcap_Bw_RZ_Zoom->setAxisTitle("L1 Stub Endcap position z [cm]", 1);
264  Stub_Endcap_Bw_RZ_Zoom->setAxisTitle("L1 Stub Endcap position #rho [cm]", 2);
265 
267 
268  //TTStub eta
269  edm::ParameterSet psTTStub_Eta = conf_.getParameter<edm::ParameterSet>("TH1TTStub_Eta");
270  HistoName = "Stub_Eta";
271  Stub_Eta = dqmStore_ ->book1D(HistoName,HistoName,
272  psTTStub_Eta.getParameter<int32_t>("Nbinsx"),
273  psTTStub_Eta.getParameter<double>("xmin"),
274  psTTStub_Eta.getParameter<double>("xmax"));
275  Stub_Eta->setAxisTitle("#eta",1);
276  Stub_Eta->setAxisTitle("# L1 Stubs ",2);
277 
278  dqmStore_->setCurrentFolder(topFolderName_+"/Stubs/NStubs");
279 
280  //TTStub barrel stack
281  edm::ParameterSet psTTStub_Barrel = conf_.getParameter<edm::ParameterSet>("TH1TTStub_Layers");
282  HistoName = "NStubs_Barrel";
283  Stub_Barrel = dqmStore_ ->book1D(HistoName,HistoName,
284  psTTStub_Barrel.getParameter<int32_t>("Nbinsx"),
285  psTTStub_Barrel.getParameter<double>("xmin"),
286  psTTStub_Barrel.getParameter<double>("xmax"));
287  Stub_Barrel->setAxisTitle("Barrel Layer",1);
288  Stub_Barrel->setAxisTitle("# L1 Stubs ",2);
289 
290  //TTStub Endcap stack
291  edm::ParameterSet psTTStub_ECDisc = conf_.getParameter<edm::ParameterSet>("TH1TTStub_Discs");
292  HistoName = "NStubs_Endcap_Disc";
293  Stub_Endcap_Disc = dqmStore_ ->book1D(HistoName,HistoName,
294  psTTStub_ECDisc.getParameter<int32_t>("Nbinsx"),
295  psTTStub_ECDisc.getParameter<double>("xmin"),
296  psTTStub_ECDisc.getParameter<double>("xmax"));
297  Stub_Endcap_Disc->setAxisTitle("Endcap Disc",1);
298  Stub_Endcap_Disc->setAxisTitle("# L1 Stubs ",2);
299 
300  //TTStub Endcap stack
301  HistoName = "NStubs_Endcap_Disc_Fw";
302  Stub_Endcap_Disc_Fw = dqmStore_ ->book1D(HistoName,HistoName,
303  psTTStub_ECDisc.getParameter<int32_t>("Nbinsx"),
304  psTTStub_ECDisc.getParameter<double>("xmin"),
305  psTTStub_ECDisc.getParameter<double>("xmax"));
306  Stub_Endcap_Disc_Fw->setAxisTitle("Forward Endcap Disc",1);
307  Stub_Endcap_Disc_Fw->setAxisTitle("# L1 Stubs ",2);
308 
309  //TTStub Endcap stack
310  HistoName = "NStubs_Endcap_Disc_Bw";
311  Stub_Endcap_Disc_Bw = dqmStore_ ->book1D(HistoName,HistoName,
312  psTTStub_ECDisc.getParameter<int32_t>("Nbinsx"),
313  psTTStub_ECDisc.getParameter<double>("xmin"),
314  psTTStub_ECDisc.getParameter<double>("xmax"));
315  Stub_Endcap_Disc_Bw->setAxisTitle("Backward Endcap Disc",1);
316  Stub_Endcap_Disc_Bw->setAxisTitle("# L1 Stubs ",2);
317 
318  edm::ParameterSet psTTStub_ECRing = conf_.getParameter<edm::ParameterSet>("TH1TTStub_Rings");
319 
320  HistoName = "NStubs_Endcap_Ring";
321  Stub_Endcap_Ring = dqmStore_ ->book1D(HistoName,HistoName,
322  psTTStub_ECRing.getParameter<int32_t>("Nbinsx"),
323  psTTStub_ECRing.getParameter<double>("xmin"),
324  psTTStub_ECRing.getParameter<double>("xmax"));
325  Stub_Endcap_Ring->setAxisTitle("Endcap Ring",1);
326  Stub_Endcap_Ring->setAxisTitle("# L1 Stubs ",2);
327 
328  for (int i = 0; i < 5; i++)
329  {
330  HistoName = "NStubs_Disc+"+std::to_string(i+1);
331  //TTStub Endcap stack
332  Stub_Endcap_Ring_Fw[i] = dqmStore_ ->book1D(HistoName, HistoName,
333  psTTStub_ECRing.getParameter<int32_t>("Nbinsx"),
334  psTTStub_ECRing.getParameter<double>("xmin"),
335  psTTStub_ECRing.getParameter<double>("xmax"));
336  Stub_Endcap_Ring_Fw[i]->setAxisTitle("Endcap Ring",1);
337  Stub_Endcap_Ring_Fw[i]->setAxisTitle("# L1 Stubs ",2);
338  }
339 
340  for (int i = 0; i < 5; i++)
341  {
342  HistoName = "NStubs_Disc-"+std::to_string(i+1);
343  //TTStub Endcap stack
344  Stub_Endcap_Ring_Bw[i] = dqmStore_ ->book1D(HistoName, HistoName,
345  psTTStub_ECRing.getParameter<int32_t>("Nbinsx"),
346  psTTStub_ECRing.getParameter<double>("xmin"),
347  psTTStub_ECRing.getParameter<double>("xmax"));
348  Stub_Endcap_Ring_Bw[i]->setAxisTitle("Endcap Ring",1);
349  Stub_Endcap_Ring_Bw[i]->setAxisTitle("# L1 Stubs ",2);
350  }
351 
352  //TTStub displ/offset
353  edm::ParameterSet psTTStub_Barrel_2D = conf_.getParameter<edm::ParameterSet>("TH2TTStub_DisOf_Layer");
354  edm::ParameterSet psTTStub_ECDisc_2D = conf_.getParameter<edm::ParameterSet>("TH2TTStub_DisOf_Disc");
355  edm::ParameterSet psTTStub_ECRing_2D = conf_.getParameter<edm::ParameterSet>("TH2TTStub_DisOf_Ring");
356 
357  dqmStore_->setCurrentFolder(topFolderName_+"/Stubs/Width");
358 
359  HistoName = "Stub_Width_Barrel";
360  Stub_Barrel_W = dqmStore_->book2D(HistoName, HistoName,
361  psTTStub_Barrel_2D.getParameter<int32_t>("Nbinsx"),
362  psTTStub_Barrel_2D.getParameter<double>("xmin"),
363  psTTStub_Barrel_2D.getParameter<double>("xmax"),
364  psTTStub_Barrel_2D.getParameter<int32_t>("Nbinsy"),
365  psTTStub_Barrel_2D.getParameter<double>("ymin"),
366  psTTStub_Barrel_2D.getParameter<double>("ymax"));
367  Stub_Barrel_W->setAxisTitle("Barrel Layer",1);
368  Stub_Barrel_W->setAxisTitle("Displacement - Offset",2);
369 
370  HistoName = "Stub_Width_Endcap_Disc";
371  Stub_Endcap_Disc_W = dqmStore_->book2D(HistoName, HistoName,
372  psTTStub_ECDisc_2D.getParameter<int32_t>("Nbinsx"),
373  psTTStub_ECDisc_2D.getParameter<double>("xmin"),
374  psTTStub_ECDisc_2D.getParameter<double>("xmax"),
375  psTTStub_ECDisc_2D.getParameter<int32_t>("Nbinsy"),
376  psTTStub_ECDisc_2D.getParameter<double>("ymin"),
377  psTTStub_ECDisc_2D.getParameter<double>("ymax"));
378  Stub_Endcap_Disc_W->setAxisTitle("Endcap Disc",1);
379  Stub_Endcap_Disc_W->setAxisTitle("Displacement - Offset",2);
380 
381  HistoName = "Stub_Width_Endcap_Ring";
382  Stub_Endcap_Ring_W = dqmStore_->book2D(HistoName, HistoName,
383  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsx"),
384  psTTStub_ECRing_2D.getParameter<double>("xmin"),
385  psTTStub_ECRing_2D.getParameter<double>("xmax"),
386  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsy"),
387  psTTStub_ECRing_2D.getParameter<double>("ymin"),
388  psTTStub_ECRing_2D.getParameter<double>("ymax"));
389  Stub_Endcap_Ring_W->setAxisTitle("Endcap Ring",1);
390  Stub_Endcap_Ring_W->setAxisTitle("Trigger Offset",2);
391 
392  for (int i = 0; i < 5; i++)
393  {
394  HistoName = "Stub_Width_Disc+"+std::to_string(i+1);
395  Stub_Endcap_Ring_W_Fw[i] = dqmStore_->book2D(HistoName, HistoName,
396  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsx"),
397  psTTStub_ECRing_2D.getParameter<double>("xmin"),
398  psTTStub_ECRing_2D.getParameter<double>("xmax"),
399  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsy"),
400  psTTStub_ECRing_2D.getParameter<double>("ymin"),
401  psTTStub_ECRing_2D.getParameter<double>("ymax"));
402  Stub_Endcap_Ring_W_Fw[i]->setAxisTitle("Endcap Ring",1);
403  Stub_Endcap_Ring_W_Fw[i]->setAxisTitle("Displacement - Offset",2);
404  }
405 
406  for (int i = 0; i < 5; i++)
407  {
408  HistoName = "Stub_Width_Disc-"+std::to_string(i+1);
409  Stub_Endcap_Ring_W_Bw[i] = dqmStore_->book2D(HistoName, HistoName,
410  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsx"),
411  psTTStub_ECRing_2D.getParameter<double>("xmin"),
412  psTTStub_ECRing_2D.getParameter<double>("xmax"),
413  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsy"),
414  psTTStub_ECRing_2D.getParameter<double>("ymin"),
415  psTTStub_ECRing_2D.getParameter<double>("ymax"));
416  Stub_Endcap_Ring_W_Bw[i]->setAxisTitle("Endcap Ring",1);
417  Stub_Endcap_Ring_W_Bw[i]->setAxisTitle("Displacement - Offset",2);
418  }
419 
420  dqmStore_->setCurrentFolder(topFolderName_+"/Stubs/Offset");
421 
422  HistoName = "Stub_Offset_Barrel";
423  Stub_Barrel_O = dqmStore_->book2D(HistoName, HistoName,
424  psTTStub_Barrel_2D.getParameter<int32_t>("Nbinsx"),
425  psTTStub_Barrel_2D.getParameter<double>("xmin"),
426  psTTStub_Barrel_2D.getParameter<double>("xmax"),
427  psTTStub_Barrel_2D.getParameter<int32_t>("Nbinsy"),
428  psTTStub_Barrel_2D.getParameter<double>("ymin"),
429  psTTStub_Barrel_2D.getParameter<double>("ymax"));
430  Stub_Barrel_O->setAxisTitle("Barrel Layer",1);
431  Stub_Barrel_O->setAxisTitle("Trigger Offset",2);
432 
433  HistoName = "Stub_Offset_Endcap_Disc";
434  Stub_Endcap_Disc_O = dqmStore_->book2D(HistoName, HistoName,
435  psTTStub_ECDisc_2D.getParameter<int32_t>("Nbinsx"),
436  psTTStub_ECDisc_2D.getParameter<double>("xmin"),
437  psTTStub_ECDisc_2D.getParameter<double>("xmax"),
438  psTTStub_ECDisc_2D.getParameter<int32_t>("Nbinsy"),
439  psTTStub_ECDisc_2D.getParameter<double>("ymin"),
440  psTTStub_ECDisc_2D.getParameter<double>("ymax"));
441  Stub_Endcap_Disc_O->setAxisTitle("Endcap Disc",1);
442  Stub_Endcap_Disc_O->setAxisTitle("Trigger Offset",2);
443 
444  HistoName = "Stub_Offset_Endcap_Ring";
445  Stub_Endcap_Ring_O = dqmStore_->book2D(HistoName, HistoName,
446  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsx"),
447  psTTStub_ECRing_2D.getParameter<double>("xmin"),
448  psTTStub_ECRing_2D.getParameter<double>("xmax"),
449  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsy"),
450  psTTStub_ECRing_2D.getParameter<double>("ymin"),
451  psTTStub_ECRing_2D.getParameter<double>("ymax"));
452  Stub_Endcap_Ring_O->setAxisTitle("Endcap Ring",1);
453  Stub_Endcap_Ring_O->setAxisTitle("Trigger Offset",2);
454 
455  for (int i = 0; i < 5; i++)
456  {
457  HistoName = "Stub_Offset_Disc+"+std::to_string(i+1);
458  Stub_Endcap_Ring_O_Fw[i] = dqmStore_->book2D(HistoName, HistoName,
459  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsx"),
460  psTTStub_ECRing_2D.getParameter<double>("xmin"),
461  psTTStub_ECRing_2D.getParameter<double>("xmax"),
462  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsy"),
463  psTTStub_ECRing_2D.getParameter<double>("ymin"),
464  psTTStub_ECRing_2D.getParameter<double>("ymax"));
465  Stub_Endcap_Ring_O_Fw[i]->setAxisTitle("Endcap Ring",1);
466  Stub_Endcap_Ring_O_Fw[i]->setAxisTitle("Trigger Offset",2);
467  }
468 
469  for (int i = 0; i < 5; i++)
470  {
471  HistoName = "Stub_Offset_Disc-"+std::to_string(i+1);
472  Stub_Endcap_Ring_O_Bw[i] = dqmStore_->book2D(HistoName, HistoName,
473  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsx"),
474  psTTStub_ECRing_2D.getParameter<double>("xmin"),
475  psTTStub_ECRing_2D.getParameter<double>("xmax"),
476  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsy"),
477  psTTStub_ECRing_2D.getParameter<double>("ymin"),
478  psTTStub_ECRing_2D.getParameter<double>("ymax"));
479  Stub_Endcap_Ring_O_Bw[i]->setAxisTitle("Endcap Ring",1);
480  Stub_Endcap_Ring_O_Bw[i]->setAxisTitle("Trigger Offset",2);
481  }
482 }
483 
484 // ------------ method called once each job just after ending the event loop ------------
485 void
487 {
488 }
489 
490 
491 //define this as a plug-in
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:106
T getParameter(std::string const &) const
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:72
unsigned int tidRing(const DetId &id) const
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:1035
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:508
virtual const Topology & topology() const
Definition: GeomDet.cc:81
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
T y() const
Definition: PV3DBase.h:63
MonitorElement * Stub_Endcap_Ring_O_Fw[5]
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:42
void Fill(long long x)
void analyze(const edm::Event &, const edm::EventSetup &) override
MonitorElement * Stub_Endcap_Ring_Bw[5]
int iEvent
Definition: GenABIO.cc:230
OuterTrackerMonitorTTStub(const edm::ParameterSet &)
MonitorElement * Stub_Endcap_Ring_O_Bw[5]
T z() const
Definition: PV3DBase.h:64
bool isValid() const
Definition: HandleBase.h:74
Class to store the L1 Track Trigger stubs.
Definition: TTStub.h:22
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
Definition: DetId.h:18
void beginRun(const edm::Run &, const edm::EventSetup &) override
const T & get() const
Definition: EventSetup.h:55
edm::EDGetTokenT< edmNew::DetSetVector< TTStub< Ref_Phase2TrackerDigi_ > > > tagTTStubsToken_
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
std::string HistoName
unsigned int layer(const DetId &id) const
T eta() const
Definition: PV3DBase.h:76
MonitorElement * Stub_Endcap_Ring_Fw[5]
HLT enums.
const TrackerGeomDet * idToDet(DetId) const override
MonitorElement * Stub_Endcap_Ring_W_Bw[5]
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:1163
T x() const
Definition: PV3DBase.h:62
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
T const * product() const
Definition: ESHandle.h:86
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:741
const_iterator begin(bool update=false) const
Definition: Run.h:43
MonitorElement * Stub_Endcap_Ring_W_Fw[5]