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
71
79 void initialize2DRefHistogram(TH1*& hist, const std::string& histName, const std::string& title, int maxLayer);
80
88 void processEfficiencyHistogram(TH1* effHist, TH1* denominator, TH1* numerator, TCanvas* canvas);
89
90
96 void processPlaneHistogram(const std::string& histName, TH1* histogram);
97
101 void process2DEffHistogram(TH1* mainHist, TH1* refHist, TH2* planeHist, TH2* errHist, int layers, int sectors,
102 bool ratioPlot, int& pvcount, double layerLimit, TCanvas* eff2dCanv);
103
106
109
111 bool m_IsPhysicsRun = false;
112
115
117 TH1* m_eff_bklm = NULL;
118
120 TCanvas* m_c_eff_bklm = NULL;
121
123 TH1* m_eff_eklm = NULL;
124
126 TCanvas* m_c_eff_eklm = NULL;
127
129 TH1* m_eff_bklm_sector = NULL;
130
132 TCanvas* m_c_eff_bklm_sector = NULL;
133
135 TH1* m_eff_eklm_sector = NULL;
136
138 TCanvas* m_c_eff_eklm_sector = NULL;
139
142
145
147 float m_warnThr = 0;
148
150 float m_alarmThr = 0;
151
153 float m_stopThr = 0;
154
156 float m_min = 0;
157
159 float m_max = 2;
160
162 bool m_ratio = true;
163
166
168 TH2* m_eff2d_bklm = NULL;
169
171 TH2* m_err_bklm = NULL;
172
174 TCanvas* m_c_eff2d_bklm = NULL;
175
178
180 TH2* m_eff2d_eklm = NULL;
181
183 TH2* m_err_eklm = NULL;
184
186 TCanvas* m_c_eff2d_eklm = NULL;
187
190
193
196
199
202
205
208
209 };
210
212}
Analysis of KLM DQM histograms.
TH1 * m_ref_efficiencies_bklm
BKLM efficiencies reference histogram.
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
warn 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
warn 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 event() override final
This method is called for each event.
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.
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.
void initialize2DRefHistogram(TH1 *&hist, const std::string &histName, const std::string &title, int maxLayer)
Initialize a histogram by either finding a reference histogram or creating a new one.
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.
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.