Belle II Software development
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/core/DQMHistAnalysis.h>
13
14/* Basf2 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 <TFile.h>
25#include <TH1.h>
26#include <TH2F.h>
27#include <TLatex.h>
28#include <TLine.h>
29#include <TText.h>
30
31/* C++ headers. */
32#include <vector>
33
34namespace Belle2 {
44
45 public:
46
51
52
56 void initialize() override final;
57
61 void beginRun() override final;
62
66 void event() override final;
67
71 void endRun() override final;
72
76 void terminate() override final;
77
78 private:
79
83 double getProcessedEvents();
84
97 int subdetector, int section, int sector, int index,
98 TH1* histogram, TH1* delta, TCanvas* canvas, TLatex& latex);
99
107 uint16_t section, TH2F* histogram, TCanvas* canvas);
108
113 void processTimeHistogram(const std::string& histName);
114
120 void processPlaneHistogram(const std::string& histName, TLatex& latex);
121
122
127 void fillMaskedChannelsHistogram(const std::string& histName);
128
135 void deltaDrawer(TH1* delta, TH1* histogram, TCanvas* canvas);
136
139
142
145
148
151
154
157
160
163
166
168 std::vector<uint16_t> m_DeadBarrelModules;
169
171 std::vector<uint16_t> m_DeadEndcapModules;
172
174 std::vector<uint16_t> m_MaskedChannels;
175
178
181
184
187
190
193
196
199
202
205
206 };
207
209}
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 final
Initializer.
int m_MessageThreshold
Message Threshold for expert pots.
int m_ThresholdForLog
Threshold for log scale.
double m_minEntries
Minimal number of entries for delta histogram update.
int m_MinHitsForFlagging
Minimal number of hits for flagging.
const KLMElementNumbers * m_ElementNumbers
KLM element numbers.
const EKLMElementNumbers * m_EklmElementNumbers
EKLM element numbers.
void processSpatial2DHitEndcapHistogram(uint16_t section, TH2F *histogram, TCanvas *canvas)
Process spatial 2D hits histograms for endcap.
MonitoringObject * m_monObj
Monitoring object.
void deltaDrawer(TH1 *delta, TH1 *histogram, TCanvas *canvas)
Scales and draws desired delta histogram for current canvas.
void processTimeHistogram(const std::string &histName)
Process histogram containing the hit times.
std::vector< uint16_t > m_MaskedChannels
Vector of masked channels.
void terminate() override final
This method is called at the end of the event processing.
void event() override final
This method is called for each event.
int m_ThresholdForHot
Threshold for hot channels.
std::vector< uint16_t > m_DeadBarrelModules
Vector of dead barrel modules.
std::string m_histogramDirectoryName
Name of histogram directory.
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 endRun() override final
This method is called if the current run ends.
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.
void beginRun() override final
Called when entering a new run.
double m_MinProcessedEventsForMessages
Minimal number of processed events for error messages.
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.
bool m_IsNullRun
Run type flag for null runs.
void analyseChannelHitHistogram(int subdetector, int section, int sector, int index, TH1 *histogram, TH1 *delta, TCanvas *canvas, TLatex &latex)
Analyse channel hit histogram.
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.
MonitoringObject is a basic object to hold data for the run-dependency monitoring Run summary TCanvas...
Abstract base class for different kinds of events.