CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
CTPPSDiamondDQMSource::PotPlots Struct Reference

plots related to one Diamond detector package More...

Public Member Functions

 PotPlots ()=default
 
 PotPlots (DQMStore::IBooker &ibooker, unsigned int id, unsigned int windowsNum, bool plotOnline, bool plotOffline, bool perLSsaving)
 

Public Attributes

MonitorElementactivePlanes = nullptr
 
MonitorElementactivePlanesInclusive = nullptr
 
std::unordered_map< unsigned int, MonitorElement * > activity_per_bx
 
unsigned int CompleteCounter
 
MonitorElementECCheck = nullptr
 
std::map< int, int > effDoublecountingChMap
 
MonitorElementEfficiencyOfChannelsInPot = nullptr
 
std::map< int, int > effTriplecountingChMap
 
unsigned int HitCounter
 
MonitorElementhitDistribution2d = nullptr
 
MonitorElementhitDistribution2d_lumisection = nullptr
 
MonitorElementhitDistribution2dOOT = nullptr
 
MonitorElementhitDistribution2dOOT_le = nullptr
 
MonitorElementHPTDCErrorFlags_2D = nullptr
 
MonitorElementleadingEdgeCumulative_all = nullptr
 
MonitorElementleadingEdgeCumulative_both = nullptr
 
MonitorElementleadingEdgeCumulative_le = nullptr
 
unsigned int LeadingOnlyCounter
 
MonitorElementleadingWithoutTrailingCumulativePot = nullptr
 
MonitorElementMHComprensive = nullptr
 
unsigned int MHCounter
 
std::unordered_map< unsigned int, MonitorElement * > pixelTomographyAll
 
TH2F pixelTracksMap
 
MonitorElementrecHitTime = nullptr
 
MonitorElementtimeOverThresholdCumulativePot = nullptr
 
MonitorElementtrackDistribution = nullptr
 
MonitorElementtrackDistributionOOT = nullptr
 
MonitorElementtrackTimeVsBX = nullptr
 
MonitorElementtrackTimeVsBXProfile = nullptr
 
MonitorElementtrailingEdgeCumulative_te = nullptr
 
unsigned int TrailingOnlyCounter
 

Detailed Description

plots related to one Diamond detector package

Definition at line 121 of file CTPPSDiamondDQMSource.cc.

Constructor & Destructor Documentation

◆ PotPlots() [1/2]

CTPPSDiamondDQMSource::PotPlots::PotPlots ( )
default

◆ PotPlots() [2/2]

CTPPSDiamondDQMSource::PotPlots::PotPlots ( DQMStore::IBooker ibooker,
unsigned int  id,
unsigned int  windowsNum,
bool  plotOnline,
bool  plotOffline,
bool  perLSsaving 
)

Definition at line 282 of file CTPPSDiamondDQMSource.cc.

References activePlanes, activePlanesInclusive, activity_per_bx, dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), dqm::implementation::IBooker::bookProfile(), ECCheck, EfficiencyOfChannelsInPot, hitDistribution2d, hitDistribution2d_lumisection, hitDistribution2dOOT, hitDistribution2dOOT_le, HPTDCErrorFlags_2D, HPTDCErrorFlags::hptdcErrorName(), mps_fire::i, heavyIonCSV_trainingSettings::idx, CTPPSDiamondDQMSource::INV_DISPLAY_RESOLUTION_FOR_HITS_MM, leadingEdgeCumulative_all, leadingEdgeCumulative_both, leadingEdgeCumulative_le, leadingWithoutTrailingCumulativePot, MHComprensive, CTPPSDetId::nFull, CTPPSDetId::nPath, EnsembleCalibrationLA_cfg::path, AlcaBeamMonitor_cff::perLSsaving, pixelTomographyAll, ctppsDiamondDQMSource_cfi::plotOffline, ctppsDiamondDQMSource_cfi::plotOnline, recHitTime, CTPPSDetId::rpName(), dqm::impl::MonitorElement::setBinLabel(), dqm::implementation::NavigatorBase::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, timeOverThresholdCumulativePot, runGCPTkAlMap::title, to_string(), trackDistribution, trackDistributionOOT, trackTimeVsBX, trackTimeVsBXProfile, trailingEdgeCumulative_te, svgfig::window(), and totemT2DQMSource_cfi::windowsNum.

288  : HitCounter(0),
289  MHCounter(0),
292  CompleteCounter(0),
293  pixelTracksMap("Pixel track maps for efficiency", "Pixel track maps for efficiency", 25, 0, 25, 16, -8, 8) {
296  ibooker.setCurrentFolder(path);
297 
299 
300  if (plotOnline) {
302  ibooker.book2D("hits in planes lumisection",
303  title + " hits in planes in the last lumisection;plane number;x (mm)",
304  10,
305  -0.5,
306  4.5,
308  -0.5,
309  18.5);
310 
312  ibooker.book2D("hits with OOT in planes (le only)",
313  title + " hits with OOT in planes (le only);plane number, OOT index;x (mm)",
314  1 + windowsNum * 4,
315  -1. / windowsNum,
316  4,
318  -0.5,
319  18.5);
320 
322  ibooker.book1D("active planes inclusive",
323  title + " active planes, MH and le only included (per event);number of active planes",
324  6,
325  -0.5,
326  5.5);
327 
328  ECCheck = ibooker.book1D("optorxEC(8bit) - vfatEC", title + " EC Error;optorxEC-vfatEC", 50, -25, 25);
329 
331  ibooker.book2D("Efficiency in channels",
332  title + " Efficiency (%) in channels (diamonds only);plane number;ch number",
333  10,
334  -0.5,
335  4.5,
336  14,
337  -1,
338  13);
339  }
340 
341  if (plotOffline && !perLSsaving) {
342  ibooker.setCurrentFolder(path + "/timing_profiles");
343  // TOTVsLS=ibooker.book2D("ToT vs LS",title +" ToT vs LS;LS;ToT(ns)",4000,0,4000, 200,5,25);
344  // trackTimeVsLS=ibooker.book2D("track time vs LS",title+" track time vs LS;LS;track_time(ns)",4000,0,4000, 500, -25, 25);
345  trackTimeVsBX =
346  ibooker.book2D("track time vs BX", title + " track time vs BX;BX;track_time(ns)", 4000, 0, 4000, 500, -25, 25);
347  // trackTimeVsXAngle = ibooker.book2D(
348  // "track time vs xangle", title + " track time vs xangle;xangle;track_time(ns)", 60, 120, 180, 500, -25, 25);
349 
350  // TOTVsLSProfile=ibooker.bookProfile("ToT vs LS profile",title+" ToT vs LS profile;LS;track_time(ns)", 500, -25, 25,4000,0,4000);
351  // trackTimeVsLSProfile=ibooker.bookProfile("track time vs LS profile",title+" track time vs LS profile;LS;track_time(ns)", 500, -25, 25,4000,0,4000);
353  "track time vs BX profile", title + " track time vs BX profile;BX;track_time(ns)", 500, -25, 25, 4000, 0, 4000);
354  // trackTimeVsXAngleProfile = ibooker.bookProfile("track time vs xangle profile",
355  // title + " track time vs xangle profile;xangle;track_time(ns)",
356  // 500,
357  // -25,
358  // 25,
359  // 60,
360  // 120,
361  // 180);
362  ibooker.setCurrentFolder(path);
363  }
364 
365  for (unsigned int i = 0; i < windowsNum; i++) {
366  std::string window = std::to_string(i * 25) + "-" + std::to_string((i + 1) * 25);
367  activity_per_bx[i] = ibooker.book1D(
368  "activity per BX " + window, title + " Activity per BX " + window + " ns;Event.BX", 3600, -1.5, 3598. + 0.5);
370  ibooker.book2D("tomography pixel " + window,
371  title + " tomography with pixel " + window + " ns (all planes);x + 25*plane(mm);y (mm)",
372  100,
373  0,
374  100,
375  10,
376  -5,
377  5);
378  }
379 
380  hitDistribution2d = ibooker.book2D("hits in planes",
381  title + " hits in planes;plane number;x (mm)",
382  10,
383  -0.5,
384  4.5,
386  -0.5,
387  18.5);
388 
389  hitDistribution2dOOT = ibooker.book2D("hits with OOT in planes",
390  title + " hits with OOT in planes;plane number, OOT index;x (mm)",
391  1 + windowsNum * 4,
392  -1. / windowsNum,
393  4,
395  -0.5,
396  18.5);
397 
398  { // bin labelling (for clarity)
399  int idx = 2; // start counting at 1, first bin is empty
400  for (int pl = 0; pl < 4; ++pl)
401  for (unsigned int oot = 0; oot < windowsNum; ++oot) {
402  const std::string bin_label =
403  (oot == 0 ? "Plane " + std::to_string(pl) + ", " : "") + "OOT" + std::to_string(oot);
404  hitDistribution2dOOT->setBinLabel(idx, bin_label);
405  if (plotOnline)
407  ++idx;
408  }
409  }
410 
411  recHitTime = ibooker.book1D("recHit time", title + " recHit time; t (ns)", 500, -25, 25);
412 
413  activePlanes =
414  ibooker.book1D("active planes", title + " active planes (per event);number of active planes", 6, -0.5, 5.5);
415 
417  ibooker.book1D("tracks", title + " tracks;x (mm)", 19. * INV_DISPLAY_RESOLUTION_FOR_HITS_MM, -0.5, 18.5);
418  trackDistributionOOT = ibooker.book2D("tracks with OOT",
419  title + " tracks with OOT;plane number;x (mm)",
420  9,
421  -0.5,
422  4,
424  -0.5,
425  18.5);
426 
427  leadingEdgeCumulative_both = ibooker.book1D("leading edge (le and te)",
428  title + " leading edge (le and te) (recHits); leading edge (ns)",
429  25 * windowsNum,
430  0,
431  25 * windowsNum);
432  leadingEdgeCumulative_all = ibooker.book1D("leading edge (all)",
433  title + " leading edge (with or without te) (DIGIs); leading edge (ns)",
434  25 * windowsNum,
435  0,
436  25 * windowsNum);
437  leadingEdgeCumulative_le = ibooker.book1D("leading edge (le only)",
438  title + " leading edge (le only) (DIGIs); leading edge (ns)",
439  25 * windowsNum,
440  0,
441  25 * windowsNum);
442  trailingEdgeCumulative_te = ibooker.book1D("trailing edge (te only)",
443  title + " trailing edge (te only) (DIGIs); trailing edge (ns)",
444  25 * windowsNum,
445  0,
446  25 * windowsNum);
448  ibooker.book1D("time over threshold", title + " time over threshold;time over threshold (ns)", 250, -25, 100);
449  // leadingTrailingCorrelationPot =
450  // ibooker.book2D("leading trailing correlation",
451  // title + " leading trailing correlation;leading edge (ns);trailing edge (ns)",
452  // 75,
453  // 0,
454  // 75,
455  // 75,
456  // 0,
457  // 75);
458 
460  ibooker.book1D("event category", title + " leading edges without trailing;;%", 3, 0.5, 3.5);
464 
465  HPTDCErrorFlags_2D = ibooker.book2D("HPTDC Errors", title + " HPTDC Errors", 16, -0.5, 16.5, 9, -0.5, 8.5);
466  for (unsigned short error_index = 1; error_index < 16; ++error_index)
467  HPTDCErrorFlags_2D->setBinLabel(error_index, HPTDCErrorFlags::hptdcErrorName(error_index - 1));
468  HPTDCErrorFlags_2D->setBinLabel(16, "Wrong EC");
469 
470  int tmpIndex = 0;
471  HPTDCErrorFlags_2D->setBinLabel(++tmpIndex, "DB 0 TDC 18", /* axis */ 2);
472  HPTDCErrorFlags_2D->setBinLabel(++tmpIndex, "DB 0 TDC 17", /* axis */ 2);
473  HPTDCErrorFlags_2D->setBinLabel(++tmpIndex, "DB 0 TDC 16", /* axis */ 2);
474  HPTDCErrorFlags_2D->setBinLabel(++tmpIndex, "DB 0 TDC 15", /* axis */ 2);
475  HPTDCErrorFlags_2D->setBinLabel(++tmpIndex, "DB 1 TDC 18", /* axis */ 2);
476  HPTDCErrorFlags_2D->setBinLabel(++tmpIndex, "DB 1 TDC 17", /* axis */ 2);
477  HPTDCErrorFlags_2D->setBinLabel(++tmpIndex, "DB 1 TDC 16", /* axis */ 2);
478  HPTDCErrorFlags_2D->setBinLabel(++tmpIndex, "DB 1 TDC 15", /* axis */ 2);
479 
480  MHComprensive =
481  ibooker.book2D("MH in channels", title + " MH (%) in channels;plane number;ch number", 10, -0.5, 4.5, 14, -1, 13);
482 
483  // ibooker.setCurrentFolder( path+"/clock/" );
484  // clock_Digi1_le = ibooker.book1D( "clock1 leading edge", title+" clock1;leading edge (ns)", 250, 0, 25 );
485  // clock_Digi1_te = ibooker.book1D( "clock1 trailing edge", title+" clock1;trailing edge (ns)", 75, 0, 75 );
486  // clock_Digi3_le = ibooker.book1D( "clock3 leading edge", title+" clock3;leading edge (ns)", 250, 0, 25 );
487  // clock_Digi3_te = ibooker.book1D( "clock3 trailing edge", title+" clock3;trailing edge (ns)", 75, 0, 75 );
488 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
static std::string to_string(const XMLCh *ch)
MonitorElement * leadingWithoutTrailingCumulativePot
std::unordered_map< unsigned int, MonitorElement * > pixelTomographyAll
static std::string hptdcErrorName(const unsigned short id)
void rpName(std::string &name, NameFlag flag=nFull) const
Definition: CTPPSDetId.h:134
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:408
def window(xmin, xmax, ymin, ymax, x=0, y=0, width=100, height=100, xlogbase=None, ylogbase=None, minusInfinity=-1000, flipx=False, flipy=True)
Definition: svgfig.py:643
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)
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:221
static constexpr double INV_DISPLAY_RESOLUTION_FOR_HITS_MM
Detector ID class for CTPPS Timing Diamond detectors. Bits [19:31] : Assigend in CTPPSDetId Calss Bit...
std::unordered_map< unsigned int, MonitorElement * > activity_per_bx
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98

Member Data Documentation

◆ activePlanes

MonitorElement* CTPPSDiamondDQMSource::PotPlots::activePlanes = nullptr

Definition at line 128 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ activePlanesInclusive

MonitorElement * CTPPSDiamondDQMSource::PotPlots::activePlanesInclusive = nullptr

Definition at line 128 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ activity_per_bx

std::unordered_map<unsigned int, MonitorElement*> CTPPSDiamondDQMSource::PotPlots::activity_per_bx

Definition at line 122 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ CompleteCounter

unsigned int CTPPSDiamondDQMSource::PotPlots::CompleteCounter

Definition at line 152 of file CTPPSDiamondDQMSource.cc.

◆ ECCheck

MonitorElement* CTPPSDiamondDQMSource::PotPlots::ECCheck = nullptr

Definition at line 140 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ effDoublecountingChMap

std::map<int, int> CTPPSDiamondDQMSource::PotPlots::effDoublecountingChMap

Definition at line 155 of file CTPPSDiamondDQMSource.cc.

◆ EfficiencyOfChannelsInPot

MonitorElement* CTPPSDiamondDQMSource::PotPlots::EfficiencyOfChannelsInPot = nullptr

Definition at line 156 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ effTriplecountingChMap

std::map<int, int> CTPPSDiamondDQMSource::PotPlots::effTriplecountingChMap

Definition at line 154 of file CTPPSDiamondDQMSource.cc.

◆ HitCounter

unsigned int CTPPSDiamondDQMSource::PotPlots::HitCounter

Definition at line 152 of file CTPPSDiamondDQMSource.cc.

◆ hitDistribution2d

MonitorElement* CTPPSDiamondDQMSource::PotPlots::hitDistribution2d = nullptr

Definition at line 124 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ hitDistribution2d_lumisection

MonitorElement* CTPPSDiamondDQMSource::PotPlots::hitDistribution2d_lumisection = nullptr

Definition at line 125 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ hitDistribution2dOOT

MonitorElement* CTPPSDiamondDQMSource::PotPlots::hitDistribution2dOOT = nullptr

Definition at line 126 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ hitDistribution2dOOT_le

MonitorElement* CTPPSDiamondDQMSource::PotPlots::hitDistribution2dOOT_le = nullptr

Definition at line 127 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ HPTDCErrorFlags_2D

MonitorElement* CTPPSDiamondDQMSource::PotPlots::HPTDCErrorFlags_2D = nullptr

Definition at line 142 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ leadingEdgeCumulative_all

MonitorElement * CTPPSDiamondDQMSource::PotPlots::leadingEdgeCumulative_all = nullptr

Definition at line 135 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ leadingEdgeCumulative_both

MonitorElement* CTPPSDiamondDQMSource::PotPlots::leadingEdgeCumulative_both = nullptr

Definition at line 135 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ leadingEdgeCumulative_le

MonitorElement * CTPPSDiamondDQMSource::PotPlots::leadingEdgeCumulative_le = nullptr

Definition at line 136 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ LeadingOnlyCounter

unsigned int CTPPSDiamondDQMSource::PotPlots::LeadingOnlyCounter

Definition at line 152 of file CTPPSDiamondDQMSource.cc.

◆ leadingWithoutTrailingCumulativePot

MonitorElement* CTPPSDiamondDQMSource::PotPlots::leadingWithoutTrailingCumulativePot = nullptr

Definition at line 138 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ MHComprensive

MonitorElement* CTPPSDiamondDQMSource::PotPlots::MHComprensive = nullptr

Definition at line 143 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ MHCounter

unsigned int CTPPSDiamondDQMSource::PotPlots::MHCounter

Definition at line 152 of file CTPPSDiamondDQMSource.cc.

◆ pixelTomographyAll

std::unordered_map<unsigned int, MonitorElement*> CTPPSDiamondDQMSource::PotPlots::pixelTomographyAll

Definition at line 133 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ pixelTracksMap

TH2F CTPPSDiamondDQMSource::PotPlots::pixelTracksMap

Definition at line 157 of file CTPPSDiamondDQMSource.cc.

◆ recHitTime

MonitorElement* CTPPSDiamondDQMSource::PotPlots::recHitTime = nullptr

Definition at line 145 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ timeOverThresholdCumulativePot

MonitorElement* CTPPSDiamondDQMSource::PotPlots::timeOverThresholdCumulativePot = nullptr

Definition at line 137 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ trackDistribution

MonitorElement* CTPPSDiamondDQMSource::PotPlots::trackDistribution = nullptr

Definition at line 130 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ trackDistributionOOT

MonitorElement* CTPPSDiamondDQMSource::PotPlots::trackDistributionOOT = nullptr

Definition at line 131 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ trackTimeVsBX

MonitorElement* CTPPSDiamondDQMSource::PotPlots::trackTimeVsBX = nullptr

Definition at line 161 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ trackTimeVsBXProfile

MonitorElement* CTPPSDiamondDQMSource::PotPlots::trackTimeVsBXProfile = nullptr

Definition at line 166 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ trailingEdgeCumulative_te

MonitorElement * CTPPSDiamondDQMSource::PotPlots::trailingEdgeCumulative_te = nullptr

Definition at line 136 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ TrailingOnlyCounter

unsigned int CTPPSDiamondDQMSource::PotPlots::TrailingOnlyCounter

Definition at line 152 of file CTPPSDiamondDQMSource.cc.