Belle II Software  release-05-02-19
DQMHistAnalysisKLM.cc
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2018 Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Kirill Chilikin, Leo Piilonen, Vipin Gaur, *
7  * Giacomo De Pietro *
8  * *
9  * This software is provided "as is" without any warranty. *
10  **************************************************************************/
11 
12 /* Own header. */
13 #include <dqm/analysis/modules/DQMHistAnalysisKLM.h>
14 
15 /* Belle 2 headers. */
16 #include <klm/dataobjects/KLMChannelIndex.h>
17 
18 /* ROOT headers. */
19 #include <TClass.h>
20 #include <TROOT.h>
21 #include <TStyle.h>
22 
23 /* C++ headers. */
24 #include <algorithm>
25 
26 using namespace Belle2;
27 
28 REG_MODULE(DQMHistAnalysisKLM)
29 
32  m_ProcessedEvents{0},
33  m_ChannelArrayIndex{&(KLMChannelArrayIndex::Instance())},
34  m_SectorArrayIndex{&(KLMSectorArrayIndex::Instance())},
35  m_ElementNumbers{&(KLMElementNumbers::Instance())},
36  m_EklmElementNumbers{&(EKLMElementNumbers::Instance())}
37 {
38  setDescription("Module used to analyze KLM DQM histograms.");
39  addParam("ThresholdForMasked", m_ThresholdForMasked,
40  "Threshold X for masked channels: if a channel has an occupancy X times larger than the average, it will be masked.", 100);
41  addParam("ThresholdForHot", m_ThresholdForHot,
42  "Threshold Y for hot channels: if a channel has an occupancy Y times larger than the average, it will be marked as hot (but not masked).",
43  10);
44  addParam("MinHitsForFlagging", m_MinHitsForFlagging, "Minimal number of hits in a channel required to flag it as 'Masked' or 'Hot'",
45  50);
46  addParam("MinProcessedEventsForMessages", m_MinProcessedEventsForMessagesInput,
47  "Minimal number of processed events required to print error messages", 10000.);
48 
49  m_MinProcessedEventsForMessages = m_MinProcessedEventsForMessagesInput;
50  m_2DHitsLine.SetLineColor(kRed);
51  m_2DHitsLine.SetLineWidth(3);
52  m_2DHitsLine.SetLineStyle(2); // dashed
53  m_PlaneLine.SetLineColor(kMagenta);
54  m_PlaneLine.SetLineWidth(1);
55  m_PlaneLine.SetLineStyle(2); // dashed
56  m_PlaneText.SetTextAlign(22); // centered, middle
57  m_PlaneText.SetTextColor(kMagenta);
58  m_PlaneText.SetTextFont(42); // Helvetica regular
59  m_PlaneText.SetTextSize(0.02); // 2% of TPad's full height
60 }
61 
63 {
64 }
65 
67 {
69  B2FATAL("The threshold used for hot channels is larger than the one for masked channels."
70  << LogVar("Threshold for hot channels", m_ThresholdForHot)
71  << LogVar("Threshold for masked channels", m_ThresholdForMasked));
72 }
73 
75 {
76 }
77 
79 {
80  if (!m_ElectronicsMap.isValid())
81  B2FATAL("No KLM electronics map.");
83  m_ProcessedEvents = 0.;
84  m_DeadBarrelModules.clear();
85  m_DeadEndcapModules.clear();
86  m_MaskedChannels.clear();
87 }
88 
90 {
91 }
92 
94 {
95  TH1* histogram = findHist("DAQ/Nevent");
96  if (histogram == nullptr) {
97  B2WARNING("DAQ DQM histogram DAQ/Nevent is not found.");
98  /* Set the minimal number of processed events to 0 if we can't determine the processed events. */
100  return 0.;
101  }
102  return histogram->GetEntries();
103 }
104 
106  int subdetector, int section, int sector,
107  TH1* histogram, TCanvas* canvas, TLatex& latex)
108 {
109  double x = 0.15;
110  double y = 0.85;
111  int i, n;
112  std::map<uint16_t, double> moduleHitMap;
113  std::map<uint16_t, double>::iterator it;
114  double average = 0;
115  int channelSubdetector, channelSection, channelSector;
116  int layer, plane, strip;
117  std::string str;
118  canvas->Clear();
119  canvas->cd();
120  histogram->SetStats(false);
121  histogram->Draw();
122  n = histogram->GetXaxis()->GetNbins();
123  for (i = 1; i <= n; i++) {
124  uint16_t channelIndex = std::round(histogram->GetBinCenter(i));
125  uint16_t channelNumber = m_ChannelArrayIndex->getNumber(channelIndex);
126  double nHitsPerModule = histogram->GetBinContent(i);
127  average = average + nHitsPerModule;
129  channelNumber, &channelSubdetector, &channelSection, &channelSector,
130  &layer, &plane, &strip);
131  if ((channelSubdetector != subdetector) ||
132  (channelSection != section) ||
133  (channelSector != sector))
134  B2FATAL("Inconsistent element numbers.");
135  uint16_t module = m_ElementNumbers->moduleNumber(
136  subdetector, section, sector, layer);
137  it = moduleHitMap.find(module);
138  if (it == moduleHitMap.end())
139  moduleHitMap.insert(std::pair<uint16_t, double>(module, nHitsPerModule));
140  else
141  it->second += nHitsPerModule;
142  }
143  unsigned int activeModuleChannels = 0;
144  for (it = moduleHitMap.begin(); it != moduleHitMap.end(); ++it) {
145  uint16_t moduleNumber = it->first;
146  if (it->second != 0) {
147  activeModuleChannels += m_ElementNumbers->getNChannelsModule(moduleNumber);
148  continue;
149  }
151  moduleNumber, &channelSubdetector, &channelSection, &channelSector, &layer);
152  /* Channel with plane = 1, strip = 1 exists for any BKLM or EKLM module. */
153  uint16_t channel = m_ElementNumbers->channelNumber(
154  channelSubdetector, channelSection, channelSector,
155  layer, 1, 1);
156  const KLMElectronicsChannel* electronicsChannel =
157  m_ElectronicsMap->getElectronicsChannel(channel);
158  if (electronicsChannel == nullptr)
159  B2FATAL("Incomplete KLM electronics map.");
160  str = "No data from HSLB ";
161  if (channelSubdetector == KLMElementNumbers::c_BKLM) {
162  str += BKLMElementNumbers::getHSLBName(electronicsChannel->getCopper(),
163  electronicsChannel->getSlot());
164  } else {
165  str += EKLMElementNumbers::getHSLBName(electronicsChannel->getCopper(),
166  electronicsChannel->getSlot());
167  }
168  str += ", lane " + std::to_string(electronicsChannel->getLane());
169  latex.DrawLatexNDC(x, y, str.c_str());
170  y -= 0.05;
171  /* Store the module number, used later in processPlaneHistogram
172  * to color the canvas with red and to raise up an alarm. */
173  if (channelSubdetector == KLMElementNumbers::c_BKLM) {
174  std::vector<uint16_t>::iterator ite = std::find(m_DeadBarrelModules.begin(),
175  m_DeadBarrelModules.end(),
176  moduleNumber);
177  if (ite == m_DeadBarrelModules.end())
178  m_DeadBarrelModules.push_back(moduleNumber);
179  } else {
180  std::vector<uint16_t>::iterator ite = std::find(m_DeadEndcapModules.begin(),
181  m_DeadEndcapModules.end(),
182  moduleNumber);
183  if (ite == m_DeadEndcapModules.end())
184  m_DeadEndcapModules.push_back(moduleNumber);
185  }
186  }
187  if (activeModuleChannels == 0)
188  return;
189  average /= activeModuleChannels;
190  for (i = 1; i <= n; ++i) {
191  uint16_t channelIndex = std::round(histogram->GetBinCenter(i));
192  uint16_t channelNumber = m_ChannelArrayIndex->getNumber(channelIndex);
193  double nHits = histogram->GetBinContent(i);
195  channelNumber, &channelSubdetector, &channelSection, &channelSector,
196  &layer, &plane, &strip);
197  std::string channelStatus = "Normal";
198  if ((nHits > average * m_ThresholdForMasked) && (nHits > m_MinHitsForFlagging)) {
199  channelStatus = "Masked";
200  std::vector<uint16_t>::iterator ite = std::find(m_MaskedChannels.begin(),
201  m_MaskedChannels.end(),
202  channelNumber);
203  if (ite == m_MaskedChannels.end())
204  m_MaskedChannels.push_back(channelNumber);
205  B2DEBUG(20, "KLM@MaskMe " << channelNumber);
206  } else if ((nHits > average * m_ThresholdForHot) && (nHits > m_MinHitsForFlagging)) {
207  channelStatus = "Hot";
208  }
209  if (channelStatus != "Normal") {
210  const KLMElectronicsChannel* electronicsChannel =
211  m_ElectronicsMap->getElectronicsChannel(channelNumber);
212  if (electronicsChannel == nullptr)
213  B2FATAL("Incomplete BKLM electronics map.");
214  if (channelStatus == "Masked")
215  histogram->SetBinContent(i, 0);
216  str = channelStatus + " channel: HSLB ";
217  if (channelSubdetector == KLMElementNumbers::c_BKLM) {
218  str += BKLMElementNumbers::getHSLBName(electronicsChannel->getCopper(),
219  electronicsChannel->getSlot());
220  } else {
221  str += EKLMElementNumbers::getHSLBName(electronicsChannel->getCopper(),
222  electronicsChannel->getSlot());
223  }
224  str += (", lane " + std::to_string(electronicsChannel->getLane()) +
225  ", axis " + std::to_string(electronicsChannel->getAxis()) +
226  ", channel " + std::to_string(electronicsChannel->getChannel()));
227  latex.DrawLatexNDC(x, y, str.c_str());
228  y -= 0.05;
229  }
230  }
231  canvas->Modified();
232 }
233 
235  uint16_t section, TH2F* histogram, TCanvas* canvas)
236 {
237  canvas->Clear();
238  canvas->cd();
239  histogram->SetStats(false);
240  histogram->Draw("COLZ");
241  /* Draw the lines only for the backward layers. */
242  if (section == EKLMElementNumbers::c_ForwardSection) {
243  m_2DHitsLine.DrawLine(-110, 80, -110, 190);
244  m_2DHitsLine.DrawLine(-110, 190, 110, 190);
245  m_2DHitsLine.DrawLine(110, 80, 110, 190);
246  m_2DHitsLine.DrawLine(-110, 80, 110, 80);
247  }
248  canvas->Modified();
249 }
250 
252  const std::string& histName)
253 {
254  TH1* histogram = findHist("KLM/" + histName);
255  if (histogram == nullptr) {
256  B2ERROR("KLM DQM histogram KLM/" << histName << " is not found.");
257  return;
258  }
259  TCanvas* canvas = findCanvas("KLM/c_" + histName);
260  if (canvas == nullptr) {
261  B2ERROR("KLM DQM histogram canvas KLM/c_" << histName << " is not found.");
262  return;
263  }
264  histogram->Clear();
265  canvas->Clear();
266  canvas->cd();
267  if (m_MaskedChannels.size() > 0) {
268  int channelSubdetector, channelSection, channelSector;
269  int layer, plane, strip;
270  for (uint16_t channel : m_MaskedChannels) {
272  channel, &channelSubdetector, &channelSection, &channelSector,
273  &layer, &plane, &strip);
274  uint16_t sectorNumber;
275  if (channelSubdetector == KLMElementNumbers::c_BKLM)
276  sectorNumber = m_ElementNumbers->sectorNumberBKLM(channelSection, channelSector);
277  else
278  sectorNumber = m_ElementNumbers->sectorNumberEKLM(channelSection, channelSector);
279  uint16_t sectorIndex = m_SectorArrayIndex->getIndex(sectorNumber);
280  histogram->Fill(sectorIndex);
281  }
282  }
283  histogram->SetStats(false);
284  histogram->Draw();
285  canvas->Modified();
286 }
287 
289  const std::string& histName, TLatex& latex)
290 {
291  std::string name, alarm;
292  const double histMinNDC = 0.1;
293  const double histMaxNDC = 0.9;
294  const double histRangeNDC = histMaxNDC - histMinNDC;
295  int moduleSubdetector, moduleSection, moduleSector, moduleLayer;
296  double xAlarm = 0.15;
297  double yAlarm = 0.8;
298  TH1* histogram = findHist("KLM/" + histName);
299  if (histogram == nullptr) {
300  B2ERROR("KLM DQM histogram KLM/" << histName << " is not found.");
301  return;
302  }
303  TCanvas* canvas = findCanvas("KLM/c_" + histName);
304  if (canvas == nullptr) {
305  B2ERROR("KLM DQM histogram canvas KLM/c_" << histName << " is not found.");
306  return;
307  }
308  canvas->Clear();
309  canvas->cd();
310  histogram->SetStats(false);
311  histogram->Draw();
312  if (histName.find("bklm") != std::string::npos) {
313  /* First draw the vertical lines and the sector names. */
314  const double maximalSector = BKLMElementNumbers::getMaximalSectorGlobalNumber();
315  for (int sector = 0; sector < BKLMElementNumbers::getMaximalSectorGlobalNumber(); ++sector) {
316  double xLineNDC = histMinNDC + (histRangeNDC * sector) / maximalSector;
317  double xTextNDC = histMinNDC + (histRangeNDC * (sector + 0.5)) / maximalSector;
318  double yTextNDC = histMinNDC + 0.98 * histRangeNDC;
319  if (sector > 0)
320  m_PlaneLine.DrawLineNDC(xLineNDC, histMinNDC, xLineNDC, histMaxNDC);
321  name = "B";
322  if (sector < 8)
323  name += "B";
324  else
325  name += "F";
326  name += std::to_string(sector % 8);
327  m_PlaneText.DrawTextNDC(xTextNDC, yTextNDC, name.c_str());
328  }
329  /* Then, color the canvas with red if there is a dead module
330  * and write an error message. */
331  if (m_DeadBarrelModules.size() == 0) {
332  canvas->Pad()->SetFillColor(kWhite);
334  for (uint16_t module : m_DeadBarrelModules) {
336  module, &moduleSubdetector, &moduleSection, &moduleSector, &moduleLayer);
337  alarm = "No data from " + m_ElementNumbers->getSectorDAQName(moduleSubdetector, moduleSection, moduleSector);
338  alarm += ", layer " + std::to_string(moduleLayer);
339  latex.DrawLatexNDC(xAlarm, yAlarm, alarm.c_str());
340  yAlarm -= 0.05;
341  }
342  alarm = "Call the KLM experts immediately!";
343  latex.DrawLatexNDC(xAlarm, yAlarm, alarm.c_str());
344  canvas->Pad()->SetFillColor(kRed);
345  }
346  } else {
347  /* First draw the vertical lines and the sector names. */
348  const double maximalLayer = EKLMElementNumbers::getMaximalLayerGlobalNumber();
349  for (int layerGlobal = 1; layerGlobal <= maximalLayer; ++layerGlobal) {
350  double xLineNDC = histMinNDC + (histRangeNDC * layerGlobal) / maximalLayer;
351  double xTextNDC = histMinNDC + (histRangeNDC * (layerGlobal - 0.5)) / maximalLayer;
352  double yTextNDC = histMinNDC + 0.98 * histRangeNDC;
353  if (layerGlobal < maximalLayer)
354  m_PlaneLine.DrawLineNDC(xLineNDC, histMinNDC, xLineNDC, histMaxNDC);
355  int section, layer;
357  layerGlobal, &section, &layer);
359  name = "B";
360  else
361  name = "F";
362  name += std::to_string(layer);
363  m_PlaneText.DrawTextNDC(xTextNDC, yTextNDC, name.c_str());
364  }
365  /* Then, color the canvas with red if there is a dead module
366  * and write an error message. */
367  if (m_DeadEndcapModules.size() == 0) {
368  canvas->Pad()->SetFillColor(kWhite);
370  for (uint16_t module : m_DeadEndcapModules) {
372  module, &moduleSubdetector, &moduleSection, &moduleSector, &moduleLayer);
373  alarm = "No data from " + m_ElementNumbers->getSectorDAQName(moduleSubdetector, moduleSection, moduleSector);
374  alarm += ", layer " + std::to_string(moduleLayer);
375  latex.DrawLatexNDC(xAlarm, yAlarm, alarm.c_str());
376  yAlarm -= 0.05;
377  }
378  alarm = "Call the KLM experts immediately!";
379  latex.DrawLatexNDC(xAlarm, yAlarm, alarm.c_str());
380  canvas->Pad()->SetFillColor(kRed);
381  }
382  }
383  canvas->Modified();
384  canvas->Update();
385 }
386 
387 TCanvas* DQMHistAnalysisKLMModule::findCanvas(const std::string& canvasName)
388 {
389  TIter nextkey(gROOT->GetListOfCanvases());
390  TObject* obj = nullptr;
391  while ((obj = dynamic_cast<TObject*>(nextkey()))) {
392  if (obj->IsA()->InheritsFrom("TCanvas")) {
393  if (obj->GetName() == canvasName)
394  return dynamic_cast<TCanvas*>(obj);
395  }
396  }
397  return nullptr;
398 }
399 
400 
402 {
403  int isKlmIncluded = 1;
404  /* If KLM is not included, stop here and return. */
405  TH1* daqInclusion = findHist("KLM/daq_inclusion");
406  if (not(daqInclusion == nullptr)) {
407  isKlmIncluded = daqInclusion->GetBinContent(daqInclusion->GetXaxis()->FindBin("Yes"));
408  if (isKlmIncluded == 0)
409  return;
410  }
411  /* Make sure that the vectors are cleared at each DQM refresh. */
412  m_DeadBarrelModules.clear();
413  m_DeadEndcapModules.clear();
414  m_MaskedChannels.clear();
416  std::string str, histogramName, canvasName;
417  TLatex latex;
418  latex.SetTextColor(kRed);
419  latex.SetTextAlign(11);
421  for (KLMChannelIndex& klmSector : klmIndex) {
422  int nHistograms;
423  if (klmSector.getSubdetector() == KLMElementNumbers::c_BKLM)
424  nHistograms = 2;
425  else
426  nHistograms = 3;
427  for (int j = 0; j < nHistograms; j++) {
428  str = "strip_hits_subdetector_" +
429  std::to_string(klmSector.getSubdetector()) +
430  "_section_" + std::to_string(klmSector.getSection()) +
431  "_sector_" + std::to_string(klmSector.getSector()) +
432  "_" + std::to_string(j);
433  histogramName = "KLM/" + str;
434  canvasName = "KLM/c_" + str;
435  TH1* histogram = findHist(histogramName);
436  if (histogram == nullptr) {
437  B2ERROR("KLM DQM histogram " << histogramName << " is not found.");
438  continue;
439  }
440  TCanvas* canvas = findCanvas(canvasName);
441  if (canvas == nullptr) {
442  B2ERROR("KLM DQM histogram canvas " << canvasName << " is not found.");
443  continue;
444  }
446  klmSector.getSubdetector(), klmSector.getSection(),
447  klmSector.getSector(), histogram, canvas, latex);
448  }
449  }
450  /* Temporary change the color palette. */
451  gStyle->SetPalette(kLightTemperature);
452  klmIndex.setIndexLevel(KLMChannelIndex::c_IndexLevelSection);
453  for (KLMChannelIndex& klmSection : klmIndex) {
454  uint16_t subdetector = klmSection.getSubdetector();
455  if (subdetector == KLMElementNumbers::c_EKLM) {
456  uint16_t section = klmSection.getSection();
457  int maximalLayerNumber = m_EklmElementNumbers->getMaximalDetectorLayerNumber(section);
458  for (int j = 1; j <= maximalLayerNumber; ++j) {
459  str = "spatial_2d_hits_subdetector_" + std::to_string(subdetector) +
460  "_section_" + std::to_string(section) +
461  "_layer_" + std::to_string(j);
462  histogramName = "KLM/" + str;
463  canvasName = "KLM/c_" + str;
464  TH2F* histogram = static_cast<TH2F*>(findHist(histogramName));
465  if (histogram == nullptr) {
466  B2ERROR("KLM DQM histogram " << histogramName << " is not found.");
467  continue;
468  }
469  TCanvas* canvas = findCanvas(canvasName);
470  if (canvas == nullptr) {
471  B2ERROR("KLM DQM histogram canvas " << canvasName << " is not found.");
472  continue;
473  }
474  processSpatial2DHitEndcapHistogram(section, histogram, canvas);
475  }
476  }
477  }
478  /* Reset the color palette to the default one. */
479  gStyle->SetPalette(kBird);
480  fillMaskedChannelsHistogram("masked_channels");
481  latex.SetTextColor(kBlue);
482  processPlaneHistogram("plane_bklm_phi", latex);
483  processPlaneHistogram("plane_bklm_z", latex);
484  processPlaneHistogram("plane_eklm", latex);
485 }
Belle2::KLMElementNumbers::sectorNumberBKLM
uint16_t sectorNumberBKLM(int section, int sector) const
Get sector number for BKLM.
Definition: KLMElementNumbers.cc:222
Belle2::KLMElectronicsChannel::getChannel
int getChannel() const
Get channel.
Definition: KLMElectronicsChannel.h:145
Belle2::DQMHistAnalysisKLMModule::m_ThresholdForMasked
int m_ThresholdForMasked
Threshold for masked channels.
Definition: DQMHistAnalysisKLM.h:146
Belle2::DQMHistAnalysisKLMModule::m_ChannelArrayIndex
const KLMChannelArrayIndex * m_ChannelArrayIndex
KLM channel array index.
Definition: DQMHistAnalysisKLM.h:179
Belle2::DQMHistAnalysisKLMModule::m_MaskedChannels
std::vector< uint16_t > m_MaskedChannels
Vector of masked channels.
Definition: DQMHistAnalysisKLM.h:167
Belle2::DQMHistAnalysisKLMModule::processPlaneHistogram
void processPlaneHistogram(const std::string &histName, TLatex &latex)
Process histogram containing the number of hits in plane.
Definition: DQMHistAnalysisKLM.cc:288
Belle2::DQMHistAnalysisKLMModule::~DQMHistAnalysisKLMModule
~DQMHistAnalysisKLMModule()
Destructor.
Definition: DQMHistAnalysisKLM.cc:62
Belle2::EKLMElementNumbers::getHSLBName
static std::string getHSLBName(int copper, int slot)
Get HSLB name.
Definition: EKLMElementNumbers.cc:273
Belle2::KLMChannelIndex::c_IndexLevelSection
@ c_IndexLevelSection
Section.
Definition: KLMChannelIndex.h:46
Belle2::DQMHistAnalysisKLMModule::m_PlaneLine
TLine m_PlaneLine
TLine for boundary in plane histograms.
Definition: DQMHistAnalysisKLM.h:173
REG_MODULE
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition: Module.h:652
Belle2::BKLMElementNumbers::getHSLBName
static std::string getHSLBName(int copper, int slot)
Get HSLB name.
Definition: BKLMElementNumbers.cc:203
Belle2::DQMHistAnalysisKLMModule::m_ElectronicsMap
DBObjPtr< KLMElectronicsMap > m_ElectronicsMap
Electronics map.
Definition: DQMHistAnalysisKLM.h:191
Belle2::KLMElectronicsChannel::getSlot
int getSlot() const
Get slot.
Definition: KLMElectronicsChannel.h:94
Belle2::DQMHistAnalysisKLMModule::m_MinHitsForFlagging
int m_MinHitsForFlagging
Minimal number of hits for flagging.
Definition: DQMHistAnalysisKLM.h:152
Belle2::KLMElementNumbers::c_EKLM
@ c_EKLM
EKLM.
Definition: KLMElementNumbers.h:50
Belle2::KLMSectorArrayIndex::Instance
static const KLMSectorArrayIndex & Instance()
Instantiation.
Definition: KLMSectorArrayIndex.cc:28
Belle2::DQMHistAnalysisKLMModule::event
void event() override
This method is called for each event.
Definition: DQMHistAnalysisKLM.cc:401
Belle2::KLMElementNumbers::channelNumber
uint16_t channelNumber(int subdetector, int section, int sector, int layer, int plane, int strip) const
Get channel number.
Definition: KLMElementNumbers.cc:37
Belle2::DQMHistAnalysisKLMModule::m_2DHitsLine
TLine m_2DHitsLine
TLine for background region in 2d hits histograms.
Definition: DQMHistAnalysisKLM.h:170
Belle2::KLMElementNumbers::Instance
static const KLMElementNumbers & Instance()
Instantiation.
Definition: KLMElementNumbers.cc:31
Belle2::DQMHistAnalysisKLMModule::m_MinProcessedEventsForMessages
double m_MinProcessedEventsForMessages
Minimal number of processed events for error messages.
Definition: DQMHistAnalysisKLM.h:158
Belle2::KLMElementNumbers::moduleNumberToElementNumbers
void moduleNumberToElementNumbers(uint16_t module, int *subdetector, int *section, int *sector, int *layer) const
Get element numbers by module number.
Definition: KLMElementNumbers.cc:186
Belle2::DQMHistAnalysisModule::findHist
static TH1 * findHist(const std::string &histname)
Find histogram.
Definition: DQMHistAnalysis.cc:83
Belle2::EKLMElementNumbers::c_BackwardSection
@ c_BackwardSection
Backward.
Definition: EKLMElementNumbers.h:44
Belle2::EKLMElementNumbers::getMaximalLayerGlobalNumber
static constexpr int getMaximalLayerGlobalNumber()
Get maximal detector layer global number.
Definition: EKLMElementNumbers.h:337
Belle2::KLMElectronicsChannel::getAxis
int getAxis() const
Get axis.
Definition: KLMElectronicsChannel.h:128
Belle2::KLMChannelIndex::c_IndexLevelSector
@ c_IndexLevelSector
Sector.
Definition: KLMChannelIndex.h:49
Belle2::KLMElementArrayIndex::getNumber
uint16_t getNumber(uint16_t index) const
Get element number.
Definition: KLMElementArrayIndex.cc:63
Belle2::DQMHistAnalysisKLMModule::getProcessedEvents
double getProcessedEvents()
Get number of processed events.
Definition: DQMHistAnalysisKLM.cc:93
Belle2::moduleHitMap
TH2 * moduleHitMap(TH1 *hitMap, int moduleID)
Make hit map in HAPD view (12*12 channels)
Definition: hitMapMaker.cc:42
Belle2::DQMHistAnalysisKLMModule::m_MinProcessedEventsForMessagesInput
double m_MinProcessedEventsForMessagesInput
Input parameter for minimal number of processed events for error messages.
Definition: DQMHistAnalysisKLM.h:155
Belle2::DQMHistAnalysisKLMModule::m_EklmElementNumbers
const EKLMElementNumbers * m_EklmElementNumbers
EKLM element numbers.
Definition: DQMHistAnalysisKLM.h:188
Belle2::KLMElementNumbers::getNChannelsModule
unsigned int getNChannelsModule(uint16_t module) const
Get number of channels in module.
Definition: KLMElementNumbers.cc:208
Belle2::EKLMElementNumbers::layerNumberToElementNumbers
void layerNumberToElementNumbers(int layerGlobal, int *section, int *layer) const
Get element numbers by detector layer global number.
Definition: EKLMElementNumbers.cc:130
Belle2::KLMElementNumbers::sectorNumberEKLM
uint16_t sectorNumberEKLM(int section, int sector) const
Get sector number for EKLM.
Definition: KLMElementNumbers.cc:229
Belle2::DQMHistAnalysisKLMModule::m_ThresholdForHot
int m_ThresholdForHot
Threshold for hot channels.
Definition: DQMHistAnalysisKLM.h:149
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::DQMHistAnalysisKLMModule::endRun
void endRun() override
This method is called if the current run ends.
Definition: DQMHistAnalysisKLM.cc:89
Belle2::BKLMElementNumbers::getMaximalSectorGlobalNumber
static constexpr int getMaximalSectorGlobalNumber()
Get maximal sector global number.
Definition: BKLMElementNumbers.h:267
Belle2::DQMHistAnalysisKLMModule::initialize
void initialize() override
Initializer.
Definition: DQMHistAnalysisKLM.cc:66
Belle2::DQMHistAnalysisKLMModule::m_DeadEndcapModules
std::vector< uint16_t > m_DeadEndcapModules
Vector of dead endcap modules.
Definition: DQMHistAnalysisKLM.h:164
LogVar
Class to store variables with their name which were sent to the logging service.
Definition: LogVariableStream.h:24
Belle2::EKLMElementNumbers::Instance
static const EKLMElementNumbers & Instance()
Instantiation.
Definition: EKLMElementNumbers.cc:20
Belle2::DQMHistAnalysisKLMModule::findCanvas
TCanvas * findCanvas(const std::string &canvasName)
Find TCanvas that matches a given name.
Definition: DQMHistAnalysisKLM.cc:387
Belle2::KLMElementNumbers::c_BKLM
@ c_BKLM
BKLM.
Definition: KLMElementNumbers.h:47
Belle2::DQMHistAnalysisKLMModule
Analysis of KLM DQM histograms.
Definition: DQMHistAnalysisKLM.h:54
Belle2::DQMHistAnalysisKLMModule::analyseChannelHitHistogram
void analyseChannelHitHistogram(int subdetector, int section, int sector, TH1 *histogram, TCanvas *canvas, TLatex &latex)
Analyse channel hit histogram.
Definition: DQMHistAnalysisKLM.cc:105
Belle2::DQMHistAnalysisKLMModule::terminate
void terminate() override
This method is called at the end of the event processing.
Definition: DQMHistAnalysisKLM.cc:74
Belle2::DQMHistAnalysisKLMModule::m_ElementNumbers
const KLMElementNumbers * m_ElementNumbers
KLM element numbers.
Definition: DQMHistAnalysisKLM.h:185
Belle2::DQMHistAnalysisKLMModule::processSpatial2DHitEndcapHistogram
void processSpatial2DHitEndcapHistogram(uint16_t section, TH2F *histogram, TCanvas *canvas)
Process spatial 2D hits histograms for endcap.
Definition: DQMHistAnalysisKLM.cc:234
Belle2::KLMChannelArrayIndex::Instance
static const KLMChannelArrayIndex & Instance()
Instantiation.
Definition: KLMChannelArrayIndex.cc:28
Belle2::KLMElectronicsChannel::getCopper
int getCopper() const
Get copper.
Definition: KLMElectronicsChannel.h:77
Belle2::KLMChannelIndex
KLM channel index.
Definition: KLMChannelIndex.h:33
Belle2::KLMElectronicsChannel
BKLM electronics channel.
Definition: KLMElectronicsChannel.h:33
Belle2::DQMHistAnalysisKLMModule::m_SectorArrayIndex
const KLMSectorArrayIndex * m_SectorArrayIndex
KLM sector array index.
Definition: DQMHistAnalysisKLM.h:182
Belle2::DQMHistAnalysisKLMModule::m_DeadBarrelModules
std::vector< uint16_t > m_DeadBarrelModules
Vector of dead barrel modules.
Definition: DQMHistAnalysisKLM.h:161
Belle2::DQMHistAnalysisKLMModule::m_PlaneText
TText m_PlaneText
TText for names in plane histograms.
Definition: DQMHistAnalysisKLM.h:176
Belle2::KLMElectronicsChannel::getLane
int getLane() const
Get lane.
Definition: KLMElectronicsChannel.h:111
Belle2::EKLMElementNumbers::c_ForwardSection
@ c_ForwardSection
Forward.
Definition: EKLMElementNumbers.h:47
Belle2::KLMElementNumbers::moduleNumber
uint16_t moduleNumber(int subdetector, int section, int sector, int layer) const
Get module number.
Definition: KLMElementNumbers.cc:149
Belle2::DQMHistAnalysisKLMModule::beginRun
void beginRun() override
Called when entering a new run.
Definition: DQMHistAnalysisKLM.cc:78
Belle2::DQMHistAnalysisKLMModule::fillMaskedChannelsHistogram
void fillMaskedChannelsHistogram(const std::string &histName)
Fill histogram containing masked channels per sector.
Definition: DQMHistAnalysisKLM.cc:251
Belle2::DQMHistAnalysisKLMModule::m_ProcessedEvents
double m_ProcessedEvents
Number of processed events.
Definition: DQMHistAnalysisKLM.h:143
Belle2::KLMElementNumbers::getSectorDAQName
std::string getSectorDAQName(int subdetector, int section, int sector) const
Get DAQ name for a given sector.
Definition: KLMElementNumbers.cc:252
Belle2::KLMElementArrayIndex::getIndex
uint16_t getIndex(uint16_t number) const
Get element index.
Definition: KLMElementArrayIndex.cc:54
Belle2::KLMElementNumbers::channelNumberToElementNumbers
void channelNumberToElementNumbers(uint16_t channel, int *subdetector, int *section, int *sector, int *layer, int *plane, int *strip) const
Get element numbers by channel number.
Definition: KLMElementNumbers.cc:106
Belle2::EKLMElementNumbers::getMaximalDetectorLayerNumber
int getMaximalDetectorLayerNumber(int section) const
Get maximal detector layer number.
Definition: EKLMElementNumbers.cc:279
Belle2::DQMHistAnalysisModule
The base class for the histogram analysis module.
Definition: DQMHistAnalysis.h:27