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 122 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 281 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, castor_dqm_sourceclient_file_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.

287  : HitCounter(0),
288  MHCounter(0),
291  CompleteCounter(0),
292  pixelTracksMap("Pixel track maps for efficiency", "Pixel track maps for efficiency", 25, 0, 25, 12, -2, 10) {
295  ibooker.setCurrentFolder(path);
296 
298 
299  if (plotOnline) {
301  ibooker.book2D("hits in planes lumisection",
302  title + " hits in planes in the last lumisection;plane number;x (mm)",
303  10,
304  -0.5,
305  4.5,
307  -0.5,
308  18.5);
309 
311  ibooker.book2D("hits with OOT in planes (le only)",
312  title + " hits with OOT in planes (le only);plane number, OOT index;x (mm)",
313  1 + windowsNum * 4,
314  -1. / windowsNum,
315  4,
317  -0.5,
318  18.5);
319 
321  ibooker.book1D("active planes inclusive",
322  title + " active planes, MH and le only included (per event);number of active planes",
323  6,
324  -0.5,
325  5.5);
326 
327  ECCheck = ibooker.book1D("optorxEC(8bit) - vfatEC", title + " EC Error;optorxEC-vfatEC", 50, -25, 25);
328 
330  ibooker.book2D("Efficiency in channels",
331  title + " Efficiency (%) in channels (diamonds only);plane number;ch number",
332  10,
333  -0.5,
334  4.5,
335  14,
336  -1,
337  13);
338  }
339 
340  if (plotOffline && !perLSsaving) {
341  ibooker.setCurrentFolder(path + "/timing_profiles");
342  // TOTVsLS=ibooker.book2D("ToT vs LS",title +" ToT vs LS;LS;ToT(ns)",4000,0,4000, 200,5,25);
343  // trackTimeVsLS=ibooker.book2D("track time vs LS",title+" track time vs LS;LS;track_time(ns)",4000,0,4000, 500, -25, 25);
344  trackTimeVsBX =
345  ibooker.book2D("track time vs BX", title + " track time vs BX;BX;track_time(ns)", 4000, 0, 4000, 500, -25, 25);
346  // trackTimeVsXAngle = ibooker.book2D(
347  // "track time vs xangle", title + " track time vs xangle;xangle;track_time(ns)", 60, 120, 180, 500, -25, 25);
348 
349  // TOTVsLSProfile=ibooker.bookProfile("ToT vs LS profile",title+" ToT vs LS profile;LS;track_time(ns)", 500, -25, 25,4000,0,4000);
350  // trackTimeVsLSProfile=ibooker.bookProfile("track time vs LS profile",title+" track time vs LS profile;LS;track_time(ns)", 500, -25, 25,4000,0,4000);
352  "track time vs BX profile", title + " track time vs BX profile;BX;track_time(ns)", 500, -25, 25, 4000, 0, 4000);
353  // trackTimeVsXAngleProfile = ibooker.bookProfile("track time vs xangle profile",
354  // title + " track time vs xangle profile;xangle;track_time(ns)",
355  // 500,
356  // -25,
357  // 25,
358  // 60,
359  // 120,
360  // 180);
361  ibooker.setCurrentFolder(path);
362  }
363 
364  for (unsigned int i = 0; i < windowsNum; i++) {
365  std::string window = std::to_string(i * 25) + "-" + std::to_string((i + 1) * 25);
366  activity_per_bx[i] = ibooker.book1D(
367  "activity per BX " + window, title + " Activity per BX " + window + " ns;Event.BX", 3600, -1.5, 3598. + 0.5);
369  ibooker.book2D("tomography pixel " + window,
370  title + " tomography with pixel " + window + " ns (all planes);x + 25*plane(mm);y (mm)",
371  100,
372  0,
373  100,
374  10,
375  -5,
376  5);
377  }
378 
379  hitDistribution2d = ibooker.book2D("hits in planes",
380  title + " hits in planes;plane number;x (mm)",
381  10,
382  -0.5,
383  4.5,
385  -0.5,
386  18.5);
387 
388  hitDistribution2dOOT = ibooker.book2D("hits with OOT in planes",
389  title + " hits with OOT in planes;plane number, OOT index;x (mm)",
390  1 + windowsNum * 4,
391  -1. / windowsNum,
392  4,
394  -0.5,
395  18.5);
396 
397  { // bin labelling (for clarity)
398  int idx = 2; // start counting at 1, first bin is empty
399  for (int pl = 0; pl < 4; ++pl)
400  for (unsigned int oot = 0; oot < windowsNum; ++oot) {
401  const std::string bin_label =
402  (oot == 0 ? "Plane " + std::to_string(pl) + ", " : "") + "OOT" + std::to_string(oot);
403  hitDistribution2dOOT->setBinLabel(idx, bin_label);
404  if (plotOnline)
406  ++idx;
407  }
408  }
409 
410  recHitTime = ibooker.book1D("recHit time", title + " recHit time; t (ns)", 500, -25, 25);
411 
412  activePlanes =
413  ibooker.book1D("active planes", title + " active planes (per event);number of active planes", 6, -0.5, 5.5);
414 
416  ibooker.book1D("tracks", title + " tracks;x (mm)", 19. * INV_DISPLAY_RESOLUTION_FOR_HITS_MM, -0.5, 18.5);
417  trackDistributionOOT = ibooker.book2D("tracks with OOT",
418  title + " tracks with OOT;plane number;x (mm)",
419  9,
420  -0.5,
421  4,
423  -0.5,
424  18.5);
425 
426  leadingEdgeCumulative_both = ibooker.book1D("leading edge (le and te)",
427  title + " leading edge (le and te) (recHits); leading edge (ns)",
428  25 * windowsNum,
429  0,
430  25 * windowsNum);
431  leadingEdgeCumulative_all = ibooker.book1D("leading edge (all)",
432  title + " leading edge (with or without te) (DIGIs); leading edge (ns)",
433  25 * windowsNum,
434  0,
435  25 * windowsNum);
436  leadingEdgeCumulative_le = ibooker.book1D("leading edge (le only)",
437  title + " leading edge (le only) (DIGIs); leading edge (ns)",
438  25 * windowsNum,
439  0,
440  25 * windowsNum);
441  trailingEdgeCumulative_te = ibooker.book1D("trailing edge (te only)",
442  title + " trailing edge (te only) (DIGIs); trailing edge (ns)",
443  25 * windowsNum,
444  0,
445  25 * windowsNum);
447  ibooker.book1D("time over threshold", title + " time over threshold;time over threshold (ns)", 250, -25, 100);
448  // leadingTrailingCorrelationPot =
449  // ibooker.book2D("leading trailing correlation",
450  // title + " leading trailing correlation;leading edge (ns);trailing edge (ns)",
451  // 75,
452  // 0,
453  // 75,
454  // 75,
455  // 0,
456  // 75);
457 
459  ibooker.book1D("event category", title + " leading edges without trailing;;%", 3, 0.5, 3.5);
463 
464  HPTDCErrorFlags_2D = ibooker.book2D("HPTDC Errors", title + " HPTDC Errors", 16, -0.5, 16.5, 9, -0.5, 8.5);
465  for (unsigned short error_index = 1; error_index < 16; ++error_index)
466  HPTDCErrorFlags_2D->setBinLabel(error_index, HPTDCErrorFlags::hptdcErrorName(error_index - 1));
467  HPTDCErrorFlags_2D->setBinLabel(16, "Wrong EC");
468 
469  int tmpIndex = 0;
470  HPTDCErrorFlags_2D->setBinLabel(++tmpIndex, "DB 0 TDC 18", /* axis */ 2);
471  HPTDCErrorFlags_2D->setBinLabel(++tmpIndex, "DB 0 TDC 17", /* axis */ 2);
472  HPTDCErrorFlags_2D->setBinLabel(++tmpIndex, "DB 0 TDC 16", /* axis */ 2);
473  HPTDCErrorFlags_2D->setBinLabel(++tmpIndex, "DB 0 TDC 15", /* axis */ 2);
474  HPTDCErrorFlags_2D->setBinLabel(++tmpIndex, "DB 1 TDC 18", /* axis */ 2);
475  HPTDCErrorFlags_2D->setBinLabel(++tmpIndex, "DB 1 TDC 17", /* axis */ 2);
476  HPTDCErrorFlags_2D->setBinLabel(++tmpIndex, "DB 1 TDC 16", /* axis */ 2);
477  HPTDCErrorFlags_2D->setBinLabel(++tmpIndex, "DB 1 TDC 15", /* axis */ 2);
478 
479  MHComprensive =
480  ibooker.book2D("MH in channels", title + " MH (%) in channels;plane number;ch number", 10, -0.5, 4.5, 14, -1, 13);
481 
482  // ibooker.setCurrentFolder( path+"/clock/" );
483  // clock_Digi1_le = ibooker.book1D( "clock1 leading edge", title+" clock1;leading edge (ns)", 250, 0, 25 );
484  // clock_Digi1_te = ibooker.book1D( "clock1 trailing edge", title+" clock1;trailing edge (ns)", 75, 0, 75 );
485  // clock_Digi3_le = ibooker.book1D( "clock3 leading edge", title+" clock3;leading edge (ns)", 250, 0, 25 );
486  // clock_Digi3_te = ibooker.book1D( "clock3 trailing edge", title+" clock3;trailing edge (ns)", 75, 0, 75 );
487 }
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:399
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:212
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 129 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ activePlanesInclusive

MonitorElement * CTPPSDiamondDQMSource::PotPlots::activePlanesInclusive = nullptr

Definition at line 129 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ activity_per_bx

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

Definition at line 123 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ CompleteCounter

unsigned int CTPPSDiamondDQMSource::PotPlots::CompleteCounter

Definition at line 153 of file CTPPSDiamondDQMSource.cc.

◆ ECCheck

MonitorElement* CTPPSDiamondDQMSource::PotPlots::ECCheck = nullptr

Definition at line 141 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ effDoublecountingChMap

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

Definition at line 156 of file CTPPSDiamondDQMSource.cc.

◆ EfficiencyOfChannelsInPot

MonitorElement* CTPPSDiamondDQMSource::PotPlots::EfficiencyOfChannelsInPot = nullptr

Definition at line 157 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ effTriplecountingChMap

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

Definition at line 155 of file CTPPSDiamondDQMSource.cc.

◆ HitCounter

unsigned int CTPPSDiamondDQMSource::PotPlots::HitCounter

Definition at line 153 of file CTPPSDiamondDQMSource.cc.

◆ hitDistribution2d

MonitorElement* CTPPSDiamondDQMSource::PotPlots::hitDistribution2d = nullptr

Definition at line 125 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ hitDistribution2d_lumisection

MonitorElement* CTPPSDiamondDQMSource::PotPlots::hitDistribution2d_lumisection = nullptr

Definition at line 126 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ hitDistribution2dOOT

MonitorElement* CTPPSDiamondDQMSource::PotPlots::hitDistribution2dOOT = nullptr

Definition at line 127 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ hitDistribution2dOOT_le

MonitorElement* CTPPSDiamondDQMSource::PotPlots::hitDistribution2dOOT_le = nullptr

Definition at line 128 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ HPTDCErrorFlags_2D

MonitorElement* CTPPSDiamondDQMSource::PotPlots::HPTDCErrorFlags_2D = nullptr

Definition at line 143 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ leadingEdgeCumulative_all

MonitorElement * CTPPSDiamondDQMSource::PotPlots::leadingEdgeCumulative_all = nullptr

Definition at line 136 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ leadingEdgeCumulative_both

MonitorElement* CTPPSDiamondDQMSource::PotPlots::leadingEdgeCumulative_both = nullptr

Definition at line 136 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ leadingEdgeCumulative_le

MonitorElement * CTPPSDiamondDQMSource::PotPlots::leadingEdgeCumulative_le = nullptr

Definition at line 137 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ LeadingOnlyCounter

unsigned int CTPPSDiamondDQMSource::PotPlots::LeadingOnlyCounter

Definition at line 153 of file CTPPSDiamondDQMSource.cc.

◆ leadingWithoutTrailingCumulativePot

MonitorElement* CTPPSDiamondDQMSource::PotPlots::leadingWithoutTrailingCumulativePot = nullptr

Definition at line 139 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ MHComprensive

MonitorElement* CTPPSDiamondDQMSource::PotPlots::MHComprensive = nullptr

Definition at line 144 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ MHCounter

unsigned int CTPPSDiamondDQMSource::PotPlots::MHCounter

Definition at line 153 of file CTPPSDiamondDQMSource.cc.

◆ pixelTomographyAll

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

Definition at line 134 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ pixelTracksMap

TH2F CTPPSDiamondDQMSource::PotPlots::pixelTracksMap

Definition at line 158 of file CTPPSDiamondDQMSource.cc.

◆ recHitTime

MonitorElement* CTPPSDiamondDQMSource::PotPlots::recHitTime = nullptr

Definition at line 146 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ timeOverThresholdCumulativePot

MonitorElement* CTPPSDiamondDQMSource::PotPlots::timeOverThresholdCumulativePot = nullptr

Definition at line 138 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ trackDistribution

MonitorElement* CTPPSDiamondDQMSource::PotPlots::trackDistribution = nullptr

Definition at line 131 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ trackDistributionOOT

MonitorElement* CTPPSDiamondDQMSource::PotPlots::trackDistributionOOT = nullptr

Definition at line 132 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ trackTimeVsBX

MonitorElement* CTPPSDiamondDQMSource::PotPlots::trackTimeVsBX = nullptr

Definition at line 162 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ trackTimeVsBXProfile

MonitorElement* CTPPSDiamondDQMSource::PotPlots::trackTimeVsBXProfile = nullptr

Definition at line 167 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ trailingEdgeCumulative_te

MonitorElement * CTPPSDiamondDQMSource::PotPlots::trailingEdgeCumulative_te = nullptr

Definition at line 137 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ TrailingOnlyCounter

unsigned int CTPPSDiamondDQMSource::PotPlots::TrailingOnlyCounter

Definition at line 153 of file CTPPSDiamondDQMSource.cc.