Belle II Software  release-08-01-10
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 
30 namespace 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 
95  TLine m_PlaneLine;
96 
98  TText m_PlaneText;
99 
101  TH1* m_RunType = NULL;
102 
105 
107  bool m_IsPhysicsRun = false;
108 
110  TH1* m_eff_bklm = NULL;
111 
113  TCanvas* m_c_eff_bklm = NULL;
114 
116  TH1* m_eff_eklm = NULL;
117 
119  TCanvas* m_c_eff_eklm = NULL;
120 
122  TH1* m_eff_bklm_sector = NULL;
123 
125  TCanvas* m_c_eff_bklm_sector = NULL;
126 
128  TH1* m_eff_eklm_sector = NULL;
129 
131  TCanvas* m_c_eff_eklm_sector = NULL;
132 
135 
138 
142  std::string m_refFileName;
143 
145  TFile* m_refFile = nullptr;
146 
148  float m_warnThr = 0;
149 
151  float m_alarmThr = 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 
190  double m_minEvents;
191 
194 
197 
200 
203 
204  };
205 
207 }
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
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.
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.
double m_minEvents
Minimal number of entries for delta histogram update.
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
TString m_RunTypeString
String with run type.
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.
TH1 * m_RunType
Histogram from DQMInfo with run type.
bool m_ratio
show efficiency ratio or difference
TH2 * m_err_eklm
EKLM efficiencies error histogram.
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.