Belle II Software  release-08-00-10
DQMHistAnalysisSVDGeneral.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 : DQMHistAnalysisSVDGeneral.h
10 // Description : module for DQM histogram analysis of SVD sensors occupancies
11 //-
12 
13 #pragma once
14 
15 #include <dqm/core/DQMHistAnalysis.h>
16 #include <vxd/dataobjects/VxdID.h>
17 
18 #include <TFile.h>
19 #include <TText.h>
20 #include <TPaveText.h>
21 #include <TCanvas.h>
22 #include <TH2F.h>
23 
24 namespace Belle2 {
32 
33  // Public functions
34  public:
35 
40 
45 
49  void initialize() override final;
50 
54  void beginRun() override final;
55 
59  void event() override final;
60 
64  void endRun() override final;
65 
69  void terminate() override final;
70 
71  private:
72 
73  // parameters
75  bool m_3Samples;
76  double m_occError;
77  double m_occWarning;
78  double m_occEmpty;
84  double m_statThreshold;
85  double m_timeThreshold;
86  float m_refMeanP;
87  float m_refMeanC;
90  // protected:
91 
93  std::string m_refFileName;
95  TFile* m_refFile = nullptr;
96 
97  TCanvas* m_cUnpacker = nullptr;
98  TH2F* m_hOccupancyU = nullptr;
99  TH2F* m_hOccupancyU3Samples = nullptr;
100  TH2F* m_hOccupancyUGroupId0 = nullptr;
101  TCanvas* m_cOccupancyU = nullptr;
102  TCanvas* m_cOccupancyU3Samples = nullptr;
103  TCanvas* m_cOccupancyUGroupId0 = nullptr;
105  TH2F* m_hOccupancyV = nullptr;
106  TH2F* m_hOccupancyV3Samples = nullptr;
107  TCanvas* m_cOccupancyV = nullptr;
108  TH2F* m_hOccupancyVGroupId0 = nullptr;
110  TCanvas* m_cOccupancyV3Samples = nullptr;
111  TCanvas* m_cOccupancyVGroupId0 = nullptr;
114  bool m_additionalPlots = false;
115 
117  TCanvas* m_cOccupancyChartChip = nullptr;
119  TH2F* m_hOnlineOccupancyU = nullptr;
120  TH2F* m_hOnlineOccupancyU3Samples = nullptr;
121  TCanvas* m_cOnlineOccupancyU = nullptr;
122  TCanvas* m_cOnlineOccupancyU3Samples = nullptr;
123  TH2F* m_hOnlineOccupancyV = nullptr;
124  TH2F* m_hOnlineOccupancyV3Samples = nullptr;
125  TCanvas* m_cOnlineOccupancyV = nullptr;
126  TCanvas* m_cOnlineOccupancyV3Samples = nullptr;
128  const int nSensors = 172;
129  TH1F m_hStripOccupancyU[172];
130  TCanvas** m_cStripOccupancyU = nullptr;
131  TH1F m_hStripOccupancyV[172];
132  TCanvas** m_cStripOccupancyV = nullptr;
135  TCanvas* m_cClusterOnTrackTime_L456V = nullptr;
140  Int_t findBinY(Int_t layer, Int_t sensor);
142  TPaveText* m_legProblem = nullptr;
143  TPaveText* m_legWarning = nullptr;
144  TPaveText* m_legNormal = nullptr;
145  TPaveText* m_legEmpty = nullptr;
146  TPaveText* m_legError = nullptr;
147  TPaveText* m_legOnProblem = nullptr;
148  TPaveText* m_legOnWarning = nullptr;
149  TPaveText* m_legOnNormal = nullptr;
150  TPaveText* m_legOnEmpty = nullptr;
151  TPaveText* m_legOnError = nullptr;
152  TText* m_yTitle = nullptr;
154  Double_t m_unpackError = 0;
155  Int_t m_occUstatus = 0;
156  Int_t m_occVstatus = 0;
157  Int_t m_occU3Samples = 0;
158  Int_t m_occV3Samples = 0;
160  Int_t m_occUGroupId0 = 0;
161  Int_t m_occVGroupId0 = 0;
163  Int_t m_onlineOccUstatus = 0;
164  Int_t m_onlineOccVstatus = 0;
169  TH1* rtype = nullptr;
170  TString runtype = nullptr;
172  std::string m_pvPrefix;
175  std::vector<VxdID> m_SVDModules;
176 
177  };
179 } // end namespace Belle2
180 
The base class for the histogram analysis module.
Class definition for the output module of Sequential ROOT I/O.
TCanvas * m_cClusterOnTrackTimeL456V3Samples
time for clusters on Track for L456V canvas for 3 sampples
TCanvas * m_cOnlineOccupancyU
online occupancy U histo canvas
std::string m_refFileName
Parameters accesible from basf2 scripts.
Int_t m_onlineOccV3Samples
0 = normal, 1 = empty, 2 = warning, 3 = error for 3 sampes
TCanvas * m_cOccupancyV
occupancy V histo canvas
TH2F * m_hOccupancyUGroupId0
occupancy U histo for cluster time group Id = 0
void initialize() override final
Initializer.
TPaveText * m_legOnProblem
onlineOccupancy plot legend, problem
TPaveText * m_legError
OfflineOccupancy plot legend, error.
TH2F * m_hOccupancyV3Samples
occupancy V histo for 3 samples
TPaveText * m_legEmpty
OfflineOccupancy plot legend, empty.
double m_statThreshold
minimal number of events to compare histograms
TH2F * m_hOnlineOccupancyV3Samples
online Occupancy V histo for 3 sample
TH2F * m_hOccupancyU3Samples
occupancy U histo for 3 samples
Int_t findBinY(Int_t layer, Int_t sensor)
find Y bin corresponding to sensor, occupancy plot
TCanvas * m_cOccupancyU
occupancy U histo canvas
TH1 * rtype
histogram from DQMInfo with runtype
double m_timeThreshold
difference between mean of cluster time for present and reference run
Int_t m_occUstatus
0 = normal, 1 = empty, 2 = warning, 3 = error
TCanvas ** m_cStripOccupancyV
u-side strip chart occupancy canvas
std::vector< VxdID > m_SVDModules
IDs of all SVD Modules to iterate over.
double m_onlineOccError
error level of the onlineOccupancy
float m_refMeanC
mean of the signal time peak from Cosmic reference run
TH2F * m_hOccupancyVGroupId0
occupancy V histo for cluster time group Id = 0
TCanvas * m_cOccupancyVGroupId0
occupancy V histo canvas for cluster time group Id = 0
Int_t m_onlineOccUstatus
0 = normal, 1 = empty, 2 = warning, 3 = error
Int_t m_onlineOccVstatus
0 = normal, 1 = empty, 2 = warning, 3 = error
double m_onlineOccEmpty
empty level of the occupancy
TPaveText * m_legOnEmpty
onlineOccupancy plot legend, empty
std::string m_pvPrefix
string prefix for EPICS PVs
TH2F * m_hOnlineOccupancyV
online Occupancy V histo
TString runtype
string with runtype: physics or cosmic
double m_occWarning
warning level of the occupancy
void terminate() override final
This method is called at the end of the event processing.
TCanvas * m_cOccupancyU3Samples
occupancy U histo canvas for 3 sampes
TPaveText * m_legWarning
OfflineOccupancy plot legend, warning.
TCanvas * m_cOnlineOccupancyV3Samples
online Occupancy V histo canvas for 3 samples
TCanvas * m_cOccupancyChartChip
occupancy chart histo canvas
TH2F * m_hOnlineOccupancyU
online occupancy U histo
TPaveText * m_legOnError
onlineOccupancy plot legend, error
void event() override final
This method is called for each event.
bool m_printCanvas
if true print the pdf of the canvases
TCanvas ** m_cStripOccupancyU
u-side strip chart occupancy canvas
TH1F m_hStripOccupancyV[172]
u-side strip chart occupancy histos
Int_t m_occUGroupId0
0 = normal, 1 = empty, 2 = warning, 3 = error for 3 samples
TPaveText * m_legOnNormal
onlineOccupancy plot legend, normal
bool m_3Samples
if true enable 3 samples histograms analysis
TH1F m_hClusterOnTrackTime_L456V
time for clusters on Track for L456V histo
void endRun() override final
This method is called if the current run ends.
TCanvas * m_cClusterOnTrackTime_L456V
time for clusters on Track for L456V canvas
Int_t m_onlineOccU3Samples
0 = normal, 1 = empty, 2 = warning, 3 = error for 3 sample
void beginRun() override final
Called when entering a new run.
Double_t m_unpackError
Maximum bin_content/ # events allowed before throwing ERROR.
Int_t m_occVstatus
0 = normal, 1 = empty, 2 = warning, 3 = error
TPaveText * m_legNormal
OfflineOccupancy plot legend, normal.
TPaveText * m_legOnWarning
onlineOccupancy plot legend, warning
double m_occEmpty
empty level of the occupancy
Int_t m_occV3Samples
0 = normal, 1 = empty, 2 = warning, 3 = error for 3 sampels
TCanvas * m_cOnlineOccupancyV
online Occupancy V histo canvas
TCanvas * m_cOccupancyUGroupId0
occupancy U histo canvas for cluster time group Id = 0
Int_t m_occU3Samples
0 = normal, 1 = empty, 2 = warning, 3 = error for 3 samples
TCanvas * m_cOccupancyV3Samples
occupancy V histo canvas for 3 samples
TH2F * m_hOnlineOccupancyU3Samples
online occupancy U histo for 3 sample
double m_onlineOccWarning
warning level of the onlineOccupancy
TPaveText * m_legProblem
OfflineOccupancy plot legend, problem.
double m_occError
error level of the occupancy
float m_refMeanP
mean of the signal time peak from Physics reference run
TH1F m_hClusterOnTrackTimeL456V3Samples
time for clusters on Track for L456V histo for 3 samples
TCanvas * m_cOnlineOccupancyU3Samples
online occupancy U histo canvas for 3 samples
Int_t m_occVGroupId0
0 = normal, 1 = empty, 2 = warning, 3 = error for 3 sampels
TH1F m_hStripOccupancyU[172]
u-side strip chart occupancy histos
TFile * m_refFile
The pointer to the reference file.
Abstract base class for different kinds of events.