Belle II Software development
DQMHistAnalysisPXDEff.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// File : DQMHistAnalysisPXDEff.h
10// Description : DQM module, which gives histograms showing the efficiency of PXD sensors
11//-
12
13#pragma once
14
15#include <dqm/core/DQMHistAnalysis.h>
16
17#include <vxd/dataobjects/VxdID.h>
18
19#include <TH2F.h>
20#include <TEfficiency.h>
21
22namespace Belle2 {
30
31 // Public functions
32 public:
33
38
42 void initialize(void) override final;
43
47 void beginRun(void) override final;
48
52 void event(void) override final;
53
57 void terminate(void) override final;
58
59 private:
68 bool updateEffBins(int bin, int nhit, int nmatch, int minentries);
69
76 bool check_error_level(int bin, std::string name);
77
84 bool check_warn_level(int bin, std::string name);
85
90 void setLabels(TGraphAsymmErrors* gr);
91
92 private:
93
94 // Data members
108 int m_minEntries = 1000;
114 std::vector<int> m_excluded;
115
117 std::vector<VxdID> m_PXDModules;
118
120 std::map<VxdID, TEfficiency*> m_eEffModules;
122 std::map<VxdID, TCanvas*> m_cEffModules;
123
125 TEfficiency* m_eEffAll = nullptr;
127 TCanvas* m_cEffAll = nullptr;
129 TH1* m_hEffAllLastTotal = nullptr;
131 TH1* m_hEffAllLastPassed = nullptr;
133 TEfficiency* m_eEffAllUpdate = nullptr;
135 TCanvas* m_cEffAllUpdate = nullptr;
136
138 TH2F* m_hInnerMap{};
140 TH2F* m_hOuterMap{};
142 TCanvas* m_cInnerMap{};
144 TCanvas* m_cOuterMap{};
145
147 TH1F* m_hWarnLine{};
151 std::map<std::string, double> m_warnlevelmod;
153 std::map<std::string, double> m_errorlevelmod;
156
159 };
161} // end namespace Belle2
162
The base class for the histogram analysis module.
DQM Histogram Analysis for PXD Efficiency.
TCanvas * m_cOuterMap
Full Eff Map Outer Layer.
TCanvas * m_cInnerMap
Full Eff Map Inner Layer.
void terminate(void) override final
This method is called at the end of the event processing.
std::map< VxdID, TEfficiency * > m_eEffModules
Individual efficiency for each module, 2d histogram.
bool m_perModuleAlarm
use alarm level per module
std::map< VxdID, TCanvas * > m_cEffModules
Individual efficiency for each module, canvas.
void initialize(void) override final
Initializer.
int m_nrxbins
Number of bins in efficiency plot, all modules plus layer and summary.
TH1 * m_hEffAllLastTotal
TH1, last state, total.
TH1 * m_hEffAllLastPassed
TH1, last state, passed.
TH2F * m_hOuterMap
Full Eff Map Outer Layer.
void setLabels(TGraphAsymmErrors *gr)
Set module labels for TGraphAsymmErrors.
TEfficiency * m_eEffAll
One bin for each module in the geometry.
MonitoringObject * m_monObj
Monitoring Object.
bool check_warn_level(int bin, std::string name)
Check bin/name for warn condition.
std::vector< VxdID > m_PXDModules
IDs of all PXD Modules to iterate over.
std::string m_histogramDirectoryName
name of histogram directory
TCanvas * m_cEffAllUpdate
Final Canvas for Update.
TH2F * m_hInnerMap
Full Eff Map Inner Layer.
double m_confidence
confidence level for error bars
std::map< std::string, double > m_warnlevelmod
warn level for alarm per module
TEfficiency * m_eEffAllUpdate
Efficiency, last state, updated.
TH1F * m_hWarnLine
TLine object for warning limit.
double m_errorlevel
error level for alarm
bool check_error_level(int bin, std::string name)
Check bin/name for error condition.
std::map< std::string, double > m_errorlevelmod
error level for alarm per module
TH1F * m_hErrorLine
TLine object for error error.
std::vector< int > m_excluded
Indizes of excluded PXD Modules.
bool m_alarmAdhoc
generate alarm from adhoc values
bool updateEffBins(int bin, int nhit, int nmatch, int minentries)
Update bin in efficiency plots with condition on nhits.
double m_warnlevel
warn level for alarm
void beginRun(void) override final
Called when entering a new run.
void event(void) override final
This method is called for each event.
MonitoringObject is a basic object to hold data for the run-dependency monitoring Run summary TCanvas...
Abstract base class for different kinds of events.