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
38 
40 
41 //
42 // constructors and destructor
43 //
45 :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 ------------
167 
168  iBooker.setCurrentFolder(topFolderName_+"/Stubs/Position");
169 
170 
174 
175  edm::ParameterSet psTTStub_Barrel_XY = conf_.getParameter<edm::ParameterSet>("TH2TTStub_Position");
176  HistoName = "Stub_Barrel_XY";
177  Stub_Barrel_XY = iBooker.book2D(HistoName, HistoName,
178  psTTStub_Barrel_XY.getParameter<int32_t>("Nbinsx"),
179  psTTStub_Barrel_XY.getParameter<double>("xmin"),
180  psTTStub_Barrel_XY.getParameter<double>("xmax"),
181  psTTStub_Barrel_XY.getParameter<int32_t>("Nbinsy"),
182  psTTStub_Barrel_XY.getParameter<double>("ymin"),
183  psTTStub_Barrel_XY.getParameter<double>("ymax"));
184  Stub_Barrel_XY->setAxisTitle("L1 Stub Barrel position x [cm]", 1);
185  Stub_Barrel_XY->setAxisTitle("L1 Stub Barrel position y [cm]", 2);
186 
187  edm::ParameterSet psTTStub_Barrel_XY_Zoom = conf_.getParameter<edm::ParameterSet>("TH2TTStub_Barrel_XY_Zoom");
188  HistoName = "Stub_Barrel_XY_Zoom";
189  Stub_Barrel_XY_Zoom = iBooker.book2D(HistoName, HistoName,
190  psTTStub_Barrel_XY_Zoom.getParameter<int32_t>("Nbinsx"),
191  psTTStub_Barrel_XY_Zoom.getParameter<double>("xmin"),
192  psTTStub_Barrel_XY_Zoom.getParameter<double>("xmax"),
193  psTTStub_Barrel_XY_Zoom.getParameter<int32_t>("Nbinsy"),
194  psTTStub_Barrel_XY_Zoom.getParameter<double>("ymin"),
195  psTTStub_Barrel_XY_Zoom.getParameter<double>("ymax"));
196  Stub_Barrel_XY_Zoom->setAxisTitle("L1 Stub Barrel position x [cm]", 1);
197  Stub_Barrel_XY_Zoom->setAxisTitle("L1 Stub Barrel position y [cm]", 2);
198 
199 
200  edm::ParameterSet psTTStub_Endcap_Fw_XY = conf_.getParameter<edm::ParameterSet>("TH2TTStub_Position");
201  HistoName = "Stub_Endcap_Fw_XY";
202  Stub_Endcap_Fw_XY = iBooker.book2D(HistoName, HistoName,
203  psTTStub_Endcap_Fw_XY.getParameter<int32_t>("Nbinsx"),
204  psTTStub_Endcap_Fw_XY.getParameter<double>("xmin"),
205  psTTStub_Endcap_Fw_XY.getParameter<double>("xmax"),
206  psTTStub_Endcap_Fw_XY.getParameter<int32_t>("Nbinsy"),
207  psTTStub_Endcap_Fw_XY.getParameter<double>("ymin"),
208  psTTStub_Endcap_Fw_XY.getParameter<double>("ymax"));
209  Stub_Endcap_Fw_XY->setAxisTitle("L1 Stub Endcap position x [cm]", 1);
210  Stub_Endcap_Fw_XY->setAxisTitle("L1 Stub Endcap position y [cm]", 2);
211 
212 
213  edm::ParameterSet psTTStub_Endcap_Bw_XY = conf_.getParameter<edm::ParameterSet>("TH2TTStub_Position");
214  HistoName = "Stub_Endcap_Bw_XY";
215  Stub_Endcap_Bw_XY = iBooker.book2D(HistoName, HistoName,
216  psTTStub_Endcap_Bw_XY.getParameter<int32_t>("Nbinsx"),
217  psTTStub_Endcap_Bw_XY.getParameter<double>("xmin"),
218  psTTStub_Endcap_Bw_XY.getParameter<double>("xmax"),
219  psTTStub_Endcap_Bw_XY.getParameter<int32_t>("Nbinsy"),
220  psTTStub_Endcap_Bw_XY.getParameter<double>("ymin"),
221  psTTStub_Endcap_Bw_XY.getParameter<double>("ymax"));
222  Stub_Endcap_Bw_XY->setAxisTitle("L1 Stub Endcap position x [cm]", 1);
223  Stub_Endcap_Bw_XY->setAxisTitle("L1 Stub Endcap position y [cm]", 2);
224 
225  //TTStub #rho vs. z
226  edm::ParameterSet psTTStub_RZ = conf_.getParameter<edm::ParameterSet>("TH2TTStub_RZ");
227  HistoName = "Stub_RZ";
228  Stub_RZ = iBooker.book2D(HistoName, HistoName,
229  psTTStub_RZ.getParameter<int32_t>("Nbinsx"),
230  psTTStub_RZ.getParameter<double>("xmin"),
231  psTTStub_RZ.getParameter<double>("xmax"),
232  psTTStub_RZ.getParameter<int32_t>("Nbinsy"),
233  psTTStub_RZ.getParameter<double>("ymin"),
234  psTTStub_RZ.getParameter<double>("ymax"));
235  Stub_RZ->setAxisTitle("L1 Stub position z [cm]", 1);
236  Stub_RZ->setAxisTitle("L1 Stub position #rho [cm]", 2);
237 
238  //TTStub Forward Endcap #rho vs. z
239  edm::ParameterSet psTTStub_Endcap_Fw_RZ_Zoom = conf_.getParameter<edm::ParameterSet>("TH2TTStub_Endcap_Fw_RZ_Zoom");
240  HistoName = "Stub_Endcap_Fw_RZ_Zoom";
241  Stub_Endcap_Fw_RZ_Zoom = iBooker.book2D(HistoName, HistoName,
242  psTTStub_Endcap_Fw_RZ_Zoom.getParameter<int32_t>("Nbinsx"),
243  psTTStub_Endcap_Fw_RZ_Zoom.getParameter<double>("xmin"),
244  psTTStub_Endcap_Fw_RZ_Zoom.getParameter<double>("xmax"),
245  psTTStub_Endcap_Fw_RZ_Zoom.getParameter<int32_t>("Nbinsy"),
246  psTTStub_Endcap_Fw_RZ_Zoom.getParameter<double>("ymin"),
247  psTTStub_Endcap_Fw_RZ_Zoom.getParameter<double>("ymax"));
248  Stub_Endcap_Fw_RZ_Zoom->setAxisTitle("L1 Stub Endcap position z [cm]", 1);
249  Stub_Endcap_Fw_RZ_Zoom->setAxisTitle("L1 Stub Endcap position #rho [cm]", 2);
250 
251  //TTStub Backward Endcap #rho vs. z
252  edm::ParameterSet psTTStub_Endcap_Bw_RZ_Zoom = conf_.getParameter<edm::ParameterSet>("TH2TTStub_Endcap_Bw_RZ_Zoom");
253  HistoName = "Stub_Endcap_Bw_RZ_Zoom";
254  Stub_Endcap_Bw_RZ_Zoom = iBooker.book2D(HistoName, HistoName,
255  psTTStub_Endcap_Bw_RZ_Zoom.getParameter<int32_t>("Nbinsx"),
256  psTTStub_Endcap_Bw_RZ_Zoom.getParameter<double>("xmin"),
257  psTTStub_Endcap_Bw_RZ_Zoom.getParameter<double>("xmax"),
258  psTTStub_Endcap_Bw_RZ_Zoom.getParameter<int32_t>("Nbinsy"),
259  psTTStub_Endcap_Bw_RZ_Zoom.getParameter<double>("ymin"),
260  psTTStub_Endcap_Bw_RZ_Zoom.getParameter<double>("ymax"));
261  Stub_Endcap_Bw_RZ_Zoom->setAxisTitle("L1 Stub Endcap position z [cm]", 1);
262  Stub_Endcap_Bw_RZ_Zoom->setAxisTitle("L1 Stub Endcap position #rho [cm]", 2);
263 
264  iBooker.setCurrentFolder(topFolderName_+"/Stubs");
265 
266  //TTStub eta
267  edm::ParameterSet psTTStub_Eta = conf_.getParameter<edm::ParameterSet>("TH1TTStub_Eta");
268  HistoName = "Stub_Eta";
269  Stub_Eta = iBooker.book1D(HistoName,HistoName,
270  psTTStub_Eta.getParameter<int32_t>("Nbinsx"),
271  psTTStub_Eta.getParameter<double>("xmin"),
272  psTTStub_Eta.getParameter<double>("xmax"));
273  Stub_Eta->setAxisTitle("#eta",1);
274  Stub_Eta->setAxisTitle("# L1 Stubs ",2);
275 
276  iBooker.setCurrentFolder(topFolderName_+"/Stubs/NStubs");
277 
278  //TTStub barrel stack
279  edm::ParameterSet psTTStub_Barrel = conf_.getParameter<edm::ParameterSet>("TH1TTStub_Layers");
280  HistoName = "NStubs_Barrel";
281  Stub_Barrel = iBooker.book1D(HistoName,HistoName,
282  psTTStub_Barrel.getParameter<int32_t>("Nbinsx"),
283  psTTStub_Barrel.getParameter<double>("xmin"),
284  psTTStub_Barrel.getParameter<double>("xmax"));
285  Stub_Barrel->setAxisTitle("Barrel Layer",1);
286  Stub_Barrel->setAxisTitle("# L1 Stubs ",2);
287 
288  //TTStub Endcap stack
289  edm::ParameterSet psTTStub_ECDisc = conf_.getParameter<edm::ParameterSet>("TH1TTStub_Discs");
290  HistoName = "NStubs_Endcap_Disc";
291  Stub_Endcap_Disc = iBooker.book1D(HistoName,HistoName,
292  psTTStub_ECDisc.getParameter<int32_t>("Nbinsx"),
293  psTTStub_ECDisc.getParameter<double>("xmin"),
294  psTTStub_ECDisc.getParameter<double>("xmax"));
295  Stub_Endcap_Disc->setAxisTitle("Endcap Disc",1);
296  Stub_Endcap_Disc->setAxisTitle("# L1 Stubs ",2);
297 
298  //TTStub Endcap stack
299  HistoName = "NStubs_Endcap_Disc_Fw";
300  Stub_Endcap_Disc_Fw = iBooker.book1D(HistoName,HistoName,
301  psTTStub_ECDisc.getParameter<int32_t>("Nbinsx"),
302  psTTStub_ECDisc.getParameter<double>("xmin"),
303  psTTStub_ECDisc.getParameter<double>("xmax"));
304  Stub_Endcap_Disc_Fw->setAxisTitle("Forward Endcap Disc",1);
305  Stub_Endcap_Disc_Fw->setAxisTitle("# L1 Stubs ",2);
306 
307  //TTStub Endcap stack
308  HistoName = "NStubs_Endcap_Disc_Bw";
309  Stub_Endcap_Disc_Bw = iBooker.book1D(HistoName,HistoName,
310  psTTStub_ECDisc.getParameter<int32_t>("Nbinsx"),
311  psTTStub_ECDisc.getParameter<double>("xmin"),
312  psTTStub_ECDisc.getParameter<double>("xmax"));
313  Stub_Endcap_Disc_Bw->setAxisTitle("Backward Endcap Disc",1);
314  Stub_Endcap_Disc_Bw->setAxisTitle("# L1 Stubs ",2);
315 
316  edm::ParameterSet psTTStub_ECRing = conf_.getParameter<edm::ParameterSet>("TH1TTStub_Rings");
317 
318  HistoName = "NStubs_Endcap_Ring";
319  Stub_Endcap_Ring = iBooker.book1D(HistoName,HistoName,
320  psTTStub_ECRing.getParameter<int32_t>("Nbinsx"),
321  psTTStub_ECRing.getParameter<double>("xmin"),
322  psTTStub_ECRing.getParameter<double>("xmax"));
323  Stub_Endcap_Ring->setAxisTitle("Endcap Ring",1);
324  Stub_Endcap_Ring->setAxisTitle("# L1 Stubs ",2);
325 
326  for (int i = 0; i < 5; i++)
327  {
328  HistoName = "NStubs_Disc+"+std::to_string(i+1);
329  //TTStub Endcap stack
330  Stub_Endcap_Ring_Fw[i] = iBooker.book1D(HistoName, HistoName,
331  psTTStub_ECRing.getParameter<int32_t>("Nbinsx"),
332  psTTStub_ECRing.getParameter<double>("xmin"),
333  psTTStub_ECRing.getParameter<double>("xmax"));
334  Stub_Endcap_Ring_Fw[i]->setAxisTitle("Endcap Ring",1);
335  Stub_Endcap_Ring_Fw[i]->setAxisTitle("# L1 Stubs ",2);
336  }
337 
338  for (int i = 0; i < 5; i++)
339  {
340  HistoName = "NStubs_Disc-"+std::to_string(i+1);
341  //TTStub Endcap stack
342  Stub_Endcap_Ring_Bw[i] = iBooker.book1D(HistoName, HistoName,
343  psTTStub_ECRing.getParameter<int32_t>("Nbinsx"),
344  psTTStub_ECRing.getParameter<double>("xmin"),
345  psTTStub_ECRing.getParameter<double>("xmax"));
346  Stub_Endcap_Ring_Bw[i]->setAxisTitle("Endcap Ring",1);
347  Stub_Endcap_Ring_Bw[i]->setAxisTitle("# L1 Stubs ",2);
348  }
349 
350  //TTStub displ/offset
351  edm::ParameterSet psTTStub_Barrel_2D = conf_.getParameter<edm::ParameterSet>("TH2TTStub_DisOf_Layer");
352  edm::ParameterSet psTTStub_ECDisc_2D = conf_.getParameter<edm::ParameterSet>("TH2TTStub_DisOf_Disc");
353  edm::ParameterSet psTTStub_ECRing_2D = conf_.getParameter<edm::ParameterSet>("TH2TTStub_DisOf_Ring");
354 
355  iBooker.setCurrentFolder(topFolderName_+"/Stubs/Width");
356 
357  HistoName = "Stub_Width_Barrel";
358  Stub_Barrel_W = iBooker.book2D(HistoName, HistoName,
359  psTTStub_Barrel_2D.getParameter<int32_t>("Nbinsx"),
360  psTTStub_Barrel_2D.getParameter<double>("xmin"),
361  psTTStub_Barrel_2D.getParameter<double>("xmax"),
362  psTTStub_Barrel_2D.getParameter<int32_t>("Nbinsy"),
363  psTTStub_Barrel_2D.getParameter<double>("ymin"),
364  psTTStub_Barrel_2D.getParameter<double>("ymax"));
365  Stub_Barrel_W->setAxisTitle("Barrel Layer",1);
366  Stub_Barrel_W->setAxisTitle("Displacement - Offset",2);
367 
368  HistoName = "Stub_Width_Endcap_Disc";
369  Stub_Endcap_Disc_W = iBooker.book2D(HistoName, HistoName,
370  psTTStub_ECDisc_2D.getParameter<int32_t>("Nbinsx"),
371  psTTStub_ECDisc_2D.getParameter<double>("xmin"),
372  psTTStub_ECDisc_2D.getParameter<double>("xmax"),
373  psTTStub_ECDisc_2D.getParameter<int32_t>("Nbinsy"),
374  psTTStub_ECDisc_2D.getParameter<double>("ymin"),
375  psTTStub_ECDisc_2D.getParameter<double>("ymax"));
376  Stub_Endcap_Disc_W->setAxisTitle("Endcap Disc",1);
377  Stub_Endcap_Disc_W->setAxisTitle("Displacement - Offset",2);
378 
379  HistoName = "Stub_Width_Endcap_Ring";
380  Stub_Endcap_Ring_W = iBooker.book2D(HistoName, HistoName,
381  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsx"),
382  psTTStub_ECRing_2D.getParameter<double>("xmin"),
383  psTTStub_ECRing_2D.getParameter<double>("xmax"),
384  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsy"),
385  psTTStub_ECRing_2D.getParameter<double>("ymin"),
386  psTTStub_ECRing_2D.getParameter<double>("ymax"));
387  Stub_Endcap_Ring_W->setAxisTitle("Endcap Ring",1);
388  Stub_Endcap_Ring_W->setAxisTitle("Trigger Offset",2);
389 
390  for (int i = 0; i < 5; i++)
391  {
392  HistoName = "Stub_Width_Disc+"+std::to_string(i+1);
393  Stub_Endcap_Ring_W_Fw[i] = iBooker.book2D(HistoName, HistoName,
394  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsx"),
395  psTTStub_ECRing_2D.getParameter<double>("xmin"),
396  psTTStub_ECRing_2D.getParameter<double>("xmax"),
397  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsy"),
398  psTTStub_ECRing_2D.getParameter<double>("ymin"),
399  psTTStub_ECRing_2D.getParameter<double>("ymax"));
400  Stub_Endcap_Ring_W_Fw[i]->setAxisTitle("Endcap Ring",1);
401  Stub_Endcap_Ring_W_Fw[i]->setAxisTitle("Displacement - Offset",2);
402  }
403 
404  for (int i = 0; i < 5; i++)
405  {
406  HistoName = "Stub_Width_Disc-"+std::to_string(i+1);
407  Stub_Endcap_Ring_W_Bw[i] = iBooker.book2D(HistoName, HistoName,
408  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsx"),
409  psTTStub_ECRing_2D.getParameter<double>("xmin"),
410  psTTStub_ECRing_2D.getParameter<double>("xmax"),
411  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsy"),
412  psTTStub_ECRing_2D.getParameter<double>("ymin"),
413  psTTStub_ECRing_2D.getParameter<double>("ymax"));
414  Stub_Endcap_Ring_W_Bw[i]->setAxisTitle("Endcap Ring",1);
415  Stub_Endcap_Ring_W_Bw[i]->setAxisTitle("Displacement - Offset",2);
416  }
417 
418  iBooker.setCurrentFolder(topFolderName_+"/Stubs/Offset");
419 
420  HistoName = "Stub_Offset_Barrel";
421  Stub_Barrel_O = iBooker.book2D(HistoName, HistoName,
422  psTTStub_Barrel_2D.getParameter<int32_t>("Nbinsx"),
423  psTTStub_Barrel_2D.getParameter<double>("xmin"),
424  psTTStub_Barrel_2D.getParameter<double>("xmax"),
425  psTTStub_Barrel_2D.getParameter<int32_t>("Nbinsy"),
426  psTTStub_Barrel_2D.getParameter<double>("ymin"),
427  psTTStub_Barrel_2D.getParameter<double>("ymax"));
428  Stub_Barrel_O->setAxisTitle("Barrel Layer",1);
429  Stub_Barrel_O->setAxisTitle("Trigger Offset",2);
430 
431  HistoName = "Stub_Offset_Endcap_Disc";
432  Stub_Endcap_Disc_O = iBooker.book2D(HistoName, HistoName,
433  psTTStub_ECDisc_2D.getParameter<int32_t>("Nbinsx"),
434  psTTStub_ECDisc_2D.getParameter<double>("xmin"),
435  psTTStub_ECDisc_2D.getParameter<double>("xmax"),
436  psTTStub_ECDisc_2D.getParameter<int32_t>("Nbinsy"),
437  psTTStub_ECDisc_2D.getParameter<double>("ymin"),
438  psTTStub_ECDisc_2D.getParameter<double>("ymax"));
439  Stub_Endcap_Disc_O->setAxisTitle("Endcap Disc",1);
440  Stub_Endcap_Disc_O->setAxisTitle("Trigger Offset",2);
441 
442  HistoName = "Stub_Offset_Endcap_Ring";
443  Stub_Endcap_Ring_O = iBooker.book2D(HistoName, HistoName,
444  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsx"),
445  psTTStub_ECRing_2D.getParameter<double>("xmin"),
446  psTTStub_ECRing_2D.getParameter<double>("xmax"),
447  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsy"),
448  psTTStub_ECRing_2D.getParameter<double>("ymin"),
449  psTTStub_ECRing_2D.getParameter<double>("ymax"));
450  Stub_Endcap_Ring_O->setAxisTitle("Endcap Ring",1);
451  Stub_Endcap_Ring_O->setAxisTitle("Trigger Offset",2);
452 
453  for (int i = 0; i < 5; i++)
454  {
455  HistoName = "Stub_Offset_Disc+"+std::to_string(i+1);
456  Stub_Endcap_Ring_O_Fw[i] = iBooker.book2D(HistoName, HistoName,
457  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsx"),
458  psTTStub_ECRing_2D.getParameter<double>("xmin"),
459  psTTStub_ECRing_2D.getParameter<double>("xmax"),
460  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsy"),
461  psTTStub_ECRing_2D.getParameter<double>("ymin"),
462  psTTStub_ECRing_2D.getParameter<double>("ymax"));
463  Stub_Endcap_Ring_O_Fw[i]->setAxisTitle("Endcap Ring",1);
464  Stub_Endcap_Ring_O_Fw[i]->setAxisTitle("Trigger Offset",2);
465  }
466 
467  for (int i = 0; i < 5; i++)
468  {
469  HistoName = "Stub_Offset_Disc-"+std::to_string(i+1);
470  Stub_Endcap_Ring_O_Bw[i] = iBooker.book2D(HistoName, HistoName,
471  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsx"),
472  psTTStub_ECRing_2D.getParameter<double>("xmin"),
473  psTTStub_ECRing_2D.getParameter<double>("xmax"),
474  psTTStub_ECRing_2D.getParameter<int32_t>("Nbinsy"),
475  psTTStub_ECRing_2D.getParameter<double>("ymin"),
476  psTTStub_ECRing_2D.getParameter<double>("ymax"));
477  Stub_Endcap_Ring_O_Bw[i]->setAxisTitle("Endcap Ring",1);
478  Stub_Endcap_Ring_O_Bw[i]->setAxisTitle("Trigger Offset",2);
479  }
480 }
481 
482 //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
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:519
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]
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
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
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:118
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:38
Definition: DetId.h:18
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:279
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:136
const T & get() const
Definition: EventSetup.h:59
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]
const TrackerGeomDet * idToDet(DetId) const override
MonitorElement * Stub_Endcap_Ring_W_Bw[5]
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
const_iterator begin(bool update=false) const
Definition: Run.h:43
MonitorElement * Stub_Endcap_Ring_W_Fw[5]