Belle II Software  release-08-01-10
DQMHistAnalysisSVDEfficiency.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 : DQMHistAnalysisSVDEfficiency.h
10 // Description : module for DQM histogram analysis of SVD sensors efficiencies
11 //-
12 
13 #pragma once
14 
15 #include <dqm/core/DQMHistAnalysis.h>
16 #include <svd/dataobjects/SVDSummaryPlots.h>
17 
18 #include <TFile.h>
19 #include <TPaveText.h>
20 #include <TCanvas.h>
21 
22 namespace Belle2 {
30 
31  // Public functions
32  public:
33 
38 
43 
47  void initialize() override final;
48 
52  void beginRun() override final;
53 
57  void event() override final;
58 
62  void endRun() override final;
63 
67  void terminate() override final;
68 
69  private:
70 
71  //parameters
72  double m_effError;
73  double m_effWarning;
74  double m_statThreshold;
75  bool m_3Samples;
78 
80  std::string m_refFileName;
82  TFile* m_refFile = nullptr;
83 
84  TCanvas* m_cEfficiencyU = nullptr;
85  TCanvas* m_cEfficiencyV = nullptr;
87  TCanvas* m_cEfficiencyErrU = nullptr;
88  TCanvas* m_cEfficiencyErrV = nullptr;
91  TCanvas* m_cEfficiencyU3Samples = nullptr;
92  TCanvas* m_cEfficiencyV3Samples = nullptr;
94  TCanvas* m_cEfficiencyErrU3Samples = nullptr;
95  TCanvas* m_cEfficiencyErrV3Samples = nullptr;
98  Int_t findBinY(Int_t layer, Int_t sensor);
100  TPaveText* m_legProblem = nullptr;
101  TPaveText* m_legWarning = nullptr;
102  TPaveText* m_legNormal = nullptr;
103  TPaveText* m_legEmpty = nullptr;
106  enum effStatus {
107  good = 0,
108  warning = 1,
109  error = 2,
110  lowStat = 3
111  };
116  std::vector<VxdID> m_SVDModules;
117 
118  std::string m_pvPrefix;
121  };
123 } // end namespace Belle2
124 
The base class for the histogram analysis module.
Class definition for the output module of Sequential ROOT I/O.
SVDSummaryPlots * m_hEfficiency3Samples
efficiency histo for 3 samples
TCanvas * m_cEfficiencyErrV3Samples
efficiency V error plot canvas for 3 samples
TPaveText * m_legEmpty
efficiency plot legend, empty
double m_statThreshold
minimal number of tracks per sensor to set green or red frame
TCanvas * m_cEfficiencyErrU
efficiency U error plot canvas
Int_t findBinY(Int_t layer, Int_t sensor)
find Y bin corresponding to sensor, efficiency plot
std::vector< VxdID > m_SVDModules
IDs of all SVD Modules to iterate over.
effStatus m_effUstatus
number representing the status of the efficiency U side
SVDSummaryPlots * m_hEfficiencyErr3Samples
efficiency error histo for 3 samples
std::string m_pvPrefix
string prefix for EPICS PVs
double m_effWarning
warning level of the efficiency
double m_effError
error level of the efficiency
void terminate() override final
This method is called at the end of the event processing.
TPaveText * m_legWarning
efficiency plot legend, warning
void event() override final
This method is called for each event.
bool m_3Samples
if true enable 3 samples histograms analysis
TCanvas * m_cEfficiencyU3Samples
efficiency U plot canvas for 3 samples
void endRun() override final
This method is called if the current run ends.
TCanvas * m_cEfficiencyErrU3Samples
efficiency U error plot canvas for 3 samples
effStatus m_effVstatus
number representing the status of the efficiency V side
void beginRun() override final
Called when entering a new run.
TPaveText * m_legNormal
efficiency plot legend, normal
TCanvas * m_cEfficiencyV3Samples
efficiency V plot canvas for 3 samples
TCanvas * m_cEfficiencyErrV
efficiency V error plot canvas
TPaveText * m_legProblem
efficiency plot legend, problem
SVDSummaryPlots * m_hEfficiencyErr
efficiency error histo
TFile * m_refFile
The pointer to the reference file.
class to summarize SVD quantities per sensor and side
Abstract base class for different kinds of events.