CMS 3D CMS Logo

Phase2TrackerValidateDigi.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: Phase2TrackerValidateDigi
4 // Class: Phase2TrackerValidateDigi
5 //
11 //
12 // Author: Suchandra Dutta, Gourab Saha, Suvankar Roy Chowdhury, Subir Sarkar
13 // Date: January 29, 2016
14 //
15 // system include files
16 #include <memory>
18 
21 
24 
31 
38 
42 
43 // DQM Histograming
46 
47 //
48 // constructors
49 //
51  : config_(iConfig),
52  pixelFlag_(config_.getParameter<bool>("PixelPlotFillingFlag")),
53  geomType_(config_.getParameter<std::string>("GeometryType")),
54  otDigiSrc_(config_.getParameter<edm::InputTag>("OuterTrackerDigiSource")),
55  otDigiSimLinkSrc_(config_.getParameter<edm::InputTag>("OuterTrackerDigiSimLinkSource")),
56  itPixelDigiSrc_(config_.getParameter<edm::InputTag>("InnerPixelDigiSource")),
57  itPixelDigiSimLinkSrc_(config_.getParameter<edm::InputTag>("InnerPixelDigiSimLinkSource")),
58  pSimHitSrc_(config_.getParameter<std::vector<edm::InputTag>>("PSimHitSource")),
59  simTrackSrc_(config_.getParameter<edm::InputTag>("SimTrackSource")),
60  simVertexSrc_(config_.getParameter<edm::InputTag>("SimVertexSource")),
61  otDigiToken_(consumes<edm::DetSetVector<Phase2TrackerDigi>>(otDigiSrc_)),
62  otDigiSimLinkToken_(consumes<edm::DetSetVector<PixelDigiSimLink>>(otDigiSimLinkSrc_)),
63  itPixelDigiToken_(consumes<edm::DetSetVector<PixelDigi>>(itPixelDigiSrc_)),
64  itPixelDigiSimLinkToken_(consumes<edm::DetSetVector<PixelDigiSimLink>>(itPixelDigiSimLinkSrc_)),
65  simTrackToken_(consumes<edm::SimTrackContainer>(simTrackSrc_)),
66  simVertexToken_(consumes<edm::SimVertexContainer>(simVertexSrc_)),
68  topoToken_(esConsumes<TrackerTopology, TrackerTopologyRcd, edm::Transition::BeginRun>()),
69  GeVperElectron(3.61E-09), // 1 electron(3.61eV, 1keV(277e, mod 9/06 d.k.
70  cval(30.) {
71  for (const auto& itag : pSimHitSrc_)
72  simHitTokens_.push_back(consumes<edm::PSimHitContainer>(itag));
73 
74  etaCut_ = config_.getParameter<double>("EtaCutOff");
75  ptCut_ = config_.getParameter<double>("PtCutOff");
76  tofUpperCut_ = config_.getParameter<double>("TOFUpperCutOff");
77  tofLowerCut_ = config_.getParameter<double>("TOFLowerCutOff");
78 
79  edm::LogInfo("Phase2TrackerValidateDigi") << ">>> Construct Phase2TrackerValidateDigi ";
80 }
81 
82 //
83 // destructor
84 //
86  // do anything here that needs to be done at desctruction time
87  // (e.g. close files, deallocate resources etc.)
88  edm::LogInfo("Phase2TrackerValidateDigi") << ">>> Destroy Phase2TrackerValidateDigi ";
89 }
90 //
91 // -- DQM Begin Run
93  edm::ESWatcher<TrackerDigiGeometryRecord> theTkDigiGeomWatcher;
95  if (theTkDigiGeomWatcher.check(iSetup)) {
96  geomHandle = iSetup.getHandle(geomToken_);
97  }
98  if (!geomHandle.isValid())
99  return;
100  tkGeom_ = &(*geomHandle);
101 
102  tTopo_ = &iSetup.getData(topoToken_);
103 }
104 //
105 // -- Analyze
106 //
108  //Digis
110  otdigis_ = &iEvent.get(otDigiToken_);
111  // DigiSimLink
114 
115  // SimTrack
116  simTracks = iEvent.getHandle(simTrackToken_);
117  // SimVertex
118  simVertices = iEvent.getHandle(simVertexToken_);
119 
120  // Fil # of SIM Vertices@
121  nSimVertices->Fill((*simVertices).size());
122  // Loop over Sim Tracks and Fill relevant histograms
123  int nTracks = 0;
124  int nTracksP = 0;
125  int nTracksS = 0;
126  for (edm::SimTrackContainer::const_iterator simTrkItr = simTracks->begin(); simTrkItr != simTracks->end();
127  ++simTrkItr) {
128  if (simTrkItr->charge() == 0)
129  continue;
130  int vtxIndex = simTrkItr->vertIndex();
131  int vtxParent = -1;
132  if (vtxIndex > 0) {
133  SimVertex vtx = (*simVertices)[vtxIndex];
134  if (!vtx.noParent()) {
135  int trkId = vtx.parentIndex();
136  vtxParent = (*simTracks)[matchedSimTrack(simTracks, trkId)].vertIndex();
137  }
138  }
139  int simTk_type = -1;
140  if (vtxIndex == 0 || vtxParent == 0)
141  simTk_type = 1;
142  else
143  simTk_type = 0;
144  nTracks++;
145  if (simTk_type == 1)
146  nTracksP++;
147  else
148  nTracksS++;
149 
150  float simTk_pt = simTrkItr->momentum().pt();
151  float simTk_eta = simTrkItr->momentum().eta();
152  float simTk_phi = simTrkItr->momentum().phi();
153 
154  if (fabs(simTk_eta) < etaCut_)
156  if (simTk_pt > ptCut_)
158  if (fabs(simTk_eta) < etaCut_ && simTk_pt > ptCut_)
160 
161  // initialize
162  for (auto& it : layerMEs) {
163  it.second.nDigis = 0;
164  it.second.nHits = 0;
165  }
166  fillSimHitInfo(iEvent, (*simTrkItr));
167 
168  int nHitCutoff = 2;
169  if (pixelFlag_)
170  nHitCutoff = 1;
171  for (auto& it : layerMEs) {
172  DigiMEs& local_mes = it.second;
173  if (it.second.nHits < nHitCutoff) {
174  if (std::fabs(simTk_eta) < 1.0)
175  local_mes.MissedHitTrackPt->Fill(simTk_pt);
176  if (simTk_pt > ptCut_ && std::fabs(simTk_eta) < 1.0)
177  local_mes.MissedHitTrackEta->Fill(simTk_eta);
178  if (std::fabs(simTk_eta) < 1.0 && simTk_pt > ptCut_)
179  local_mes.MissedHitTrackPhi->Fill(simTk_phi);
180  }
181  }
182  }
184  nSimulatedTracksP->Fill(nTracksP);
185  nSimulatedTracksS->Fill(nTracksS);
186  if (pixelFlag_)
188  else
189  fillOTBXInfo();
190 }
191 
193  int totalHits = 0;
194  unsigned int id = simTrk.trackId();
195  // Get digis
196 
197  for (const auto& itoken : simHitTokens_) {
198  const auto& simHitHandle = iEvent.getHandle(itoken);
199  if (!simHitHandle.isValid())
200  continue;
201  const edm::PSimHitContainer& simHits = (*simHitHandle.product());
202  for (edm::PSimHitContainer::const_iterator isim = simHits.begin(); isim != simHits.end(); ++isim) {
203  if ((*isim).trackId() != id)
204  continue;
205  const PSimHit& simHit = (*isim);
206 
207  if (!isPrimary(simTrk, simHit))
208  continue;
209 
210  unsigned int rawid = (*isim).detUnitId();
211  int layer;
212  if (pixelFlag_)
214  else
215  layer = tTopo_->getOTLayerNumber(rawid);
216  if (layer < 0)
217  continue;
219  auto pos = layerMEs.find(key);
220  if (pos == layerMEs.end())
221  continue;
222  DigiMEs& local_mes = pos->second;
223 
224  const DetId detId(rawid);
225  float dZ = (*isim).entryPoint().z() - (*isim).exitPoint().z();
226  if (fabs(dZ) <= 0.01)
227  continue;
228 
229  if (DetId(detId).det() != DetId::Detector::Tracker)
230  continue;
231 
232  const GeomDet* geomDet = tkGeom_->idToDet(detId);
233  if (!geomDet)
234  continue;
235  Global3DPoint pdPos = geomDet->surface().toGlobal(isim->localPosition());
236 
237  if (((*isim).tof() - pdPos.mag() / cval) < tofLowerCut_ || ((*isim).tof() - pdPos.mag() / cval) > tofUpperCut_)
238  continue;
239 
241  SimulatedXYPositionMap->Fill(pdPos.x() * 10., pdPos.y() * 10.);
243  SimulatedRZPositionMap->Fill(pdPos.z() * 10., std::hypot(pdPos.x(), pdPos.y()) * 10.);
244 
245  const TrackerGeomDet* geomDetUnit(tkGeom_->idToDetUnit(detId));
246  const Phase2TrackerGeomDetUnit* tkDetUnit = dynamic_cast<const Phase2TrackerGeomDetUnit*>(geomDetUnit);
247  int nColumns = tkDetUnit->specificTopology().ncolumns();
248 
249  float pt = simTrk.momentum().pt();
250  float eta = simTrk.momentum().eta();
251  float phi = simTrk.momentum().phi();
252  totalHits++;
253  pos->second.nHits++;
254 
255  if (local_mes.SimHitDx)
256  local_mes.SimHitDx->Fill(std::fabs((*isim).entryPoint().x() - (*isim).exitPoint().x()));
257  if (local_mes.SimHitDy)
258  local_mes.SimHitDy->Fill(std::fabs((*isim).entryPoint().y() - (*isim).exitPoint().y()));
259  if (local_mes.SimHitDz)
260  local_mes.SimHitDz->Fill(std::fabs((*isim).entryPoint().z() - (*isim).exitPoint().z()));
261 
262  if (SimulatedTOFEtaMap)
263  SimulatedTOFEtaMap->Fill(pdPos.eta(), (*isim).timeOfFlight());
264  if (SimulatedTOFPhiMap)
265  SimulatedTOFPhiMap->Fill(pdPos.phi(), (*isim).timeOfFlight());
266  if (SimulatedTOFRMap)
267  SimulatedTOFRMap->Fill(std::hypot(pdPos.x(), pdPos.y()), (*isim).timeOfFlight());
268  if (SimulatedTOFZMap)
269  SimulatedTOFZMap->Fill(pdPos.z(), (*isim).timeOfFlight());
270 
271  bool digiFlag;
272 
273  if (pixelFlag_)
274  digiFlag = findITPixelDigi(rawid, id);
275  else
276  digiFlag = findOTDigi(rawid, id);
277 
278  if (fabs(eta) < etaCut_) {
279  if (local_mes.SimTrackPt)
280  local_mes.SimTrackPt->Fill(pt);
281  if (digiFlag && local_mes.MatchedTrackPt)
282  local_mes.MatchedTrackPt->Fill(pt);
283  else if (local_mes.MissedDigiTrackPt)
284  local_mes.MissedDigiTrackPt->Fill(pt);
285  }
286  if (pt > ptCut_) {
287  if (local_mes.SimTrackEta)
288  local_mes.SimTrackEta->Fill(eta);
289  if (digiFlag && local_mes.MatchedTrackEta)
290  local_mes.MatchedTrackEta->Fill(eta);
291  else if (local_mes.MissedDigiTrackEta)
292  local_mes.MissedDigiTrackEta->Fill(eta);
293  }
294  if (fabs(eta) < etaCut_ && pt > ptCut_) {
295  if (local_mes.SimTrackPhi)
296  local_mes.SimTrackPhi->Fill(phi);
297  if (digiFlag && local_mes.MatchedTrackPhi)
298  local_mes.MatchedTrackPhi->Fill(phi);
299  else if (local_mes.MissedDigiTrackPhi)
300  local_mes.MissedDigiTrackPhi->Fill(phi);
301  }
302  if (digiFlag) {
303  pos->second.nDigis++;
305  MatchedRZPositionMap->Fill(pdPos.z() * 10., std::hypot(pdPos.x(), pdPos.y()) * 10.);
307  MatchedXYPositionMap->Fill(pdPos.x() * 10., pdPos.y() * 10.);
308  if (nColumns <= 2 && local_mes.MatchedSimHitElossS)
309  local_mes.MatchedSimHitElossS->Fill((*isim).energyLoss() / GeVperElectron);
310  else if (local_mes.MatchedSimHitElossP)
311  local_mes.MatchedSimHitElossP->Fill((*isim).energyLoss() / GeVperElectron);
312  } else {
313  if (local_mes.MissedDigiLocalXposVsYPos)
314  local_mes.MissedDigiLocalXposVsYPos->Fill((*isim).localPosition().x(), (*isim).localPosition().y());
315  if (local_mes.MissedDigiTimeWindow)
316  local_mes.MissedDigiTimeWindow->Fill(std::fabs((*isim).timeOfFlight() - pdPos.mag() / cval));
317  if (nColumns <= 2 && local_mes.MissedDigiSimHitElossS)
318  local_mes.MissedDigiSimHitElossS->Fill((*isim).energyLoss() / GeVperElectron);
319  else if (local_mes.MissedDigiSimHitElossP)
320  local_mes.MissedDigiSimHitElossP->Fill((*isim).energyLoss() / GeVperElectron);
321  }
322  }
323  }
324  return totalHits;
325 }
326 bool Phase2TrackerValidateDigi::findOTDigi(unsigned int detid, unsigned int id) {
327  bool matched = false;
329  if (DSVIter != otdigis_->end()) {
330  for (edm::DetSet<Phase2TrackerDigi>::const_iterator di = DSVIter->begin(); di != DSVIter->end(); di++) {
331  int col = di->column(); // column
332  int row = di->row(); // row
333  unsigned int channel = Phase2TrackerDigi::pixelToChannel(row, col);
334  unsigned int simTkId = getSimTrackId(otSimLink_, detid, channel);
335  if (simTkId == id) {
336  matched = true;
337  break;
338  }
339  }
340  }
341  return matched;
342 }
343 bool Phase2TrackerValidateDigi::findITPixelDigi(unsigned int detid, unsigned int id) {
344  bool matched = false;
346  if (DSVIter != itdigis_->end()) {
347  for (edm::DetSet<PixelDigi>::const_iterator di = DSVIter->begin(); di != DSVIter->end(); di++) {
348  int col = di->column(); // column
349  int row = di->row(); // row
350  unsigned int channel = PixelDigi::pixelToChannel(row, col);
351  unsigned int simTkId = getSimTrackId(itSimLink_, detid, channel);
352  if (simTkId == id) {
353  matched = true;
354  break;
355  }
356  }
357  }
358  return matched;
359 }
360 //
361 // -- Book Histograms
362 //
364  edm::Run const& iRun,
365  edm::EventSetup const& iSetup) {
366  std::string top_folder = config_.getParameter<std::string>("TopFolderName");
367  std::stringstream folder_name;
368 
369  ibooker.cd();
370  folder_name << top_folder << "/"
371  << "SimTrackInfo";
372  ibooker.setCurrentFolder(folder_name.str());
373 
374  edm::LogInfo("Phase2TrackerValidateDigi") << " Booking Histograms in : " << folder_name.str();
375  std::stringstream HistoName;
376 
377  HistoName.str("");
378  HistoName << "NumberOfSimulatedTracks";
379  nSimulatedTracks = ibooker.book1D(HistoName.str(), HistoName.str(), 501, -0.5, 500.5);
380 
381  HistoName.str("");
382  HistoName << "NumberOfSimulatedTracksP";
383  nSimulatedTracksP = ibooker.book1D(HistoName.str(), HistoName.str(), 501, -0.5, 500.5);
384 
385  HistoName.str("");
386  HistoName << "NumberOfSimulatedTracksS";
387  nSimulatedTracksS = ibooker.book1D(HistoName.str(), HistoName.str(), 501, -0.5, 500.5);
388 
389  HistoName.str("");
390  HistoName << "NumberOfSimulatedVertices";
391  nSimVertices = ibooker.book1D(HistoName.str(), HistoName.str(), 101, -0.5, 100.5);
392 
394  HistoName.str("");
395  HistoName << "SimulatedTrackPt";
396  if (Parameters.getParameter<bool>("switch"))
397  SimulatedTrackPt = ibooker.book1D(HistoName.str(),
398  HistoName.str(),
399  Parameters.getParameter<int32_t>("Nbins"),
400  Parameters.getParameter<double>("xmin"),
401  Parameters.getParameter<double>("xmax"));
402  else
403  SimulatedTrackPt = nullptr;
404  /*
405  HistoName.str("");
406  HistoName << "SimulatedTrackPt";
407  SimulatedTrackPt = ibooker.book1D(HistoName.str(),HistoName.str(),
408  Parameters.getParameter<int32_t>("Nbins"),
409  Parameters.getParameter<double>("xmin"),
410  Parameters.getParameter<double>("xmax");*/
411  HistoName.str("");
412  HistoName << "SimulatedTrackPtP";
413  if (Parameters.getParameter<bool>("switch"))
414  SimulatedTrackPtP = ibooker.book1D(HistoName.str(),
415  HistoName.str(),
416  Parameters.getParameter<int32_t>("Nbins"),
417  Parameters.getParameter<double>("xmin"),
418  Parameters.getParameter<double>("xmax"));
419  else
420  SimulatedTrackPtP = nullptr;
421  HistoName.str("");
422  HistoName << "SimulatedTrackPtS";
423  if (Parameters.getParameter<bool>("switch"))
424  SimulatedTrackPtS = ibooker.book1D(HistoName.str(),
425  HistoName.str(),
426  Parameters.getParameter<int32_t>("Nbins"),
427  Parameters.getParameter<double>("xmin"),
428  Parameters.getParameter<double>("xmax"));
429  else
430  SimulatedTrackPtS = nullptr;
431 
433  HistoName.str("");
434  HistoName << "SimulatedTrackEta";
435  if (Parameters.getParameter<bool>("switch"))
436  SimulatedTrackEta = ibooker.book1D(HistoName.str(),
437  HistoName.str(),
438  Parameters.getParameter<int32_t>("Nbins"),
439  Parameters.getParameter<double>("xmin"),
440  Parameters.getParameter<double>("xmax"));
441  else
442  SimulatedTrackEta = nullptr;
443  HistoName.str("");
444  HistoName << "SimulatedTrackEtaP";
445  if (Parameters.getParameter<bool>("switch"))
446  SimulatedTrackEtaP = ibooker.book1D(HistoName.str(),
447  HistoName.str(),
448  Parameters.getParameter<int32_t>("Nbins"),
449  Parameters.getParameter<double>("xmin"),
450  Parameters.getParameter<double>("xmax"));
451  else
452  SimulatedTrackEtaP = nullptr;
453  HistoName.str("");
454  HistoName << "SimulatedTrackEtaS";
455  if (Parameters.getParameter<bool>("switch"))
456  SimulatedTrackEtaS = ibooker.book1D(HistoName.str(),
457  HistoName.str(),
458  Parameters.getParameter<int32_t>("Nbins"),
459  Parameters.getParameter<double>("xmin"),
460  Parameters.getParameter<double>("xmax"));
461  else
462  SimulatedTrackEtaS = nullptr;
463 
465  HistoName.str("");
466  HistoName << "SimulatedTrackPhi";
467  if (Parameters.getParameter<bool>("switch"))
468  SimulatedTrackPhi = ibooker.book1D(HistoName.str(),
469  HistoName.str(),
470  Parameters.getParameter<int32_t>("Nbins"),
471  Parameters.getParameter<double>("xmin"),
472  Parameters.getParameter<double>("xmax"));
473  else
474  SimulatedTrackPhi = nullptr;
475 
476  HistoName.str("");
477  HistoName << "SimulatedTrackPhiP";
478  if (Parameters.getParameter<bool>("switch"))
479  SimulatedTrackPhiP = ibooker.book1D(HistoName.str(),
480  HistoName.str(),
481  Parameters.getParameter<int32_t>("Nbins"),
482  Parameters.getParameter<double>("xmin"),
483  Parameters.getParameter<double>("xmax"));
484  else
485  SimulatedTrackPhiP = nullptr;
486 
487  HistoName.str("");
488  HistoName << "SimulatedTrackPhiS";
489  if (Parameters.getParameter<bool>("switch"))
490  SimulatedTrackPhiS = ibooker.book1D(HistoName.str(),
491  HistoName.str(),
492  Parameters.getParameter<int32_t>("Nbins"),
493  Parameters.getParameter<double>("xmin"),
494  Parameters.getParameter<double>("xmax"));
495  else
496  SimulatedTrackPhiS = nullptr;
497 
498  Parameters = config_.getParameter<edm::ParameterSet>("XYPositionMapH");
499  HistoName.str("");
500  HistoName << "SimulatedXPosVsYPos";
501  if (Parameters.getParameter<bool>("switch"))
502  SimulatedXYPositionMap = ibooker.book2D(HistoName.str(),
503  HistoName.str(),
504  Parameters.getParameter<int32_t>("Nxbins"),
505  Parameters.getParameter<double>("xmin"),
506  Parameters.getParameter<double>("xmax"),
507  Parameters.getParameter<int32_t>("Nybins"),
508  Parameters.getParameter<double>("ymin"),
509  Parameters.getParameter<double>("ymax"));
510  else
511  SimulatedXYPositionMap = nullptr;
512 
513  Parameters = config_.getParameter<edm::ParameterSet>("RZPositionMapH");
514  HistoName.str("");
515  HistoName << "SimulatedRPosVsZPos";
516  if (Parameters.getParameter<bool>("switch"))
517  SimulatedRZPositionMap = ibooker.book2D(HistoName.str(),
518  HistoName.str(),
519  Parameters.getParameter<int32_t>("Nxbins"),
520  Parameters.getParameter<double>("xmin"),
521  Parameters.getParameter<double>("xmax"),
522  Parameters.getParameter<int32_t>("Nybins"),
523  Parameters.getParameter<double>("ymin"),
524  Parameters.getParameter<double>("ymax"));
525  else
526  SimulatedRZPositionMap = nullptr;
527 
528  //add TOF maps
530  HistoName.str("");
531  HistoName << "SimulatedTOFVsEta";
532  if (Parameters.getParameter<bool>("switch"))
533  SimulatedTOFEtaMap = ibooker.book2D(HistoName.str(),
534  HistoName.str(),
535  Parameters.getParameter<int32_t>("Nxbins"),
536  Parameters.getParameter<double>("xmin"),
537  Parameters.getParameter<double>("xmax"),
538  Parameters.getParameter<int32_t>("Nybins"),
539  Parameters.getParameter<double>("ymin"),
540  Parameters.getParameter<double>("ymax"));
541  else
542  SimulatedTOFEtaMap = nullptr;
544  HistoName.str("");
545  HistoName << "SimulatedTOFVsPhi";
546  if (Parameters.getParameter<bool>("switch"))
547  SimulatedTOFPhiMap = ibooker.book2D(HistoName.str(),
548  HistoName.str(),
549  Parameters.getParameter<int32_t>("Nxbins"),
550  Parameters.getParameter<double>("xmin"),
551  Parameters.getParameter<double>("xmax"),
552  Parameters.getParameter<int32_t>("Nybins"),
553  Parameters.getParameter<double>("ymin"),
554  Parameters.getParameter<double>("ymax"));
555  else
556  SimulatedTOFPhiMap = nullptr;
558  HistoName.str("");
559  HistoName << "SimulatedTOFVsR";
560  if (Parameters.getParameter<bool>("switch"))
561  SimulatedTOFRMap = ibooker.book2D(HistoName.str(),
562  HistoName.str(),
563  Parameters.getParameter<int32_t>("Nxbins"),
564  Parameters.getParameter<double>("xmin"),
565  Parameters.getParameter<double>("xmax"),
566  Parameters.getParameter<int32_t>("Nybins"),
567  Parameters.getParameter<double>("ymin"),
568  Parameters.getParameter<double>("ymax"));
569  else
570  SimulatedTOFRMap = nullptr;
572  HistoName.str("");
573  HistoName << "SimulatedTOFVsZ";
574  if (Parameters.getParameter<bool>("switch"))
575  SimulatedTOFZMap = ibooker.book2D(HistoName.str(),
576  HistoName.str(),
577  Parameters.getParameter<int32_t>("Nxbins"),
578  Parameters.getParameter<double>("xmin"),
579  Parameters.getParameter<double>("xmax"),
580  Parameters.getParameter<int32_t>("Nybins"),
581  Parameters.getParameter<double>("ymin"),
582  Parameters.getParameter<double>("ymax"));
583  else
584  SimulatedTOFZMap = nullptr;
585 
586  edm::ESWatcher<TrackerDigiGeometryRecord> theTkDigiGeomWatcher;
587  if (theTkDigiGeomWatcher.check(iSetup)) {
588  for (auto const& det_u : tkGeom_->detUnits()) {
589  unsigned int detId_raw = det_u->geographicalId().rawId();
590  bookLayerHistos(ibooker, detId_raw, pixelFlag_);
591  }
592  }
593  ibooker.cd();
594  folder_name.str("");
595  folder_name << top_folder << "/"
596  << "DigiMonitor";
597  ibooker.setCurrentFolder(folder_name.str());
598 
599  Parameters = config_.getParameter<edm::ParameterSet>("XYPositionMapH");
600  HistoName.str("");
601  HistoName << "MatchedSimXPosVsYPos";
602  if (Parameters.getParameter<bool>("switch"))
603  MatchedXYPositionMap = ibooker.book2D(HistoName.str(),
604  HistoName.str(),
605  Parameters.getParameter<int32_t>("Nxbins"),
606  Parameters.getParameter<double>("xmin"),
607  Parameters.getParameter<double>("xmax"),
608  Parameters.getParameter<int32_t>("Nybins"),
609  Parameters.getParameter<double>("ymin"),
610  Parameters.getParameter<double>("ymax"));
611  else
612  MatchedXYPositionMap = nullptr;
613 
614  Parameters = config_.getParameter<edm::ParameterSet>("RZPositionMapH");
615  HistoName.str("");
616  HistoName << "MatchedSimRPosVsZPos";
617  if (Parameters.getParameter<bool>("switch"))
618  MatchedRZPositionMap = ibooker.book2D(HistoName.str(),
619  HistoName.str(),
620  Parameters.getParameter<int32_t>("Nxbins"),
621  Parameters.getParameter<double>("xmin"),
622  Parameters.getParameter<double>("xmax"),
623  Parameters.getParameter<int32_t>("Nybins"),
624  Parameters.getParameter<double>("ymin"),
625  Parameters.getParameter<double>("ymax"));
626  else
627  MatchedRZPositionMap = nullptr;
628 }
629 //
630 // -- Book Layer Histograms
631 //
632 void Phase2TrackerValidateDigi::bookLayerHistos(DQMStore::IBooker& ibooker, unsigned int det_id, bool flag) {
633  int layer;
634  if (flag)
636  else
637  layer = tTopo_->getOTLayerNumber(det_id);
638 
639  if (layer < 0)
640  return;
641 
642  std::string key = getHistoId(det_id, flag);
643  std::map<std::string, DigiMEs>::iterator pos = layerMEs.find(key);
644  if (pos == layerMEs.end()) {
645  std::string top_folder = config_.getParameter<std::string>("TopFolderName");
646  std::stringstream folder_name;
647 
648  //For endCap: P-type sensors are present only upto ring 10 for discs 1&2 (TEDD-1) and upto ring 7 for discs 3,4&5 (TEDD-2)
649  bool isPStypeModForTEDD_1 =
650  (!pixelFlag_ && layer > 100 && tTopo_->tidWheel(det_id) < 3 && tTopo_->tidRing(det_id) <= 10) ? true : false;
651  bool isPStypeModForTEDD_2 =
652  (!pixelFlag_ && layer > 100 && tTopo_->tidWheel(det_id) >= 3 && tTopo_->tidRing(det_id) <= 7) ? true : false;
653 
654  bool isPtypeSensor =
655  (flag || (layer < 4 || (layer > 6 && (isPStypeModForTEDD_1 || isPStypeModForTEDD_2)))) ? true : false;
656 
657  ibooker.cd();
658  ibooker.setCurrentFolder(top_folder + "/DigiMonitor/" + key);
659  edm::LogInfo("Phase2TrackerValidateDigi") << " Booking Histograms in : " << key;
660 
661  std::ostringstream HistoName;
662  DigiMEs local_mes;
663 
665  HistoName.str("");
666  HistoName << "SimTrackPt";
667  if (Parameters.getParameter<bool>("switch"))
668  local_mes.SimTrackPt = ibooker.book1D(HistoName.str(),
669  HistoName.str(),
670  Parameters.getParameter<int32_t>("Nbins"),
671  Parameters.getParameter<double>("xmin"),
672  Parameters.getParameter<double>("xmax"));
673  else
674  local_mes.SimTrackPt = nullptr;
675  HistoName.str("");
676  HistoName << "MatchedTrackPt";
677  if (Parameters.getParameter<bool>("switch"))
678  local_mes.MatchedTrackPt = ibooker.book1D(HistoName.str(),
679  HistoName.str(),
680  Parameters.getParameter<int32_t>("Nbins"),
681  Parameters.getParameter<double>("xmin"),
682  Parameters.getParameter<double>("xmax"));
683  else
684  local_mes.MatchedTrackPt = nullptr;
685  HistoName.str("");
686  HistoName << "MissedHitTrackPt";
687  if (Parameters.getParameter<bool>("switch"))
688  local_mes.MissedHitTrackPt = ibooker.book1D(HistoName.str(),
689  HistoName.str(),
690  Parameters.getParameter<int32_t>("Nbins"),
691  Parameters.getParameter<double>("xmin"),
692  Parameters.getParameter<double>("xmax"));
693  else
694  local_mes.MissedHitTrackPt = nullptr;
695  HistoName.str("");
696  HistoName << "MissedDigiTrackPt";
697  if (Parameters.getParameter<bool>("switch"))
698  local_mes.MissedDigiTrackPt = ibooker.book1D(HistoName.str(),
699  HistoName.str(),
700  Parameters.getParameter<int32_t>("Nbins"),
701  Parameters.getParameter<double>("xmin"),
702  Parameters.getParameter<double>("xmax"));
703  else
704  local_mes.MissedDigiTrackPt = nullptr;
705 
707  HistoName.str("");
708  HistoName << "SimTrackEta";
709  if (Parameters.getParameter<bool>("switch"))
710  local_mes.SimTrackEta = ibooker.book1D(HistoName.str(),
711  HistoName.str(),
712  Parameters.getParameter<int32_t>("Nbins"),
713  Parameters.getParameter<double>("xmin"),
714  Parameters.getParameter<double>("xmax"));
715  else
716  local_mes.SimTrackEta = nullptr;
717  HistoName.str("");
718  HistoName << "MatchedTrackEta";
719  if (Parameters.getParameter<bool>("switch"))
720  local_mes.MatchedTrackEta = ibooker.book1D(HistoName.str(),
721  HistoName.str(),
722  Parameters.getParameter<int32_t>("Nbins"),
723  Parameters.getParameter<double>("xmin"),
724  Parameters.getParameter<double>("xmax"));
725  else
726  local_mes.MatchedTrackEta = nullptr;
727  HistoName.str("");
728  HistoName << "MissedHitTrackEta";
729  if (Parameters.getParameter<bool>("switch"))
730  local_mes.MissedHitTrackEta = ibooker.book1D(HistoName.str(),
731  HistoName.str(),
732  Parameters.getParameter<int32_t>("Nbins"),
733  Parameters.getParameter<double>("xmin"),
734  Parameters.getParameter<double>("xmax"));
735  else
736  local_mes.MissedHitTrackEta = nullptr;
737  HistoName.str("");
738  HistoName << "MissedDigiTrackEta";
739  if (Parameters.getParameter<bool>("switch"))
740  local_mes.MissedDigiTrackEta = ibooker.book1D(HistoName.str(),
741  HistoName.str(),
742  Parameters.getParameter<int32_t>("Nbins"),
743  Parameters.getParameter<double>("xmin"),
744  Parameters.getParameter<double>("xmax"));
745  else
746  local_mes.MissedDigiTrackEta = nullptr;
747 
749  HistoName.str("");
750  HistoName << "SimTrackPhi";
751  if (Parameters.getParameter<bool>("switch"))
752  local_mes.SimTrackPhi = ibooker.book1D(HistoName.str(),
753  HistoName.str(),
754  Parameters.getParameter<int32_t>("Nbins"),
755  Parameters.getParameter<double>("xmin"),
756  Parameters.getParameter<double>("xmax"));
757  else
758  local_mes.SimTrackPhi = nullptr;
759  HistoName.str("");
760  HistoName << "MatchedTrackPhi";
761  if (Parameters.getParameter<bool>("switch"))
762  local_mes.MatchedTrackPhi = ibooker.book1D(HistoName.str(),
763  HistoName.str(),
764  Parameters.getParameter<int32_t>("Nbins"),
765  Parameters.getParameter<double>("xmin"),
766  Parameters.getParameter<double>("xmax"));
767  else
768  local_mes.MatchedTrackPhi = nullptr;
769  HistoName.str("");
770  HistoName << "MissedHitTrackPhi";
771  if (Parameters.getParameter<bool>("switch"))
772  local_mes.MissedHitTrackPhi = ibooker.book1D(HistoName.str(),
773  HistoName.str(),
774  Parameters.getParameter<int32_t>("Nbins"),
775  Parameters.getParameter<double>("xmin"),
776  Parameters.getParameter<double>("xmax"));
777  else
778  local_mes.MissedHitTrackPhi = nullptr;
779  HistoName.str("");
780  HistoName << "MissedDigiTrackPhi";
781  if (Parameters.getParameter<bool>("switch"))
782  local_mes.MissedDigiTrackPhi = ibooker.book1D(HistoName.str(),
783  HistoName.str(),
784  Parameters.getParameter<int32_t>("Nbins"),
785  Parameters.getParameter<double>("xmin"),
786  Parameters.getParameter<double>("xmax"));
787  else
788  local_mes.MissedDigiTrackPhi = nullptr;
789 
791  if (!flag) {
792  HistoName.str("");
793  HistoName << "MatchedSimHitElossS";
794  if (Parameters.getParameter<bool>("switch"))
795  local_mes.MatchedSimHitElossS = ibooker.book1D(HistoName.str(),
796  HistoName.str(),
797  Parameters.getParameter<int32_t>("Nbins"),
798  Parameters.getParameter<double>("xmin"),
799  Parameters.getParameter<double>("xmax"));
800  else
801  local_mes.MatchedSimHitElossS = nullptr;
802  HistoName.str("");
803  HistoName << "MissedDigiSimHitElossS";
804  if (Parameters.getParameter<bool>("switch"))
805  local_mes.MissedDigiSimHitElossS = ibooker.book1D(HistoName.str(),
806  HistoName.str(),
807  Parameters.getParameter<int32_t>("Nbins"),
808  Parameters.getParameter<double>("xmin"),
809  Parameters.getParameter<double>("xmax"));
810  else
811  local_mes.MissedDigiSimHitElossS = nullptr;
812  }
813  if (isPtypeSensor) {
814  HistoName.str("");
815  HistoName << "MatchedSimHitElossP";
816  if (Parameters.getParameter<bool>("switch"))
817  local_mes.MatchedSimHitElossP = ibooker.book1D(HistoName.str(),
818  HistoName.str(),
819  Parameters.getParameter<int32_t>("Nbins"),
820  Parameters.getParameter<double>("xmin"),
821  Parameters.getParameter<double>("xmax"));
822  else
823  local_mes.MatchedSimHitElossP = nullptr;
824  HistoName.str("");
825  HistoName << "MissedDigiSimHitElossP";
826  if (Parameters.getParameter<bool>("switch"))
827  local_mes.MissedDigiSimHitElossP = ibooker.book1D(HistoName.str(),
828  HistoName.str(),
829  Parameters.getParameter<int32_t>("Nbins"),
830  Parameters.getParameter<double>("xmin"),
831  Parameters.getParameter<double>("xmax"));
832  else
833  local_mes.MissedDigiSimHitElossP = nullptr;
834  }
836  HistoName.str("");
837  HistoName << "SimHitDx";
838  if (Parameters.getParameter<bool>("switch"))
839  local_mes.SimHitDx = ibooker.book1D(HistoName.str(),
840  HistoName.str(),
841  Parameters.getParameter<int32_t>("Nbins"),
842  Parameters.getParameter<double>("xmin"),
843  Parameters.getParameter<double>("xmax"));
844  else
845  local_mes.SimHitDx = nullptr;
846 
848  HistoName.str("");
849  HistoName << "SimHitDy";
850  if (Parameters.getParameter<bool>("switch"))
851  local_mes.SimHitDy = ibooker.book1D(HistoName.str(),
852  HistoName.str(),
853  Parameters.getParameter<int32_t>("Nbins"),
854  Parameters.getParameter<double>("xmin"),
855  Parameters.getParameter<double>("xmax"));
856  else
857  local_mes.SimHitDy = nullptr;
858 
860  HistoName.str("");
861  HistoName << "SimHitDz";
862  if (Parameters.getParameter<bool>("switch"))
863  local_mes.SimHitDz = ibooker.book1D(HistoName.str(),
864  HistoName.str(),
865  Parameters.getParameter<int32_t>("Nbins"),
866  Parameters.getParameter<double>("xmin"),
867  Parameters.getParameter<double>("xmax"));
868  else
869  local_mes.SimHitDz = nullptr;
870 
871  HistoName.str("");
872  HistoName << "BunchXingWindow";
873  local_mes.BunchXTimeBin = ibooker.book1D(HistoName.str(), HistoName.str(), 8, -5.5, 2.5);
874 
875  HistoName.str("");
876  HistoName << "FractionOfOOTPUDigi";
877  local_mes.FractionOfOOTDigis = ibooker.bookProfile(HistoName.str(), HistoName.str(), 8, -5.5, 2.5, 0., 1.0, "s");
878 
879  HistoName.str("");
880  HistoName << "MissedDigiLocalXPosvsYPos";
881  local_mes.MissedDigiLocalXposVsYPos =
882  ibooker.book2D(HistoName.str(), HistoName.str(), 130, -6.5, 6.5, 130, -6.5, 6.5);
883 
885  HistoName.str("");
886  HistoName << "MissedDigiTimeWindow";
887  if (Parameters.getParameter<bool>("switch"))
888  local_mes.MissedDigiTimeWindow = ibooker.book1D(HistoName.str(), HistoName.str(), 100, -0.5, 49.5);
889  else
890  local_mes.MissedDigiTimeWindow = nullptr;
891  local_mes.nDigis = 0;
892  layerMEs.insert(std::make_pair(key, local_mes));
893  }
894 }
895 //
896 // -- Get SimTrack Id
897 //
899  const DetId& detId,
900  unsigned int& channel) {
902 
903  unsigned int simTrkId(0);
904  if (isearch == simLinks->end())
905  return simTrkId;
906 
907  edm::DetSet<PixelDigiSimLink> link_detset = (*simLinks)[detId];
908  // Loop over DigiSimLink in this det unit
909  int iSimLink = 0;
910  for (edm::DetSet<PixelDigiSimLink>::const_iterator it = link_detset.data.begin(); it != link_detset.data.end();
911  it++, iSimLink++) {
912  if (channel == it->channel()) {
913  simTrkId = it->SimTrackId();
914  break;
915  }
916  }
917  return simTrkId;
918 }
921  DSViter != otSimLink_->end();
922  DSViter++) {
923  unsigned int rawid = DSViter->id;
924  DetId detId(rawid);
925  if (DetId(detId).det() != DetId::Detector::Tracker)
926  continue;
927  int layer = tTopo_->getOTLayerNumber(rawid);
928  if (layer < 0)
929  continue;
930  bool flag_ = false;
931  std::string key = getHistoId(rawid, flag_);
932  std::map<std::string, DigiMEs>::iterator pos = layerMEs.find(key);
933  if (pos == layerMEs.end())
934  continue;
935  DigiMEs& local_mes = pos->second;
936  int tot_digi = 0;
937  std::map<int, float> bxMap;
938  for (typename edm::DetSet<PixelDigiSimLink>::const_iterator di = DSViter->begin(); di != DSViter->end(); di++) {
939  tot_digi++;
940  int bx = di->eventId().bunchCrossing();
941  std::map<int, float>::iterator ic = bxMap.find(bx);
942  if (ic == bxMap.end())
943  bxMap[bx] = 1.0;
944  else
945  bxMap[bx] += 1.0;
946  }
947  for (const auto& v : bxMap) {
948  if (tot_digi) {
949  local_mes.BunchXTimeBin->Fill(v.first, v.second);
950  local_mes.FractionOfOOTDigis->Fill(v.first, v.second / tot_digi);
951  }
952  }
953  }
954 }
957  DSViter != itSimLink_->end();
958  DSViter++) {
959  unsigned int rawid = DSViter->id;
960  DetId detId(rawid);
961  if (DetId(detId).det() != DetId::Detector::Tracker)
962  continue;
963  int layer = tTopo_->getITPixelLayerNumber(rawid);
964  if (layer < 0)
965  continue;
966  bool flag_ = true;
967  std::string key = getHistoId(rawid, flag_);
968  std::map<std::string, DigiMEs>::iterator pos = layerMEs.find(key);
969  if (pos == layerMEs.end())
970  continue;
971  DigiMEs& local_mes = pos->second;
972  int tot_digi = 0;
973  std::map<int, float> bxMap;
974  for (typename edm::DetSet<PixelDigiSimLink>::const_iterator di = DSViter->begin(); di != DSViter->end(); di++) {
975  tot_digi++;
976  int bx = di->eventId().bunchCrossing();
977  std::map<int, float>::iterator ic = bxMap.find(bx);
978  if (ic == bxMap.end())
979  bxMap[bx] = 1.0;
980  else
981  bxMap[bx] += 1.0;
982  }
983  for (const auto& v : bxMap) {
984  if (tot_digi) {
985  local_mes.BunchXTimeBin->Fill(v.first, v.second);
986  local_mes.FractionOfOOTDigis->Fill(v.first, v.second / tot_digi);
987  }
988  }
989  }
990 }
991 //
992 // -- Get Matched SimTrack
993 //
995  edm::SimTrackContainer sim_tracks = (*SimTk.product());
996  for (unsigned int it = 0; it < sim_tracks.size(); it++) {
997  if (sim_tracks[it].trackId() == simTrkId) {
998  return it;
999  }
1000  }
1001  return -1;
1002 }
1003 //
1004 // -- Check if the SimTrack is _Primary or not
1005 //
1007  bool retval = false;
1008  unsigned int trkId = simTrk.trackId();
1009  if (trkId != simHit.trackId())
1010  return retval;
1011  int vtxIndex = simTrk.vertIndex();
1012  int ptype = simHit.processType();
1013  if ((vtxIndex == 0) && (ptype == 0))
1014  retval = true;
1015  return retval;
1016 }
1017 //
1018 // -- Fill Histogram
1019 //
1021  MonitorElement* th1, MonitorElement* th2, MonitorElement* th3, float val, int primary) {
1022  if (th1)
1023  th1->Fill(val);
1024  if (th2 && primary == 1)
1025  th2->Fill(val);
1026  if (th3 && primary != 1)
1027  th3->Fill(val);
1028 }
1029 //
1030 // -- Fill NHit per Layer Histogram [Need to work on!!!]
1031 //
1032 /*
1033 void Phase2TrackerValidateDigi::fillHitsPerTrack() {
1034  for (const auto& it : layerMEs) {
1035  const DigiMEs& local_mes = it.second;
1036  unsigned int layer = it.first;
1037  int lval;
1038  if (layer < 10)
1039  lval = layer;
1040  else if (layer / 100 == 1)
1041  lval = 100 - (layer + 10);
1042  else if (layer / 100 == 2)
1043  lval = (layer + 10) - 200;
1044  else
1045  lval = 0;
1046  nSimHitsPerTrack->Fill(lval, local_mes.nHits);
1047  }
1048 }
1049 */
1051  if (flag)
1052  return phase2tkutil::getITHistoId(det_id, tTopo_);
1053  else
1054  return phase2tkutil::getOTHistoId(det_id, tTopo_);
1055 }
1056 
1057 //define this as a plug-in
muonTagProbeFilters_cff.matched
matched
Definition: muonTagProbeFilters_cff.py:62
TrackerGeometry::idToDet
const TrackerGeomDet * idToDet(DetId) const override
Definition: TrackerGeometry.cc:193
edm::ESWatcher::check
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:57
Phase2TrackerValidateDigi::GeVperElectron
const float GeVperElectron
Definition: Phase2TrackerValidateDigi.h:152
edm::DetSetVector< PixelDigiSimLink >
Phase2TrackerValidateDigi::DigiMEs::MatchedTrackEta
MonitorElement * MatchedTrackEta
Definition: Phase2TrackerValidateDigi.h:44
PixelDigiCollection.h
dqm::impl::MonitorElement
Definition: MonitorElement.h:98
CoreSimTrack::momentum
const math::XYZTLorentzVectorD & momentum() const
Definition: CoreSimTrack.h:19
Phase2TrackerValidateDigi::DigiMEs::MissedHitTrackPhi
MonitorElement * MissedHitTrackPhi
Definition: Phase2TrackerValidateDigi.h:46
Phase2TrackerValidateDigi::getSimTrackId
unsigned int getSimTrackId(const edm::DetSetVector< PixelDigiSimLink > *simLinks, const DetId &detId, unsigned int &channel)
Definition: Phase2TrackerValidateDigi.cc:898
electrons_cff.bool
bool
Definition: electrons_cff.py:366
Phase2TrackerValidateDigi::MatchedRZPositionMap
MonitorElement * MatchedRZPositionMap
Definition: Phase2TrackerValidateDigi.h:89
Phase2TrackerValidateDigi::getHistoId
std::string getHistoId(uint32_t det_id, bool flag)
Definition: Phase2TrackerValidateDigi.cc:1050
SimVertex
Definition: SimVertex.h:5
Phase2TrackerValidateDigi::DigiMEs::MatchedTrackPt
MonitorElement * MatchedTrackPt
Definition: Phase2TrackerValidateDigi.h:42
MessageLogger.h
TrackerGeometry.h
GeomDet
Definition: GeomDet.h:27
edm::Handle::product
T const * product() const
Definition: Handle.h:70
edm::ESWatcher< TrackerDigiGeometryRecord >
edm::DetSetVector::end
iterator end()
Return the off-the-end iterator.
Definition: DetSetVector.h:325
Phase2TrackerValidateDigi::matchedSimTrack
int matchedSimTrack(edm::Handle< edm::SimTrackContainer > &SimTk, unsigned int simTrkId)
Definition: Phase2TrackerValidateDigi.cc:994
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
edm::DetSet
Definition: DetSet.h:23
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
Phase2TrackerValidateDigi::SimulatedTrackPtP
MonitorElement * SimulatedTrackPtP
Definition: Phase2TrackerValidateDigi.h:77
edm::Run
Definition: Run.h:45
TrackerTopology::getITPixelLayerNumber
int getITPixelLayerNumber(const DetId &id) const
Definition: TrackerTopology.cc:436
TrackerTopology::getOTLayerNumber
int getOTLayerNumber(const DetId &id) const
Definition: TrackerTopology.cc:421
Phase2TrackerValidateDigi::~Phase2TrackerValidateDigi
~Phase2TrackerValidateDigi() override
Definition: Phase2TrackerValidateDigi.cc:85
edm
HLT enums.
Definition: AlignableModifier.h:19
Phase2TrackerValidateDigi::simHitTokens_
std::vector< edm::EDGetTokenT< edm::PSimHitContainer > > simHitTokens_
Definition: Phase2TrackerValidateDigi.h:143
TrackerTopology
Definition: TrackerTopology.h:16
Phase2TrackerValidateDigi::DigiMEs
Definition: Phase2TrackerValidateDigi.h:38
cuy.col
col
Definition: cuy.py:1009
pos
Definition: PixelAliasList.h:18
PSimHitContainer.h
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89301
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
TrackerGeomDet
Definition: TrackerGeomDet.h:6
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
PixelDigi
Definition: PixelDigi.h:14
OfflineHarvestingSequence_cosmic.ptype
ptype
Definition: OfflineHarvestingSequence_cosmic.py:7
Phase2TrackerValidateDigi::fillSimHitInfo
int fillSimHitInfo(const edm::Event &iEvent, const SimTrack simTrk)
Definition: Phase2TrackerValidateDigi.cc:192
edm::DetSetVector::begin
iterator begin()
Return an iterator to the first DetSet.
Definition: DetSetVector.h:314
Phase2TrackerValidateDigi::DigiMEs::MissedDigiTrackPhi
MonitorElement * MissedDigiTrackPhi
Definition: Phase2TrackerValidateDigi.h:49
Phase2TrackerValidateDigi::DigiMEs::MatchedTrackPhi
MonitorElement * MatchedTrackPhi
Definition: Phase2TrackerValidateDigi.h:43
Phase2TrackerValidateDigi::DigiMEs::MatchedSimHitElossS
MonitorElement * MatchedSimHitElossS
Definition: Phase2TrackerValidateDigi.h:54
Phase2TrackerValidateDigi::DigiMEs::SimHitDx
MonitorElement * SimHitDx
Definition: Phase2TrackerValidateDigi.h:55
PixelDigi.h
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
Phase2TrackerValidateDigi::tofLowerCut_
float tofLowerCut_
Definition: Phase2TrackerValidateDigi.h:100
Phase2TrackerValidateDigi::DigiMEs::SimHitDz
MonitorElement * SimHitDz
Definition: Phase2TrackerValidateDigi.h:57
findQualityFiles.v
v
Definition: findQualityFiles.py:179
Phase2TrackerValidateDigi::DigiMEs::BunchXTimeBin
MonitorElement * BunchXTimeBin
Definition: Phase2TrackerValidateDigi.h:58
BeamSpotPI::nTracks
Definition: BeamSpotPayloadInspectorHelper.h:42
edm::Handle< edm::SimTrackContainer >
TrackerTopology::tidRing
unsigned int tidRing(const DetId &id) const
Definition: TrackerTopology.h:218
Phase2TrackerValidateDigi::cval
const float cval
Definition: Phase2TrackerValidateDigi.h:153
TrackerTopology::tidWheel
unsigned int tidWheel(const DetId &id) const
Definition: TrackerTopology.h:201
Phase2TrackerDigi::pixelToChannel
static PackedDigiType pixelToChannel(unsigned int row, unsigned int col)
Definition: Phase2TrackerDigi.h:43
Phase2TrackerValidateDigi::SimulatedTOFZMap
MonitorElement * SimulatedTOFZMap
Definition: Phase2TrackerValidateDigi.h:94
align::Tracker
Definition: StructureType.h:70
TrackerGeometry::idToDetUnit
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
Definition: TrackerGeometry.cc:183
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
Phase2TrackerValidateDigi::tkGeom_
const TrackerGeometry * tkGeom_
Definition: Phase2TrackerValidateDigi.h:149
DetId
Definition: DetId.h:17
Phase2TrackerValidateDigi.h
GeomDet::surface
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
MakerMacros.h
TrackerTopology.h
Phase2TrackerValidateDigi::SimulatedTOFPhiMap
MonitorElement * SimulatedTOFPhiMap
Definition: Phase2TrackerValidateDigi.h:92
Phase2TrackerValidateDigi::findITPixelDigi
bool findITPixelDigi(unsigned int detid, unsigned int id)
Definition: Phase2TrackerValidateDigi.cc:343
Phase2TrackerValidateDigi::SimulatedTOFRMap
MonitorElement * SimulatedTOFRMap
Definition: Phase2TrackerValidateDigi.h:93
Phase2TrackerValidateDigi
Definition: Phase2TrackerValidateDigi.h:29
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
Phase2TrackerValidateDigi::simVertexToken_
const edm::EDGetTokenT< edm::SimVertexContainer > simVertexToken_
Definition: Phase2TrackerValidateDigi.h:138
TrackerGeometry::detUnits
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
Definition: TrackerGeometry.h:61
Phase2TrackerValidateDigi::topoToken_
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
Definition: Phase2TrackerValidateDigi.h:148
Service.h
PVValHelper::eta
Definition: PVValidationHelpers.h:70
rpcPointValidation_cfi.simHit
simHit
Definition: rpcPointValidation_cfi.py:24
Phase2TrackerValidateDigi::SimulatedTrackPhiP
MonitorElement * SimulatedTrackPhiP
Definition: Phase2TrackerValidateDigi.h:79
PixelGeomDetUnit
Definition: PixelGeomDetUnit.h:15
TrackerDigiGeometryRecord
Definition: TrackerDigiGeometryRecord.h:16
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
Phase2TrackerValidateDigi::isPrimary
bool isPrimary(const SimTrack &simTrk, const PSimHit &simHit)
Definition: Phase2TrackerValidateDigi.cc:1006
TrackerPhase2DQMUtil.h
Surface::toGlobal
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
Phase2TrackerValidateDigi::layerMEs
std::map< std::string, DigiMEs > layerMEs
Definition: Phase2TrackerValidateDigi.h:120
edm::ESHandle< TrackerGeometry >
Phase2TrackerValidateDigi::nSimVertices
MonitorElement * nSimVertices
Definition: Phase2TrackerValidateDigi.h:71
dqm::implementation::NavigatorBase::cd
virtual void cd()
Definition: DQMStore.cc:29
Phase2TrackerValidateDigi::SimulatedTrackPtS
MonitorElement * SimulatedTrackPtS
Definition: Phase2TrackerValidateDigi.h:81
dqm::implementation::IBooker::bookProfile
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:322
Phase2TrackerValidateDigi::DigiMEs::MissedDigiSimHitElossS
MonitorElement * MissedDigiSimHitElossS
Definition: Phase2TrackerValidateDigi.h:52
Phase2TrackerValidateDigi::DigiMEs::MissedHitTrackEta
MonitorElement * MissedHitTrackEta
Definition: Phase2TrackerValidateDigi.h:47
Phase2TrackerValidateDigi::fillOTBXInfo
void fillOTBXInfo()
Definition: Phase2TrackerValidateDigi.cc:919
Phase2TrackerValidateDigi::Phase2TrackerValidateDigi
Phase2TrackerValidateDigi(const edm::ParameterSet &)
Definition: Phase2TrackerValidateDigi.cc:50
Phase2TrackerValidateDigi::simTrackToken_
const edm::EDGetTokenT< edm::SimTrackContainer > simTrackToken_
Definition: Phase2TrackerValidateDigi.h:137
PixelDigi::pixelToChannel
static int pixelToChannel(int row, int col)
Definition: PixelDigi.h:75
Phase2TrackerValidateDigi::DigiMEs::FractionOfOOTDigis
MonitorElement * FractionOfOOTDigis
Definition: Phase2TrackerValidateDigi.h:59
Point3DBase< float, GlobalTag >
Phase2TrackerValidateDigi::DigiMEs::MissedDigiTimeWindow
MonitorElement * MissedDigiTimeWindow
Definition: Phase2TrackerValidateDigi.h:61
Phase2TrackerValidateDigi::DigiMEs::MissedDigiTrackPt
MonitorElement * MissedDigiTrackPt
Definition: Phase2TrackerValidateDigi.h:48
Phase2TrackerValidateDigi::DigiMEs::SimHitDy
MonitorElement * SimHitDy
Definition: Phase2TrackerValidateDigi.h:56
Phase2TrackerValidateDigi::SimulatedRZPositionMap
MonitorElement * SimulatedRZPositionMap
Definition: Phase2TrackerValidateDigi.h:86
PixelGeomDetType.h
Phase2TrackerValidateDigi::nSimulatedTracks
MonitorElement * nSimulatedTracks
Definition: Phase2TrackerValidateDigi.h:67
Phase2TrackerValidateDigi::pixelFlag_
bool pixelFlag_
Definition: Phase2TrackerValidateDigi.h:122
Phase2TrackerValidateDigi::itSimLink_
const edm::DetSetVector< PixelDigiSimLink > * itSimLink_
Definition: Phase2TrackerValidateDigi.h:140
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
Phase2TrackerValidateDigi::SimulatedTrackEtaP
MonitorElement * SimulatedTrackEtaP
Definition: Phase2TrackerValidateDigi.h:78
Phase2TrackerValidateDigi::MatchedXYPositionMap
MonitorElement * MatchedXYPositionMap
Definition: Phase2TrackerValidateDigi.h:88
Phase2TrackerValidateDigi::DigiMEs::MissedHitTrackPt
MonitorElement * MissedHitTrackPt
Definition: Phase2TrackerValidateDigi.h:45
funct::true
true
Definition: Factorize.h:173
Phase2TrackerValidateDigi::SimulatedTOFEtaMap
MonitorElement * SimulatedTOFEtaMap
Definition: Phase2TrackerValidateDigi.h:91
TrackerDigiGeometryRecord.h
Phase2TrackerValidateDigi::fillITPixelBXInfo
void fillITPixelBXInfo()
Definition: Phase2TrackerValidateDigi.cc:955
Phase2TrackerDigi.h
Phase2TrackerValidateDigi::DigiMEs::nDigis
int nDigis
Definition: Phase2TrackerValidateDigi.h:63
MonitorElement.h
Phase2TrackerValidateDigi::SimulatedTrackEta
MonitorElement * SimulatedTrackEta
Definition: Phase2TrackerValidateDigi.h:74
Phase2TrackerValidateDigi::otDigiToken_
const edm::EDGetTokenT< edm::DetSetVector< Phase2TrackerDigi > > otDigiToken_
Definition: Phase2TrackerValidateDigi.h:133
edm::ParameterSet
Definition: ParameterSet.h:47
edm::Transition
Transition
Definition: Transition.h:12
TrackerGeomDet.h
Phase2TrackerValidateDigi::SimulatedTrackPhiS
MonitorElement * SimulatedTrackPhiS
Definition: Phase2TrackerValidateDigi.h:83
Phase2TrackerValidateDigi::DigiMEs::SimTrackPhi
MonitorElement * SimTrackPhi
Definition: Phase2TrackerValidateDigi.h:41
Phase2TrackerValidateDigi::SimulatedTrackEtaS
MonitorElement * SimulatedTrackEtaS
Definition: Phase2TrackerValidateDigi.h:82
edm::DetSetVector::const_iterator
collection_type::const_iterator const_iterator
Definition: DetSetVector.h:102
fed_dqm_sourceclient-live_cfg.folder_name
folder_name
Definition: fed_dqm_sourceclient-live_cfg.py:42
PV3DBase::eta
T eta() const
Definition: PV3DBase.h:73
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
Phase2TrackerValidateDigi::analyze
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override
Definition: Phase2TrackerValidateDigi.cc:107
edm::DetSetVector::find
iterator find(det_id_type id)
Definition: DetSetVector.h:264
iEvent
int iEvent
Definition: GenABIO.cc:224
Phase2TrackerValidateDigi::dqmBeginRun
void dqmBeginRun(const edm::Run &iRun, const edm::EventSetup &iSetup) override
Definition: Phase2TrackerValidateDigi.cc:92
Phase2TrackerValidateDigi::itPixelDigiToken_
const edm::EDGetTokenT< edm::DetSetVector< PixelDigi > > itPixelDigiToken_
Definition: Phase2TrackerValidateDigi.h:135
Phase2TrackerValidateDigi::pSimHitSrc_
std::vector< edm::InputTag > pSimHitSrc_
Definition: Phase2TrackerValidateDigi.h:129
Phase2TrackerValidateDigi::itPixelDigiSimLinkToken_
const edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > itPixelDigiSimLinkToken_
Definition: Phase2TrackerValidateDigi.h:136
cscdqm::HistoName
std::string HistoName
Definition: CSCDQM_HistoDef.h:32
edm::EventSetup::getHandle
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:155
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
Phase2TrackerValidateDigi::nSimulatedTracksP
MonitorElement * nSimulatedTracksP
Definition: Phase2TrackerValidateDigi.h:68
Phase2TrackerValidateDigi::DigiMEs::MissedDigiLocalXposVsYPos
MonitorElement * MissedDigiLocalXposVsYPos
Definition: Phase2TrackerValidateDigi.h:60
edm::EventSetup
Definition: EventSetup.h:58
Phase2TrackerValidateDigi::DigiMEs::SimTrackEta
MonitorElement * SimTrackEta
Definition: Phase2TrackerValidateDigi.h:40
DetSetVector.h
Phase2TrackerValidateDigi::bookLayerHistos
void bookLayerHistos(DQMStore::IBooker &ibooker, unsigned int det_id, bool flag)
Definition: Phase2TrackerValidateDigi.cc:632
Phase2TrackerValidateDigi::DigiMEs::SimTrackPt
MonitorElement * SimTrackPt
Definition: Phase2TrackerValidateDigi.h:39
edm::ESHandleBase::isValid
bool isValid() const
Definition: ESHandle.h:44
Phase2TrackerValidateDigi::SimulatedTrackPhi
MonitorElement * SimulatedTrackPhi
Definition: Phase2TrackerValidateDigi.h:75
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
Phase2TrackerValidateDigi::DigiMEs::MissedDigiSimHitElossP
MonitorElement * MissedDigiSimHitElossP
Definition: Phase2TrackerValidateDigi.h:51
Phase2TrackerValidateDigi::nSimulatedTracksS
MonitorElement * nSimulatedTracksS
Definition: Phase2TrackerValidateDigi.h:69
InputTag.h
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
CoreSimTrack::trackId
unsigned int trackId() const
Definition: CoreSimTrack.h:31
DDAxes::phi
PV3DBase::mag
T mag() const
Definition: PV3DBase.h:64
Phase2TrackerValidateDigi::ptCut_
float ptCut_
Definition: Phase2TrackerValidateDigi.h:98
Phase2TrackerValidateDigi::tTopo_
const TrackerTopology * tTopo_
Definition: Phase2TrackerValidateDigi.h:150
Phase2TrackerValidateDigi::itdigis_
const edm::DetSetVector< PixelDigi > * itdigis_
Definition: Phase2TrackerValidateDigi.h:142
Phase2TrackerDigi
Definition: Phase2TrackerDigi.h:12
GeomDet.h
Phase2TrackerValidateDigi::DigiMEs::MatchedSimHitElossP
MonitorElement * MatchedSimHitElossP
Definition: Phase2TrackerValidateDigi.h:53
Phase2TrackerValidateDigi::simVertices
edm::Handle< edm::SimVertexContainer > simVertices
Definition: Phase2TrackerValidateDigi.h:146
heppy_batch.val
val
Definition: heppy_batch.py:351
Phase2TrackerValidateDigi::otdigis_
const edm::DetSetVector< Phase2TrackerDigi > * otdigis_
Definition: Phase2TrackerValidateDigi.h:141
std
Definition: JetResolutionObject.h:76
Phase2TrackerValidateDigi::otSimLink_
const edm::DetSetVector< PixelDigiSimLink > * otSimLink_
Definition: Phase2TrackerValidateDigi.h:139
phase2tkutil::getITHistoId
std::string getITHistoId(uint32_t det_id, const TrackerTopology *tTopo)
Definition: TrackerPhase2DQMUtil.cc:2
Phase2TrackerValidateDigi::simHits
edm::Handle< edm::PSimHitContainer > simHits
Definition: Phase2TrackerValidateDigi.h:144
Phase2TrackerValidateDigi::bookHistograms
void bookHistograms(DQMStore::IBooker &ibooker, edm::Run const &iRun, edm::EventSetup const &iSetup) override
Definition: Phase2TrackerValidateDigi.cc:363
extraflags_cff.vtx
vtx
Definition: extraflags_cff.py:19
edm::SimTrackContainer
std::vector< SimTrack > SimTrackContainer
Definition: SimTrackContainer.h:12
SimTrack
Definition: SimTrack.h:9
ESWatcher.h
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
dqm::implementation::IBooker::book2D
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
PixelGeomDetUnit.h
edm::DetSet::data
collection_type data
Definition: DetSet.h:80
SimTrack::vertIndex
int vertIndex() const
index of the vertex in the Event container (-1 if no vertex)
Definition: SimTrack.h:33
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
Phase2TrackerValidateDigi::fillHistogram
void fillHistogram(MonitorElement *th1, MonitorElement *th2, MonitorElement *th3, float val, int primary)
Definition: Phase2TrackerValidateDigi.cc:1020
dqm::implementation::IBooker
Definition: DQMStore.h:43
Phase2TrackerValidateDigi::DigiMEs::MissedDigiTrackEta
MonitorElement * MissedDigiTrackEta
Definition: Phase2TrackerValidateDigi.h:50
Phase2TrackerValidateDigi::etaCut_
float etaCut_
Definition: Phase2TrackerValidateDigi.h:97
Phase2TrackerDigitizerFwd.h
edm::PSimHitContainer
std::vector< PSimHit > PSimHitContainer
Definition: PSimHitContainer.h:11
TrackerTopologyRcd
Definition: TrackerTopologyRcd.h:10
Phase2TrackerValidateDigi::SimulatedTrackPt
MonitorElement * SimulatedTrackPt
Definition: Phase2TrackerValidateDigi.h:73
Phase2TrackerValidateDigi::config_
edm::ParameterSet config_
Definition: Phase2TrackerValidateDigi.h:119
PSimHit
Definition: PSimHit.h:15
Phase2TrackerValidateDigi::SimulatedXYPositionMap
MonitorElement * SimulatedXYPositionMap
Definition: Phase2TrackerValidateDigi.h:85
DeDxTools::esConsumes
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
edm::Event
Definition: Event.h:73
Parameters
vector< ParameterSet > Parameters
Definition: HLTMuonPlotter.cc:25
Phase2TrackerValidateDigi::otDigiSimLinkToken_
const edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > otDigiSimLinkToken_
Definition: Phase2TrackerValidateDigi.h:134
crabWrapper.key
key
Definition: crabWrapper.py:19
Phase2TrackerValidateDigi::findOTDigi
bool findOTDigi(unsigned int detid, unsigned int id)
Definition: Phase2TrackerValidateDigi.cc:326
edm::SimVertexContainer
std::vector< SimVertex > SimVertexContainer
Definition: SimVertexContainer.h:12
flag_
struct @715 flag_
PV3DBase::phi
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
Phase2TrackerValidateDigi::simTracks
edm::Handle< edm::SimTrackContainer > simTracks
Definition: Phase2TrackerValidateDigi.h:145
Phase2TrackerValidateDigi::geomToken_
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
Definition: Phase2TrackerValidateDigi.h:147
phase2tkutil::getOTHistoId
std::string getOTHistoId(uint32_t det_id, const TrackerTopology *tTopo)
Definition: TrackerPhase2DQMUtil.cc:25
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:117
Phase2TrackerValidateDigi::tofUpperCut_
float tofUpperCut_
Definition: Phase2TrackerValidateDigi.h:99
TrackerGeometry
Definition: TrackerGeometry.h:14
edm::DetSet::const_iterator
collection_type::const_iterator const_iterator
Definition: DetSet.h:31