Belle II Software  release-06-01-15
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 
40 
45 
49  virtual void initialize() override;
50 
54  virtual void beginRun() override;
55 
59  virtual void event() override;
60 
64  virtual void endRun() override;
65 
69  virtual void terminate() override;
70 
71  private:
72 
73  // parameters
75  float m_occError;
76  float m_occWarning;
77  float m_occEmpty;
85  float m_refMeanP;
86  float m_refMeanC;
89  // protected:
90 
92  std::string m_refFileName;
94  TFile* m_refFile = nullptr;
95 
96  TCanvas* m_cUnpacker = nullptr;
97  TH2F* m_hOccupancyU = nullptr;
98  TCanvas* m_cOccupancyU = nullptr;
99  TH2F* m_hOccupancyV = nullptr;
100  TCanvas* m_cOccupancyV = nullptr;
103  TCanvas* m_cOccupancyChartChip = nullptr;
105  TH2F* m_hOnlineOccupancyU = nullptr;
106  TCanvas* m_cOnlineOccupancyU = nullptr;
107  TH2F* m_hOnlineOccupancyV = nullptr;
108  TCanvas* m_cOnlineOccupancyV = nullptr;
110  const int nSensors = 172;
111  TH1F m_hStripOccupancyU[172];
112  TCanvas** m_cStripOccupancyU = nullptr;
113  TH1F m_hStripOccupancyV[172];
114  TCanvas** m_cStripOccupancyV = nullptr;
117  TCanvas* m_cClusterOnTrackTime_L456V = nullptr;
119  Int_t findBinY(Int_t layer, Int_t sensor);
121  TPaveText* m_legProblem = nullptr;
122  TPaveText* m_legWarning = nullptr;
123  TPaveText* m_legNormal = nullptr;
124  TPaveText* m_legEmpty = nullptr;
125  TPaveText* m_legError = nullptr;
126  TPaveText* m_legOnProblem = nullptr;
127  TPaveText* m_legOnWarning = nullptr;
128  TPaveText* m_legOnNormal = nullptr;
129  TPaveText* m_legOnEmpty = nullptr;
130  TPaveText* m_legOnError = nullptr;
131  TText* m_yTitle = nullptr;
133  Double_t m_unpackError = 0;
134  Int_t m_occUstatus = 0;
135  Int_t m_occVstatus = 0;
136  Int_t m_onlineOccUstatus = 0;
137  Int_t m_onlineOccVstatus = 0;
139  TH1* rtype = nullptr;
140  TString runtype = nullptr;
143  std::vector<VxdID> m_SVDModules;
144 
145  };
147 } // end namespace Belle2
148 
The base class for the histogram analysis module.
Class definition for the output module of Sequential ROOT I/O.
TCanvas * m_cOnlineOccupancyU
online occupancy U histo canvas
std::string m_refFileName
Parameters accesible from basf2 scripts.
TCanvas * m_cOccupancyV
occupancy V histo canvas
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
Initializer.
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 called for each event.
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
Called when entering a new run.
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.