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