Belle II Software development
DQMHistAnalysisKLM2.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/* KLM headers. */
15#include <klm/dataobjects/bklm/BKLMElementNumbers.h>
16#include <klm/dataobjects/eklm/EKLMElementNumbers.h>
17
18
19/* ROOT headers. */
20#include <TCanvas.h>
21#include <TH1.h>
22#include <TH2.h>
23#include <TString.h>
24#include <TText.h>
25#include <TLine.h>
26
27/* C++ headers. */
28#include <string>
29
30namespace Belle2 {
40
41 public:
42
47
51 void initialize() override final;
52
56 void beginRun() override final;
57
61 void event() override final;
62
66 void endRun() override final;
67
68
69 private:
70
78 void processEfficiencyHistogram(TH1* effHist, TH1* denominator, TH1* numerator, TCanvas* canvas);
79
80
86 void processPlaneHistogram(const std::string& histName, TH1* histogram);
87
91 void process2DEffHistogram(TH1* mainHist, TH1* refHist, TH2* planeHist, TH2* errHist, int layers, int sectors,
92 bool ratioPlot, int* pvcount, double layerLimit, TCanvas* eff2dCanv);
93
96
99
101 bool m_IsPhysicsRun = false;
102
105
107 TH1* m_eff_bklm = NULL;
108
110 TCanvas* m_c_eff_bklm = NULL;
111
113 TH1* m_eff_eklm = NULL;
114
116 TCanvas* m_c_eff_eklm = NULL;
117
119 TH1* m_eff_bklm_sector = NULL;
120
122 TCanvas* m_c_eff_bklm_sector = NULL;
123
125 TH1* m_eff_eklm_sector = NULL;
126
128 TCanvas* m_c_eff_eklm_sector = NULL;
129
132
135
139 std::string m_refFileName;
140
142 TFile* m_refFile = nullptr;
143
145 float m_warnThr = 0;
146
148 float m_alarmThr = 0;
149
151 float m_stopThr = 0;
152
154 float m_min = 0;
155
157 float m_max = 2;
158
160 bool m_ratio = true;
161
164
166 TH2* m_eff2d_bklm = NULL;
167
169 TH2* m_err_bklm = NULL;
170
172 TCanvas* m_c_eff2d_bklm = NULL;
173
176
178 TH2* m_eff2d_eklm = NULL;
179
181 TH2* m_err_eklm = NULL;
182
184 TCanvas* m_c_eff2d_eklm = NULL;
185
188
191
194
197
200
203
206
207 };
208
210}
Analysis of KLM DQM histograms.
TH1 * m_ref_efficiencies_bklm
BKLM efficiencies reference histogram.
std::string m_refFileName
2D layer-sector efficiency differences
TLine m_PlaneLine
TLine for boundary in plane histograms.
int m_nEffEKLMLayers
Number of inefficient EKLM Layers.
void initialize() override final
Initializer.
TCanvas * m_c_eff2d_bklm
BKLM efficiencies ratio canvas.
double m_EKLMLayerWarn
alarm limits from inefficient EKLM layers PV
std::string m_refHistogramDirectoryName
Name of histogram directory for reference file.
TCanvas * m_c_eff2d_eklm
EKLM efficiencies ratio canvas.
TH1 * m_eff_bklm_sector
Histogram for BKLM sector efficiency.
void processPlaneHistogram(const std::string &histName, TH1 *histogram)
Process histogram containing the number of hits in plane.
bool m_IsPhysicsRun
Run type flag for null runs.
float m_stopThr
efficiency ratio (run-)stop threshold
double m_minEntries
Minimal number of entries for delta histogram and PV update.
TH1 * m_eff_eklm
Histogram for EKLM plane efficiency.
void processEfficiencyHistogram(TH1 *effHist, TH1 *denominator, TH1 *numerator, TCanvas *canvas)
Process histogram containing the efficiencies.
TCanvas * m_c_eff_eklm_sector
Histogram for EKLM sector efficiency.
const EKLMElementNumbers * m_EklmElementNumbers
EKLM element numbers.
TH1 * m_eff_eklm_sector
Histogram for EKLM sector efficiency.
float m_max
efficiency ratio max z scale
double m_BKLMLayerWarn
alarm limits from inefficient BKLM layers PV
MonitoringObject * m_monObj
Monitoring object.
TH1 * m_ref_efficiencies_eklm
ELM efficiencies reference histogram.
float m_alarmThr
efficiency ratio alarm threshold
void process2DEffHistogram(TH1 *mainHist, TH1 *refHist, TH2 *planeHist, TH2 *errHist, int layers, int sectors, bool ratioPlot, int *pvcount, double layerLimit, TCanvas *eff2dCanv)
Process 2D efficiency histograms.
void event() override final
This method is called for each event.
TCanvas * m_c_eff_bklm_sector
Histogram for BKLM sector efficiency.
float m_warnThr
efficiency ratio warning threshold
std::string m_histogramDirectoryName
Name of histogram directory.
TH2 * m_err_bklm
BKLM efficiencies error histogram.
float m_min
efficiency ratio min z scale
TH2 * m_eff2d_bklm
BKLM efficiencies 2dim histogram.
TH1 * m_eff_bklm
Histogram for BKLM plane efficiency.
TCanvas * m_c_eff_bklm
BKLM plane efficiency canvas.
TText m_PlaneText
TText for names in plane histograms.
TCanvas * m_c_eff_eklm
EKLM plane efficiency canvas.
void endRun() override final
This method is called if the current run ends.
void beginRun() override final
Called when entering a new run.
bool m_ratio
show efficiency ratio or difference
TH2 * m_err_eklm
EKLM efficiencies error histogram.
bool m_IsNullRun
Run type flag for null runs.
TH2 * m_eff2d_eklm
EKLM efficiencies 2dim histogram.
int m_nEffBKLMLayers
Number of inefficient BKLM layers.
TFile * m_refFile
reference histogram file
The base class for the histogram analysis module.
EKLM element numbers.
MonitoringObject is a basic object to hold data for the run-dependency monitoring Run summary TCanvas...
Abstract base class for different kinds of events.