Belle II Software  release-06-02-00
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 #ifdef _BELLE2_EPICS
16 // EPICS
17 #include "cadef.h"
18 #endif
19 
20 #include <dqm/analysis/modules/DQMHistAnalysis.h>
21 #include <vxd/dataobjects/VxdID.h>
22 
23 #include <TEfficiency.h>
24 #include <TCanvas.h>
25 #include <TH2F.h>
26 
27 namespace Belle2 {
35 
36  // Public functions
37  public:
38 
43 
48 
52  void initialize(void) override final;
53 
57  void beginRun(void) override final;
58 
62  void event(void) override final;
63 
67  void terminate(void) override final;
68 
69  private:
70 
71  // Data members
75  std::string m_pvPrefix;
77  int m_u_bins;
79  int m_v_bins;
81  double m_confidence;
83  double m_warnlevel;
85  double m_errorlevel;
87  int m_minEntries = 1000;
92 
94  std::vector<VxdID> m_PXDModules;
95 
97  std::map<VxdID, TEfficiency*> m_hEffModules;
99  std::map<VxdID, TCanvas*> m_cEffModules;
100 
102  TEfficiency* m_hEffAll = nullptr;
104  TCanvas* m_cEffAll = nullptr;
106  TH1* m_hEffAllLastTotal = nullptr;
108  TH1* m_hEffAllLastPassed = nullptr;
110  TEfficiency* m_hEffAllUpdate = nullptr;
112  TCanvas* m_cEffAllUpdate = nullptr;
113 
115  TH2F* m_hInnerMap{};
117  TH2F* m_hOuterMap{};
119  TCanvas* m_cInnerMap{};
121  TCanvas* m_cOuterMap{};
122 
124  TH1F* m_hWarnLine{};
126  TH1F* m_hErrorLine{};
128  std::map<VxdID, double> m_warnlevelmod;
130  std::map<VxdID, double> m_errorlevelmod;
131 
134 
137 
140 
141 #ifdef _BELLE2_EPICS
143  std::vector <chid> mychid_status;
145  std::map <VxdID, chid> mychid_eff;
147  std::map <VxdID, chid> mychid_low;
149  std::map <VxdID, chid> mychid_lolo;
150 #endif
151  };
153 } // end namespace Belle2
154 
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.
int m_minEntries
Update entry intervall.
std::map< VxdID, double > m_warnlevelmod
warn level for alarm per module
bool m_perModuleAlarm
use alarm level per module
TEfficiency * m_hEffAll
One bin for each module in the geometry.
std::map< VxdID, TCanvas * > m_cEffModules
Individual efficiency for each module, canvas.
void initialize(void) override final
Initializer.
TEfficiency * m_hEffAllUpdate
Efficiency, last state, updated.
std::map< VxdID, double > m_errorlevelmod
error level for alarm per module
TH1 * m_hEffAllLastTotal
TH1, last state, total.
TH1 * m_hEffAllLastPassed
TH1, last state, passed.
TH2F * m_hOuterMap
Full Eff Map Outer Layer.
std::string m_pvPrefix
prefix for EPICS PVs
MonitoringObject * m_monObj
Monitoring Object.
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
TH1F * m_hWarnLine
TLine object for warning limit.
double m_errorlevel
error level for alarm
bool m_useEpicsRO
flag if to import from EPICS only
std::map< VxdID, TEfficiency * > m_hEffModules
Individual efficiency for each module, 2d histogram.
bool m_useEpics
flag if to export to EPICS
TH1F * m_hErrorLine
TLine object for error error.
bool m_alarmAdhoc
generate alarm from adhoc values
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.