Belle II Software  release-08-01-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 #include <svd/dataobjects/SVDSummaryPlots.h>
18 
19 #include <TFile.h>
20 #include <TText.h>
21 #include <TPaveText.h>
22 #include <TCanvas.h>
23 #include <TH2F.h>
24 
25 namespace Belle2 {
33 
34  // Public functions
35  public:
36 
41 
46 
50  void initialize() override final;
51 
55  void beginRun() override final;
56 
60  void event() override final;
61 
65  void endRun() override final;
66 
70  void terminate() override final;
71 
72  private:
73 
74  // parameters
76  bool m_3Samples;
77  double m_occError;
78  double m_occWarning;
79  double m_occEmpty;
85  double m_statThreshold;
86  double m_timeThreshold;
87  float m_refMeanP;
88  float m_refMeanC;
91  // protected:
92 
94  std::string m_refFileName;
96  TFile* m_refFile = nullptr;
97 
98  TCanvas* m_cUnpacker = nullptr;
106  TCanvas* m_cOccupancyU = nullptr;
107  TCanvas* m_cOccupancyU3Samples = nullptr;
108  TCanvas* m_cOccupancyUGroupId0 = nullptr;
110  TCanvas* m_cOccupancyV = nullptr;
111  TCanvas* m_cOccupancyV3Samples = nullptr;
112  TCanvas* m_cOccupancyVGroupId0 = nullptr;
115  bool m_additionalPlots = false;
116 
118  TCanvas* m_cOccupancyChartChip = nullptr;
120  TCanvas* m_cOnlineOccupancyU = nullptr;
121  TCanvas* m_cOnlineOccupancyU3Samples = nullptr;
122  TCanvas* m_cOnlineOccupancyV = nullptr;
123  TCanvas* m_cOnlineOccupancyV3Samples = nullptr;
125  int m_sensors = 0;
126  TH1F m_hStripOccupancyU[172];
127  TCanvas** m_cStripOccupancyU = nullptr;
128  TH1F m_hStripOccupancyV[172];
129  TCanvas** m_cStripOccupancyV = nullptr;
132  TCanvas* m_cClusterOnTrackTime_L456V = nullptr;
137  Int_t findBinY(Int_t layer, Int_t sensor);
139  TPaveText* m_legProblem = nullptr;
140  TPaveText* m_legWarning = nullptr;
141  TPaveText* m_legNormal = nullptr;
142  TPaveText* m_legEmpty = nullptr;
143  TPaveText* m_legError = nullptr;
144  TPaveText* m_legOnProblem = nullptr;
145  TPaveText* m_legOnWarning = nullptr;
146  TPaveText* m_legOnNormal = nullptr;
147  TPaveText* m_legOnEmpty = nullptr;
148  TPaveText* m_legOnError = nullptr;
150  TPaveText* m_legTiProblem = nullptr;
151  TPaveText* m_legTiNormal = nullptr;
152  TPaveText* m_legTiEmpty = nullptr;
154  TPaveText* m_legTi3Problem = nullptr;
155  TPaveText* m_legTi3Normal = nullptr;
156  TPaveText* m_legTi3Empty = nullptr;
158  Double_t m_unpackError = 0;
159  Int_t m_occUstatus = 0;
160  Int_t m_occVstatus = 0;
161  Int_t m_occU3Samples = 0;
162  Int_t m_occV3Samples = 0;
164  Int_t m_occUGroupId0 = 0;
165  Int_t m_occVGroupId0 = 0;
167  Int_t m_onlineOccUstatus = 0;
168  Int_t m_onlineOccVstatus = 0;
173  TString m_runtype = nullptr;
175  std::string m_pvPrefix;
178  std::vector<VxdID> m_SVDModules;
179 
180  };
182 } // end namespace Belle2
183 
The base class for the histogram analysis module.
Class definition for the output module of Sequential ROOT I/O.
TPaveText * m_legTiEmpty
cluster time on tracks plot legend, empty
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
void initialize() override final
Initializer.
TPaveText * m_legOnProblem
onlineOccupancy plot legend, problem
TPaveText * m_legError
OfflineOccupancy plot legend, error.
TPaveText * m_legEmpty
OfflineOccupancy plot legend, empty.
double m_statThreshold
minimal number of events to compare histograms
Int_t findBinY(Int_t layer, Int_t sensor)
find Y bin corresponding to sensor, occupancy plot
TCanvas * m_cOccupancyU
occupancy U histo canvas
double m_timeThreshold
difference between mean of cluster time for present and reference run
TPaveText * m_legTi3Normal
cluster time on tracks for 3 samples plot legend, normal
TString m_runtype
string with runtype: physics or cosmic
Int_t m_occUstatus
0 = normal, 1 = empty, 2 = warning, 3 = error
TPaveText * m_legTiProblem
cluster time on tracks plot legend, problem
int m_sensors
number of sensors to considired
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
TCanvas * m_cOccupancyVGroupId0
occupancy V histo canvas for cluster time group Id = 0
SVDSummaryPlots * m_hOccupancy3Samples
occupancy histos for 3 samples
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
SVDSummaryPlots * m_hOnlineOccupancy3Samples
online occupancy histos for 3 sampels
SVDSummaryPlots * m_hOccupancy
occupancy histos
std::string m_pvPrefix
string prefix for EPICS PVs
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
SVDSummaryPlots * m_hOccupancyGroupId0
occupancy histos for cluster time group id=0
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
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
TPaveText * m_legTi3Empty
cluster time on tracks for 3 samples plot legend, empty
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.
SVDSummaryPlots * m_hOnlineOccupancy
online occupancy histos
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
double m_onlineOccWarning
warning level of the onlineOccupancy
TPaveText * m_legProblem
OfflineOccupancy plot legend, problem.
TPaveText * m_legTiNormal
cluster time on tracks plot legend, normal
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
TPaveText * m_legTi3Problem
cluster time on tracks for 3 samples plot legend, problem
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.
class to summarize SVD quantities per sensor and side
Abstract base class for different kinds of events.