Belle II Software  release-05-01-25
eclDQM.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2018 - Belle II Collaboration *
4  * *
5  * ECL Data Quality Monitor (First Module) *
6  * *
7  * This module provides histograms for ECL Data Quality Monitoring *
8  * *
9  * Author: The Belle II Collaboration *
10  * Contributors: Dmitry Matvienko (d.v.matvienko@inp.nsk.su) *
11  * *
12  * This software is provided "as is" without any warranty. *
13  **************************************************************************/
14 
15 #pragma once
16 
17 // Copied 6 lines below from PXDDQMModule.h
18 #undef DQM
19 #ifndef DQM
20 #include <framework/core/HistoModule.h>
21 #else
22 #include <daq/dqm/modules/DqmHistoManagerModule.h>
23 #endif
24 
25 //FRAMEWORK
26 #include <framework/datastore/StoreObjPtr.h>
27 #include <framework/datastore/StoreArray.h>
28 #include <framework/core/ModuleParam.templateDetails.h>
29 #include <framework/database/DBObjPtr.h>
30 
31 //ECL
32 #include <ecl/utility/ECLChannelMapper.h>
33 #include <ecl/geometry/ECLGeometryPar.h>
34 #include <ecl/dbobjects/ECLCrystalCalib.h>
35 
36 class TH1F;
37 class TH2F;
38 class TProfile;
39 
40 namespace Belle2 {
46  class EventMetaData;
47  class ECLDigit;
48  class ECLDsp;
49  class ECLTrig;
50  class ECLCalDigit;
51  class TRGSummary;
52 
56  class ECLDQMModule : public HistoModule {
58  public:
59 
61  ECLDQMModule();
62 
64  virtual ~ECLDQMModule();
65 
67  virtual void initialize() override;
69  virtual void beginRun() override;
71  virtual void event() override;
73  virtual void endRun() override;
75  virtual void terminate() override;
76 
78  virtual void defineHisto() override;
79 
80  private:
99 
101  int m_iEvent{ -1};
107  bool m_DPHYTTYP{0};
108 
110  std::vector<double> m_HitThresholds = {};
112  std::vector<double> m_TotalEnergyThresholds = {};
114  std::vector<double> m_TimingThresholds = {};
116  std::vector<double> m_HitNumberUpperLimits = {};
118  std::vector<std::string> m_WaveformOption;
120  std::vector<double> ecltot = {};
122  std::vector<double> nhits = {};
124  std::vector<int> v_totalthrApsd = {};
125 
126 
128  int m_DspArray[8736][31] = {};
130  double m_PedestalMean[8736] = {};
132  double m_PedestalRms[8736] = {};
133 
135  TH1F* h_evtot{nullptr};
137  TH1F* h_evtot_logic{nullptr};
139  TH1F* h_evtot_rand{nullptr};
141  TH1F* h_evtot_dphy{nullptr};
143  TH1F* h_quality{nullptr};
145  TH1F* h_quality_other{nullptr};
147  TH1F* h_bad_quality{nullptr};
149  TH1F* h_trigtag1{nullptr};
151  TH1F* h_adc_hits{nullptr};
152 
154  std::vector<TH1F*> h_cids = {};
156  std::vector<TH1F*> h_edeps = {};
158  std::vector<TH1F*> h_time_barrels = {};
160  std::vector<TH1F*> h_time_endcaps = {};
162  std::vector<TH1F*> h_ncevs = {};
164  std::vector<TH1F*> h_cells = {};
166  TH1F* h_cell_psd_norm{nullptr};
168  std::vector<TH1F*> h_time_crate_Thr1GeV = {};
170  TH2F* h_trigtime_trigid{nullptr};
172  TH2F* h_trigtag2_trigid{nullptr};
174  TProfile* h_pedmean_cellid{nullptr};
176  TProfile* h_pedrms_cellid{nullptr};
178  TProfile* h_pedrms_thetaid{nullptr};
179  };
181 }; // end Belle2 namespace
Belle2::ECLDQMModule::h_adc_hits
TH1F * h_adc_hits
Histogram: Fraction of digits above ADC threshold.
Definition: eclDQM.h:151
Belle2::ECLDQMModule::m_EnergyUpperThr
double m_EnergyUpperThr
Upper threshold of energy deposition in event, [GeV].
Definition: eclDQM.h:105
Belle2::ECLDQMModule::m_DspArray
int m_DspArray[8736][31]
WF sampling points for digit array.
Definition: eclDQM.h:128
Belle2::ECLDQMModule::terminate
virtual void terminate() override
Terminate.
Definition: eclDQM.cc:446
Belle2::ECLDQMModule::m_l1Trigger
StoreObjPtr< TRGSummary > m_l1Trigger
StoreObjPtr TRGSummary
Definition: eclDQM.h:86
Belle2::ECLDQMModule::h_edeps
std::vector< TH1F * > h_edeps
Histogram vector: Total energy.
Definition: eclDQM.h:156
Belle2::ECLDQMModule::defineHisto
virtual void defineHisto() override
Function to define histograms.
Definition: eclDQM.cc:84
Belle2::ECLDQMModule::h_cids
std::vector< TH1F * > h_cids
Histogram vector: Hit map.
Definition: eclDQM.h:154
Belle2::ECLDQMModule::m_ECLDigits
StoreArray< ECLDigit > m_ECLDigits
StoreArray ECLDigit.
Definition: eclDQM.h:90
Belle2::ECLDQMModule::m_iEvent
int m_iEvent
Global event number.
Definition: eclDQM.h:101
Belle2::ECLDQMModule::h_trigtime_trigid
TH2F * h_trigtime_trigid
Histogram: Trigger time vs.
Definition: eclDQM.h:170
Belle2::ECLDQMModule::m_TotalEnergyThresholds
std::vector< double > m_TotalEnergyThresholds
Parameters for histograms w/ total energy.
Definition: eclDQM.h:112
Belle2::ECLDQMModule::h_evtot_rand
TH1F * h_evtot_rand
Histogram: Event no for rand (auxiliary) to normalize rand waveform flow.
Definition: eclDQM.h:139
Belle2::ECLDQMModule::h_pedmean_cellid
TProfile * h_pedmean_cellid
Histogram: Pedestal Average vs.
Definition: eclDQM.h:174
Belle2::ECLDQMModule::m_PedestalRms
double m_PedestalRms[8736]
Pedestal rms error values.
Definition: eclDQM.h:132
Belle2::ECLDQMModule::h_cells
std::vector< TH1F * > h_cells
Histogram vector: Waveforms vs CellID.
Definition: eclDQM.h:164
Belle2::ECLDQMModule::h_time_barrels
std::vector< TH1F * > h_time_barrels
Histogram vector: Reconstructed time for barrel.
Definition: eclDQM.h:158
Belle2::ECLDQMModule::h_ncevs
std::vector< TH1F * > h_ncevs
Histogram vector: Channel multiplicity.
Definition: eclDQM.h:162
Belle2::ECLDQMModule::h_pedrms_cellid
TProfile * h_pedrms_cellid
Histogram: Pedestal rms error vs.
Definition: eclDQM.h:176
Belle2::DBObjPtr
Class for accessing objects in the database.
Definition: DBObjPtr.h:31
Belle2::ECLDQMModule::m_calibrationThrApsd
DBObjPtr< ECLCrystalCalib > m_calibrationThrApsd
PSD waveform amplitude threshold.
Definition: eclDQM.h:98
Belle2::ECL::ECLChannelMapper
This class provides access to ECL channel map that is either a) Loaded from the database (see ecl/dbo...
Definition: ECLChannelMapper.h:36
Belle2::ECLDQMModule::h_time_crate_Thr1GeV
std::vector< TH1F * > h_time_crate_Thr1GeV
Histogram vector: Reconstructed signal time for all ECL crates above the threshold = 1 GeV.
Definition: eclDQM.h:168
Belle2::ECLDQMModule::m_ECLTrigs
StoreArray< ECLTrig > m_ECLTrigs
StoreArray ECLTrig.
Definition: eclDQM.h:94
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::ECLDQMModule::m_HitThresholds
std::vector< double > m_HitThresholds
Parameters for hit occ.
Definition: eclDQM.h:110
Belle2::StoreObjPtr
Type-safe access to single objects in the data store.
Definition: ParticleList.h:33
Belle2::ECLDQMModule::h_bad_quality
TH1F * h_bad_quality
Histogram: Cell IDs w/ bad fit quality flag.
Definition: eclDQM.h:147
Belle2::ECLDQMModule::~ECLDQMModule
virtual ~ECLDQMModule()
Destructor.
Definition: eclDQM.cc:79
Belle2::ECLDQMModule::m_histogramDirectoryName
std::string m_histogramDirectoryName
Histogram directory in ROOT file.
Definition: eclDQM.h:103
Belle2::ECLDQMModule::m_WaveformOption
std::vector< std::string > m_WaveformOption
Parameters for waveform histograms.
Definition: eclDQM.h:118
Belle2::ECLDQMModule::beginRun
virtual void beginRun() override
Call when a run begins.
Definition: eclDQM.cc:271
Belle2::ECLDQMModule::ecltot
std::vector< double > ecltot
Container for energy.
Definition: eclDQM.h:120
Belle2::ECLDQMModule::m_eventmetadata
StoreObjPtr< EventMetaData > m_eventmetadata
StoreObjPtr EventMetaData.
Definition: eclDQM.h:84
Belle2::ECLDQMModule::v_totalthrApsd
std::vector< int > v_totalthrApsd
Vector to store psd wf amplitude threshold.
Definition: eclDQM.h:124
Belle2::ECLDQMModule::h_time_endcaps
std::vector< TH1F * > h_time_endcaps
Histogram vector: Reconstructed time for endcaps.
Definition: eclDQM.h:160
Belle2::ECLDQMModule::m_ECLCalDigits
StoreArray< ECLCalDigit > m_ECLCalDigits
StoreArray ECLCalDigit.
Definition: eclDQM.h:96
Belle2::ECLDQMModule::h_evtot
TH1F * h_evtot
Histogram: Total event no (auxiliary) to normalize hit map .
Definition: eclDQM.h:135
Belle2::ECLDQMModule::h_quality_other
TH1F * h_quality_other
Histogram: Fit quality flag for waveform type 'other'.
Definition: eclDQM.h:145
Belle2::ECLDQMModule::m_PedestalMean
double m_PedestalMean[8736]
Pedestal average values.
Definition: eclDQM.h:130
Belle2::ECLDQMModule::m_ECLDsps
StoreArray< ECLDsp > m_ECLDsps
StoreArray ECLDsp.
Definition: eclDQM.h:92
Belle2::ECLDQMModule::mapper
ECL::ECLChannelMapper mapper
ECL channel mapper.
Definition: eclDQM.h:88
Belle2::ECLDQMModule::endRun
virtual void endRun() override
Call when a run ends.
Definition: eclDQM.cc:441
Belle2::ECLDQMModule::h_cell_psd_norm
TH1F * h_cell_psd_norm
Histogram: Normalize to psd hits for CellID.
Definition: eclDQM.h:166
Belle2::ECLDQMModule::h_trigtag2_trigid
TH2F * h_trigtag2_trigid
Histogram: Trigger tag flag #2 vs.
Definition: eclDQM.h:172
Belle2::ECLDQMModule::event
virtual void event() override
Event processor.
Definition: eclDQM.cc:297
Belle2::ECL::ECLGeometryPar
The Class for ECL Geometry Parameters.
Definition: ECLGeometryPar.h:45
Belle2::ECLDQMModule::h_pedrms_thetaid
TProfile * h_pedrms_thetaid
Histogram: Pedestal rms error vs.
Definition: eclDQM.h:178
Belle2::ECLDQMModule::m_geom
ECL::ECLGeometryPar * m_geom
Geometry.
Definition: eclDQM.h:82
Belle2::StoreArray
Accessor to arrays stored in the data store.
Definition: ECLMatchingPerformanceExpertModule.h:33
Belle2::ECLDQMModule::h_evtot_dphy
TH1F * h_evtot_dphy
Histogram: Event no for dphy (auxiliary) to normalize dphy waveform flow.
Definition: eclDQM.h:141
Belle2::ECLDQMModule::ECLDQMModule
ECLDQMModule()
< derived from HistoModule class.
Definition: eclDQM.cc:55
Belle2::ECLDQMModule
This module is created to monitor ECL Data Quality.
Definition: eclDQM.h:56
Belle2::ECLDQMModule::h_trigtag1
TH1F * h_trigtag1
Histogram: Trigger tag flag #1.
Definition: eclDQM.h:149
Belle2::ECLDQMModule::nhits
std::vector< double > nhits
Container for channel multiplicity.
Definition: eclDQM.h:122
Belle2::ECLDQMModule::h_quality
TH1F * h_quality
Histogram: Fit quality flag (0 - good, 1 - large amplitude, 3 - bad chi2).
Definition: eclDQM.h:143
Belle2::ECLDQMModule::h_evtot_logic
TH1F * h_evtot_logic
Histogram: Event no for logic (auxiliary) to normalize logic waveform flow.
Definition: eclDQM.h:137
Belle2::ECLDQMModule::initialize
virtual void initialize() override
Initialize the module.
Definition: eclDQM.cc:251
Belle2::ECLDQMModule::m_DPHYTTYP
bool m_DPHYTTYP
Flag to select events triggered by delayed bhabha.
Definition: eclDQM.h:107
Belle2::HistoModule
HistoModule.h is supposed to be used instead of Module.h for the modules with histogram definitions t...
Definition: HistoModule.h:29
Belle2::ECLDQMModule::m_HitNumberUpperLimits
std::vector< double > m_HitNumberUpperLimits
Parameters for number of hits histograms.
Definition: eclDQM.h:116
Belle2::ECLDQMModule::m_TimingThresholds
std::vector< double > m_TimingThresholds
Parameters for timing histograms.
Definition: eclDQM.h:114