CMS 3D CMS Logo

CTPPSDiamondDQMSource.cc
Go to the documentation of this file.
1 /****************************************************************************
2 *
3 * This is a part of CTPPS offline software.
4 * Authors:
5 * Jan Kašpar (jan.kaspar@gmail.com)
6 * Nicola Minafra
7 * Laurent Forthomme
8 *
9 ****************************************************************************/
10 
20 
23 
28 
31 
34 
39 
40 #include <string>
41 
42 //----------------------------------------------------------------------------------------------------
43 
44 // Utility for efficiency computations
46  const CTPPSDiamondDetId& detid,
47  const CTPPSDiamondLocalTrack& localTrack,
48  const float tolerance = 1) {
49  const DetGeomDesc* det = geom->sensor(detid);
50  const float x_pos = det->translation().x(),
51  x_width = 2.0 * det->params().at(0); // parameters stand for half the size
52  return ((x_pos + 0.5 * x_width > localTrack.x0() - localTrack.x0Sigma() - tolerance &&
53  x_pos + 0.5 * x_width < localTrack.x0() + localTrack.x0Sigma() + tolerance) ||
54  (x_pos - 0.5 * x_width > localTrack.x0() - localTrack.x0Sigma() - tolerance &&
55  x_pos - 0.5 * x_width < localTrack.x0() + localTrack.x0Sigma() + tolerance) ||
56  (x_pos - 0.5 * x_width < localTrack.x0() - localTrack.x0Sigma() - tolerance &&
57  x_pos + 0.5 * x_width > localTrack.x0() + localTrack.x0Sigma() + tolerance));
58 }
59 
60 namespace dds {
61  struct Cache {
62  std::unordered_map<unsigned int, std::unique_ptr<TH2F>> hitDistribution2dMap;
63 
64  std::unordered_map<unsigned int, unsigned long> hitsCounterMap;
65  };
66 } // namespace dds
67 
68 class CTPPSDiamondDQMSource : public DQMOneEDAnalyzer<edm::LuminosityBlockCache<dds::Cache>> {
69 public:
71  ~CTPPSDiamondDQMSource() override;
72 
73 protected:
74  void dqmBeginRun(const edm::Run&, const edm::EventSetup&) override;
75  void bookHistograms(DQMStore::IBooker&, const edm::Run&, const edm::EventSetup&) override;
76  void analyze(const edm::Event&, const edm::EventSetup&) override;
77  std::shared_ptr<dds::Cache> globalBeginLuminosityBlock(const edm::LuminosityBlock&,
78  const edm::EventSetup&) const override;
80 
81 private:
82  // Constants
83  static const double SEC_PER_LUMI_SECTION; // Number of seconds per lumisection: used to compute hit rates in Hz
84  static const int CHANNEL_OF_VFAT_CLOCK; // Channel ID of the VFAT that contains clock data
85  static const double DISPLAY_RESOLUTION_FOR_HITS_MM; // Bin width of histograms showing hits and tracks (in mm)
87  static const double HPTDC_BIN_WIDTH_NS; // ns per HPTDC bin
88  static const int CTPPS_NUM_OF_ARMS;
89  static const int CTPPS_DIAMOND_STATION_ID;
90  static const int CTPPS_DIAMOND_RP_ID;
91  static const int CTPPS_PIXEL_STATION_ID;
92  static const int CTPPS_NEAR_RP_ID;
93  static const int CTPPS_FAR_RP_ID;
94  static const int CTPPS_DIAMOND_NUM_OF_PLANES;
96  static const int CTPPS_FED_ID_45;
97  static const int CTPPS_FED_ID_56;
98 
105 
108 
112  std::vector<std::pair<edm::EventRange, int>> runParameters_;
114  unsigned int verbosity_;
115 
117  struct GlobalPlots {
119  GlobalPlots(DQMStore::IBooker& ibooker);
120  };
121 
123 
125  struct PotPlots {
126  std::unordered_map<unsigned int, MonitorElement*> activity_per_bx;
127 
133 
136 
137  std::unordered_map<unsigned int, MonitorElement*> pixelTomographyAll;
138 
143 
145 
148 
149  // MonitorElement* clock_Digi1_le = nullptr;
150  // MonitorElement* clock_Digi1_te = nullptr;
151  // MonitorElement* clock_Digi3_le = nullptr;
152  // MonitorElement* clock_Digi3_te = nullptr;
153 
155 
156  std::map<int, int> effTriplecountingChMap;
157  std::map<int, int> effDoublecountingChMap;
160 
161  PotPlots() {}
162  PotPlots(DQMStore::IBooker& ibooker, unsigned int id);
163  };
164 
165  std::unordered_map<unsigned int, PotPlots> potPlots_;
167 
169  struct PlanePlots {
173 
176 
178 
180  PlanePlots(DQMStore::IBooker& ibooker, unsigned int id);
181  };
182 
183  std::unordered_map<unsigned int, PlanePlots> planePlots_;
184 
186  struct ChannelPlots {
187  std::unordered_map<unsigned int, MonitorElement*> activity_per_bx;
188 
197 
199 
201  ChannelPlots(DQMStore::IBooker& ibooker, unsigned int id);
202  };
203 
204  std::unordered_map<unsigned int, ChannelPlots> channelPlots_;
205 };
206 
207 //----------------------------------------------------------------------------------------------------
208 
209 // Values for all constants
213 const double CTPPSDiamondDQMSource::INV_DISPLAY_RESOLUTION_FOR_HITS_MM = 1. / DISPLAY_RESOLUTION_FOR_HITS_MM;
214 const double CTPPSDiamondDQMSource::HPTDC_BIN_WIDTH_NS = 25. / 1024;
225 
226 //----------------------------------------------------------------------------------------------------
227 
228 CTPPSDiamondDQMSource::GlobalPlots::GlobalPlots(DQMStore::IBooker& ibooker) { ibooker.setCurrentFolder("CTPPS"); }
229 
230 //----------------------------------------------------------------------------------------------------
231 
233  : HitCounter(0),
234  MHCounter(0),
235  LeadingOnlyCounter(0),
236  TrailingOnlyCounter(0),
237  CompleteCounter(0),
238  pixelTracksMap("Pixel track maps for efficiency", "Pixel track maps for efficiency", 25, 0, 25, 12, -2, 10) {
241  ibooker.setCurrentFolder(path);
242 
244 
245  activity_per_bx[0] =
246  ibooker.book1D("activity per BX 0 25", title + " Activity per BX 0 - 25 ns;Event.BX", 3600, -1.5, 3598. + 0.5);
247  activity_per_bx[1] =
248  ibooker.book1D("activity per BX 25 50", title + " Activity per BX 25 - 50 ns;Event.BX", 3600, -1.5, 3598. + 0.5);
249  activity_per_bx[2] =
250  ibooker.book1D("activity per BX 50 75", title + " Activity per BX 50 - 75 ns;Event.BX", 3600, -1.5, 3598. + 0.5);
251 
252  hitDistribution2d = ibooker.book2D("hits in planes",
253  title + " hits in planes;plane number;x (mm)",
254  10,
255  -0.5,
256  4.5,
258  -0.5,
259  18.5);
260  hitDistribution2d_lumisection = ibooker.book2D("hits in planes lumisection",
261  title + " hits in planes in the last lumisection;plane number;x (mm)",
262  10,
263  -0.5,
264  4.5,
266  -0.5,
267  18.5);
268  hitDistribution2dOOT = ibooker.book2D("hits with OOT in planes",
269  title + " hits with OOT in planes;plane number + 0.25 OOT;x (mm)",
270  17,
271  -0.25,
272  4,
274  -0.5,
275  18.5);
276  hitDistribution2dOOT_le = ibooker.book2D("hits with OOT in planes (le only)",
277  title + " hits with OOT in planes (le only);plane number + 0.25 OOT;x (mm)",
278  17,
279  -0.25,
280  4,
282  -0.5,
283  18.5);
284  activePlanes =
285  ibooker.book1D("active planes", title + " active planes (per event);number of active planes", 6, -0.5, 5.5);
287  ibooker.book1D("active planes inclusive",
288  title + " active planes, MH and le only included (per event);number of active planes",
289  6,
290  -0.5,
291  5.5);
292 
294  ibooker.book1D("tracks", title + " tracks;x (mm)", 19. * INV_DISPLAY_RESOLUTION_FOR_HITS_MM, -0.5, 18.5);
295  trackDistributionOOT = ibooker.book2D("tracks with OOT",
296  title + " tracks with OOT;plane number;x (mm)",
297  9,
298  -0.5,
299  4,
301  -0.5,
302  18.5);
303 
304  pixelTomographyAll[0] =
305  ibooker.book2D("tomography pixel 0 25",
306  title + " tomography with pixel 0 - 25 ns (all planes);x + 25*plane(mm);y (mm)",
307  100,
308  0,
309  100,
310  8,
311  0,
312  8);
313  pixelTomographyAll[1] =
314  ibooker.book2D("tomography pixel 25 50",
315  title + " tomography with pixel 25 - 50 ns (all planes);x + 25*plane(mm);y (mm)",
316  100,
317  0,
318  100,
319  8,
320  0,
321  8);
322  pixelTomographyAll[2] =
323  ibooker.book2D("tomography pixel 50 75",
324  title + " tomography with pixel 50 - 75 ns (all planes);x + 25*plane(mm);y (mm)",
325  100,
326  0,
327  100,
328  8,
329  0,
330  8);
331 
332  leadingEdgeCumulative_both = ibooker.book1D(
333  "leading edge (le and te)", title + " leading edge (le and te) (recHits); leading edge (ns)", 75, 0, 75);
334  leadingEdgeCumulative_all = ibooker.book1D(
335  "leading edge (all)", title + " leading edge (with or without te) (DIGIs); leading edge (ns)", 75, 0, 75);
337  ibooker.book1D("leading edge (le only)", title + " leading edge (le only) (DIGIs); leading edge (ns)", 75, 0, 75);
338  trailingEdgeCumulative_te = ibooker.book1D(
339  "trailing edge (te only)", title + " trailing edge (te only) (DIGIs); trailing edge (ns)", 75, 0, 75);
341  ibooker.book1D("time over threshold", title + " time over threshold;time over threshold (ns)", 250, -25, 100);
343  ibooker.book2D("leading trailing correlation",
344  title + " leading trailing correlation;leading edge (ns);trailing edge (ns)",
345  75,
346  0,
347  75,
348  75,
349  0,
350  75);
351 
353  ibooker.book1D("event category", title + " leading edges without trailing;;%", 3, 0.5, 3.5);
357 
358  ECCheck = ibooker.book1D("optorxEC(8bit) - vfatEC", title + " EC Error;optorxEC-vfatEC", 50, -25, 25);
359 
360  HPTDCErrorFlags_2D = ibooker.book2D("HPTDC Errors", title + " HPTDC Errors", 16, -0.5, 16.5, 9, -0.5, 8.5);
361  for (unsigned short error_index = 1; error_index < 16; ++error_index)
362  HPTDCErrorFlags_2D->setBinLabel(error_index, HPTDCErrorFlags::hptdcErrorName(error_index - 1));
363  HPTDCErrorFlags_2D->setBinLabel(16, "Wrong EC");
364 
365  int tmpIndex = 0;
366  HPTDCErrorFlags_2D->setBinLabel(++tmpIndex, "DB 0 TDC 18", /* axis */ 2);
367  HPTDCErrorFlags_2D->setBinLabel(++tmpIndex, "DB 0 TDC 17", /* axis */ 2);
368  HPTDCErrorFlags_2D->setBinLabel(++tmpIndex, "DB 0 TDC 16", /* axis */ 2);
369  HPTDCErrorFlags_2D->setBinLabel(++tmpIndex, "DB 0 TDC 15", /* axis */ 2);
370  HPTDCErrorFlags_2D->setBinLabel(++tmpIndex, "DB 1 TDC 18", /* axis */ 2);
371  HPTDCErrorFlags_2D->setBinLabel(++tmpIndex, "DB 1 TDC 17", /* axis */ 2);
372  HPTDCErrorFlags_2D->setBinLabel(++tmpIndex, "DB 1 TDC 16", /* axis */ 2);
373  HPTDCErrorFlags_2D->setBinLabel(++tmpIndex, "DB 1 TDC 15", /* axis */ 2);
374 
375  MHComprensive =
376  ibooker.book2D("MH in channels", title + " MH (%) in channels;plane number;ch number", 10, -0.5, 4.5, 14, -1, 13);
377 
379  ibooker.book2D("Efficiency in channels",
380  title + " Efficiency (%) in channels (diamonds only);plane number;ch number",
381  10,
382  -0.5,
383  4.5,
384  14,
385  -1,
386  13);
387 
388  // ibooker.setCurrentFolder( path+"/clock/" );
389  // clock_Digi1_le = ibooker.book1D( "clock1 leading edge", title+" clock1;leading edge (ns)", 250, 0, 25 );
390  // clock_Digi1_te = ibooker.book1D( "clock1 trailing edge", title+" clock1;trailing edge (ns)", 75, 0, 75 );
391  // clock_Digi3_le = ibooker.book1D( "clock3 leading edge", title+" clock3;leading edge (ns)", 250, 0, 25 );
392  // clock_Digi3_te = ibooker.book1D( "clock3 trailing edge", title+" clock3;trailing edge (ns)", 75, 0, 75 );
393 }
394 
395 //----------------------------------------------------------------------------------------------------
396 
398  : pixelTracksMapWithDiamonds("Pixel track maps for efficiency with coincidence",
399  "Pixel track maps for efficiency with coincidence",
400  25,
401  0,
402  25,
403  12,
404  -2,
405  10) {
408  ibooker.setCurrentFolder(path);
409 
411 
412  digiProfileCumulativePerPlane = ibooker.book1D("digi profile", title + " digi profile; ch number", 12, -0.5, 11.5);
413  hitProfile = ibooker.book1D(
414  "hit profile", title + " hit profile;x (mm)", 19. * INV_DISPLAY_RESOLUTION_FOR_HITS_MM, -0.5, 18.5);
415  hit_multiplicity = ibooker.book1D("channels per plane", title + " channels per plane; ch per plane", 13, -0.5, 12.5);
416 
418  ibooker.book2D("tomography pixel", title + " tomography with pixel;x + 25 OOT (mm);y (mm)", 75, 0, 75, 8, 0, 8);
420  ibooker.book2D("Efficiency wrt pixels", title + " Efficiency wrt pixels;x (mm);y (mm)", 25, 0, 25, 12, -2, 10);
421 }
422 
423 //----------------------------------------------------------------------------------------------------
424 
426  : HitCounter(0), MHCounter(0), LeadingOnlyCounter(0), TrailingOnlyCounter(0), CompleteCounter(0) {
429  ibooker.setCurrentFolder(path);
430 
432 
433  leadingWithoutTrailing = ibooker.book1D("event category", title + " Event Category;;%", 3, 0.5, 3.5);
434  leadingWithoutTrailing->setBinLabel(1, "Leading only");
435  leadingWithoutTrailing->setBinLabel(2, "Trailing only");
437 
438  activity_per_bx[0] =
439  ibooker.book1D("activity per BX 0 25", title + " Activity per BX 0 - 25 ns;Event.BX", 500, -1.5, 498. + 0.5);
440  activity_per_bx[1] =
441  ibooker.book1D("activity per BX 25 50", title + " Activity per BX 25 - 50 ns;Event.BX", 500, -1.5, 498. + 0.5);
442  activity_per_bx[2] =
443  ibooker.book1D("activity per BX 50 75", title + " Activity per BX 50 - 75 ns;Event.BX", 500, -1.5, 498. + 0.5);
444 
445  HPTDCErrorFlags = ibooker.book1D("hptdc_Errors", title + " HPTDC Errors", 16, -0.5, 16.5);
446  for (unsigned short error_index = 1; error_index < 16; ++error_index)
447  HPTDCErrorFlags->setBinLabel(error_index, HPTDCErrorFlags::hptdcErrorName(error_index - 1));
448  HPTDCErrorFlags->setBinLabel(16, "MH (%)");
449 
451  ibooker.book1D("leading edge (le and te)", title + " leading edge (recHits); leading edge (ns)", 75, 0, 75);
453  ibooker.book1D("leading edge (le only)", title + " leading edge (DIGIs); leading edge (ns)", 75, 0, 75);
454  trailingEdgeCumulative_te = ibooker.book1D(
455  "trailing edge (te only)", title + " trailing edge (te only) (DIGIs); trailing edge (ns)", 75, 0, 75);
457  ibooker.book1D("time over threshold", title + " time over threshold;time over threshold (ns)", 75, -25, 50);
459  ibooker.book2D("leading trailing correlation",
460  title + " leading trailing correlation;leading edge (ns);trailing edge (ns)",
461  75,
462  0,
463  75,
464  75,
465  0,
466  75);
467 
469  ibooker.book2D("tomography pixel", "tomography with pixel;x + 25 OOT (mm);y (mm)", 75, 0, 75, 8, 0, 8);
470 
471  hit_rate = ibooker.book1D("hit rate", title + "hit rate;rate (Hz)", 40, 0, 20);
472 }
473 
474 //----------------------------------------------------------------------------------------------------
475 
477  : tokenStatus_(consumes<edm::DetSetVector<TotemVFATStatus>>(ps.getParameter<edm::InputTag>("tagStatus"))),
479  consumes<edm::DetSetVector<CTPPSPixelLocalTrack>>(ps.getParameter<edm::InputTag>("tagPixelLocalTracks"))),
480  tokenDigi_(consumes<edm::DetSetVector<CTPPSDiamondDigi>>(ps.getParameter<edm::InputTag>("tagDigi"))),
482  consumes<edm::DetSetVector<CTPPSDiamondRecHit>>(ps.getParameter<edm::InputTag>("tagDiamondRecHits"))),
484  consumes<edm::DetSetVector<CTPPSDiamondLocalTrack>>(ps.getParameter<edm::InputTag>("tagDiamondLocalTracks"))),
485  tokenFEDInfo_(consumes<std::vector<TotemFEDInfo>>(ps.getParameter<edm::InputTag>("tagFEDInfo"))),
488  excludeMultipleHits_(ps.getParameter<bool>("excludeMultipleHits")),
489  centralOOT_(-999),
490  verbosity_(ps.getUntrackedParameter<unsigned int>("verbosity", 0)),
491  EC_difference_56_(-500),
492  EC_difference_45_(-500) {
493  for (const auto& pset : ps.getParameter<std::vector<edm::ParameterSet>>("offsetsOOT")) {
494  runParameters_.emplace_back(
495  std::make_pair(pset.getParameter<edm::EventRange>("validityRange"), pset.getParameter<int>("centralOOT")));
496  }
497 }
498 
499 //----------------------------------------------------------------------------------------------------
500 
502 
503 //----------------------------------------------------------------------------------------------------
504 
506  centralOOT_ = -999;
507  for (const auto& oot : runParameters_) {
508  if (edm::contains(oot.first, edm::EventID(iRun.run(), 0, 1))) {
509  centralOOT_ = oot.second;
510  break;
511  }
512  }
513 
514  // Get detector shifts from the geometry
517  const DetGeomDesc* det = geom.sensor(detid);
518  horizontalShiftOfDiamond_ = det->translation().x() - det->params().at(0);
519 
520  // Rough alignement of pixel detector for diamond thomography
522  if (iRun.run() > 300000) { //Pixel installed
523  det = geom.sensor(pixid);
525  }
526 }
527 
528 //----------------------------------------------------------------------------------------------------
529 
530 void CTPPSDiamondDQMSource::bookHistograms(DQMStore::IBooker& ibooker, const edm::Run&, const edm::EventSetup&) {
531  ibooker.cd();
532  ibooker.setCurrentFolder("CTPPS");
533 
534  globalPlot_ = GlobalPlots(ibooker);
535 
536  for (unsigned short arm = 0; arm < CTPPS_NUM_OF_ARMS; ++arm) {
538  potPlots_[rpId] = PotPlots(ibooker, rpId);
539  for (unsigned short pl = 0; pl < CTPPS_DIAMOND_NUM_OF_PLANES; ++pl) {
541  planePlots_[plId] = PlanePlots(ibooker, plId);
542  for (unsigned short ch = 0; ch < CTPPS_DIAMOND_NUM_OF_CHANNELS; ++ch) {
544  channelPlots_[chId] = ChannelPlots(ibooker, chId);
545  }
546  }
547  }
548 }
549 
550 //----------------------------------------------------------------------------------------------------
551 
553  const edm::EventSetup&) const {
554  auto d = std::make_shared<dds::Cache>();
555  d->hitDistribution2dMap.reserve(potPlots_.size());
556  for (auto& plot : potPlots_)
557  d->hitDistribution2dMap[plot.first] =
558  std::unique_ptr<TH2F>(static_cast<TH2F*>(plot.second.hitDistribution2d_lumisection->getTH2F()->Clone()));
559  return d;
560 }
561 
562 //----------------------------------------------------------------------------------------------------
563 
565  // get event data
567  event.getByToken(tokenStatus_, diamondVFATStatus);
568 
570  event.getByToken(tokenPixelTrack_, pixelTracks);
571 
573  event.getByToken(tokenDigi_, diamondDigis);
574 
576  event.getByToken(tokenFEDInfo_, fedInfo);
577 
579  event.getByToken(tokenDiamondHit_, diamondRecHits);
580 
582  event.getByToken(tokenDiamondTrack_, diamondLocalTracks);
583 
584  const CTPPSGeometry* ctppsGeometry = &iSetup.getData(ctppsGeometryEventToken_);
585 
586  // check validity
587  bool valid = true;
588  valid &= diamondVFATStatus.isValid();
589  valid &= pixelTracks.isValid();
590  valid &= diamondDigis.isValid();
591  valid &= fedInfo.isValid();
592  valid &= diamondRecHits.isValid();
593  valid &= diamondLocalTracks.isValid();
594 
595  if (!valid) {
596  if (verbosity_) {
597  edm::LogProblem("CTPPSDiamondDQMSource")
598  << "ERROR in CTPPSDiamondDQMSource::analyze > some of the required inputs are not valid. Skipping this "
599  "event.\n"
600  << " diamondVFATStatus.isValid = " << diamondVFATStatus.isValid() << "\n"
601  << " pixelTracks.isValid = " << pixelTracks.isValid() << "\n"
602  << " diamondDigis.isValid = " << diamondDigis.isValid() << "\n"
603  << " fedInfo.isValid = " << fedInfo.isValid() << "\n"
604  << " diamondRecHits.isValid = " << diamondRecHits.isValid() << "\n"
605  << " diamondLocalTracks.isValid = " << diamondLocalTracks.isValid();
606  }
607 
608  return;
609  }
610 
611  //------------------------------
612  // RP Plots
613  //------------------------------
614 
615  //------------------------------
616  // Correlation Plots
617  //------------------------------
618 
619  // Using CTPPSDiamondDigi
620  for (const auto& digis : *diamondDigis) {
621  const CTPPSDiamondDetId detId(digis.detId());
622  CTPPSDiamondDetId detId_pot(digis.detId());
623 
624  for (const auto& digi : digis) {
625  detId_pot.setPlane(0);
626  detId_pot.setChannel(0);
627  if (detId.channel() == CHANNEL_OF_VFAT_CLOCK)
628  continue;
629  if (potPlots_.find(detId_pot) == potPlots_.end())
630  continue;
631  //Leading without trailing investigation
632  if (digi.leadingEdge() != 0 || digi.trailingEdge() != 0) {
633  ++(potPlots_[detId_pot].HitCounter);
634  if (digi.leadingEdge() != 0) {
635  potPlots_[detId_pot].leadingEdgeCumulative_all->Fill(HPTDC_BIN_WIDTH_NS * digi.leadingEdge());
636  }
637  if (digi.leadingEdge() != 0 && digi.trailingEdge() == 0) {
638  ++(potPlots_[detId_pot].LeadingOnlyCounter);
639  potPlots_[detId_pot].leadingEdgeCumulative_le->Fill(HPTDC_BIN_WIDTH_NS * digi.leadingEdge());
640  }
641  if (digi.leadingEdge() == 0 && digi.trailingEdge() != 0) {
642  ++(potPlots_[detId_pot].TrailingOnlyCounter);
643  potPlots_[detId_pot].trailingEdgeCumulative_te->Fill(HPTDC_BIN_WIDTH_NS * digi.trailingEdge());
644  }
645  if (digi.leadingEdge() != 0 && digi.trailingEdge() != 0) {
646  ++(potPlots_[detId_pot].CompleteCounter);
647  potPlots_[detId_pot].leadingTrailingCorrelationPot->Fill(HPTDC_BIN_WIDTH_NS * digi.leadingEdge(),
648  HPTDC_BIN_WIDTH_NS * digi.trailingEdge());
649  }
650  }
651 
652  // HPTDC Errors
653  const HPTDCErrorFlags hptdcErrors = digi.hptdcErrorFlags();
654  if (detId.channel() == 6 || detId.channel() == 7) // ch6 for HPTDC 0 and ch7 for HPTDC 1
655  {
656  int verticalIndex = 2 * detId.plane() + (detId.channel() - 6);
657  for (unsigned short hptdcErrorIndex = 1; hptdcErrorIndex < 16; ++hptdcErrorIndex)
658  if (hptdcErrors.errorId(hptdcErrorIndex - 1))
659  potPlots_[detId_pot].HPTDCErrorFlags_2D->Fill(hptdcErrorIndex, verticalIndex);
660  }
661  if (digi.multipleHit())
662  ++(potPlots_[detId_pot].MHCounter);
663  }
664  }
665 
666  // EC Errors
667  for (const auto& vfat_status : *diamondVFATStatus) {
668  const CTPPSDiamondDetId detId(vfat_status.detId());
669  CTPPSDiamondDetId detId_pot(vfat_status.detId());
670  detId_pot.setPlane(0);
671  detId_pot.setChannel(0);
672  for (const auto& status : vfat_status) {
673  if (!status.isOK())
674  continue;
675  if (potPlots_.find(detId_pot) == potPlots_.end())
676  continue;
677  if (channelPlots_.find(detId) == channelPlots_.end())
678  continue;
679 
680  // Check Event Number
681  for (const auto& optorx : *fedInfo) {
682  if (detId.arm() == 1 && optorx.fedId() == CTPPS_FED_ID_56) {
683  potPlots_[detId_pot].ECCheck->Fill((int)((optorx.lv1() & 0xFF) - ((unsigned int)status.ec() & 0xFF)) & 0xFF);
684  if ((static_cast<int>((optorx.lv1() & 0xFF) - status.ec()) != EC_difference_56_) &&
685  (static_cast<uint8_t>((optorx.lv1() & 0xFF) - status.ec()) < 128))
686  EC_difference_56_ = static_cast<int>(optorx.lv1() & 0xFF) - (static_cast<unsigned int>(status.ec()) & 0xFF);
687  if (EC_difference_56_ != 1 && EC_difference_56_ != -500 && std::abs(EC_difference_56_) < 127) {
688  if (detId.channel() == 6 || detId.channel() == 7)
689  potPlots_[detId_pot].HPTDCErrorFlags_2D->Fill(16, 2 * detId.plane() + (detId.channel() - 6));
690  if (verbosity_)
691  edm::LogProblem("CTPPSDiamondDQMSource")
692  << "FED " << CTPPS_FED_ID_56 << ": ECError at EV: 0x" << std::hex << optorx.lv1() << "\t\tVFAT EC: 0x"
693  << static_cast<unsigned int>(status.ec()) << "\twith ID: " << std::dec << detId
694  << "\tdiff: " << EC_difference_56_;
695  }
696  } else if (detId.arm() == 0 && optorx.fedId() == CTPPS_FED_ID_45) {
697  potPlots_[detId_pot].ECCheck->Fill((int)((optorx.lv1() & 0xFF) - status.ec()) & 0xFF);
698  if ((static_cast<int>((optorx.lv1() & 0xFF) - status.ec()) != EC_difference_45_) &&
699  (static_cast<uint8_t>((optorx.lv1() & 0xFF) - status.ec()) < 128))
700  EC_difference_45_ = static_cast<int>(optorx.lv1() & 0xFF) - (static_cast<unsigned int>(status.ec()) & 0xFF);
701  if (EC_difference_45_ != 1 && EC_difference_45_ != -500 && std::abs(EC_difference_45_) < 127) {
702  if (detId.channel() == 6 || detId.channel() == 7)
703  potPlots_[detId_pot].HPTDCErrorFlags_2D->Fill(16, 2 * detId.plane() + (detId.channel() - 6));
704  if (verbosity_)
705  edm::LogProblem("CTPPSDiamondDQMSource")
706  << "FED " << CTPPS_FED_ID_45 << ": ECError at EV: 0x" << std::hex << optorx.lv1() << "\t\tVFAT EC: 0x"
707  << static_cast<unsigned int>(status.ec()) << "\twith ID: " << std::dec << detId
708  << "\tdiff: " << EC_difference_45_;
709  }
710  }
711  }
712  }
713  }
714 
715  // Using CTPPSDiamondRecHit
716  std::unordered_map<unsigned int, std::set<unsigned int>> planes;
717  std::unordered_map<unsigned int, std::set<unsigned int>> planes_inclusive;
718 
719  auto lumiCache = luminosityBlockCache(event.getLuminosityBlock().index());
720  for (const auto& rechits : *diamondRecHits) {
721  CTPPSDiamondDetId detId_pot(rechits.detId());
722  detId_pot.setPlane(0);
723  detId_pot.setChannel(0);
724  const CTPPSDiamondDetId detId(rechits.detId());
725 
726  for (const auto& rechit : rechits) {
727  planes_inclusive[detId_pot].insert(detId.plane());
728  if (excludeMultipleHits_ && rechit.multipleHits() > 0)
729  continue;
730  if (rechit.toT() != 0 && centralOOT_ != -999 && rechit.ootIndex() == centralOOT_)
731  planes[detId_pot].insert(detId.plane());
732 
733  if (potPlots_.find(detId_pot) == potPlots_.end())
734  continue;
735 
736  float UFSDShift = 0.0;
737  if (rechit.yWidth() < 3)
738  UFSDShift = 0.5; // Display trick for UFSD that have 2 pixels with same X
739 
740  if (rechit.toT() != 0 && centralOOT_ != -999 && rechit.ootIndex() == centralOOT_) {
741  TH2F* hitHistoTmp = potPlots_[detId_pot].hitDistribution2d->getTH2F();
742  TAxis* hitHistoTmpYAxis = hitHistoTmp->GetYaxis();
743  int startBin = hitHistoTmpYAxis->FindBin(rechit.x() - horizontalShiftOfDiamond_ - 0.5 * rechit.xWidth());
744  int numOfBins = rechit.xWidth() * INV_DISPLAY_RESOLUTION_FOR_HITS_MM;
745  for (int i = 0; i < numOfBins; ++i) {
746  hitHistoTmp->Fill(detId.plane() + UFSDShift, hitHistoTmpYAxis->GetBinCenter(startBin + i));
747  }
748 
749  hitHistoTmp = lumiCache->hitDistribution2dMap[detId_pot].get();
750  hitHistoTmpYAxis = hitHistoTmp->GetYaxis();
751  startBin = hitHistoTmpYAxis->FindBin(rechit.x() - horizontalShiftOfDiamond_ - 0.5 * rechit.xWidth());
752  numOfBins = rechit.xWidth() * INV_DISPLAY_RESOLUTION_FOR_HITS_MM;
753  for (int i = 0; i < numOfBins; ++i) {
754  hitHistoTmp->Fill(detId.plane() + UFSDShift, hitHistoTmpYAxis->GetBinCenter(startBin + i));
755  }
756  }
757 
758  if (rechit.toT() != 0) {
759  // Both
760  potPlots_[detId_pot].leadingEdgeCumulative_both->Fill(rechit.time() + 25 * rechit.ootIndex());
761  potPlots_[detId_pot].timeOverThresholdCumulativePot->Fill(rechit.toT());
762 
763  TH2F* hitHistoOOTTmp = potPlots_[detId_pot].hitDistribution2dOOT->getTH2F();
764  TAxis* hitHistoOOTTmpYAxis = hitHistoOOTTmp->GetYaxis();
765  int startBin = hitHistoOOTTmpYAxis->FindBin(rechit.x() - horizontalShiftOfDiamond_ - 0.5 * rechit.xWidth());
766  int numOfBins = rechit.xWidth() * INV_DISPLAY_RESOLUTION_FOR_HITS_MM;
767  for (int i = 0; i < numOfBins; ++i) {
768  hitHistoOOTTmp->Fill(detId.plane() + 0.25 * rechit.ootIndex(),
769  hitHistoOOTTmpYAxis->GetBinCenter(startBin + i));
770  }
771  } else {
772  if (rechit.ootIndex() != CTPPSDiamondRecHit::TIMESLICE_WITHOUT_LEADING) {
773  // Only leading
774  TH2F* hitHistoOOTTmp = potPlots_[detId_pot].hitDistribution2dOOT_le->getTH2F();
775  TAxis* hitHistoOOTTmpYAxis = hitHistoOOTTmp->GetYaxis();
776  int startBin = hitHistoOOTTmpYAxis->FindBin(rechit.x() - horizontalShiftOfDiamond_ - 0.5 * rechit.xWidth());
777  int numOfBins = rechit.xWidth() * INV_DISPLAY_RESOLUTION_FOR_HITS_MM;
778  for (int i = 0; i < numOfBins; ++i) {
779  hitHistoOOTTmp->Fill(detId.plane() + 0.25 * rechit.ootIndex(),
780  hitHistoOOTTmpYAxis->GetBinCenter(startBin + i));
781  }
782  }
783  }
784  if (rechit.ootIndex() != CTPPSDiamondRecHit::TIMESLICE_WITHOUT_LEADING &&
785  potPlots_[detId_pot].activity_per_bx.count(rechit.ootIndex()) > 0)
786  potPlots_[detId_pot].activity_per_bx.at(rechit.ootIndex())->Fill(event.bunchCrossing());
787  }
788  }
789 
790  for (const auto& plt : potPlots_) {
791  plt.second.activePlanes->Fill(planes[plt.first].size());
792  plt.second.activePlanesInclusive->Fill(planes_inclusive[plt.first].size());
793  }
794 
795  // Using CTPPSDiamondLocalTrack
796  for (const auto& tracks : *diamondLocalTracks) {
797  CTPPSDiamondDetId detId_pot(tracks.detId());
798  detId_pot.setPlane(0);
799  detId_pot.setChannel(0);
800  const CTPPSDiamondDetId detId(tracks.detId());
801 
802  for (const auto& track : tracks) {
803  if (!track.isValid())
804  continue;
806  continue;
807  if (excludeMultipleHits_ && track.multipleHits() > 0)
808  continue;
809  if (potPlots_.find(detId_pot) == potPlots_.end())
810  continue;
811 
812  TH2F* trackHistoOOTTmp = potPlots_[detId_pot].trackDistributionOOT->getTH2F();
813  TAxis* trackHistoOOTTmpYAxis = trackHistoOOTTmp->GetYaxis();
814  int startBin = trackHistoOOTTmpYAxis->FindBin(track.x0() - horizontalShiftOfDiamond_ - track.x0Sigma());
815  int numOfBins = 2 * track.x0Sigma() * INV_DISPLAY_RESOLUTION_FOR_HITS_MM;
816  for (int i = 0; i < numOfBins; ++i) {
817  trackHistoOOTTmp->Fill(track.ootIndex(), trackHistoOOTTmpYAxis->GetBinCenter(startBin + i));
818  }
819 
820  if (centralOOT_ != -999 && track.ootIndex() == centralOOT_) {
821  TH1F* trackHistoInTimeTmp = potPlots_[detId_pot].trackDistribution->getTH1F();
822  int startBin = trackHistoInTimeTmp->FindBin(track.x0() - horizontalShiftOfDiamond_ - track.x0Sigma());
823  int numOfBins = 2 * track.x0Sigma() * INV_DISPLAY_RESOLUTION_FOR_HITS_MM;
824  for (int i = 0; i < numOfBins; ++i) {
825  trackHistoInTimeTmp->Fill(trackHistoInTimeTmp->GetBinCenter(startBin + i));
826  }
827  }
828  }
829  }
830 
831  // Channel efficiency using CTPPSDiamondLocalTrack
832  for (const auto& tracks : *diamondLocalTracks) {
833  CTPPSDiamondDetId detId_pot(tracks.detId());
834  detId_pot.setPlane(0);
835  detId_pot.setChannel(0);
836  for (const auto& track : tracks) {
837  // Find hits and planes in the track
838  int numOfHits = 0;
839  std::set<int> planesInTrackSet;
840  for (const auto& vec : *diamondRecHits) {
841  const CTPPSDiamondDetId detid(vec.detId());
842  if (detid.arm() != detId_pot.arm())
843  continue;
844 
845  for (const auto& hit : vec) {
846  // first check if the hit contributes to the track
847  if (track.containsHit(hit)) {
848  ++numOfHits;
849  planesInTrackSet.insert(detid.plane());
850  }
851  }
852  }
853 
854  if (numOfHits > 0 && numOfHits <= 10 && planesInTrackSet.size() > 2) {
855  for (int plane = 0; plane < 4; ++plane) {
856  for (int channel = 0; channel < 12; ++channel) {
857  int map_index = plane * 100 + channel;
858  if (potPlots_[detId_pot].effDoublecountingChMap.find(map_index) ==
859  potPlots_[detId_pot].effDoublecountingChMap.end()) {
860  potPlots_[detId_pot].effTriplecountingChMap[map_index] = 0;
861  potPlots_[detId_pot].effDoublecountingChMap[map_index] = 0;
862  }
863  CTPPSDiamondDetId detId(detId_pot.arm(), CTPPS_DIAMOND_STATION_ID, CTPPS_DIAMOND_RP_ID, plane, channel);
864  if (channelAlignedWithTrack(ctppsGeometry, detId, track, 0.2)) {
865  // Channel should fire
866  ++(potPlots_[detId_pot].effDoublecountingChMap[map_index]);
867  for (const auto& rechits : *diamondRecHits) {
868  CTPPSDiamondDetId detId_hit(rechits.detId());
869  if (detId_hit == detId) {
870  for (const auto& rechit : rechits) {
871  if (track.containsHit(rechit, 1)) {
872  // Channel fired
873  ++(potPlots_[detId_pot].effTriplecountingChMap[map_index]);
874  }
875  }
876  }
877  }
878  }
879  }
880  }
881  }
882  }
883  }
884 
885  // Tomography of diamonds using pixel
886  for (const auto& rechits : *diamondRecHits) {
887  CTPPSDiamondDetId detId_pot(rechits.detId());
888  detId_pot.setPlane(0);
889  detId_pot.setChannel(0);
890  const CTPPSDiamondDetId detId(rechits.detId());
891  for (const auto& rechit : rechits) {
892  if (excludeMultipleHits_ && rechit.multipleHits() > 0)
893  continue;
894  if (rechit.toT() == 0)
895  continue;
896  if (!pixelTracks.isValid())
897  continue;
898  if (potPlots_.find(detId_pot) == potPlots_.end())
899  continue;
900 
901  for (const auto& ds : *pixelTracks) {
902  if (ds.size() > 1)
903  continue;
904  const CTPPSPixelDetId pixId(ds.detId());
905  if (pixId.station() != CTPPS_PIXEL_STATION_ID || pixId.rp() != CTPPS_FAR_RP_ID)
906  continue;
907  for (const auto& lt : ds) {
908  if (lt.isValid() && pixId.arm() == detId_pot.arm()) {
909  if (rechit.ootIndex() != CTPPSDiamondRecHit::TIMESLICE_WITHOUT_LEADING && rechit.ootIndex() >= 0 &&
910  potPlots_[detId_pot].pixelTomographyAll.count(rechit.ootIndex()) > 0 &&
911  lt.x0() - horizontalShiftBwDiamondPixels_ < 24)
912  potPlots_[detId_pot]
913  .pixelTomographyAll.at(rechit.ootIndex())
914  ->Fill(lt.x0() - horizontalShiftBwDiamondPixels_ + 25 * detId.plane(), lt.y0());
915  }
916  }
917  }
918  }
919  }
920 
921  //------------------------------
922  // Clock Plots
923  //------------------------------
924  // Commented out to save space in the DQM files, but code should be kept
925  // for ( const auto& digis : *diamondDigis ) {
926  // const CTPPSDiamondDetId detId( digis.detId() );
927  // CTPPSDiamondDetId detId_pot( digis.detId() );
928  // if ( detId.channel() == CHANNEL_OF_VFAT_CLOCK ) {
929  // detId_pot.setPlane( 0 );
930  // detId_pot.setChannel( 0 );
931  // for ( const auto& digi : digis ) {
932  // if ( digi.leadingEdge() != 0 ) {
933  // if ( detId.plane() == 1 ) {
934  // potPlots_[detId_pot].clock_Digi1_le->Fill( HPTDC_BIN_WIDTH_NS * digi.leadingEdge() );
935  // potPlots_[detId_pot].clock_Digi1_te->Fill( HPTDC_BIN_WIDTH_NS * digi.trailingEdge() );
936  // }
937  // if ( detId.plane() == 3 ) {
938  // potPlots_[detId_pot].clock_Digi3_le->Fill( HPTDC_BIN_WIDTH_NS * digi.leadingEdge() );
939  // potPlots_[detId_pot].clock_Digi3_te->Fill( HPTDC_BIN_WIDTH_NS * digi.trailingEdge() );
940  // }
941  // }
942  // }
943  // }
944  // }
945 
946  //------------------------------
947  // Plane Plots
948  //------------------------------
949 
950  // Using CTPPSDiamondDigi
951  std::unordered_map<unsigned int, unsigned int> channelsPerPlane;
952  for (const auto& digis : *diamondDigis) {
953  const CTPPSDiamondDetId detId(digis.detId());
954  CTPPSDiamondDetId detId_plane(digis.detId());
955  for (const auto& digi : digis) {
956  detId_plane.setChannel(0);
957  if (detId.channel() == CHANNEL_OF_VFAT_CLOCK)
958  continue;
959  if (planePlots_.find(detId_plane) == planePlots_.end())
960  continue;
961 
962  if (digi.leadingEdge() != 0) {
963  planePlots_[detId_plane].digiProfileCumulativePerPlane->Fill(detId.channel());
964  if (channelsPerPlane.find(detId_plane) != channelsPerPlane.end())
965  channelsPerPlane[detId_plane]++;
966  else
967  channelsPerPlane[detId_plane] = 0;
968  }
969  }
970  }
971 
972  for (const auto& plt : channelsPerPlane) {
973  planePlots_[plt.first].hit_multiplicity->Fill(plt.second);
974  }
975 
976  // Using CTPPSDiamondRecHit
977  for (const auto& rechits : *diamondRecHits) {
978  CTPPSDiamondDetId detId_plane(rechits.detId());
979  detId_plane.setChannel(0);
980  for (const auto& rechit : rechits) {
981  if (excludeMultipleHits_ && rechit.multipleHits() > 0)
982  continue;
983  if (rechit.toT() == 0)
984  continue;
985  if (planePlots_.find(detId_plane) != planePlots_.end()) {
986  if (centralOOT_ != -999 && rechit.ootIndex() == centralOOT_) {
987  TH1F* hitHistoTmp = planePlots_[detId_plane].hitProfile->getTH1F();
988  int startBin = hitHistoTmp->FindBin(rechit.x() - horizontalShiftOfDiamond_ - 0.5 * rechit.xWidth());
989  int numOfBins = rechit.xWidth() * INV_DISPLAY_RESOLUTION_FOR_HITS_MM;
990  for (int i = 0; i < numOfBins; ++i) {
991  hitHistoTmp->Fill(hitHistoTmp->GetBinCenter(startBin + i));
992  }
993  }
994  }
995  }
996  }
997 
998  //Tomography of diamonds using pixel and Efficiency WRT Pixels
999  for (const auto& ds : *pixelTracks) {
1000  const CTPPSPixelDetId pixId(ds.detId());
1001  if (pixId.station() != CTPPS_PIXEL_STATION_ID || pixId.rp() != CTPPS_FAR_RP_ID)
1002  continue;
1003  if (ds.size() > 1)
1004  continue;
1005  for (const auto& lt : ds) {
1006  if (lt.isValid()) {
1007  // For efficieny
1009  potPlots_[detId_pot].pixelTracksMap.Fill(lt.x0() - horizontalShiftBwDiamondPixels_, lt.y0());
1010 
1011  std::set<CTPPSDiamondDetId> planesWitHits_set;
1012  for (const auto& rechits : *diamondRecHits) {
1013  CTPPSDiamondDetId detId_plane(rechits.detId());
1014  detId_plane.setChannel(0);
1015  for (const auto& rechit : rechits) {
1016  if (excludeMultipleHits_ && rechit.multipleHits() > 0)
1017  continue;
1018  if (rechit.ootIndex() == CTPPSDiamondRecHit::TIMESLICE_WITHOUT_LEADING || rechit.toT() == 0)
1019  continue;
1020  if (planePlots_.find(detId_plane) == planePlots_.end())
1021  continue;
1022  if (pixId.arm() == detId_plane.arm() && lt.x0() - horizontalShiftBwDiamondPixels_ < 24) {
1023  planePlots_[detId_plane].pixelTomography_far->Fill(
1024  lt.x0() - horizontalShiftBwDiamondPixels_ + 25 * rechit.ootIndex(), lt.y0());
1025  if (centralOOT_ != -999 && rechit.ootIndex() == centralOOT_)
1026  planesWitHits_set.insert(detId_plane);
1027  }
1028  }
1029  }
1030 
1031  for (auto& planeId : planesWitHits_set)
1032  planePlots_[planeId].pixelTracksMapWithDiamonds.Fill(lt.x0() - horizontalShiftBwDiamondPixels_, lt.y0());
1033  }
1034  }
1035  }
1036 
1037  //------------------------------
1038  // Channel Plots
1039  //------------------------------
1040 
1041  // digi profile cumulative
1042  for (const auto& digis : *diamondDigis) {
1043  const CTPPSDiamondDetId detId(digis.detId());
1044  for (const auto& digi : digis) {
1045  if (detId.channel() == CHANNEL_OF_VFAT_CLOCK)
1046  continue;
1047  if (channelPlots_.find(detId) != channelPlots_.end()) {
1048  // HPTDC Errors
1049  const HPTDCErrorFlags hptdcErrors = digi.hptdcErrorFlags();
1050  for (unsigned short hptdcErrorIndex = 1; hptdcErrorIndex < 16; ++hptdcErrorIndex)
1051  if (hptdcErrors.errorId(hptdcErrorIndex - 1))
1052  channelPlots_[detId].HPTDCErrorFlags->Fill(hptdcErrorIndex);
1053  if (digi.multipleHit())
1054  ++(channelPlots_[detId].MHCounter);
1055 
1056  // Check dropped trailing edges
1057  if (digi.leadingEdge() != 0 || digi.trailingEdge() != 0) {
1058  ++(channelPlots_[detId].HitCounter);
1059  if (digi.leadingEdge() != 0 && digi.trailingEdge() == 0) {
1060  ++(channelPlots_[detId].LeadingOnlyCounter);
1061  channelPlots_[detId].leadingEdgeCumulative_le->Fill(HPTDC_BIN_WIDTH_NS * digi.leadingEdge());
1062  }
1063  if (digi.leadingEdge() == 0 && digi.trailingEdge() != 0) {
1064  ++(channelPlots_[detId].TrailingOnlyCounter);
1065  channelPlots_[detId].trailingEdgeCumulative_te->Fill(HPTDC_BIN_WIDTH_NS * digi.trailingEdge());
1066  }
1067  if (digi.leadingEdge() != 0 && digi.trailingEdge() != 0) {
1068  ++(channelPlots_[detId].CompleteCounter);
1069  channelPlots_[detId].LeadingTrailingCorrelationPerChannel->Fill(HPTDC_BIN_WIDTH_NS * digi.leadingEdge(),
1070  HPTDC_BIN_WIDTH_NS * digi.trailingEdge());
1071  }
1072  }
1073  }
1074  }
1075  }
1076 
1077  // Using CTPPSDiamondRecHit
1078 
1079  for (const auto& rechits : *diamondRecHits) {
1080  CTPPSDiamondDetId detId(rechits.detId());
1081  for (const auto& rechit : rechits) {
1082  if (excludeMultipleHits_ && rechit.multipleHits() > 0)
1083  continue;
1084  if (channelPlots_.find(detId) != channelPlots_.end()) {
1085  if (rechit.ootIndex() != CTPPSDiamondRecHit::TIMESLICE_WITHOUT_LEADING && rechit.toT() != 0) {
1086  channelPlots_[detId].leadingEdgeCumulative_both->Fill(rechit.time() + 25 * rechit.ootIndex());
1087  channelPlots_[detId].TimeOverThresholdCumulativePerChannel->Fill(rechit.toT());
1088  }
1089  ++(lumiCache->hitsCounterMap[detId]);
1090  }
1091 
1092  if (rechit.ootIndex() != CTPPSDiamondRecHit::TIMESLICE_WITHOUT_LEADING &&
1093  channelPlots_[detId].activity_per_bx.count(rechit.ootIndex()) > 0)
1094  channelPlots_[detId].activity_per_bx.at(rechit.ootIndex())->Fill(event.bunchCrossing());
1095  }
1096  }
1097 
1098  // Tomography of diamonds using pixel
1099  for (const auto& rechits : *diamondRecHits) {
1100  const CTPPSDiamondDetId detId(rechits.detId());
1101  for (const auto& rechit : rechits) {
1102  if (excludeMultipleHits_ && rechit.multipleHits() > 0)
1103  continue;
1104  if (rechit.ootIndex() == CTPPSDiamondRecHit::TIMESLICE_WITHOUT_LEADING || rechit.toT() == 0)
1105  continue;
1106  if (!pixelTracks.isValid())
1107  continue;
1108  if (channelPlots_.find(detId) == channelPlots_.end())
1109  continue;
1110 
1111  for (const auto& ds : *pixelTracks) {
1112  const CTPPSPixelDetId pixId(ds.detId());
1113  if (pixId.station() != CTPPS_PIXEL_STATION_ID || pixId.rp() != CTPPS_FAR_RP_ID)
1114  continue;
1115  if (ds.size() > 1)
1116  continue;
1117  for (const auto& lt : ds) {
1118  if (lt.isValid() && pixId.arm() == detId.arm() && lt.x0() - horizontalShiftBwDiamondPixels_ < 24)
1119  channelPlots_[detId].pixelTomography_far->Fill(
1120  lt.x0() - horizontalShiftBwDiamondPixels_ + 25 * rechit.ootIndex(), lt.y0());
1121  }
1122  }
1123  }
1124  }
1125 }
1126 
1127 //----------------------------------------------------------------------------------------------------
1128 
1130  auto lumiCache = luminosityBlockCache(iLumi.index());
1131  for (auto& plot : potPlots_) {
1132  *(plot.second.hitDistribution2d_lumisection->getTH2F()) = *(lumiCache->hitDistribution2dMap[plot.first]);
1133  }
1134  for (auto& plot : channelPlots_) {
1135  auto hitsCounterPerLumisection = lumiCache->hitsCounterMap[plot.first];
1136  if (hitsCounterPerLumisection != 0) {
1137  plot.second.hit_rate->Fill((double)hitsCounterPerLumisection / SEC_PER_LUMI_SECTION);
1138  }
1139 
1140  double HundredOverHitCounter = .0;
1141  if (plot.second.HitCounter != 0)
1142  HundredOverHitCounter = 100. / plot.second.HitCounter;
1143  plot.second.HPTDCErrorFlags->setBinContent(16, HundredOverHitCounter * plot.second.MHCounter);
1144  plot.second.leadingWithoutTrailing->setBinContent(1, HundredOverHitCounter * plot.second.LeadingOnlyCounter);
1145  plot.second.leadingWithoutTrailing->setBinContent(2, HundredOverHitCounter * plot.second.TrailingOnlyCounter);
1146  plot.second.leadingWithoutTrailing->setBinContent(3, HundredOverHitCounter * plot.second.CompleteCounter);
1147  }
1148 
1149  for (auto& plot : potPlots_) {
1150  double HundredOverHitCounterPot = 0.;
1151  if (plot.second.HitCounter != 0)
1152  HundredOverHitCounterPot = 100. / plot.second.HitCounter;
1153  plot.second.leadingWithoutTrailingCumulativePot->setBinContent(
1154  1, HundredOverHitCounterPot * plot.second.LeadingOnlyCounter);
1155  plot.second.leadingWithoutTrailingCumulativePot->setBinContent(
1156  2, HundredOverHitCounterPot * plot.second.TrailingOnlyCounter);
1157  plot.second.leadingWithoutTrailingCumulativePot->setBinContent(
1158  3, HundredOverHitCounterPot * plot.second.CompleteCounter);
1159 
1160  plot.second.MHComprensive->Reset();
1161  CTPPSDiamondDetId rpId(plot.first);
1162  for (auto& chPlot : channelPlots_) {
1163  CTPPSDiamondDetId chId(chPlot.first);
1164  if (chId.arm() == rpId.arm() && chId.rp() == rpId.rp()) {
1165  plot.second.MHComprensive->Fill(chId.plane(), chId.channel(), chPlot.second.HPTDCErrorFlags->getBinContent(16));
1166  }
1167  }
1168  }
1169 
1170  // Efficiencies of single channels
1171  for (auto& plot : potPlots_) {
1172  plot.second.EfficiencyOfChannelsInPot->Reset();
1173  for (auto& element : plot.second.effTriplecountingChMap) {
1174  if (plot.second.effDoublecountingChMap[element.first] > 0) {
1175  int plane = element.first / 100;
1176  int channel = element.first % 100;
1177  double counted = element.second;
1178  double total = plot.second.effDoublecountingChMap[element.first];
1179  double efficiency = counted / total;
1180  // double error = std::sqrt( efficiency * ( 1 - efficiency ) / total );
1181 
1182  plot.second.EfficiencyOfChannelsInPot->Fill(plane, channel, 100 * efficiency);
1183  }
1184  }
1185  }
1186 
1187  // Efficeincy wrt pixels //TODO
1188  for (auto& plot : planePlots_) {
1189  TH2F* hitHistoTmp = plot.second.EfficiencyWRTPixelsInPlane->getTH2F();
1190 
1191  CTPPSDiamondDetId detId_pot(plot.first);
1192  detId_pot.setPlane(0);
1193 
1194  hitHistoTmp->Divide(&(plot.second.pixelTracksMapWithDiamonds), &(potPlots_[detId_pot].pixelTracksMap));
1195  }
1196 }
1197 
1198 //----------------------------------------------------------------------------------------------------
1199 
VeryForwardRealGeometryRecord
Event setup record containing the real (actual) geometry information.
Definition: VeryForwardRealGeometryRecord.h:22
CTPPSDiamondDQMSource::tokenPixelTrack_
edm::EDGetTokenT< edm::DetSetVector< CTPPSPixelLocalTrack > > tokenPixelTrack_
Definition: CTPPSDiamondDQMSource.cc:100
dqm::impl::MonitorElement
Definition: MonitorElement.h:98
CTPPSDiamondDQMSource::tokenDigi_
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondDigi > > tokenDigi_
Definition: CTPPSDiamondDQMSource.cc:101
CTPPSDiamondLocalTrack
Definition: CTPPSDiamondLocalTrack.h:20
CTPPSDetId::rp
uint32_t rp() const
Definition: CTPPSDetId.h:69
CTPPSDiamondDQMSource::bookHistograms
void bookHistograms(DQMStore::IBooker &, const edm::Run &, const edm::EventSetup &) override
Definition: CTPPSDiamondDQMSource.cc:530
PDWG_EXOHSCP_cff.tracks
tracks
Definition: PDWG_EXOHSCP_cff.py:28
CTPPSDiamondDQMSource::PotPlots::leadingTrailingCorrelationPot
MonitorElement * leadingTrailingCorrelationPot
Definition: CTPPSDiamondDQMSource.cc:141
electrons_cff.bool
bool
Definition: electrons_cff.py:372
mps_fire.i
i
Definition: mps_fire.py:355
CTPPSDiamondDQMSource::HPTDC_BIN_WIDTH_NS
static const double HPTDC_BIN_WIDTH_NS
Definition: CTPPSDiamondDQMSource.cc:87
CTPPSPixelLocalTrack.h
CTPPSDiamondDQMSource::CTPPS_FAR_RP_ID
static const int CTPPS_FAR_RP_ID
Definition: CTPPSDiamondDQMSource.cc:93
CTPPSDiamondDQMSource::ChannelPlots::MHCounter
unsigned int MHCounter
Definition: CTPPSDiamondDQMSource.cc:198
CTPPSGeometry
The manager class for TOTEM RP geometry.
Definition: CTPPSGeometry.h:29
CTPPSDiamondDQMSource::ctppsGeometryRunToken_
edm::ESGetToken< CTPPSGeometry, VeryForwardRealGeometryRecord > ctppsGeometryRunToken_
Definition: CTPPSDiamondDQMSource.cc:106
CTPPSDiamondDQMSource::ChannelPlots::HitCounter
unsigned int HitCounter
Definition: CTPPSDiamondDQMSource.cc:198
CTPPSDiamondDQMSource::potPlots_
std::unordered_map< unsigned int, PotPlots > potPlots_
Definition: CTPPSDiamondDQMSource.cc:165
ESHandle.h
CTPPSDiamondDQMSource::CTPPS_DIAMOND_NUM_OF_CHANNELS
static const int CTPPS_DIAMOND_NUM_OF_CHANNELS
Definition: CTPPSDiamondDQMSource.cc:95
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
CTPPSDiamondDQMSource::PotPlots::HitCounter
unsigned int HitCounter
Definition: CTPPSDiamondDQMSource.cc:154
mps_update.status
status
Definition: mps_update.py:69
edm::Run
Definition: Run.h:45
edm::EDGetTokenT
Definition: EDGetToken.h:33
edm::LuminosityBlock::index
LuminosityBlockIndex index() const
Definition: LuminosityBlock.cc:20
CTPPSDiamondRecHit
Reconstructed hit in diamond detectors.
Definition: CTPPSDiamondRecHit.h:16
edm
HLT enums.
Definition: AlignableModifier.h:19
CTPPSDiamondDQMSource::tokenDiamondTrack_
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondLocalTrack > > tokenDiamondTrack_
Definition: CTPPSDiamondDQMSource.cc:103
CTPPSDiamondDQMSource::PotPlots::hitDistribution2dOOT_le
MonitorElement * hitDistribution2dOOT_le
Definition: CTPPSDiamondDQMSource.cc:131
CTPPSDiamondDQMSource::PotPlots::timeOverThresholdCumulativePot
MonitorElement * timeOverThresholdCumulativePot
Definition: CTPPSDiamondDQMSource.cc:141
CTPPSPixelDetId.h
CTPPSDiamondDQMSource::PotPlots::leadingEdgeCumulative_le
MonitorElement * leadingEdgeCumulative_le
Definition: CTPPSDiamondDQMSource.cc:140
CTPPSDiamondDQMSource::PotPlots::trackDistributionOOT
MonitorElement * trackDistributionOOT
Definition: CTPPSDiamondDQMSource.cc:135
CTPPSDiamondDQMSource::tokenFEDInfo_
edm::EDGetTokenT< std::vector< TotemFEDInfo > > tokenFEDInfo_
Definition: CTPPSDiamondDQMSource.cc:104
CTPPSDiamondDQMSource::PotPlots::effTriplecountingChMap
std::map< int, int > effTriplecountingChMap
Definition: CTPPSDiamondDQMSource.cc:156
CTPPSDiamondDQMSource::PlanePlots::PlanePlots
PlanePlots()
Definition: CTPPSDiamondDQMSource.cc:179
CTPPSDiamondDigi
Definition: CTPPSDiamondDigi.h:16
CTPPSDiamondDetId::setPlane
void setPlane(uint32_t channel)
Definition: CTPPSDiamondDetId.h:48
DQMOneEDAnalyzer
Definition: DQMOneEDAnalyzer.h:20
CTPPSDiamondDQMSource::tokenDiamondHit_
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondRecHit > > tokenDiamondHit_
Definition: CTPPSDiamondDQMSource.cc:102
DQMStore.h
CTPPSDiamondDQMSource::channelPlots_
std::unordered_map< unsigned int, ChannelPlots > channelPlots_
Definition: CTPPSDiamondDQMSource.cc:204
CTPPSDiamondDQMSource::PotPlots::pixelTomographyAll
std::unordered_map< unsigned int, MonitorElement * > pixelTomographyAll
Definition: CTPPSDiamondDQMSource.cc:137
CTPPSDiamondDQMSource::CTPPSDiamondDQMSource
CTPPSDiamondDQMSource(const edm::ParameterSet &)
Definition: CTPPSDiamondDQMSource.cc:476
CTPPSDiamondDetId::setChannel
void setChannel(uint32_t channel)
Definition: CTPPSDiamondDetId.h:55
CTPPSDiamondDQMSource::PotPlots::activePlanesInclusive
MonitorElement * activePlanesInclusive
Definition: CTPPSDiamondDQMSource.cc:132
CTPPSDiamondDQMSource::ChannelPlots::trailingEdgeCumulative_te
MonitorElement * trailingEdgeCumulative_te
Definition: CTPPSDiamondDQMSource.cc:191
dds::Cache
Definition: CTPPSDiamondDQMSource.cc:61
L1TObjectsTimingClient_cff.efficiency
efficiency
Definition: L1TObjectsTimingClient_cff.py:10
year_2016_postTS2_cff.rpId
rpId
Definition: year_2016_postTS2_cff.py:23
CTPPSDiamondDQMSource::excludeMultipleHits_
bool excludeMultipleHits_
Definition: CTPPSDiamondDQMSource.cc:109
edm::Handle
Definition: AssociativeIterator.h:50
plotFactory.plot
plot
Definition: plotFactory.py:109
edm::RunBase::run
RunNumber_t run() const
Definition: RunBase.h:40
CTPPSDetId::nPath
Definition: CTPPSDetId.h:87
ESGetToken.h
CTPPSDiamondDQMSource::CTPPS_NEAR_RP_ID
static const int CTPPS_NEAR_RP_ID
Definition: CTPPSDiamondDQMSource.cc:92
validateGeometry_cfg.valid
valid
Definition: validateGeometry_cfg.py:21
DQMOneEDAnalyzer.h
CTPPSDiamondDQMSource::PotPlots::leadingWithoutTrailingCumulativePot
MonitorElement * leadingWithoutTrailingCumulativePot
Definition: CTPPSDiamondDQMSource.cc:142
CTPPSDiamondDQMSource::PlanePlots::EfficiencyWRTPixelsInPlane
MonitorElement * EfficiencyWRTPixelsInPlane
Definition: CTPPSDiamondDQMSource.cc:175
CTPPSDiamondDQMSource::CTPPS_FED_ID_45
static const int CTPPS_FED_ID_45
Definition: CTPPSDiamondDQMSource.cc:96
CTPPSGeometry.h
dqm::legacy::DQMStore::IBooker
dqm::implementation::IBooker IBooker
Definition: DQMStore.h:729
MakerMacros.h
HPTDCErrorFlags
Definition: HPTDCErrorFlags.h:15
CTPPSDiamondDQMSource::ChannelPlots::pixelTomography_far
MonitorElement * pixelTomography_far
Definition: CTPPSDiamondDQMSource.cc:195
CTPPSDiamondDQMSource::dqmBeginRun
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
Definition: CTPPSDiamondDQMSource.cc:505
CTPPSDiamondDQMSource::PotPlots::activePlanes
MonitorElement * activePlanes
Definition: CTPPSDiamondDQMSource.cc:132
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
CTPPSDiamondDQMSource::EC_difference_45_
int EC_difference_45_
Definition: CTPPSDiamondDQMSource.cc:166
CTPPSDiamondDQMSource::~CTPPSDiamondDQMSource
~CTPPSDiamondDQMSource() override
Definition: CTPPSDiamondDQMSource.cc:501
CTPPSDiamondDetId::plane
uint32_t plane() const
Definition: CTPPSDiamondDetId.h:46
CTPPSDiamondDigi.h
CTPPSDiamondDQMSource::PotPlots::EfficiencyOfChannelsInPot
MonitorElement * EfficiencyOfChannelsInPot
Definition: CTPPSDiamondDQMSource.cc:158
CTPPSDiamondRecHit.h
CTPPSDiamondDQMSource::PotPlots::hitDistribution2d
MonitorElement * hitDistribution2d
Definition: CTPPSDiamondDQMSource.cc:128
CTPPSDiamondDQMSource::PotPlots::LeadingOnlyCounter
unsigned int LeadingOnlyCounter
Definition: CTPPSDiamondDQMSource.cc:154
CTPPSDiamondDetId::channel
uint32_t channel() const
Definition: CTPPSDiamondDetId.h:53
CTPPSDiamondDetId::planeName
void planeName(std::string &name, NameFlag flag=nFull) const
Definition: CTPPSDiamondDetId.h:66
Run.h
CTPPSDiamondDQMSource::EC_difference_56_
int EC_difference_56_
Definition: CTPPSDiamondDQMSource.cc:166
CTPPSDiamondDQMSource::planePlots_
std::unordered_map< unsigned int, PlanePlots > planePlots_
Definition: CTPPSDiamondDQMSource.cc:183
CTPPSDiamondDQMSource::horizontalShiftOfDiamond_
double horizontalShiftOfDiamond_
Definition: CTPPSDiamondDQMSource.cc:111
CTPPSDiamondDQMSource::CTPPS_DIAMOND_NUM_OF_PLANES
static const int CTPPS_DIAMOND_NUM_OF_PLANES
Definition: CTPPSDiamondDQMSource.cc:94
dds
Definition: CTPPSDiamondDQMSource.cc:60
relativeConstraints.geom
geom
Definition: relativeConstraints.py:72
CTPPSDiamondDQMSource::ChannelPlots
plots related to one Diamond channel
Definition: CTPPSDiamondDQMSource.cc:186
dds::Cache::hitDistribution2dMap
std::unordered_map< unsigned int, std::unique_ptr< TH2F > > hitDistribution2dMap
Definition: CTPPSDiamondDQMSource.cc:62
Transition.h
CTPPSDiamondDQMSource::CHANNEL_OF_VFAT_CLOCK
static const int CHANNEL_OF_VFAT_CLOCK
Definition: CTPPSDiamondDQMSource.cc:84
CTPPSDiamondDQMSource::ChannelPlots::LeadingTrailingCorrelationPerChannel
MonitorElement * LeadingTrailingCorrelationPerChannel
Definition: CTPPSDiamondDQMSource.cc:193
CTPPSDiamondDQMSource::ctppsGeometryEventToken_
edm::ESGetToken< CTPPSGeometry, VeryForwardRealGeometryRecord > ctppsGeometryEventToken_
Definition: CTPPSDiamondDQMSource.cc:107
CTPPSDiamondDQMSource::centralOOT_
int centralOOT_
Definition: CTPPSDiamondDQMSource.cc:113
TotemVFATStatus.h
CTPPSDiamondDQMSource::PotPlots::pixelTracksMap
TH2F pixelTracksMap
Definition: CTPPSDiamondDQMSource.cc:159
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CTPPSDetId::arm
uint32_t arm() const
Definition: CTPPSDetId.h:55
CTPPSDiamondDQMSource::CTPPS_PIXEL_STATION_ID
static const int CTPPS_PIXEL_STATION_ID
Definition: CTPPSDiamondDQMSource.cc:91
CTPPSDiamondDetId.h
CTPPSDiamondDQMSource::PotPlots::MHComprensive
MonitorElement * MHComprensive
Definition: CTPPSDiamondDQMSource.cc:147
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
CTPPSDiamondDetId
Detector ID class for CTPPS Timing Diamond detectors. Bits [19:31] : Assigend in CTPPSDetId Calss Bit...
Definition: CTPPSDiamondDetId.h:24
CTPPSDiamondDQMSource::ChannelPlots::TrailingOnlyCounter
unsigned int TrailingOnlyCounter
Definition: CTPPSDiamondDQMSource.cc:198
CTPPSDiamondDQMSource::PotPlots::hitDistribution2d_lumisection
MonitorElement * hitDistribution2d_lumisection
Definition: CTPPSDiamondDQMSource.cc:129
edm::ParameterSet
Definition: ParameterSet.h:36
edm::Transition
Transition
Definition: Transition.h:12
CTPPSDiamondDQMSource::PotPlots::MHCounter
unsigned int MHCounter
Definition: CTPPSDiamondDQMSource.cc:154
Event.h
CTPPSDiamondDQMSource::INV_DISPLAY_RESOLUTION_FOR_HITS_MM
static const double INV_DISPLAY_RESOLUTION_FOR_HITS_MM
Definition: CTPPSDiamondDQMSource.cc:86
CTPPSDiamondRecHit::TIMESLICE_WITHOUT_LEADING
static constexpr int TIMESLICE_WITHOUT_LEADING
Definition: CTPPSDiamondRecHit.h:44
CTPPSPixelLocalTrack
Definition: CTPPSPixelLocalTrack.h:84
CTPPSDiamondDQMSource::globalPlot_
GlobalPlots globalPlot_
Definition: CTPPSDiamondDQMSource.cc:122
CTPPSDiamondDQMSource::PlanePlots::pixelTracksMapWithDiamonds
TH2F pixelTracksMapWithDiamonds
Definition: CTPPSDiamondDQMSource.cc:177
CTPPSDiamondDQMSource::PotPlots::hitDistribution2dOOT
MonitorElement * hitDistribution2dOOT
Definition: CTPPSDiamondDQMSource.cc:130
CTPPSDiamondDQMSource::ChannelPlots::CompleteCounter
unsigned int CompleteCounter
Definition: CTPPSDiamondDQMSource.cc:198
CTPPSDiamondDQMSource::ChannelPlots::leadingEdgeCumulative_both
MonitorElement * leadingEdgeCumulative_both
Definition: CTPPSDiamondDQMSource.cc:190
CTPPSDiamondDQMSource::ChannelPlots::ChannelPlots
ChannelPlots()
Definition: CTPPSDiamondDQMSource.cc:200
CTPPSDiamondDQMSource::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: CTPPSDiamondDQMSource.cc:564
edm::LogProblem
Definition: MessageLogger.h:387
CTPPSDiamondDQMSource::PotPlots::TrailingOnlyCounter
unsigned int TrailingOnlyCounter
Definition: CTPPSDiamondDQMSource.cc:154
CTPPSDiamondDQMSource::PotPlots::PotPlots
PotPlots()
Definition: CTPPSDiamondDQMSource.cc:161
TrackInfoProducer_cfi.rechits
rechits
Definition: TrackInfoProducer_cfi.py:9
CTPPSDetId::nFull
Definition: CTPPSDetId.h:87
CTPPSDiamondDQMSource::CTPPS_NUM_OF_ARMS
static const int CTPPS_NUM_OF_ARMS
Definition: CTPPSDiamondDQMSource.cc:88
CTPPSDiamondDQMSource::ChannelPlots::LeadingOnlyCounter
unsigned int LeadingOnlyCounter
Definition: CTPPSDiamondDQMSource.cc:198
CTPPSDiamondLocalTrack.h
CTPPSDiamondDQMSource::CTPPS_FED_ID_56
static const int CTPPS_FED_ID_56
Definition: CTPPSDiamondDQMSource.cc:97
createfilelist.int
int
Definition: createfilelist.py:10
DetGeomDesc
Geometrical description of a sensor.
Definition: DetGeomDesc.h:34
CTPPSDiamondDQMSource::CTPPS_DIAMOND_STATION_ID
static const int CTPPS_DIAMOND_STATION_ID
Definition: CTPPSDiamondDQMSource.cc:89
CTPPSDiamondDQMSource::ChannelPlots::TimeOverThresholdCumulativePerChannel
MonitorElement * TimeOverThresholdCumulativePerChannel
Definition: CTPPSDiamondDQMSource.cc:192
tolerance
const double tolerance
Definition: HGCalGeomParameters.cc:27
dqm::impl::MonitorElement::setBinLabel
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:771
HPTDCErrorFlags::errorId
bool errorId(unsigned short id) const
Definition: HPTDCErrorFlags.h:19
channelAlignedWithTrack
bool channelAlignedWithTrack(const CTPPSGeometry *geom, const CTPPSDiamondDetId &detid, const CTPPSDiamondLocalTrack &localTrack, const float tolerance=1)
Definition: CTPPSDiamondDQMSource.cc:45
HPTDCErrorFlags::hptdcErrorName
static std::string hptdcErrorName(const unsigned short id)
Definition: HPTDCErrorFlags.h:74
edm::EventSetup
Definition: EventSetup.h:57
CTPPSDiamondDQMSource::PotPlots::leadingEdgeCumulative_both
MonitorElement * leadingEdgeCumulative_both
Definition: CTPPSDiamondDQMSource.cc:139
edm::contains
bool contains(EventRange const &lh, EventID const &rh)
Definition: EventRange.cc:37
DetSetVector.h
CTPPSPixelDetId
Definition: CTPPSPixelDetId.h:16
CTPPSDiamondDQMSource::PotPlots::trackDistribution
MonitorElement * trackDistribution
Definition: CTPPSDiamondDQMSource.cc:134
VeryForwardRealGeometryRecord.h
CTPPSDiamondDQMSource::globalBeginLuminosityBlock
std::shared_ptr< dds::Cache > globalBeginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) const override
Definition: CTPPSDiamondDQMSource.cc:552
edm::ESGetToken< CTPPSGeometry, VeryForwardRealGeometryRecord >
TotemVFATStatus
Definition: TotemVFATStatus.h:20
HcalObjRepresent::Fill
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
Definition: HcalObjRepresent.h:1053
InputTag.h
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:113
overlapproblemtsosanalyzer_cfi.title
title
Definition: overlapproblemtsosanalyzer_cfi.py:7
CTPPSDiamondDQMSource
Definition: CTPPSDiamondDQMSource.cc:68
CTPPSDiamondDQMSource::ChannelPlots::hit_rate
MonitorElement * hit_rate
Definition: CTPPSDiamondDQMSource.cc:196
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
CTPPSTimingLocalTrack::x0
float x0() const
Definition: CTPPSTimingLocalTrack.h:37
CTPPSDiamondDetId::channelName
void channelName(std::string &name, NameFlag flag=nFull) const
Definition: CTPPSDiamondDetId.h:84
std
Definition: JetResolutionObject.h:76
CTPPSDiamondDQMSource::PotPlots::HPTDCErrorFlags_2D
MonitorElement * HPTDCErrorFlags_2D
Definition: CTPPSDiamondDQMSource.cc:146
CTPPSDiamondDQMSource::PlanePlots::digiProfileCumulativePerPlane
MonitorElement * digiProfileCumulativePerPlane
Definition: CTPPSDiamondDQMSource.cc:170
CTPPSDiamondDQMSource::PotPlots::effDoublecountingChMap
std::map< int, int > effDoublecountingChMap
Definition: CTPPSDiamondDQMSource.cc:157
CTPPSDiamondDQMSource::PlanePlots::hit_multiplicity
MonitorElement * hit_multiplicity
Definition: CTPPSDiamondDQMSource.cc:172
CTPPSDiamondDQMSource::PotPlots::CompleteCounter
unsigned int CompleteCounter
Definition: CTPPSDiamondDQMSource.cc:154
CTPPSDiamondDQMSource::ChannelPlots::activity_per_bx
std::unordered_map< unsigned int, MonitorElement * > activity_per_bx
Definition: CTPPSDiamondDQMSource.cc:187
CTPPSDiamondDQMSource::PotPlots::trailingEdgeCumulative_te
MonitorElement * trailingEdgeCumulative_te
Definition: CTPPSDiamondDQMSource.cc:140
edm::eventsetup::heterocontainer::insert
bool insert(Storage &iStorage, ItemType *iItem, const IdTag &iIdTag)
Definition: HCMethods.h:50
EventSetup.h
CTPPSDiamondDQMSource::SEC_PER_LUMI_SECTION
static const double SEC_PER_LUMI_SECTION
Definition: CTPPSDiamondDQMSource.cc:83
DetGeomDesc::params
std::vector< double > params() const
Definition: DetGeomDesc.h:66
CTPPSDiamondDQMSource::DISPLAY_RESOLUTION_FOR_HITS_MM
static const double DISPLAY_RESOLUTION_FOR_HITS_MM
Definition: CTPPSDiamondDQMSource.cc:85
CTPPSDiamondDQMSource::verbosity_
unsigned int verbosity_
Definition: CTPPSDiamondDQMSource.cc:114
CTPPSDiamondDQMSource::PlanePlots::hitProfile
MonitorElement * hitProfile
Definition: CTPPSDiamondDQMSource.cc:171
TotemFEDInfo
OptoRx headers and footers.
Definition: TotemFEDInfo.h:16
CTPPSDiamondDQMSource::PotPlots::leadingEdgeCumulative_all
MonitorElement * leadingEdgeCumulative_all
Definition: CTPPSDiamondDQMSource.cc:139
DetGeomDesc::translation
Translation translation() const
Definition: DetGeomDesc.h:64
dqmMemoryStats.total
total
Definition: dqmMemoryStats.py:152
CTPPSDiamondDQMSource::PotPlots::activity_per_bx
std::unordered_map< unsigned int, MonitorElement * > activity_per_bx
Definition: CTPPSDiamondDQMSource.cc:126
CTPPSDiamondDQMSource::ChannelPlots::leadingWithoutTrailing
MonitorElement * leadingWithoutTrailing
Definition: CTPPSDiamondDQMSource.cc:194
edm::EDConsumerBase::esConsumes
auto esConsumes()
Definition: EDConsumerBase.h:168
CTPPSDiamondDQMSource::GlobalPlots
plots related to the whole system
Definition: CTPPSDiamondDQMSource.cc:117
HLT_2018_cff.track
track
Definition: HLT_2018_cff.py:10352
ztail.d
d
Definition: ztail.py:151
CTPPSDiamondDQMSource::PlanePlots::pixelTomography_far
MonitorElement * pixelTomography_far
Definition: CTPPSDiamondDQMSource.cc:174
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
TotemFEDInfo.h
ParameterSet.h
CTPPSDiamondDQMSource::ChannelPlots::leadingEdgeCumulative_le
MonitorElement * leadingEdgeCumulative_le
Definition: CTPPSDiamondDQMSource.cc:190
edm::EDConsumerBase::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: EDConsumerBase.h:126
dds::Cache::hitsCounterMap
std::unordered_map< unsigned int, unsigned long > hitsCounterMap
Definition: CTPPSDiamondDQMSource.cc:64
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
event
Definition: event.py:1
edm::EventID
Definition: EventID.h:31
CTPPSDiamondDQMSource::CTPPS_DIAMOND_RP_ID
static const int CTPPS_DIAMOND_RP_ID
Definition: CTPPSDiamondDQMSource.cc:90
edm::Event
Definition: Event.h:73
edm::EventRange
Definition: EventRange.h:31
CTPPSDiamondDQMSource::tokenStatus_
edm::EDGetTokenT< edm::DetSetVector< TotemVFATStatus > > tokenStatus_
Definition: CTPPSDiamondDQMSource.cc:99
CTPPSDiamondDQMSource::PlanePlots
plots related to one Diamond plane
Definition: CTPPSDiamondDQMSource.cc:169
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
CTPPSDiamondDQMSource::globalEndLuminosityBlock
void globalEndLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) override
Definition: CTPPSDiamondDQMSource.cc:1129
CTPPSTimingLocalTrack::x0Sigma
float x0Sigma() const
Definition: CTPPSTimingLocalTrack.h:38
CTPPSDiamondDQMSource::PotPlots::ECCheck
MonitorElement * ECCheck
Definition: CTPPSDiamondDQMSource.cc:144
CTPPSDiamondDQMSource::PotPlots
plots related to one Diamond detector package
Definition: CTPPSDiamondDQMSource.cc:125
hit
Definition: SiStripHitEffFromCalibTree.cc:88
BeamSpotProblemMonitor_cff.pixelTracks
pixelTracks
Definition: BeamSpotProblemMonitor_cff.py:7
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
EventRange.h
CTPPSDiamondDQMSource::GlobalPlots::GlobalPlots
GlobalPlots()
Definition: CTPPSDiamondDQMSource.cc:118
CTPPSDiamondDQMSource::horizontalShiftBwDiamondPixels_
double horizontalShiftBwDiamondPixels_
Definition: CTPPSDiamondDQMSource.cc:110
CTPPSDiamondDQMSource::runParameters_
std::vector< std::pair< edm::EventRange, int > > runParameters_
Definition: CTPPSDiamondDQMSource.cc:112
CTPPSDetId::rpName
void rpName(std::string &name, NameFlag flag=nFull) const
Definition: CTPPSDetId.h:132