Belle II Software  release-06-00-14
DQMHistAnalysisKLM.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 #pragma once
10 
11 /* DQM headers. */
12 #include <dqm/analysis/modules/DQMHistAnalysis.h>
13 
14 /* Belle 2 headers. */
15 #include <framework/database/DBObjPtr.h>
16 #include <klm/dataobjects/bklm/BKLMElementNumbers.h>
17 #include <klm/dataobjects/KLMChannelArrayIndex.h>
18 #include <klm/dataobjects/KLMElementNumbers.h>
19 #include <klm/dataobjects/KLMSectorArrayIndex.h>
20 #include <klm/dbobjects/KLMElectronicsMap.h>
21 
22 /* ROOT headers. */
23 #include <TCanvas.h>
24 #include <TH1.h>
25 #include <TH2F.h>
26 #include <TLatex.h>
27 #include <TText.h>
28 #include <TLine.h>
29 
30 /* C++ headers. */
31 #include <vector>
32 
33 namespace Belle2 {
43 
44  public:
45 
50 
55 
59  void initialize() override;
60 
64  void beginRun() override;
65 
69  void event() override;
70 
74  void endRun() override;
75 
79  void terminate() override;
80 
81  private:
82 
86  double getProcessedEvents();
87 
98  int subdetector, int section, int sector,
99  TH1* histogram, TCanvas* canvas, TLatex& latex);
100 
108  uint16_t section, TH2F* histogram, TCanvas* canvas);
109 
115  void processPlaneHistogram(const std::string& histName, TLatex& latex);
116 
121  void fillMaskedChannelsHistogram(const std::string& histName);
122 
128  TCanvas* findCanvas(const std::string& canvasName);
129 
132 
135 
138 
141 
144 
147 
150 
152  std::vector<uint16_t> m_DeadBarrelModules;
153 
155  std::vector<uint16_t> m_DeadEndcapModules;
156 
158  std::vector<uint16_t> m_MaskedChannels;
159 
162 
164  TLine m_PlaneLine;
165 
167  TText m_PlaneText;
168 
171 
174 
177 
180 
183 
184  };
185 
187 }
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
Analysis of KLM DQM histograms.
TLine m_PlaneLine
TLine for boundary in plane histograms.
double m_ProcessedEvents
Number of processed events.
void initialize() override
Initializer.
int m_ThresholdForLog
Threshold for log scale.
void event() override
This method is called for each event.
TCanvas * findCanvas(const std::string &canvasName)
Find TCanvas that matches a given name.
int m_MinHitsForFlagging
Minimal number of hits for flagging.
const KLMElementNumbers * m_ElementNumbers
KLM element numbers.
void endRun() override
This method is called if the current run ends.
const EKLMElementNumbers * m_EklmElementNumbers
EKLM element numbers.
void terminate() override
This method is called at the end of the event processing.
void processSpatial2DHitEndcapHistogram(uint16_t section, TH2F *histogram, TCanvas *canvas)
Process spatial 2D hits histograms for endcap.
std::vector< uint16_t > m_MaskedChannels
Vector of masked channels.
int m_ThresholdForHot
Threshold for hot channels.
std::vector< uint16_t > m_DeadBarrelModules
Vector of dead barrel modules.
void beginRun() override
Called when entering a new run.
double m_MinProcessedEventsForMessagesInput
Input parameter for minimal number of processed events for error messages.
TText m_PlaneText
TText for names in plane histograms.
DBObjPtr< KLMElectronicsMap > m_ElectronicsMap
Electronics map.
void processPlaneHistogram(const std::string &histName, TLatex &latex)
Process histogram containing the number of hits in plane.
int m_ThresholdForMasked
Threshold for masked channels.
const KLMSectorArrayIndex * m_SectorArrayIndex
KLM sector array index.
double m_MinProcessedEventsForMessages
Minimal number of processed events for error messages.
void analyseChannelHitHistogram(int subdetector, int section, int sector, TH1 *histogram, TCanvas *canvas, TLatex &latex)
Analyse channel hit histogram.
std::vector< uint16_t > m_DeadEndcapModules
Vector of dead endcap modules.
double getProcessedEvents()
Get number of processed events.
TLine m_2DHitsLine
TLine for background region in 2d hits histograms.
const KLMChannelArrayIndex * m_ChannelArrayIndex
KLM channel array index.
void fillMaskedChannelsHistogram(const std::string &histName)
Fill histogram containing masked channels per sector.
The base class for the histogram analysis module.
EKLM element numbers.
KLM channel array index.
KLM element numbers.
KLM sector array index.
Abstract base class for different kinds of events.