Belle II Software  release-08-01-10
SVDLocalCalibrationsMonitorModule.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 #pragma once
10 
11 #include <framework/core/Module.h>
12 
13 #include <svd/dbobjects/SVDLocalConfigParameters.h>
14 #include <svd/dbobjects/SVDGlobalConfigParameters.h>
15 #include <svd/calibration/SVDFADCMaskedStrips.h>
16 #include <svd/calibration/SVDPulseShapeCalibrations.h>
17 #include <svd/calibration/SVDNoiseCalibrations.h>
18 #include <svd/calibration/SVDPedestalCalibrations.h>
19 //#include <svd/calibration/SVDOccupancyCalibrations.h>
20 #include <svd/calibration/SVDHotStripsCalibrations.h>
21 
22 #include <svd/dataobjects/SVDHistograms.h>
23 #include <svd/dataobjects/SVDSummaryPlots.h>
24 
25 #include <string>
26 #include <TFile.h>
27 #include <TTree.h>
28 #include <TBranch.h>
29 #include <TH1F.h>
30 #include <TH2F.h>
31 
32 namespace Belle2 {
44 
45  public:
46 
51 
53  virtual void beginRun() override;
54 
56  virtual void event() override;
57 
59  virtual void endRun() override;
60 
61  /* ROOT file related parameters */
62  TFile* m_rootFilePtr = nullptr;
63  TTree* m_tree = nullptr;
64  TTree* m_treeDetailed = nullptr;
66  //branches
67  TBranch* b_exp = nullptr;
68  TBranch* b_run = nullptr;
69  TBranch* b_date = nullptr;
70  TBranch* b_hv = nullptr;
71  TBranch* b_ladder = nullptr;
72  TBranch* b_layer = nullptr;
73  TBranch* b_sensor = nullptr;
74  TBranch* b_side = nullptr;
75  TBranch* b_strip = nullptr;
76  TBranch* b_occupancy = nullptr;
77  TBranch* b_mask = nullptr;
78  TBranch* b_maskAVE = nullptr;
79  TBranch* b_hotstrips = nullptr;
80  TBranch* b_hotstripsAVE = nullptr;
81  TBranch* b_pedestal = nullptr;
82  TBranch* b_pedestalAVE = nullptr;
83  TBranch* b_pedestalRMS = nullptr;
84  TBranch* b_gain = nullptr;
85  TBranch* b_gainAVE = nullptr;
86  TBranch* b_gainRMS = nullptr;
87  TBranch* b_noise = nullptr;
88  TBranch* b_noiseEl = nullptr;
89  TBranch* b_noiseAVE = nullptr;
90  TBranch* b_noiseRMS = nullptr;
91  TBranch* b_noiseElAVE = nullptr;
92  TBranch* b_noiseElRMS = nullptr;
93  TBranch* b_occupancyAVE = nullptr;
94  TBranch* b_occupancyRMS = nullptr;
95  TBranch* b_calPeakADC = nullptr;
96  TBranch* b_calPeakADCAVE = nullptr;
97  TBranch* b_calPeakADCRMS = nullptr;
98  TBranch* b_calPeakTime = nullptr;
99  TBranch* b_calPeakTimeAVE = nullptr;
100  TBranch* b_calPeakTimeRMS = nullptr;
101  TBranch* b_pulseWidth = nullptr;
102  TBranch* b_pulseWidthAVE = nullptr;
103  TBranch* b_pulseWidthRMS = nullptr;
105  //branch variables
106  int m_exp = -1;
107  int m_run = -1;
108  char m_date[11] = "";
109  float m_hv = -1;
110  int m_layer = -1;
111  int m_ladder = -1;
112  int m_sensor = -1;
113  int m_side = -1;
114  int m_strip = -1;
115  float m_mask = -1;
116  float m_maskAVE = -1;
117  float m_hotstrips = -1;
118  float m_hotstripsAVE = -1;
119  float m_occupancy = -1;
120  float m_noise = -1;
121  float m_noiseEl = -1;
122  float m_occupancyAVE = -1;
123  float m_occupancyRMS = -1;
124  float m_noiseAVE = -1;
125  float m_noiseRMS = -1;
126  float m_noiseElAVE = -1;
127  float m_noiseElRMS = -1;
128  float m_pedestal = -1;
129  float m_pedestalAVE = -1;
130  float m_pedestalRMS = -1;
131  float m_gain = -1;
132  float m_gainAVE = -1;
133  float m_gainRMS = -1;
134  float m_calPeakADC = -1;
135  float m_calPeakADCAVE = -1;
136  float m_calPeakADCRMS = -1;
137  float m_calPeakTime = -1;
138  float m_calPeakTimeAVE = -1;
139  float m_calPeakTimeRMS = -1;
140  float m_pulseWidth = -1;
141  float m_pulseWidthAVE = -1;
142  float m_pulseWidthRMS = -1;
144  std::string m_rootFileName = "SVDLocalCalibrationMonitor_output.root";
146  private:
155  // SVDOccupancyCalibrations m_OccupancyCal; /**< occupancy payload*/
156  // SVDHotStripsCalibrations m_HotStripsCal; /**< hot strips calibration*/
157 
161  // SVDHistograms<TProfile>* m_pMask = nullptr; /**< masked strips profile */
162 
163  //NOISE
169  //PEDESTAL
173  //GAIN
177  //PEAKTIME
181  //PEAKADC
185  //PULSEWIDTH
189  //OCCUPANCY
193  //HOT STRIPS
197  nullptr;
198  };
200 }
201 
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
Base class for Modules.
Definition: Module.h:72
This class defines the dbobject and the method to access strips which are masked at FADC level.
Module to produce a list of histogram showing the uploaded local calibration constants.
SVDHistograms< TH2F > * m_h2Pedestal
pedestal (ADC) VS strip 2D histo
SVDHistograms< TH2F > * m_h2CalPeakADC
calPeakADC (ns) VS strip 2D histo
SVDFADCMaskedStrips m_MaskedStr
FADC masked strip payload.
SVDHistograms< TH2F > * m_h2Noise
noise (ADC) VS strip 2D histo
SVDLocalCalibrationsMonitorModule()
Constructor: Sets the description, the properties and the parameters of the module.
TTree * m_tree
pointer at tree containing the mean and RMS of calibration constants
TBranch * b_date
date of the noise local run in yyyy-mm-dd format
SVDHistograms< TH2F > * m_h2CalPeakTime
calPeakTime (ns) VS strip 2D histo
TTree * m_treeDetailed
pointer at tree containing the calibration constants of each strip
SVDHistograms< TH1F > * hm_hot_strips
hot strips per sensor
virtual void event() override
fill trees and histograms
SVDHistograms< TH1F > * m_hGain
gain (e-/ADC) histo
virtual void endRun() override
print the payloads uniqueID and write trees and histograms to the rootfile
SVDSummaryPlots * m_hHotStripsSummary
hot strip summary histo
SVDHistograms< TH1F > * m_hCalPeakTime
calPeakTime (ns) histo
SVDHistograms< TH2F > * m_h2Mask
mask VS strip 2D histo
SVDPulseShapeCalibrations m_PulseShapeCal
pulse shape payload
SVDHistograms< TH1F > * m_hNoiseEl
noise in e- histo
virtual void beginRun() override
initialize the TTrees and check validities of payloads
SVDHistograms< TH2F > * m_h2NoiseEl
noise in e- VS strip 2D histo
DBObjPtr< SVDLocalConfigParameters > m_svdLocalConfig
SVD Local Configuration payload.
char m_date[11]
date of the noise local run in yyyy-mm-dd format
SVDHistograms< TH1F > * m_hHotstrips
hot strips histo
SVDHistograms< TH1F > * m_hNoise
noise (ADC) histo
DBObjPtr< SVDGlobalConfigParameters > m_svdGlobalConfig
SVD Global Configuration payload.
SVDHistograms< TH1F > * m_hPulseWidth
calPeakTime (ns) histo
SVDHistograms< TH1F > * m_hCalPeakADC
calPeakADC (ns) histo
SVDHistograms< TH2F > * m_h2PulseWidth
calPeakTime (ns) VS strip 2D histo
SVDHistograms< TH1F > * m_hPedestal
pedestal (ADC) histo
SVDHistograms< TH2F > * m_h2Occupancy
occupancy (hits/evt) VS strip 2D histo
TBranch * b_occupancyAVE
sensor occupancy average (ADC)
TFile * m_rootFilePtr
pointer at root file used for storing histograms
SVDPedestalCalibrations m_PedestalCal
pedestal payload
SVDHistograms< TH2F > * m_h2Gain
gain (e-/ADC) VS strip 2D histo
SVDHistograms< TH2F > * m_h2Hotstrips
hotstrips VS strip 2D histo
SVDHistograms< TH1F > * m_hOccupancy
occupancy (hits/evt) histo
This class defines the dbobject and the method to access SVD calibrations from the noise local runs.
This class defines the dbobject and the method to access SVD calibrations from the noise local runs.
This class defines the dbobject and the methods to access the SVD calibrations from the local runs pr...
class to summarize SVD quantities per sensor and side
Abstract base class for different kinds of events.