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