Belle II Software development
DQMHistAnalysisSVDOccupancy.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 : DQMHistAnalysisSVDOccupancy.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
25namespace 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
77 double m_occError;
78 double m_occWarning;
79 double m_occEmpty;
86 // protected:
93 TCanvas* m_cOccupancyU = nullptr;
94 TCanvas* m_cOccupancyU3Samples = nullptr;
95 TCanvas* m_cOccupancyUGroupId0 = nullptr;
97 TCanvas* m_cOccupancyV = nullptr;
98 TCanvas* m_cOccupancyV3Samples = nullptr;
99 TCanvas* m_cOccupancyVGroupId0 = nullptr;
102 bool m_additionalPlots = false;
103
105 TCanvas* m_cOccupancyChartChip = nullptr;
107 TH2F* m_hOnlineOccupancyU = nullptr;
109 TCanvas* m_cOnlineOccupancyU = nullptr;
110 TCanvas* m_cOnlineOccupancyU3Samples = nullptr;
111 TH2F* m_hOnlineOccupancyV = nullptr;
113 TCanvas* m_cOnlineOccupancyV = nullptr;
114 TCanvas* m_cOnlineOccupancyV3Samples = nullptr;
116 const int nSensors = 172;
117 int m_sensors = 0;
119 TCanvas** m_cStripOccupancyU = nullptr;
121 TCanvas** m_cStripOccupancyV = nullptr;
123 Int_t findBinY(Int_t layer, Int_t sensor);
125 TPaveText* m_legProblem = nullptr;
126 TPaveText* m_legWarning = nullptr;
127 TPaveText* m_legNormal = nullptr;
128 TPaveText* m_legEmpty = nullptr;
129 TPaveText* m_legError = nullptr;
130 TPaveText* m_legOnProblem = nullptr;
131 TPaveText* m_legOnWarning = nullptr;
132 TPaveText* m_legOnNormal = nullptr;
133 TPaveText* m_legOnEmpty = nullptr;
134 TPaveText* m_legOnError = nullptr;
136 Int_t m_occUstatus = 0;
137 Int_t m_occVstatus = 0;
138 Int_t m_occU3Samples = 0;
139 Int_t m_occV3Samples = 0;
141 Int_t m_occUGroupId0 = 0;
142 Int_t m_occVGroupId0 = 0;
150 std::string m_pvPrefix;
153 std::vector<VxdID> m_SVDModules;
154
155 };
157} // end namespace Belle2
158
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
Int_t m_onlineOccV3Samples
0 = normal, 1 = empty, 2 = warning, 3 = error for 3 sampes
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.
TH2F * m_hOnlineOccupancyV3Samples
online Occupancy V histo for 3 sample
Int_t findBinY(Int_t layer, Int_t sensor)
find Y bin corresponding to sensor, occupancy plot
TCanvas * m_cOccupancyU
occupancy U histo canvas
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
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
Parameters accesible from basf2 scripts.
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
void endRun() override final
This method is called if the current run ends.
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.
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
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
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
class to summarize SVD quantities per sensor and side
Abstract base class for different kinds of events.