Belle II Software  release-06-00-14
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/analysis/modules/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 
39 
41  virtual void initialize() override;
42 
44  virtual void beginRun() override;
45  virtual void event() override;
46  virtual void endRun() override;
47  virtual void terminate() override;
48 
49  // parameters
51  float m_occError;
52  float m_occWarning;
53  float m_occEmpty;
61  float m_refMeanP;
62  float m_refMeanC;
65  // protected:
66 
67 
68  private:
69 
71  std::string m_refFileName;
73  TFile* m_refFile = nullptr;
74 
75  TCanvas* m_cUnpacker = nullptr;
76  TH2F* m_hOccupancyU = nullptr;
77  TCanvas* m_cOccupancyU = nullptr;
78  TH2F* m_hOccupancyV = nullptr;
79  TCanvas* m_cOccupancyV = nullptr;
82  TCanvas* m_cOccupancyChartChip = nullptr;
84  TH2F* m_hOnlineOccupancyU = nullptr;
85  TCanvas* m_cOnlineOccupancyU = nullptr;
86  TH2F* m_hOnlineOccupancyV = nullptr;
87  TCanvas* m_cOnlineOccupancyV = nullptr;
89  const int nSensors = 172;
90  TH1F m_hStripOccupancyU[172];
91  TCanvas** m_cStripOccupancyU = nullptr;
92  TH1F m_hStripOccupancyV[172];
93  TCanvas** m_cStripOccupancyV = nullptr;
96  TCanvas* m_cClusterOnTrackTime_L456V = 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;
104  TPaveText* m_legError = nullptr;
105  TPaveText* m_legOnProblem = nullptr;
106  TPaveText* m_legOnWarning = nullptr;
107  TPaveText* m_legOnNormal = nullptr;
108  TPaveText* m_legOnEmpty = nullptr;
109  TPaveText* m_legOnError = nullptr;
110  TText* m_yTitle = nullptr;
112  Double_t m_unpackError = 0;
113  Int_t m_occUstatus = 0;
114  Int_t m_occVstatus = 0;
115  Int_t m_onlineOccUstatus = 0;
116  Int_t m_onlineOccVstatus = 0;
118  TH1* rtype = nullptr;
119  TString runtype = nullptr;
122  std::vector<VxdID> m_SVDModules;
123 
124  };
126 } // end namespace Belle2
127 
The base class for the histogram analysis module.
Class definition for the output module of Sequential ROOT I/O.
DQMHistAnalysisSVDGeneralModule()
Constructor / Destructor.
TCanvas * m_cOnlineOccupancyU
online occupancy U histo canvas
std::string m_refFileName
Parameters accesible from basf2 scripts.
TCanvas * m_cOccupancyV
occupancy V histo canvas
const int nSensors
total number of sensors
TPaveText * m_legOnProblem
onlineOccupancy plot legend, problem
TPaveText * m_legError
OfflineOccupancy plot legend, error.
TPaveText * m_legEmpty
OfflineOccupancy plot legend, empty.
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
virtual void initialize() override
Module functions to be called from main process.
int m_statThreshold
minimal number of events to compare histograms
Int_t m_occUstatus
0 = normal, 1 = empty, 2 = warning, 3 = error
virtual void event() override
This method is the core of the module.
TCanvas ** m_cStripOccupancyV
u-side strip chart occupancy canvas
std::vector< VxdID > m_SVDModules
IDs of all SVD Modules to iterate over.
float m_refMeanC
mean of the signal time peak from Cosmic reference run
virtual void endRun() override
This method is called if the current run ends.
Int_t m_onlineOccUstatus
0 = normal, 1 = empty, 2 = warning, 3 = error
Int_t m_onlineOccVstatus
0 = normal, 1 = empty, 2 = warning, 3 = error
virtual void terminate() override
This method is called at the end of the event processing.
TPaveText * m_legOnEmpty
onlineOccupancy plot legend, empty
TH2F * m_hOnlineOccupancyV
online Occupancy V histo
TString runtype
string with runtype: physics or cosmic
float m_occWarning
warning level of the occupancy
float m_timeThreshold
difference between mean of cluster time for present and reference run
TPaveText * m_legWarning
OfflineOccupancy plot legend, warning.
TCanvas * m_cOccupancyChartChip
occupancy chart histo canvas
TH2F * m_hOnlineOccupancyU
online occupancy U histo
TPaveText * m_legOnError
onlineOccupancy plot legend, error
bool m_printCanvas
if true print the pdf of the canvases
float m_occError
error level of the occupancy
TCanvas ** m_cStripOccupancyU
u-side strip chart occupancy canvas
TH1F m_hStripOccupancyV[172]
u-side strip chart occupancy histos
virtual void beginRun() override
Module functions to be called from event process.
float m_onlineOccWarning
warning level of the onlineOccupancy
TPaveText * m_legOnNormal
onlineOccupancy plot legend, normal
TH1F m_hClusterOnTrackTime_L456V
time for clusters on Track for L456V histo
TCanvas * m_cClusterOnTrackTime_L456V
time for clusters on Track for L456V canvas
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
TCanvas * m_cOnlineOccupancyV
online Occupancy V histo canvas
float m_occEmpty
empty level of the occupancy
TPaveText * m_legProblem
OfflineOccupancy plot legend, problem.
float m_onlineOccError
error level of the onlineOccupancy
float m_refMeanP
mean of the signal time peak from Physics reference run
TH1F m_hStripOccupancyU[172]
u-side strip chart occupancy histos
float m_onlineOccEmpty
empty level of the occupancy
TFile * m_refFile
The pointer to the reference file.
Abstract base class for different kinds of events.