CMS 3D CMS Logo

Phase2OTValidateRecHitBase.cc
Go to the documentation of this file.
1 // Package: Phase2OTValidateRecHitBase
2 // Class: Phase2OTValidateRecHitBase
3 //
7 //
8 // Author: Suvankar Roy Chowdhury
9 // Date: May 2021
10 //
11 // system include files
26 
27 //
28 // constructors
29 //
31  : config_(iConfig),
33  topoToken_(esConsumes<TrackerTopology, TrackerTopologyRcd, edm::Transition::BeginRun>()) {
34  edm::LogInfo("Phase2OTValidateRecHitBase") << ">>> Construct Phase2OTValidateRecHitBase ";
35 }
36 
37 //
38 // destructor
39 //
41  // do anything here that needs to be done at desctruction time
42  // (e.g. close files, deallocate resources etc.)
43  edm::LogInfo("Phase2OTValidateRecHitBase") << ">>> Destroy Phase2OTValidateRecHitBase ";
44 }
45 //
46 // -- DQM Begin Run
48  tkGeom_ = &iSetup.getData(geomToken_);
49  tTopo_ = &iSetup.getData(topoToken_);
50 }
51 
53  const Phase2TrackerRecHit1D* rechit,
54  const std::map<unsigned int, SimTrack>& selectedSimTrackMap,
55  std::map<std::string, unsigned int>& nrechitLayerMapP_primary,
56  std::map<std::string, unsigned int>& nrechitLayerMapS_primary) {
57  auto detId = rechit->geographicalId();
58  // Get the geomdet
59  const GeomDetUnit* geomDetunit(tkGeom_->idToDetUnit(detId));
60  if (!geomDetunit)
61  return;
62  // determine the detector we are in
65 
66  LocalPoint lp = rechit->localPosition();
67  auto simTrackIt(selectedSimTrackMap.find(simhitClosest->trackId()));
68  bool isPrimary = false;
69  //check if simhit is primary
70  if (simTrackIt != selectedSimTrackMap.end())
71  isPrimary = phase2tkutil::isPrimary(simTrackIt->second, simhitClosest);
72  Local3DPoint simlp(simhitClosest->localPosition());
73  const LocalError& lperr = rechit->localPositionError();
74  double dx = lp.x() - simlp.x();
75  double dy = lp.y() - simlp.y();
76  double pullx = 999.;
77  double pully = 999.;
78  if (lperr.xx())
79  pullx = (dx) / std::sqrt(lperr.xx());
80  if (lperr.yy())
81  pully = (dx) / std::sqrt(lperr.yy());
82  float eta = geomDetunit->surface().toGlobal(lp).eta();
83  float phi = geomDetunit->surface().toGlobal(lp).phi();
84 
85  //scale for plotting
86  dx *= phase2tkutil::cmtomicron; //this is always the case
88  dy *= phase2tkutil::cmtomicron; //only for PSP sensors
89 
90  layerMEs_[key].deltaX_P->Fill(dx);
91  layerMEs_[key].deltaY_P->Fill(dy);
92 
93  layerMEs_[key].pullX_P->Fill(pullx);
94  layerMEs_[key].pullY_P->Fill(pully);
95 
96  layerMEs_[key].deltaX_eta_P->Fill(std::abs(eta), dx);
97  layerMEs_[key].deltaY_eta_P->Fill(std::abs(eta), dy);
98  layerMEs_[key].deltaX_phi_P->Fill(phi, dx);
99  layerMEs_[key].deltaY_phi_P->Fill(phi, dy);
100 
101  layerMEs_[key].pullX_eta_P->Fill(eta, pullx);
102  layerMEs_[key].pullY_eta_P->Fill(eta, pully);
103 
104  if (isPrimary) {
105  layerMEs_[key].deltaX_primary_P->Fill(dx);
106  layerMEs_[key].deltaY_primary_P->Fill(dy);
107  layerMEs_[key].pullX_primary_P->Fill(pullx);
108  layerMEs_[key].pullY_primary_P->Fill(pully);
109  } else
110  nrechitLayerMapP_primary[key]--;
112  layerMEs_[key].deltaX_S->Fill(dx);
113  layerMEs_[key].deltaY_S->Fill(dy);
114 
115  layerMEs_[key].pullX_S->Fill(pullx);
116  layerMEs_[key].pullY_S->Fill(pully);
117 
118  layerMEs_[key].deltaX_eta_S->Fill(std::abs(eta), dx);
119  layerMEs_[key].deltaY_eta_S->Fill(std::abs(eta), dy);
120  layerMEs_[key].deltaX_phi_S->Fill(phi, dx);
121  layerMEs_[key].deltaY_phi_S->Fill(phi, dy);
122 
123  layerMEs_[key].pullX_eta_S->Fill(eta, pullx);
124  layerMEs_[key].pullY_eta_S->Fill(eta, pully);
125 
126  if (isPrimary) {
127  layerMEs_[key].deltaX_primary_S->Fill(dx);
128  layerMEs_[key].deltaY_primary_S->Fill(dy);
129  layerMEs_[key].pullX_primary_S->Fill(pullx);
130  layerMEs_[key].pullY_primary_S->Fill(pully);
131  } else
132  nrechitLayerMapS_primary[key]--;
133  }
134 }
135 //
136 // -- Book Histograms
137 //
139  edm::Run const& iRun,
140  edm::EventSetup const& iSetup) {
141  std::string top_folder = config_.getParameter<std::string>("TopFolderName");
142  //Now book layer wise histos
143  edm::ESWatcher<TrackerDigiGeometryRecord> theTkDigiGeomWatcher;
144  if (theTkDigiGeomWatcher.check(iSetup)) {
145  for (auto const& det_u : tkGeom_->detUnits()) {
146  //Always check TrackerNumberingBuilder before changing this part
147  if (det_u->subDetector() == GeomDetEnumerators::SubDetector::P2PXB ||
148  det_u->subDetector() == GeomDetEnumerators::SubDetector::P2PXEC)
149  continue;
150  unsigned int detId_raw = det_u->geographicalId().rawId();
151  bookLayerHistos(ibooker, detId_raw, top_folder);
152  }
153  }
154 }
155 
156 //
157 // -- Book Layer Histograms
158 //
161  if (layerMEs_.find(key) == layerMEs_.end()) {
162  ibooker.cd();
163  RecHitME local_histos;
164  ibooker.setCurrentFolder(subdir + "/" + key);
165  edm::LogInfo("Phase2OTValidateRecHitBase") << " Booking Histograms in : " << key;
166 
168  local_histos.deltaX_P =
170  local_histos.deltaY_P =
172 
173  local_histos.pullX_P =
175  local_histos.pullY_P =
177 
178  local_histos.deltaX_eta_P =
179  phase2tkutil::book2DFromPSet(config_.getParameter<edm::ParameterSet>("Delta_X_vs_eta_Pixel"), ibooker);
180  local_histos.deltaY_eta_P =
181  phase2tkutil::book2DFromPSet(config_.getParameter<edm::ParameterSet>("Delta_Y_vs_eta_Pixel"), ibooker);
182 
183  local_histos.deltaX_phi_P =
184  phase2tkutil::book2DFromPSet(config_.getParameter<edm::ParameterSet>("Delta_X_vs_phi_Pixel"), ibooker);
185  local_histos.deltaY_phi_P =
186  phase2tkutil::book2DFromPSet(config_.getParameter<edm::ParameterSet>("Delta_Y_vs_phi_Pixel"), ibooker);
187 
188  local_histos.pullX_eta_P =
190  local_histos.pullY_eta_P =
192 
193  ibooker.setCurrentFolder(subdir + "/" + key + "/PrimarySimHits");
194  //all histos for Primary particles
195  local_histos.numberRecHitsprimary_P =
196  phase2tkutil::book1DFromPSet(config_.getParameter<edm::ParameterSet>("nRecHits_Pixel_primary"), ibooker);
197 
198  local_histos.deltaX_primary_P =
199  phase2tkutil::book1DFromPSet(config_.getParameter<edm::ParameterSet>("Delta_X_Pixel_Primary"), ibooker);
200  local_histos.deltaY_primary_P =
201  phase2tkutil::book1DFromPSet(config_.getParameter<edm::ParameterSet>("Delta_X_Pixel_Primary"), ibooker);
202 
203  local_histos.pullX_primary_P =
204  phase2tkutil::book1DFromPSet(config_.getParameter<edm::ParameterSet>("Pull_X_Pixel_Primary"), ibooker);
205  local_histos.pullY_primary_P =
206  phase2tkutil::book1DFromPSet(config_.getParameter<edm::ParameterSet>("Pull_X_Pixel_Primary"), ibooker);
207  } //if block for P
208 
209  ibooker.setCurrentFolder(subdir + "/" + key);
210  local_histos.deltaX_S =
212  local_histos.deltaY_S =
214 
215  local_histos.pullX_S =
217  local_histos.pullY_S =
219 
220  local_histos.deltaX_eta_S =
221  phase2tkutil::book2DFromPSet(config_.getParameter<edm::ParameterSet>("Delta_X_vs_eta_Strip"), ibooker);
222  local_histos.deltaY_eta_S =
223  phase2tkutil::book2DFromPSet(config_.getParameter<edm::ParameterSet>("Delta_Y_vs_eta_Strip"), ibooker);
224 
225  local_histos.deltaX_phi_S =
226  phase2tkutil::book2DFromPSet(config_.getParameter<edm::ParameterSet>("Delta_X_vs_phi_Strip"), ibooker);
227  local_histos.deltaY_phi_S =
228  phase2tkutil::book2DFromPSet(config_.getParameter<edm::ParameterSet>("Delta_Y_vs_phi_Strip"), ibooker);
229 
230  local_histos.pullX_eta_S =
232  local_histos.pullY_eta_S =
234 
235  //primary
236  ibooker.setCurrentFolder(subdir + "/" + key + "/PrimarySimHits");
237  local_histos.numberRecHitsprimary_S =
238  phase2tkutil::book1DFromPSet(config_.getParameter<edm::ParameterSet>("nRecHits_Strip_primary"), ibooker);
239 
240  local_histos.deltaX_primary_S =
241  phase2tkutil::book1DFromPSet(config_.getParameter<edm::ParameterSet>("Delta_X_Strip_Primary"), ibooker);
242  local_histos.deltaY_primary_S =
243  phase2tkutil::book1DFromPSet(config_.getParameter<edm::ParameterSet>("Delta_Y_Strip_Primary"), ibooker);
244 
245  local_histos.pullX_primary_S =
246  phase2tkutil::book1DFromPSet(config_.getParameter<edm::ParameterSet>("Pull_X_Strip_Primary"), ibooker);
247  local_histos.pullY_primary_S =
248  phase2tkutil::book1DFromPSet(config_.getParameter<edm::ParameterSet>("Pull_X_Strip_Primary"), ibooker);
249 
250  layerMEs_.insert(std::make_pair(key, local_histos));
251  }
252 }
253 
255  // rechitValidOT
256  //for macro-pixel sensors
257  std::string mptag = "macro-pixel sensor";
258  std::string striptag = "strip sensor";
259  {
261  psd0.add<std::string>("name", "Delta_X_Pixel");
262  psd0.add<std::string>("title", "#Delta X " + mptag + ";Cluster resolution X coordinate [#mum]");
263  psd0.add<bool>("switch", true);
264  psd0.add<double>("xmax", 250);
265  psd0.add<double>("xmin", -250);
266  psd0.add<int>("NxBins", 100);
267  desc.add<edm::ParameterSetDescription>("Delta_X_Pixel", psd0);
268  }
269  {
271  psd0.add<std::string>("name", "Delta_Y_Pixel");
272  psd0.add<std::string>("title", "#Delta Y " + mptag + ";Cluster resolution Y coordinate [#mum]");
273  psd0.add<bool>("switch", true);
274  psd0.add<double>("xmin", -1500);
275  psd0.add<double>("xmax", 1500);
276  psd0.add<int>("NxBins", 100);
277  desc.add<edm::ParameterSetDescription>("Delta_Y_Pixel", psd0);
278  }
279  {
281  psd0.add<std::string>("name", "Delta_X_Pixel_Primary");
282  psd0.add<std::string>("title", "#Delta X " + mptag + ";cluster resolution X coordinate [#mum]");
283  psd0.add<bool>("switch", true);
284  psd0.add<double>("xmin", -250);
285  psd0.add<double>("xmax", 250);
286  psd0.add<int>("NxBins", 100);
287  desc.add<edm::ParameterSetDescription>("Delta_X_Pixel_Primary", psd0);
288  }
289  {
291  psd0.add<std::string>("name", "Delta_Y_Pixel_Primary");
292  psd0.add<std::string>("title", "#Delta Y " + mptag + ";cluster resolution Y coordinate [#mum]");
293  psd0.add<bool>("switch", true);
294  psd0.add<double>("xmin", -500);
295  psd0.add<double>("xmax", 500);
296  psd0.add<int>("NxBins", 100);
297  desc.add<edm::ParameterSetDescription>("Delta_Y_Pixel_Primary", psd0);
298  }
299 
300  {
302  psd0.add<std::string>("name", "Delta_X_vs_Eta_Pixel");
303  psd0.add<std::string>("title", ";|#eta|;#Delta x [#mum]");
304  psd0.add<int>("NyBins", 250);
305  psd0.add<double>("ymin", -250.0);
306  psd0.add<double>("ymax", 250.0);
307  psd0.add<int>("NxBins", 41);
308  psd0.add<bool>("switch", true);
309  psd0.add<double>("xmax", 4.1);
310  psd0.add<double>("xmin", 0.);
311  desc.add<edm::ParameterSetDescription>("Delta_X_vs_eta_Pixel", psd0);
312  }
313  {
315  psd0.add<std::string>("name", "Delta_Y_vs_Eta_Pixel");
316  psd0.add<std::string>("title", ";|#eta|;#Delta y [#mum]");
317  psd0.add<int>("NyBins", 300);
318  psd0.add<double>("ymin", -1500.0);
319  psd0.add<double>("ymax", 1500.0);
320  psd0.add<int>("NxBins", 41);
321  psd0.add<bool>("switch", true);
322  psd0.add<double>("xmax", 4.1);
323  psd0.add<double>("xmin", 0.);
324  desc.add<edm::ParameterSetDescription>("Delta_Y_vs_eta_Pixel", psd0);
325  }
326 
327  {
329  psd0.add<std::string>("name", "Delta_X_vs_Phi_Pixel");
330  psd0.add<std::string>("title", ";#phi;#Delta x [#mum]");
331  psd0.add<int>("NyBins", 250);
332  psd0.add<double>("ymin", -250.0);
333  psd0.add<double>("ymax", 250.0);
334  psd0.add<int>("NxBins", 36);
335  psd0.add<bool>("switch", true);
336  psd0.add<double>("xmax", M_PI);
337  psd0.add<double>("xmin", -M_PI);
338  desc.add<edm::ParameterSetDescription>("Delta_X_vs_phi_Pixel", psd0);
339  }
340  {
342  psd0.add<std::string>("name", "Delta_Y_vs_Phi_Pixel");
343  psd0.add<std::string>("title", ";#phi;#Delta y [#mum]");
344  psd0.add<int>("NyBins", 300);
345  psd0.add<double>("ymin", -1500.0);
346  psd0.add<double>("ymax", 1500.0);
347  psd0.add<int>("NxBins", 35);
348  psd0.add<bool>("switch", true);
349  psd0.add<double>("xmax", M_PI);
350  psd0.add<double>("xmin", -M_PI);
351  desc.add<edm::ParameterSetDescription>("Delta_Y_vs_phi_Pixel", psd0);
352  }
353  //Pulls macro-pixel
354  {
356  psd0.add<std::string>("name", "Pull_X_Pixel");
357  psd0.add<std::string>("title", ";pull x;");
358  psd0.add<double>("xmin", -4.0);
359  psd0.add<bool>("switch", true);
360  psd0.add<double>("xmax", 4.0);
361  psd0.add<int>("NxBins", 100);
362  desc.add<edm::ParameterSetDescription>("Pull_X_Pixel", psd0);
363  }
364  {
366  psd0.add<std::string>("name", "Pull_Y_Pixel");
367  psd0.add<std::string>("title", ";pull y;");
368  psd0.add<double>("xmin", -4.0);
369  psd0.add<bool>("switch", true);
370  psd0.add<double>("xmax", 4.0);
371  psd0.add<int>("NxBins", 100);
372  desc.add<edm::ParameterSetDescription>("Pull_Y_Pixel", psd0);
373  }
374 
375  {
377  psd0.add<std::string>("name", "Pull_X_Pixel_Primary");
378  psd0.add<std::string>("title", ";pull x;");
379  psd0.add<double>("xmin", -4.0);
380  psd0.add<bool>("switch", true);
381  psd0.add<double>("xmax", 4.0);
382  psd0.add<int>("NxBins", 100);
383  desc.add<edm::ParameterSetDescription>("Pull_X_Pixel_Primary", psd0);
384  }
385  {
387  psd0.add<std::string>("name", "Pull_Y_Pixel_Primary");
388  psd0.add<std::string>("title", ";pull y;");
389  psd0.add<double>("xmin", -4.0);
390  psd0.add<bool>("switch", true);
391  psd0.add<double>("xmax", 4.0);
392  psd0.add<int>("NxBins", 100);
393  desc.add<edm::ParameterSetDescription>("Pull_Y_Pixel_Primary", psd0);
394  }
395  {
397  psd0.add<std::string>("name", "Pull_X_vs_Eta");
398  psd0.add<std::string>("title", ";#eta;pull x");
399  psd0.add<double>("ymax", 4.0);
400  psd0.add<int>("NxBins", 82);
401  psd0.add<bool>("switch", true);
402  psd0.add<double>("xmax", 4.1);
403  psd0.add<double>("xmin", -4.1);
404  psd0.add<double>("ymin", -4.0);
405  desc.add<edm::ParameterSetDescription>("Pull_X_vs_eta_Pixel", psd0);
406  }
407  {
409  psd0.add<std::string>("name", "Pull_Y_vs_Eta");
410  psd0.add<std::string>("title", ";#eta;pull y");
411  psd0.add<double>("ymax", 4.0);
412  psd0.add<int>("NxBins", 82);
413  psd0.add<bool>("switch", true);
414  psd0.add<double>("xmax", 4.1);
415  psd0.add<double>("xmin", -4.1);
416  psd0.add<double>("ymin", -4.0);
417  desc.add<edm::ParameterSetDescription>("Pull_Y_vs_eta_Pixel", psd0);
418  }
419  {
421  psd0.add<std::string>("name", "Number_RecHits_matched_PrimarySimTrack");
422  psd0.add<std::string>("title", "Number of RecHits matched to primary SimTrack;;");
423  psd0.add<double>("xmin", 0.0);
424  psd0.add<bool>("switch", true);
425  psd0.add<double>("xmax", 10000.0);
426  psd0.add<int>("NxBins", 100);
427  desc.add<edm::ParameterSetDescription>("nRecHits_Pixel_primary", psd0);
428  }
429  //strip sensors
430  {
432  psd0.add<std::string>("name", "Delta_X_Strip");
433  psd0.add<std::string>("title", "#Delta X " + striptag + ";Cluster resolution X coordinate [#mum]");
434  psd0.add<bool>("switch", true);
435  psd0.add<double>("xmin", -250);
436  psd0.add<double>("xmax", 250);
437  psd0.add<int>("NxBins", 100);
438  desc.add<edm::ParameterSetDescription>("Delta_X_Strip", psd0);
439  }
440  {
442  psd0.add<std::string>("name", "Delta_Y_Strip");
443  psd0.add<std::string>("title", "#Delta Y " + striptag + ";Cluster resolution Y coordinate [cm]");
444  psd0.add<double>("xmin", -5.0);
445  psd0.add<bool>("switch", true);
446  psd0.add<double>("xmax", 5.0);
447  psd0.add<int>("NxBins", 100);
448  desc.add<edm::ParameterSetDescription>("Delta_Y_Strip", psd0);
449  }
450  {
452  psd0.add<std::string>("name", "Delta_X_Strip_Primary");
453  psd0.add<std::string>("title", "#Delta X " + striptag + ";Cluster resolution X coordinate [#mum]");
454  psd0.add<bool>("switch", true);
455  psd0.add<double>("xmin", -250);
456  psd0.add<double>("xmax", 250);
457  psd0.add<int>("NxBins", 100);
458  desc.add<edm::ParameterSetDescription>("Delta_X_Strip_Primary", psd0);
459  }
460  {
462  psd0.add<std::string>("name", "Delta_Y_Strip_Primary");
463  psd0.add<std::string>("title", "#Delta Y " + striptag + ";Cluster resolution Y coordinate [cm]");
464  psd0.add<double>("xmin", -5.0);
465  psd0.add<bool>("switch", true);
466  psd0.add<double>("xmax", 5.0);
467  psd0.add<int>("NxBins", 100);
468  desc.add<edm::ParameterSetDescription>("Delta_Y_Strip_Primary", psd0);
469  }
470 
471  {
473  psd0.add<std::string>("name", "Delta_X_vs_Eta_Strip");
474  psd0.add<std::string>("title", ";|#eta|;#Delta x [#mum]");
475  psd0.add<int>("NyBins", 250);
476  psd0.add<double>("ymin", -250.0);
477  psd0.add<double>("ymax", 250.0);
478  psd0.add<int>("NxBins", 41);
479  psd0.add<bool>("switch", true);
480  psd0.add<double>("xmax", 4.1);
481  psd0.add<double>("xmin", 0.);
482  desc.add<edm::ParameterSetDescription>("Delta_X_vs_eta_Strip", psd0);
483  }
484  {
486  psd0.add<std::string>("name", "Delta_Y_vs_Eta_Strip");
487  psd0.add<std::string>("title", ";|#eta|;#Delta y [cm]");
488  psd0.add<int>("NyBins", 100);
489  psd0.add<double>("ymin", -5.0);
490  psd0.add<double>("ymax", 5.0);
491  psd0.add<int>("NxBins", 41);
492  psd0.add<bool>("switch", true);
493  psd0.add<double>("xmax", 4.1);
494  psd0.add<double>("xmin", 0.);
495  desc.add<edm::ParameterSetDescription>("Delta_Y_vs_eta_Strip", psd0);
496  }
497 
498  {
500  psd0.add<std::string>("name", "Delta_X_vs_Phi_Strip");
501  psd0.add<std::string>("title", ";#phi;#Delta x [#mum]");
502  psd0.add<int>("NyBins", 250);
503  psd0.add<double>("ymin", -250.0);
504  psd0.add<double>("ymax", 250.0);
505  psd0.add<int>("NxBins", 36);
506  psd0.add<bool>("switch", true);
507  psd0.add<double>("xmax", M_PI);
508  psd0.add<double>("xmin", -M_PI);
509  desc.add<edm::ParameterSetDescription>("Delta_X_vs_phi_Strip", psd0);
510  }
511  {
513  psd0.add<std::string>("name", "Delta_Y_vs_Phi_Strip");
514  psd0.add<std::string>("title", ";#phi;#Delta y [cm]");
515  psd0.add<int>("NyBins", 100);
516  psd0.add<double>("ymin", -5.0);
517  psd0.add<double>("ymax", 5.0);
518  psd0.add<int>("NxBins", 36);
519  psd0.add<bool>("switch", true);
520  psd0.add<double>("xmax", M_PI);
521  psd0.add<double>("xmin", -M_PI);
522  desc.add<edm::ParameterSetDescription>("Delta_Y_vs_phi_Strip", psd0);
523  }
524  //pulls strips
525  {
527  psd0.add<std::string>("name", "Pull_X_Strip");
528  psd0.add<std::string>("title", ";pull x;");
529  psd0.add<double>("xmin", -4.0);
530  psd0.add<bool>("switch", true);
531  psd0.add<double>("xmax", 4.0);
532  psd0.add<int>("NxBins", 100);
533  desc.add<edm::ParameterSetDescription>("Pull_X_Strip", psd0);
534  }
535  {
537  psd0.add<std::string>("name", "Pull_Y_Strip");
538  psd0.add<std::string>("title", ";pull y;");
539  psd0.add<double>("xmin", -4.0);
540  psd0.add<bool>("switch", true);
541  psd0.add<double>("xmax", 4.0);
542  psd0.add<int>("NxBins", 100);
543  desc.add<edm::ParameterSetDescription>("Pull_Y_Strip", psd0);
544  }
545 
546  {
548  psd0.add<std::string>("name", "Pull_X_Strip_Primary");
549  psd0.add<std::string>("title", ";pull x;");
550  psd0.add<double>("xmin", -4.0);
551  psd0.add<bool>("switch", true);
552  psd0.add<double>("xmax", 4.0);
553  psd0.add<int>("NxBins", 100);
554  desc.add<edm::ParameterSetDescription>("Pull_X_Strip_Primary", psd0);
555  }
556  {
558  psd0.add<std::string>("name", "Pull_Y_Strip_Primary");
559  psd0.add<std::string>("title", ";pull y;");
560  psd0.add<double>("xmin", -4.0);
561  psd0.add<bool>("switch", true);
562  psd0.add<double>("xmax", 4.0);
563  psd0.add<int>("NxBins", 100);
564  desc.add<edm::ParameterSetDescription>("Pull_Y_Strip_Primary", psd0);
565  }
566  {
568  psd0.add<std::string>("name", "Pull_X_vs_Eta_Strip");
569  psd0.add<std::string>("title", ";#eta;pull x");
570  psd0.add<double>("ymax", 4.0);
571  psd0.add<int>("NxBins", 82);
572  psd0.add<bool>("switch", true);
573  psd0.add<double>("xmax", 4.1);
574  psd0.add<double>("xmin", -4.1);
575  psd0.add<double>("ymin", -4.0);
576  desc.add<edm::ParameterSetDescription>("Pull_X_vs_eta_Strip", psd0);
577  }
578  {
580  psd0.add<std::string>("name", "Pull_Y_vs_Eta_Strip");
581  psd0.add<std::string>("title", ";#eta;pull y");
582  psd0.add<double>("ymax", 4.0);
583  psd0.add<int>("NxBins", 82);
584  psd0.add<bool>("switch", true);
585  psd0.add<double>("xmax", 4.1);
586  psd0.add<double>("xmin", -4.1);
587  psd0.add<double>("ymin", -4.0);
588  desc.add<edm::ParameterSetDescription>("Pull_Y_vs_eta_Strip", psd0);
589  }
590  {
592  psd0.add<std::string>("name", "Number_RecHits_matched_PrimarySimTrack");
593  psd0.add<std::string>("title", "Number of RecHits matched to primary SimTrack;;");
594  psd0.add<double>("xmin", 0.0);
595  psd0.add<bool>("switch", true);
596  psd0.add<double>("xmax", 10000.0);
597  psd0.add<int>("NxBins", 100);
598  desc.add<edm::ParameterSetDescription>("nRecHits_Strip_primary", psd0);
599  }
600 }
601 
602 //define this as a plug-in
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
MonitorElement * book2DFromPSet(const edm::ParameterSet &hpars, DQMStore::IBooker &ibooker)
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
void fillOTRecHitHistos(const PSimHit *simhitClosest, const Phase2TrackerRecHit1D *rechit, const std::map< unsigned int, SimTrack > &selectedSimTrackMap, std::map< std::string, unsigned int > &nrechitLayerMapP_primary, std::map< std::string, unsigned int > &nrechitLayerMapS_primary)
static constexpr float cmtomicron
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
bool isPrimary(const SimTrack &simTrk, const PSimHit *simHit)
static void fillPSetDescription(edm::ParameterSetDescription &desc)
Phase2OTValidateRecHitBase(const edm::ParameterSet &)
MonitorElement * bookProfile1DFromPSet(const edm::ParameterSet &hpars, DQMStore::IBooker &ibooker)
void bookLayerHistos(DQMStore::IBooker &ibooker, unsigned int det_id, std::string &subdir)
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
std::string getOTHistoId(uint32_t det_id, const TrackerTopology *tTopo)
void bookHistograms(DQMStore::IBooker &ibooker, edm::Run const &iRun, edm::EventSetup const &iSetup) override
ModuleType getDetectorType(DetId) const
T sqrt(T t)
Definition: SSEVec.h:19
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
Transition
Definition: Transition.h:12
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
unsigned int trackId() const
Definition: PSimHit.h:108
ParameterDescriptionBase * add(U const &iLabel, T const &value)
MonitorElement * book1DFromPSet(const edm::ParameterSet &hpars, DQMStore::IBooker &ibooker)
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
#define M_PI
Log< level::Info, false > LogInfo
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
LocalError localPositionError() const override
DetId geographicalId() const
Local3DPoint localPosition() const
Definition: PSimHit.h:54
HLT enums.
void dqmBeginRun(const edm::Run &iRun, const edm::EventSetup &iSetup) override
LocalPoint localPosition() const override
Definition: Run.h:45
std::map< std::string, RecHitME > layerMEs_