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 119 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 277 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.

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

Referenced by PotPlots().

◆ activePlanesInclusive

MonitorElement * CTPPSDiamondDQMSource::PotPlots::activePlanesInclusive = nullptr

Definition at line 126 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ activity_per_bx

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

Definition at line 120 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ CompleteCounter

unsigned int CTPPSDiamondDQMSource::PotPlots::CompleteCounter

Definition at line 150 of file CTPPSDiamondDQMSource.cc.

◆ ECCheck

MonitorElement* CTPPSDiamondDQMSource::PotPlots::ECCheck = nullptr

Definition at line 138 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ effDoublecountingChMap

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

Definition at line 153 of file CTPPSDiamondDQMSource.cc.

◆ EfficiencyOfChannelsInPot

MonitorElement* CTPPSDiamondDQMSource::PotPlots::EfficiencyOfChannelsInPot = nullptr

Definition at line 154 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ effTriplecountingChMap

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

Definition at line 152 of file CTPPSDiamondDQMSource.cc.

◆ HitCounter

unsigned int CTPPSDiamondDQMSource::PotPlots::HitCounter

Definition at line 150 of file CTPPSDiamondDQMSource.cc.

◆ hitDistribution2d

MonitorElement* CTPPSDiamondDQMSource::PotPlots::hitDistribution2d = nullptr

Definition at line 122 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ hitDistribution2d_lumisection

MonitorElement* CTPPSDiamondDQMSource::PotPlots::hitDistribution2d_lumisection = nullptr

Definition at line 123 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ hitDistribution2dOOT

MonitorElement* CTPPSDiamondDQMSource::PotPlots::hitDistribution2dOOT = nullptr

Definition at line 124 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ hitDistribution2dOOT_le

MonitorElement* CTPPSDiamondDQMSource::PotPlots::hitDistribution2dOOT_le = nullptr

Definition at line 125 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ HPTDCErrorFlags_2D

MonitorElement* CTPPSDiamondDQMSource::PotPlots::HPTDCErrorFlags_2D = nullptr

Definition at line 140 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ leadingEdgeCumulative_all

MonitorElement * CTPPSDiamondDQMSource::PotPlots::leadingEdgeCumulative_all = nullptr

Definition at line 133 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ leadingEdgeCumulative_both

MonitorElement* CTPPSDiamondDQMSource::PotPlots::leadingEdgeCumulative_both = nullptr

Definition at line 133 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ leadingEdgeCumulative_le

MonitorElement * CTPPSDiamondDQMSource::PotPlots::leadingEdgeCumulative_le = nullptr

Definition at line 134 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ LeadingOnlyCounter

unsigned int CTPPSDiamondDQMSource::PotPlots::LeadingOnlyCounter

Definition at line 150 of file CTPPSDiamondDQMSource.cc.

◆ leadingWithoutTrailingCumulativePot

MonitorElement* CTPPSDiamondDQMSource::PotPlots::leadingWithoutTrailingCumulativePot = nullptr

Definition at line 136 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ MHComprensive

MonitorElement* CTPPSDiamondDQMSource::PotPlots::MHComprensive = nullptr

Definition at line 141 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ MHCounter

unsigned int CTPPSDiamondDQMSource::PotPlots::MHCounter

Definition at line 150 of file CTPPSDiamondDQMSource.cc.

◆ pixelTomographyAll

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

Definition at line 131 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ pixelTracksMap

TH2F CTPPSDiamondDQMSource::PotPlots::pixelTracksMap

Definition at line 155 of file CTPPSDiamondDQMSource.cc.

◆ recHitTime

MonitorElement* CTPPSDiamondDQMSource::PotPlots::recHitTime = nullptr

Definition at line 143 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ timeOverThresholdCumulativePot

MonitorElement* CTPPSDiamondDQMSource::PotPlots::timeOverThresholdCumulativePot = nullptr

Definition at line 135 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ trackDistribution

MonitorElement* CTPPSDiamondDQMSource::PotPlots::trackDistribution = nullptr

Definition at line 128 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ trackDistributionOOT

MonitorElement* CTPPSDiamondDQMSource::PotPlots::trackDistributionOOT = nullptr

Definition at line 129 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ trackTimeVsBX

MonitorElement* CTPPSDiamondDQMSource::PotPlots::trackTimeVsBX = nullptr

Definition at line 159 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ trackTimeVsBXProfile

MonitorElement* CTPPSDiamondDQMSource::PotPlots::trackTimeVsBXProfile = nullptr

Definition at line 164 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ trailingEdgeCumulative_te

MonitorElement * CTPPSDiamondDQMSource::PotPlots::trailingEdgeCumulative_te = nullptr

Definition at line 134 of file CTPPSDiamondDQMSource.cc.

Referenced by PotPlots().

◆ TrailingOnlyCounter

unsigned int CTPPSDiamondDQMSource::PotPlots::TrailingOnlyCounter

Definition at line 150 of file CTPPSDiamondDQMSource.cc.