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 
112  std::vector<std::pair<edm::EventRange, int>> runParameters_;
114  unsigned int verbosity_;
115 
117  struct GlobalPlots {
118  GlobalPlots() {}
119  GlobalPlots(DQMStore::IBooker& ibooker);
120  };
121 
123 
125  struct PotPlots {
126  std::unordered_map<unsigned int, MonitorElement*> activity_per_bx;
127 
132  MonitorElement *activePlanes = nullptr, *activePlanesInclusive = nullptr;
133 
136 
137  std::unordered_map<unsigned int, MonitorElement*> pixelTomographyAll;
138 
143 
144  MonitorElement* ECCheck = nullptr;
145 
147  MonitorElement* MHComprensive = nullptr;
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;
159  TH2F pixelTracksMap;
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 {
172  MonitorElement* hit_multiplicity = nullptr;
173 
176 
178 
179  PlanePlots() {}
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 
196  MonitorElement* hit_rate = nullptr;
197 
199 
200  ChannelPlots() {}
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 
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 
333  "leading edge (le and te)", title + " leading edge (le and te) (recHits); leading edge (ns)", 75, 0, 75);
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);
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);
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 
505 void CTPPSDiamondDQMSource::dqmBeginRun(const edm::Run& iRun, const edm::EventSetup& iSetup) {
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);
519 
520  // Rough alignement of pixel detector for diamond thomography
522  if (iRun.run() > 300000) { //Pixel installed
523  det = geom.sensor(pixid);
526  }
527 }
528 
529 //----------------------------------------------------------------------------------------------------
530 
532  ibooker.cd();
533  ibooker.setCurrentFolder("CTPPS");
534 
535  globalPlot_ = GlobalPlots(ibooker);
536 
537  for (unsigned short arm = 0; arm < CTPPS_NUM_OF_ARMS; ++arm) {
539  potPlots_[rpId] = PotPlots(ibooker, rpId);
540  for (unsigned short pl = 0; pl < CTPPS_DIAMOND_NUM_OF_PLANES; ++pl) {
542  planePlots_[plId] = PlanePlots(ibooker, plId);
543  for (unsigned short ch = 0; ch < CTPPS_DIAMOND_NUM_OF_CHANNELS; ++ch) {
545  channelPlots_[chId] = ChannelPlots(ibooker, chId);
546  }
547  }
548  }
549 }
550 
551 //----------------------------------------------------------------------------------------------------
552 
554  const edm::EventSetup&) const {
555  auto d = std::make_shared<dds::Cache>();
556  d->hitDistribution2dMap.reserve(potPlots_.size());
557  for (auto& plot : potPlots_)
558  d->hitDistribution2dMap[plot.first] =
559  std::unique_ptr<TH2F>(static_cast<TH2F*>(plot.second.hitDistribution2d_lumisection->getTH2F()->Clone()));
560  return d;
561 }
562 
563 //----------------------------------------------------------------------------------------------------
564 
566  // get event data
568  event.getByToken(tokenStatus_, diamondVFATStatus);
569 
571  event.getByToken(tokenPixelTrack_, pixelTracks);
572 
574  event.getByToken(tokenDigi_, diamondDigis);
575 
577  event.getByToken(tokenFEDInfo_, fedInfo);
578 
580  event.getByToken(tokenDiamondHit_, diamondRecHits);
581 
583  event.getByToken(tokenDiamondTrack_, diamondLocalTracks);
584 
585  const CTPPSGeometry* ctppsGeometry = &iSetup.getData(ctppsGeometryEventToken_);
586 
587  // check validity
588  bool valid = true;
589  valid &= diamondVFATStatus.isValid();
590  valid &= pixelTracks.isValid();
591  valid &= diamondDigis.isValid();
592  valid &= fedInfo.isValid();
593  valid &= diamondRecHits.isValid();
594  valid &= diamondLocalTracks.isValid();
595 
596  if (!valid) {
597  if (verbosity_) {
598  edm::LogProblem("CTPPSDiamondDQMSource")
599  << "ERROR in CTPPSDiamondDQMSource::analyze > some of the required inputs are not valid. Skipping this "
600  "event.\n"
601  << " diamondVFATStatus.isValid = " << diamondVFATStatus.isValid() << "\n"
602  << " pixelTracks.isValid = " << pixelTracks.isValid() << "\n"
603  << " diamondDigis.isValid = " << diamondDigis.isValid() << "\n"
604  << " fedInfo.isValid = " << fedInfo.isValid() << "\n"
605  << " diamondRecHits.isValid = " << diamondRecHits.isValid() << "\n"
606  << " diamondLocalTracks.isValid = " << diamondLocalTracks.isValid();
607  }
608 
609  return;
610  }
611 
612  //------------------------------
613  // RP Plots
614  //------------------------------
615 
616  //------------------------------
617  // Correlation Plots
618  //------------------------------
619 
620  // Using CTPPSDiamondDigi
621  for (const auto& digis : *diamondDigis) {
622  const CTPPSDiamondDetId detId(digis.detId());
623  CTPPSDiamondDetId detId_pot(digis.detId());
624 
625  for (const auto& digi : digis) {
626  detId_pot.setPlane(0);
627  detId_pot.setChannel(0);
628  if (detId.channel() == CHANNEL_OF_VFAT_CLOCK)
629  continue;
630  if (potPlots_.find(detId_pot) == potPlots_.end())
631  continue;
632  //Leading without trailing investigation
633  if (digi.leadingEdge() != 0 || digi.trailingEdge() != 0) {
634  ++(potPlots_[detId_pot].HitCounter);
635  if (digi.leadingEdge() != 0) {
636  potPlots_[detId_pot].leadingEdgeCumulative_all->Fill(HPTDC_BIN_WIDTH_NS * digi.leadingEdge());
637  }
638  if (digi.leadingEdge() != 0 && digi.trailingEdge() == 0) {
639  ++(potPlots_[detId_pot].LeadingOnlyCounter);
640  potPlots_[detId_pot].leadingEdgeCumulative_le->Fill(HPTDC_BIN_WIDTH_NS * digi.leadingEdge());
641  }
642  if (digi.leadingEdge() == 0 && digi.trailingEdge() != 0) {
643  ++(potPlots_[detId_pot].TrailingOnlyCounter);
644  potPlots_[detId_pot].trailingEdgeCumulative_te->Fill(HPTDC_BIN_WIDTH_NS * digi.trailingEdge());
645  }
646  if (digi.leadingEdge() != 0 && digi.trailingEdge() != 0) {
647  ++(potPlots_[detId_pot].CompleteCounter);
648  potPlots_[detId_pot].leadingTrailingCorrelationPot->Fill(HPTDC_BIN_WIDTH_NS * digi.leadingEdge(),
649  HPTDC_BIN_WIDTH_NS * digi.trailingEdge());
650  }
651  }
652 
653  // HPTDC Errors
654  const HPTDCErrorFlags hptdcErrors = digi.hptdcErrorFlags();
655  if (detId.channel() == 6 || detId.channel() == 7) // ch6 for HPTDC 0 and ch7 for HPTDC 1
656  {
657  int verticalIndex = 2 * detId.plane() + (detId.channel() - 6);
658  for (unsigned short hptdcErrorIndex = 1; hptdcErrorIndex < 16; ++hptdcErrorIndex)
659  if (hptdcErrors.errorId(hptdcErrorIndex - 1))
660  potPlots_[detId_pot].HPTDCErrorFlags_2D->Fill(hptdcErrorIndex, verticalIndex);
661  }
662  if (digi.multipleHit())
663  ++(potPlots_[detId_pot].MHCounter);
664  }
665  }
666 
667  // EC Errors
668  for (const auto& vfat_status : *diamondVFATStatus) {
669  const CTPPSDiamondDetId detId(vfat_status.detId());
670  CTPPSDiamondDetId detId_pot(vfat_status.detId());
671  detId_pot.setPlane(0);
672  detId_pot.setChannel(0);
673  for (const auto& status : vfat_status) {
674  if (!status.isOK())
675  continue;
676  if (potPlots_.find(detId_pot) == potPlots_.end())
677  continue;
678  if (channelPlots_.find(detId) == channelPlots_.end())
679  continue;
680 
681  // Check Event Number
682  for (const auto& optorx : *fedInfo) {
683  if (detId.arm() == 1 && optorx.fedId() == CTPPS_FED_ID_56) {
684  potPlots_[detId_pot].ECCheck->Fill((int)((optorx.lv1() & 0xFF) - ((unsigned int)status.ec() & 0xFF)) & 0xFF);
685  if ((static_cast<int>((optorx.lv1() & 0xFF) - status.ec()) != EC_difference_56_) &&
686  (static_cast<uint8_t>((optorx.lv1() & 0xFF) - status.ec()) < 128))
687  EC_difference_56_ = static_cast<int>(optorx.lv1() & 0xFF) - (static_cast<unsigned int>(status.ec()) & 0xFF);
688  if (EC_difference_56_ != 1 && EC_difference_56_ != -500 && std::abs(EC_difference_56_) < 127) {
689  if (detId.channel() == 6 || detId.channel() == 7)
690  potPlots_[detId_pot].HPTDCErrorFlags_2D->Fill(16, 2 * detId.plane() + (detId.channel() - 6));
691  if (verbosity_)
692  edm::LogProblem("CTPPSDiamondDQMSource")
693  << "FED " << CTPPS_FED_ID_56 << ": ECError at EV: 0x" << std::hex << optorx.lv1() << "\t\tVFAT EC: 0x"
694  << static_cast<unsigned int>(status.ec()) << "\twith ID: " << std::dec << detId
695  << "\tdiff: " << EC_difference_56_;
696  }
697  } else if (detId.arm() == 0 && optorx.fedId() == CTPPS_FED_ID_45) {
698  potPlots_[detId_pot].ECCheck->Fill((int)((optorx.lv1() & 0xFF) - status.ec()) & 0xFF);
699  if ((static_cast<int>((optorx.lv1() & 0xFF) - status.ec()) != EC_difference_45_) &&
700  (static_cast<uint8_t>((optorx.lv1() & 0xFF) - status.ec()) < 128))
701  EC_difference_45_ = static_cast<int>(optorx.lv1() & 0xFF) - (static_cast<unsigned int>(status.ec()) & 0xFF);
702  if (EC_difference_45_ != 1 && EC_difference_45_ != -500 && std::abs(EC_difference_45_) < 127) {
703  if (detId.channel() == 6 || detId.channel() == 7)
704  potPlots_[detId_pot].HPTDCErrorFlags_2D->Fill(16, 2 * detId.plane() + (detId.channel() - 6));
705  if (verbosity_)
706  edm::LogProblem("CTPPSDiamondDQMSource")
707  << "FED " << CTPPS_FED_ID_45 << ": ECError at EV: 0x" << std::hex << optorx.lv1() << "\t\tVFAT EC: 0x"
708  << static_cast<unsigned int>(status.ec()) << "\twith ID: " << std::dec << detId
709  << "\tdiff: " << EC_difference_45_;
710  }
711  }
712  }
713  }
714  }
715 
716  // Using CTPPSDiamondRecHit
717  std::unordered_map<unsigned int, std::set<unsigned int>> planes;
718  std::unordered_map<unsigned int, std::set<unsigned int>> planes_inclusive;
719 
720  auto lumiCache = luminosityBlockCache(event.getLuminosityBlock().index());
721  for (const auto& rechits : *diamondRecHits) {
722  CTPPSDiamondDetId detId_pot(rechits.detId());
723  detId_pot.setPlane(0);
724  detId_pot.setChannel(0);
725  const CTPPSDiamondDetId detId(rechits.detId());
726 
727  for (const auto& rechit : rechits) {
728  planes_inclusive[detId_pot].insert(detId.plane());
729  if (excludeMultipleHits_ && rechit.multipleHits() > 0)
730  continue;
731  if (rechit.toT() != 0 && centralOOT_ != -999 && rechit.ootIndex() == centralOOT_)
732  planes[detId_pot].insert(detId.plane());
733 
734  if (potPlots_.find(detId_pot) == potPlots_.end())
735  continue;
736 
737  float UFSDShift = 0.0;
738  if (rechit.yWidth() < 3)
739  UFSDShift = 0.5; // Display trick for UFSD that have 2 pixels with same X
740 
741  if (rechit.toT() != 0 && centralOOT_ != -999 && rechit.ootIndex() == centralOOT_) {
742  TH2F* hitHistoTmp = potPlots_[detId_pot].hitDistribution2d->getTH2F();
743  TAxis* hitHistoTmpYAxis = hitHistoTmp->GetYaxis();
744  int startBin = hitHistoTmpYAxis->FindBin(rechit.x() - horizontalShiftOfDiamond_ - 0.5 * rechit.xWidth());
745  int numOfBins = rechit.xWidth() * INV_DISPLAY_RESOLUTION_FOR_HITS_MM;
746  for (int i = 0; i < numOfBins; ++i) {
747  hitHistoTmp->Fill(detId.plane() + UFSDShift, hitHistoTmpYAxis->GetBinCenter(startBin + i));
748  }
749 
750  hitHistoTmp = lumiCache->hitDistribution2dMap[detId_pot].get();
751  hitHistoTmpYAxis = hitHistoTmp->GetYaxis();
752  startBin = hitHistoTmpYAxis->FindBin(rechit.x() - horizontalShiftOfDiamond_ - 0.5 * rechit.xWidth());
753  numOfBins = rechit.xWidth() * INV_DISPLAY_RESOLUTION_FOR_HITS_MM;
754  for (int i = 0; i < numOfBins; ++i) {
755  hitHistoTmp->Fill(detId.plane() + UFSDShift, hitHistoTmpYAxis->GetBinCenter(startBin + i));
756  }
757  }
758 
759  if (rechit.toT() != 0) {
760  // Both
761  potPlots_[detId_pot].leadingEdgeCumulative_both->Fill(rechit.time() + 25 * rechit.ootIndex());
762  potPlots_[detId_pot].timeOverThresholdCumulativePot->Fill(rechit.toT());
763 
764  TH2F* hitHistoOOTTmp = potPlots_[detId_pot].hitDistribution2dOOT->getTH2F();
765  TAxis* hitHistoOOTTmpYAxis = hitHistoOOTTmp->GetYaxis();
766  int startBin = hitHistoOOTTmpYAxis->FindBin(rechit.x() - horizontalShiftOfDiamond_ - 0.5 * rechit.xWidth());
767  int numOfBins = rechit.xWidth() * INV_DISPLAY_RESOLUTION_FOR_HITS_MM;
768  for (int i = 0; i < numOfBins; ++i) {
769  hitHistoOOTTmp->Fill(detId.plane() + 0.25 * rechit.ootIndex(),
770  hitHistoOOTTmpYAxis->GetBinCenter(startBin + i));
771  }
772  } else {
773  if (rechit.ootIndex() != CTPPSDiamondRecHit::TIMESLICE_WITHOUT_LEADING) {
774  // Only leading
775  TH2F* hitHistoOOTTmp = potPlots_[detId_pot].hitDistribution2dOOT_le->getTH2F();
776  TAxis* hitHistoOOTTmpYAxis = hitHistoOOTTmp->GetYaxis();
777  int startBin = hitHistoOOTTmpYAxis->FindBin(rechit.x() - horizontalShiftOfDiamond_ - 0.5 * rechit.xWidth());
778  int numOfBins = rechit.xWidth() * INV_DISPLAY_RESOLUTION_FOR_HITS_MM;
779  for (int i = 0; i < numOfBins; ++i) {
780  hitHistoOOTTmp->Fill(detId.plane() + 0.25 * rechit.ootIndex(),
781  hitHistoOOTTmpYAxis->GetBinCenter(startBin + i));
782  }
783  }
784  }
785  if (rechit.ootIndex() != CTPPSDiamondRecHit::TIMESLICE_WITHOUT_LEADING &&
786  potPlots_[detId_pot].activity_per_bx.count(rechit.ootIndex()) > 0)
787  potPlots_[detId_pot].activity_per_bx.at(rechit.ootIndex())->Fill(event.bunchCrossing());
788  }
789  }
790 
791  for (const auto& plt : potPlots_) {
792  plt.second.activePlanes->Fill(planes[plt.first].size());
793  plt.second.activePlanesInclusive->Fill(planes_inclusive[plt.first].size());
794  }
795 
796  // Using CTPPSDiamondLocalTrack
797  for (const auto& tracks : *diamondLocalTracks) {
798  CTPPSDiamondDetId detId_pot(tracks.detId());
799  detId_pot.setPlane(0);
800  detId_pot.setChannel(0);
801  const CTPPSDiamondDetId detId(tracks.detId());
802 
803  for (const auto& track : tracks) {
804  if (!track.isValid())
805  continue;
807  continue;
808  if (excludeMultipleHits_ && track.multipleHits() > 0)
809  continue;
810  if (potPlots_.find(detId_pot) == potPlots_.end())
811  continue;
812 
813  TH2F* trackHistoOOTTmp = potPlots_[detId_pot].trackDistributionOOT->getTH2F();
814  TAxis* trackHistoOOTTmpYAxis = trackHistoOOTTmp->GetYaxis();
815  int startBin = trackHistoOOTTmpYAxis->FindBin(track.x0() - horizontalShiftOfDiamond_ - track.x0Sigma());
816  int numOfBins = 2 * track.x0Sigma() * INV_DISPLAY_RESOLUTION_FOR_HITS_MM;
817  for (int i = 0; i < numOfBins; ++i) {
818  trackHistoOOTTmp->Fill(track.ootIndex(), trackHistoOOTTmpYAxis->GetBinCenter(startBin + i));
819  }
820 
821  if (centralOOT_ != -999 && track.ootIndex() == centralOOT_) {
822  TH1F* trackHistoInTimeTmp = potPlots_[detId_pot].trackDistribution->getTH1F();
823  int startBin = trackHistoInTimeTmp->FindBin(track.x0() - horizontalShiftOfDiamond_ - track.x0Sigma());
824  int numOfBins = 2 * track.x0Sigma() * INV_DISPLAY_RESOLUTION_FOR_HITS_MM;
825  for (int i = 0; i < numOfBins; ++i) {
826  trackHistoInTimeTmp->Fill(trackHistoInTimeTmp->GetBinCenter(startBin + i));
827  }
828  }
829  }
830  }
831 
832  // Channel efficiency using CTPPSDiamondLocalTrack
833  for (const auto& tracks : *diamondLocalTracks) {
834  CTPPSDiamondDetId detId_pot(tracks.detId());
835  detId_pot.setPlane(0);
836  detId_pot.setChannel(0);
837  for (const auto& track : tracks) {
838  // Find hits and planes in the track
839  int numOfHits = 0;
840  std::set<int> planesInTrackSet;
841  for (const auto& vec : *diamondRecHits) {
842  const CTPPSDiamondDetId detid(vec.detId());
843  if (detid.arm() != detId_pot.arm())
844  continue;
845 
846  for (const auto& hit : vec) {
847  // first check if the hit contributes to the track
848  if (track.containsHit(hit)) {
849  ++numOfHits;
850  planesInTrackSet.insert(detid.plane());
851  }
852  }
853  }
854 
855  if (numOfHits > 0 && numOfHits <= 10 && planesInTrackSet.size() > 2) {
856  for (int plane = 0; plane < 4; ++plane) {
857  for (int channel = 0; channel < 12; ++channel) {
858  int map_index = plane * 100 + channel;
859  if (potPlots_[detId_pot].effDoublecountingChMap.find(map_index) ==
860  potPlots_[detId_pot].effDoublecountingChMap.end()) {
861  potPlots_[detId_pot].effTriplecountingChMap[map_index] = 0;
862  potPlots_[detId_pot].effDoublecountingChMap[map_index] = 0;
863  }
864  CTPPSDiamondDetId detId(detId_pot.arm(), CTPPS_DIAMOND_STATION_ID, CTPPS_DIAMOND_RP_ID, plane, channel);
865  if (channelAlignedWithTrack(ctppsGeometry, detId, track, 0.2)) {
866  // Channel should fire
867  ++(potPlots_[detId_pot].effDoublecountingChMap[map_index]);
868  for (const auto& rechits : *diamondRecHits) {
869  CTPPSDiamondDetId detId_hit(rechits.detId());
870  if (detId_hit == detId) {
871  for (const auto& rechit : rechits) {
872  if (track.containsHit(rechit, 1)) {
873  // Channel fired
874  ++(potPlots_[detId_pot].effTriplecountingChMap[map_index]);
875  }
876  }
877  }
878  }
879  }
880  }
881  }
882  }
883  }
884  }
885 
886  // Tomography of diamonds using pixel
887  for (const auto& rechits : *diamondRecHits) {
888  CTPPSDiamondDetId detId_pot(rechits.detId());
889  detId_pot.setPlane(0);
890  detId_pot.setChannel(0);
891  const CTPPSDiamondDetId detId(rechits.detId());
892  for (const auto& rechit : rechits) {
893  if (excludeMultipleHits_ && rechit.multipleHits() > 0)
894  continue;
895  if (rechit.toT() == 0)
896  continue;
897  if (!pixelTracks.isValid())
898  continue;
899  if (potPlots_.find(detId_pot) == potPlots_.end())
900  continue;
901 
902  for (const auto& ds : *pixelTracks) {
903  if (ds.size() > 1)
904  continue;
905  const CTPPSPixelDetId pixId(ds.detId());
906  if (pixId.station() != CTPPS_PIXEL_STATION_ID || pixId.rp() != CTPPS_FAR_RP_ID)
907  continue;
908  for (const auto& lt : ds) {
909  if (lt.isValid() && pixId.arm() == detId_pot.arm()) {
910  if (rechit.ootIndex() != CTPPSDiamondRecHit::TIMESLICE_WITHOUT_LEADING && rechit.ootIndex() >= 0 &&
911  potPlots_[detId_pot].pixelTomographyAll.count(rechit.ootIndex()) > 0 &&
912  lt.x0() - horizontalShiftBwDiamondPixels_ < 24)
913  potPlots_[detId_pot]
914  .pixelTomographyAll.at(rechit.ootIndex())
915  ->Fill(lt.x0() - horizontalShiftBwDiamondPixels_ + 25 * detId.plane(), lt.y0());
916  }
917  }
918  }
919  }
920  }
921 
922  //------------------------------
923  // Clock Plots
924  //------------------------------
925  // Commented out to save space in the DQM files, but code should be kept
926  // for ( const auto& digis : *diamondDigis ) {
927  // const CTPPSDiamondDetId detId( digis.detId() );
928  // CTPPSDiamondDetId detId_pot( digis.detId() );
929  // if ( detId.channel() == CHANNEL_OF_VFAT_CLOCK ) {
930  // detId_pot.setPlane( 0 );
931  // detId_pot.setChannel( 0 );
932  // for ( const auto& digi : digis ) {
933  // if ( digi.leadingEdge() != 0 ) {
934  // if ( detId.plane() == 1 ) {
935  // potPlots_[detId_pot].clock_Digi1_le->Fill( HPTDC_BIN_WIDTH_NS * digi.leadingEdge() );
936  // potPlots_[detId_pot].clock_Digi1_te->Fill( HPTDC_BIN_WIDTH_NS * digi.trailingEdge() );
937  // }
938  // if ( detId.plane() == 3 ) {
939  // potPlots_[detId_pot].clock_Digi3_le->Fill( HPTDC_BIN_WIDTH_NS * digi.leadingEdge() );
940  // potPlots_[detId_pot].clock_Digi3_te->Fill( HPTDC_BIN_WIDTH_NS * digi.trailingEdge() );
941  // }
942  // }
943  // }
944  // }
945  // }
946 
947  //------------------------------
948  // Plane Plots
949  //------------------------------
950 
951  // Using CTPPSDiamondDigi
952  std::unordered_map<unsigned int, unsigned int> channelsPerPlane;
953  for (const auto& digis : *diamondDigis) {
954  const CTPPSDiamondDetId detId(digis.detId());
955  CTPPSDiamondDetId detId_plane(digis.detId());
956  for (const auto& digi : digis) {
957  detId_plane.setChannel(0);
958  if (detId.channel() == CHANNEL_OF_VFAT_CLOCK)
959  continue;
960  if (planePlots_.find(detId_plane) == planePlots_.end())
961  continue;
962 
963  if (digi.leadingEdge() != 0) {
964  planePlots_[detId_plane].digiProfileCumulativePerPlane->Fill(detId.channel());
965  if (channelsPerPlane.find(detId_plane) != channelsPerPlane.end())
966  channelsPerPlane[detId_plane]++;
967  else
968  channelsPerPlane[detId_plane] = 0;
969  }
970  }
971  }
972 
973  for (const auto& plt : channelsPerPlane) {
974  planePlots_[plt.first].hit_multiplicity->Fill(plt.second);
975  }
976 
977  // Using CTPPSDiamondRecHit
978  for (const auto& rechits : *diamondRecHits) {
979  CTPPSDiamondDetId detId_plane(rechits.detId());
980  detId_plane.setChannel(0);
981  for (const auto& rechit : rechits) {
982  if (excludeMultipleHits_ && rechit.multipleHits() > 0)
983  continue;
984  if (rechit.toT() == 0)
985  continue;
986  if (planePlots_.find(detId_plane) != planePlots_.end()) {
987  if (centralOOT_ != -999 && rechit.ootIndex() == centralOOT_) {
988  TH1F* hitHistoTmp = planePlots_[detId_plane].hitProfile->getTH1F();
989  int startBin = hitHistoTmp->FindBin(rechit.x() - horizontalShiftOfDiamond_ - 0.5 * rechit.xWidth());
990  int numOfBins = rechit.xWidth() * INV_DISPLAY_RESOLUTION_FOR_HITS_MM;
991  for (int i = 0; i < numOfBins; ++i) {
992  hitHistoTmp->Fill(hitHistoTmp->GetBinCenter(startBin + i));
993  }
994  }
995  }
996  }
997  }
998 
999  //Tomography of diamonds using pixel and Efficiency WRT Pixels
1000  for (const auto& ds : *pixelTracks) {
1001  const CTPPSPixelDetId pixId(ds.detId());
1002  if (pixId.station() != CTPPS_PIXEL_STATION_ID || pixId.rp() != CTPPS_FAR_RP_ID)
1003  continue;
1004  if (ds.size() > 1)
1005  continue;
1006  for (const auto& lt : ds) {
1007  if (lt.isValid()) {
1008  // For efficieny
1010  potPlots_[detId_pot].pixelTracksMap.Fill(lt.x0() - horizontalShiftBwDiamondPixels_, lt.y0());
1011 
1012  std::set<CTPPSDiamondDetId> planesWitHits_set;
1013  for (const auto& rechits : *diamondRecHits) {
1014  CTPPSDiamondDetId detId_plane(rechits.detId());
1015  detId_plane.setChannel(0);
1016  for (const auto& rechit : rechits) {
1017  if (excludeMultipleHits_ && rechit.multipleHits() > 0)
1018  continue;
1019  if (rechit.ootIndex() == CTPPSDiamondRecHit::TIMESLICE_WITHOUT_LEADING || rechit.toT() == 0)
1020  continue;
1021  if (planePlots_.find(detId_plane) == planePlots_.end())
1022  continue;
1023  if (pixId.arm() == detId_plane.arm() && lt.x0() - horizontalShiftBwDiamondPixels_ < 24) {
1024  planePlots_[detId_plane].pixelTomography_far->Fill(
1025  lt.x0() - horizontalShiftBwDiamondPixels_ + 25 * rechit.ootIndex(), lt.y0());
1026  if (centralOOT_ != -999 && rechit.ootIndex() == centralOOT_)
1027  planesWitHits_set.insert(detId_plane);
1028  }
1029  }
1030  }
1031 
1032  for (auto& planeId : planesWitHits_set)
1033  planePlots_[planeId].pixelTracksMapWithDiamonds.Fill(lt.x0() - horizontalShiftBwDiamondPixels_, lt.y0());
1034  }
1035  }
1036  }
1037 
1038  //------------------------------
1039  // Channel Plots
1040  //------------------------------
1041 
1042  // digi profile cumulative
1043  for (const auto& digis : *diamondDigis) {
1044  const CTPPSDiamondDetId detId(digis.detId());
1045  for (const auto& digi : digis) {
1046  if (detId.channel() == CHANNEL_OF_VFAT_CLOCK)
1047  continue;
1048  if (channelPlots_.find(detId) != channelPlots_.end()) {
1049  // HPTDC Errors
1050  const HPTDCErrorFlags hptdcErrors = digi.hptdcErrorFlags();
1051  for (unsigned short hptdcErrorIndex = 1; hptdcErrorIndex < 16; ++hptdcErrorIndex)
1052  if (hptdcErrors.errorId(hptdcErrorIndex - 1))
1053  channelPlots_[detId].HPTDCErrorFlags->Fill(hptdcErrorIndex);
1054  if (digi.multipleHit())
1055  ++(channelPlots_[detId].MHCounter);
1056 
1057  // Check dropped trailing edges
1058  if (digi.leadingEdge() != 0 || digi.trailingEdge() != 0) {
1059  ++(channelPlots_[detId].HitCounter);
1060  if (digi.leadingEdge() != 0 && digi.trailingEdge() == 0) {
1061  ++(channelPlots_[detId].LeadingOnlyCounter);
1062  channelPlots_[detId].leadingEdgeCumulative_le->Fill(HPTDC_BIN_WIDTH_NS * digi.leadingEdge());
1063  }
1064  if (digi.leadingEdge() == 0 && digi.trailingEdge() != 0) {
1065  ++(channelPlots_[detId].TrailingOnlyCounter);
1066  channelPlots_[detId].trailingEdgeCumulative_te->Fill(HPTDC_BIN_WIDTH_NS * digi.trailingEdge());
1067  }
1068  if (digi.leadingEdge() != 0 && digi.trailingEdge() != 0) {
1069  ++(channelPlots_[detId].CompleteCounter);
1070  channelPlots_[detId].LeadingTrailingCorrelationPerChannel->Fill(HPTDC_BIN_WIDTH_NS * digi.leadingEdge(),
1071  HPTDC_BIN_WIDTH_NS * digi.trailingEdge());
1072  }
1073  }
1074  }
1075  }
1076  }
1077 
1078  // Using CTPPSDiamondRecHit
1079 
1080  for (const auto& rechits : *diamondRecHits) {
1081  CTPPSDiamondDetId detId(rechits.detId());
1082  for (const auto& rechit : rechits) {
1083  if (excludeMultipleHits_ && rechit.multipleHits() > 0)
1084  continue;
1085  if (channelPlots_.find(detId) != channelPlots_.end()) {
1086  if (rechit.ootIndex() != CTPPSDiamondRecHit::TIMESLICE_WITHOUT_LEADING && rechit.toT() != 0) {
1087  channelPlots_[detId].leadingEdgeCumulative_both->Fill(rechit.time() + 25 * rechit.ootIndex());
1088  channelPlots_[detId].TimeOverThresholdCumulativePerChannel->Fill(rechit.toT());
1089  }
1090  ++(lumiCache->hitsCounterMap[detId]);
1091  }
1092 
1093  if (rechit.ootIndex() != CTPPSDiamondRecHit::TIMESLICE_WITHOUT_LEADING &&
1094  channelPlots_[detId].activity_per_bx.count(rechit.ootIndex()) > 0)
1095  channelPlots_[detId].activity_per_bx.at(rechit.ootIndex())->Fill(event.bunchCrossing());
1096  }
1097  }
1098 
1099  // Tomography of diamonds using pixel
1100  for (const auto& rechits : *diamondRecHits) {
1101  const CTPPSDiamondDetId detId(rechits.detId());
1102  for (const auto& rechit : rechits) {
1103  if (excludeMultipleHits_ && rechit.multipleHits() > 0)
1104  continue;
1105  if (rechit.ootIndex() == CTPPSDiamondRecHit::TIMESLICE_WITHOUT_LEADING || rechit.toT() == 0)
1106  continue;
1107  if (!pixelTracks.isValid())
1108  continue;
1109  if (channelPlots_.find(detId) == channelPlots_.end())
1110  continue;
1111 
1112  for (const auto& ds : *pixelTracks) {
1113  const CTPPSPixelDetId pixId(ds.detId());
1114  if (pixId.station() != CTPPS_PIXEL_STATION_ID || pixId.rp() != CTPPS_FAR_RP_ID)
1115  continue;
1116  if (ds.size() > 1)
1117  continue;
1118  for (const auto& lt : ds) {
1119  if (lt.isValid() && pixId.arm() == detId.arm() && lt.x0() - horizontalShiftBwDiamondPixels_ < 24)
1120  channelPlots_[detId].pixelTomography_far->Fill(
1121  lt.x0() - horizontalShiftBwDiamondPixels_ + 25 * rechit.ootIndex(), lt.y0());
1122  }
1123  }
1124  }
1125  }
1126 }
1127 
1128 //----------------------------------------------------------------------------------------------------
1131  auto lumiCache = luminosityBlockCache(iLumi.index());
1132  for (auto& plot : potPlots_) {
1133  *(plot.second.hitDistribution2d_lumisection->getTH2F()) = *(lumiCache->hitDistribution2dMap[plot.first]);
1134  }
1135  for (auto& plot : channelPlots_) {
1136  auto hitsCounterPerLumisection = lumiCache->hitsCounterMap[plot.first];
1137  if (hitsCounterPerLumisection != 0) {
1138  plot.second.hit_rate->Fill((double)hitsCounterPerLumisection / SEC_PER_LUMI_SECTION);
1139  }
1140 
1141  double HundredOverHitCounter = .0;
1142  if (plot.second.HitCounter != 0)
1143  HundredOverHitCounter = 100. / plot.second.HitCounter;
1144  plot.second.HPTDCErrorFlags->setBinContent(16, HundredOverHitCounter * plot.second.MHCounter);
1145  plot.second.leadingWithoutTrailing->setBinContent(1, HundredOverHitCounter * plot.second.LeadingOnlyCounter);
1146  plot.second.leadingWithoutTrailing->setBinContent(2, HundredOverHitCounter * plot.second.TrailingOnlyCounter);
1147  plot.second.leadingWithoutTrailing->setBinContent(3, HundredOverHitCounter * plot.second.CompleteCounter);
1148  }
1149 
1150  for (auto& plot : potPlots_) {
1151  double HundredOverHitCounterPot = 0.;
1152  if (plot.second.HitCounter != 0)
1153  HundredOverHitCounterPot = 100. / plot.second.HitCounter;
1154  plot.second.leadingWithoutTrailingCumulativePot->setBinContent(
1155  1, HundredOverHitCounterPot * plot.second.LeadingOnlyCounter);
1156  plot.second.leadingWithoutTrailingCumulativePot->setBinContent(
1157  2, HundredOverHitCounterPot * plot.second.TrailingOnlyCounter);
1158  plot.second.leadingWithoutTrailingCumulativePot->setBinContent(
1159  3, HundredOverHitCounterPot * plot.second.CompleteCounter);
1160 
1161  plot.second.MHComprensive->Reset();
1162  CTPPSDiamondDetId rpId(plot.first);
1163  for (auto& chPlot : channelPlots_) {
1164  CTPPSDiamondDetId chId(chPlot.first);
1165  if (chId.arm() == rpId.arm() && chId.rp() == rpId.rp()) {
1166  plot.second.MHComprensive->Fill(chId.plane(), chId.channel(), chPlot.second.HPTDCErrorFlags->getBinContent(16));
1167  }
1168  }
1169  }
1170 
1171  // Efficiencies of single channels
1172  for (auto& plot : potPlots_) {
1173  plot.second.EfficiencyOfChannelsInPot->Reset();
1174  for (auto& element : plot.second.effTriplecountingChMap) {
1175  if (plot.second.effDoublecountingChMap[element.first] > 0) {
1176  int plane = element.first / 100;
1177  int channel = element.first % 100;
1178  double counted = element.second;
1179  double total = plot.second.effDoublecountingChMap[element.first];
1180  double efficiency = counted / total;
1181  // double error = std::sqrt( efficiency * ( 1 - efficiency ) / total );
1182 
1183  plot.second.EfficiencyOfChannelsInPot->Fill(plane, channel, 100 * efficiency);
1184  }
1185  }
1186  }
1187 
1188  // Efficeincy wrt pixels //TODO
1189  for (auto& plot : planePlots_) {
1190  TH2F* hitHistoTmp = plot.second.EfficiencyWRTPixelsInPlane->getTH2F();
1191 
1192  CTPPSDiamondDetId detId_pot(plot.first);
1193  detId_pot.setPlane(0);
1194 
1195  hitHistoTmp->Divide(&(plot.second.pixelTracksMapWithDiamonds), &(potPlots_[detId_pot].pixelTracksMap));
1196  }
1197 }
1198 
1199 //----------------------------------------------------------------------------------------------------
1200 
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: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:530
PDWG_EXOHSCP_cff.tracks
tracks
Definition: PDWG_EXOHSCP_cff.py:28
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
CTPPSDiamondDQMSource::PotPlots::leadingTrailingCorrelationPot
MonitorElement * leadingTrailingCorrelationPot
Definition: CTPPSDiamondDQMSource.cc:140
electrons_cff.bool
bool
Definition: electrons_cff.py:393
mps_fire.i
i
Definition: mps_fire.py:428
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11713
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:197
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:197
CTPPSDiamondDQMSource::potPlots_
std::unordered_map< unsigned int, PotPlots > potPlots_
Definition: CTPPSDiamondDQMSource.cc:164
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:73
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
CTPPSDiamondDQMSource::PotPlots::HitCounter
unsigned int HitCounter
Definition: CTPPSDiamondDQMSource.cc:153
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:27
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:130
CTPPSDiamondDQMSource::PotPlots::timeOverThresholdCumulativePot
MonitorElement * timeOverThresholdCumulativePot
Definition: CTPPSDiamondDQMSource.cc:140
CTPPSPixelDetId.h
CTPPSDiamondDQMSource::PotPlots::leadingEdgeCumulative_le
MonitorElement * leadingEdgeCumulative_le
Definition: CTPPSDiamondDQMSource.cc:139
CTPPSDiamondDQMSource::PotPlots::trackDistributionOOT
MonitorElement * trackDistributionOOT
Definition: CTPPSDiamondDQMSource.cc:134
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89287
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:155
CTPPSDiamondDQMSource::PlanePlots::PlanePlots
PlanePlots()
Definition: CTPPSDiamondDQMSource.cc:178
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:203
CTPPSDiamondDQMSource::PotPlots::pixelTomographyAll
std::unordered_map< unsigned int, MonitorElement * > pixelTomographyAll
Definition: CTPPSDiamondDQMSource.cc:136
CTPPSDiamondDQMSource::CTPPSDiamondDQMSource
CTPPSDiamondDQMSource(const edm::ParameterSet &)
Definition: CTPPSDiamondDQMSource.cc:475
CTPPSDiamondDetId::setChannel
void setChannel(uint32_t channel)
Definition: CTPPSDiamondDetId.h:55
CTPPSDiamondDQMSource::PotPlots::activePlanesInclusive
MonitorElement * activePlanesInclusive
Definition: CTPPSDiamondDQMSource.cc:131
CTPPSDiamondDQMSource::ChannelPlots::trailingEdgeCumulative_te
MonitorElement * trailingEdgeCumulative_te
Definition: CTPPSDiamondDQMSource.cc:190
dds::Cache
Definition: CTPPSDiamondDQMSource.cc:60
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: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::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:141
CTPPSDiamondDQMSource::PlanePlots::EfficiencyWRTPixelsInPlane
MonitorElement * EfficiencyWRTPixelsInPlane
Definition: CTPPSDiamondDQMSource.cc:174
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:194
CTPPSDiamondDQMSource::dqmBeginRun
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
Definition: CTPPSDiamondDQMSource.cc:504
CTPPSDiamondDQMSource::PotPlots::activePlanes
MonitorElement * activePlanes
Definition: CTPPSDiamondDQMSource.cc:131
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
CTPPSDiamondDQMSource::EC_difference_45_
int EC_difference_45_
Definition: CTPPSDiamondDQMSource.cc:165
CTPPSDiamondDQMSource::~CTPPSDiamondDQMSource
~CTPPSDiamondDQMSource() override
Definition: CTPPSDiamondDQMSource.cc:500
CTPPSDiamondDetId::plane
uint32_t plane() const
Definition: CTPPSDiamondDetId.h:46
CTPPSDiamondDigi.h
CTPPSDiamondDQMSource::PotPlots::EfficiencyOfChannelsInPot
MonitorElement * EfficiencyOfChannelsInPot
Definition: CTPPSDiamondDQMSource.cc:157
edm::LogProblem
Log< level::Error, true > LogProblem
Definition: MessageLogger.h:131
CTPPSDiamondRecHit.h
CTPPSDiamondDQMSource::PotPlots::hitDistribution2d
MonitorElement * hitDistribution2d
Definition: CTPPSDiamondDQMSource.cc:127
DetGeomDesc::getDiamondDimensions
const DiamondDimensions & getDiamondDimensions() const
Definition: DetGeomDesc.h:82
CTPPSDiamondDQMSource::PotPlots::LeadingOnlyCounter
unsigned int LeadingOnlyCounter
Definition: CTPPSDiamondDQMSource.cc:153
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:165
CTPPSDiamondDQMSource::planePlots_
std::unordered_map< unsigned int, PlanePlots > planePlots_
Definition: CTPPSDiamondDQMSource.cc:182
dqm::implementation::NavigatorBase::cd
virtual void cd()
Definition: DQMStore.cc:29
CTPPSDiamondDQMSource::horizontalShiftOfDiamond_
double horizontalShiftOfDiamond_
Definition: CTPPSDiamondDQMSource.cc:110
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:185
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:44
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:192
CTPPSDiamondDQMSource::ctppsGeometryEventToken_
edm::ESGetToken< CTPPSGeometry, VeryForwardRealGeometryRecord > ctppsGeometryEventToken_
Definition: CTPPSDiamondDQMSource.cc:106
CTPPSDiamondDQMSource::centralOOT_
int centralOOT_
Definition: CTPPSDiamondDQMSource.cc:112
TotemVFATStatus.h
CTPPSDiamondDQMSource::PotPlots::pixelTracksMap
TH2F pixelTracksMap
Definition: CTPPSDiamondDQMSource.cc:158
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:90
CTPPSDiamondDetId.h
CTPPSDiamondDQMSource::PotPlots::MHComprensive
MonitorElement * MHComprensive
Definition: CTPPSDiamondDQMSource.cc:146
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:197
CTPPSDiamondDQMSource::PotPlots::hitDistribution2d_lumisection
MonitorElement * hitDistribution2d_lumisection
Definition: CTPPSDiamondDQMSource.cc:128
edm::ParameterSet
Definition: ParameterSet.h:47
edm::Transition
Transition
Definition: Transition.h:12
CTPPSDiamondDQMSource::PotPlots::MHCounter
unsigned int MHCounter
Definition: CTPPSDiamondDQMSource.cc:153
Event.h
CTPPSDiamondDQMSource::INV_DISPLAY_RESOLUTION_FOR_HITS_MM
static const double INV_DISPLAY_RESOLUTION_FOR_HITS_MM
Definition: CTPPSDiamondDQMSource.cc:85
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:121
CTPPSDiamondDQMSource::PlanePlots::pixelTracksMapWithDiamonds
TH2F pixelTracksMapWithDiamonds
Definition: CTPPSDiamondDQMSource.cc:176
CTPPSDiamondDQMSource::PotPlots::hitDistribution2dOOT
MonitorElement * hitDistribution2dOOT
Definition: CTPPSDiamondDQMSource.cc:129
CTPPSDiamondDQMSource::ChannelPlots::CompleteCounter
unsigned int CompleteCounter
Definition: CTPPSDiamondDQMSource.cc:197
CTPPSDiamondDQMSource::ChannelPlots::leadingEdgeCumulative_both
MonitorElement * leadingEdgeCumulative_both
Definition: CTPPSDiamondDQMSource.cc:189
CTPPSDiamondDQMSource::ChannelPlots::ChannelPlots
ChannelPlots()
Definition: CTPPSDiamondDQMSource.cc:199
CTPPSDiamondDQMSource::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: CTPPSDiamondDQMSource.cc:564
CTPPSDiamondDQMSource::PotPlots::TrailingOnlyCounter
unsigned int TrailingOnlyCounter
Definition: CTPPSDiamondDQMSource.cc:153
CTPPSDiamondDQMSource::PotPlots::PotPlots
PotPlots()
Definition: CTPPSDiamondDQMSource.cc:160
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:197
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:49
CTPPSDiamondDQMSource::CTPPS_DIAMOND_STATION_ID
static const int CTPPS_DIAMOND_STATION_ID
Definition: CTPPSDiamondDQMSource.cc:88
CTPPSDiamondDQMSource::ChannelPlots::TimeOverThresholdCumulativePerChannel
MonitorElement * TimeOverThresholdCumulativePerChannel
Definition: CTPPSDiamondDQMSource.cc:191
tolerance
const double tolerance
Definition: HGCalGeomParameters.cc:26
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:57
CTPPSDiamondDQMSource::PotPlots::leadingEdgeCumulative_both
MonitorElement * leadingEdgeCumulative_both
Definition: CTPPSDiamondDQMSource.cc:138
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:133
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:120
CTPPSDiamondDQMSource
Definition: CTPPSDiamondDQMSource.cc:67
CTPPSDiamondDQMSource::ChannelPlots::hit_rate
MonitorElement * hit_rate
Definition: CTPPSDiamondDQMSource.cc:195
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:145
CTPPSDiamondDQMSource::PlanePlots::digiProfileCumulativePerPlane
MonitorElement * digiProfileCumulativePerPlane
Definition: CTPPSDiamondDQMSource.cc:169
CTPPSDiamondDQMSource::PotPlots::effDoublecountingChMap
std::map< int, int > effDoublecountingChMap
Definition: CTPPSDiamondDQMSource.cc:156
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:171
CTPPSDiamondDQMSource::PotPlots::CompleteCounter
unsigned int CompleteCounter
Definition: CTPPSDiamondDQMSource.cc:153
CTPPSDiamondDQMSource::ChannelPlots::activity_per_bx
std::unordered_map< unsigned int, MonitorElement * > activity_per_bx
Definition: CTPPSDiamondDQMSource.cc:186
CTPPSDiamondDQMSource::PotPlots::trailingEdgeCumulative_te
MonitorElement * trailingEdgeCumulative_te
Definition: CTPPSDiamondDQMSource.cc:139
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:113
CTPPSDiamondDQMSource::PlanePlots::hitProfile
MonitorElement * hitProfile
Definition: CTPPSDiamondDQMSource.cc:170
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:138
dqmMemoryStats.total
total
Definition: dqmMemoryStats.py:152
CTPPSDiamondDQMSource::PotPlots::activity_per_bx
std::unordered_map< unsigned int, MonitorElement * > activity_per_bx
Definition: CTPPSDiamondDQMSource.cc:125
CTPPSDiamondDQMSource::ChannelPlots::leadingWithoutTrailing
MonitorElement * leadingWithoutTrailing
Definition: CTPPSDiamondDQMSource.cc:193
edm::EDConsumerBase::esConsumes
auto esConsumes()
Definition: EDConsumerBase.h:200
CTPPSDiamondDQMSource::GlobalPlots
plots related to the whole system
Definition: CTPPSDiamondDQMSource.cc:116
ztail.d
d
Definition: ztail.py:151
CTPPSDiamondDQMSource::PlanePlots::pixelTomography_far
MonitorElement * pixelTomography_far
Definition: CTPPSDiamondDQMSource.cc:173
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:189
edm::EDConsumerBase::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: EDConsumerBase.h:153
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:168
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:143
CTPPSDiamondDQMSource::PotPlots
plots related to one Diamond detector package
Definition: CTPPSDiamondDQMSource.cc:124
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:117
CTPPSDiamondDQMSource::horizontalShiftBwDiamondPixels_
double horizontalShiftBwDiamondPixels_
Definition: CTPPSDiamondDQMSource.cc:109
CTPPSDiamondDQMSource::runParameters_
std::vector< std::pair< edm::EventRange, int > > runParameters_
Definition: CTPPSDiamondDQMSource.cc:111
CTPPSDetId::rpName
void rpName(std::string &name, NameFlag flag=nFull) const
Definition: CTPPSDetId.h:132