Belle II Software development
eclDQM.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/* ECL headers. */
12#include <ecl/dbobjects/ECLCrystalCalib.h>
13#include <ecl/geometry/ECLGeometryPar.h>
14#include <ecl/mapper/ECLChannelMapper.h>
15
16/* Basf2 headers. */
17#include <framework/core/HistoModule.h>
18#include <framework/core/ModuleParam.templateDetails.h>
19#include <framework/datastore/StoreArray.h>
20#include <framework/datastore/StoreObjPtr.h>
21#include <framework/database/DBObjPtr.h>
22
23class TH1F;
24class TH2F;
25class TProfile;
26
27namespace Belle2 {
33 class EventMetaData;
34 class ECLDigit;
35 class ECLDsp;
36 class ECLTrig;
37 class ECLCalDigit;
38 class TRGSummary;
39
43 class ECLDQMModule : public HistoModule {
45 public:
46
49
51 virtual ~ECLDQMModule();
52
54 virtual void initialize() override;
56 virtual void beginRun() override;
58 virtual void event() override;
60 virtual void endRun() override;
62 virtual void terminate() override;
63
65 virtual void defineHisto() override;
66
67 private:
72 bool isRandomTrigger();
73
92
94 int m_iEvent{ -1};
100 bool m_DPHYTTYP{0};
101
103 std::vector<double> m_HitThresholds = {};
105 std::vector<double> m_TotalEnergyThresholds = {};
107 std::vector<double> m_TimingThresholds = {};
109 std::vector<double> m_HitNumberUpperLimits = {};
111 std::vector<std::string> m_WaveformOption;
113 std::vector<double> ecltot = {};
115 std::vector<double> nhits = {};
117 std::vector<int> v_totalthrApsd = {};
118
119
126
128 TH1F* h_evtot{nullptr};
130 TH1F* h_evtot_logic{nullptr};
132 TH1F* h_evtot_rand{nullptr};
134 TH1F* h_evtot_dphy{nullptr};
136 TH1F* h_quality{nullptr};
138 TH1F* h_quality_other{nullptr};
140 TH1F* h_bad_quality{nullptr};
142 TH1F* h_trigtag1{nullptr};
144 TH1F* h_adc_hits{nullptr};
147
149 std::vector<TH1F*> h_cids = {};
151 std::vector<TH1F*> h_edeps = {};
153 std::vector<TH1F*> h_time_barrels = {};
155 std::vector<TH1F*> h_time_endcaps = {};
157 std::vector<TH1F*> h_ncevs = {};
159 std::vector<TH1F*> h_cells = {};
161 TH1F* h_cell_psd_norm{nullptr};
163 std::vector<TH1F*> h_time_crate_Thr1GeV = {};
165 TH2F* h_trigtime_trigid{nullptr};
167 TH2F* h_trigtag2_trigid{nullptr};
169 TProfile* h_pedmean_cellid{nullptr};
171 TProfile* h_pedrms_cellid{nullptr};
173 TProfile* h_pedrms_thetaid{nullptr};
174 };
176}; // end Belle2 namespace
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
This module is created to monitor ECL Data Quality.
Definition: eclDQM.h:43
double m_PedestalMean[ECLElementNumbers::c_NCrystals]
Pedestal average values.
Definition: eclDQM.h:123
TH1F * h_trigtag1
Histogram: Trigger tag flag #1.
Definition: eclDQM.h:142
std::vector< double > nhits
Container for channel multiplicity.
Definition: eclDQM.h:115
TH1F * h_bad_quality
Histogram: Cell IDs w/ bad fit quality flag.
Definition: eclDQM.h:140
double m_PedestalRms[ECLElementNumbers::c_NCrystals]
Pedestal rms error values.
Definition: eclDQM.h:125
bool m_DPHYTTYP
Flag to select events triggered by delayed bhabha.
Definition: eclDQM.h:100
std::vector< double > m_TimingThresholds
Parameters for timing histograms.
Definition: eclDQM.h:107
TH1F * h_adc_hits
Histogram: Fraction of digits above ADC threshold.
Definition: eclDQM.h:144
StoreArray< ECLDsp > m_ECLDsps
StoreArray ECLDsp.
Definition: eclDQM.h:85
virtual void initialize() override
Initialize the module.
Definition: eclDQM.cc:242
virtual ~ECLDQMModule()
Destructor.
Definition: eclDQM.cc:76
StoreArray< ECLCalDigit > m_ECLCalDigits
StoreArray ECLCalDigit.
Definition: eclDQM.h:89
StoreObjPtr< TRGSummary > m_l1Trigger
StoreObjPtr TRGSummary
Definition: eclDQM.h:79
TH1F * h_cell_psd_norm
Histogram: Normalize to psd hits for CellID.
Definition: eclDQM.h:161
virtual void event() override
Event processor.
Definition: eclDQM.cc:289
TH2F * h_trigtime_trigid
Histogram: Trigger time vs.
Definition: eclDQM.h:165
ECLDQMModule()
< derived from HistoModule class.
Definition: eclDQM.cc:50
std::vector< TH1F * > h_edeps
Histogram vector: Total energy.
Definition: eclDQM.h:151
virtual void endRun() override
Call when a run ends.
Definition: eclDQM.cc:429
std::vector< TH1F * > h_ncevs
Histogram vector: Channel multiplicity.
Definition: eclDQM.h:157
virtual void terminate() override
Terminate.
Definition: eclDQM.cc:434
TH1F * h_evtot
Histogram: Total event no (auxiliary) to normalize hit map .
Definition: eclDQM.h:128
int m_iEvent
Global event number.
Definition: eclDQM.h:94
ECL::ECLGeometryPar * m_geom
Geometry.
Definition: eclDQM.h:75
StoreArray< ECLDigit > m_ECLDigits
StoreArray ECLDigit.
Definition: eclDQM.h:83
std::vector< double > ecltot
Container for energy.
Definition: eclDQM.h:113
std::vector< TH1F * > h_time_barrels
Histogram vector: Reconstructed time for barrel.
Definition: eclDQM.h:153
double m_EnergyUpperThr
Upper threshold of energy deposition in event, [GeV].
Definition: eclDQM.h:98
TProfile * h_pedmean_cellid
Histogram: Pedestal Average vs.
Definition: eclDQM.h:169
TH1F * h_evtot_rand
Histogram: Event no for rand (auxiliary) to normalize rand waveform flow.
Definition: eclDQM.h:132
std::vector< TH1F * > h_time_crate_Thr1GeV
Histogram vector: Reconstructed signal time for all ECL crates above the threshold = 1 GeV.
Definition: eclDQM.h:163
TH1F * h_time_crate_Thr1GeV_large
Histogram: Entries with crate time offsets > 100 ns (E > 1 GeV).
Definition: eclDQM.h:146
virtual void beginRun() override
Call when a run begins.
Definition: eclDQM.cc:262
std::string m_histogramDirectoryName
Histogram directory in ROOT file.
Definition: eclDQM.h:96
ECL::ECLChannelMapper mapper
ECL channel mapper.
Definition: eclDQM.h:81
TH1F * h_evtot_logic
Histogram: Event no for logic (auxiliary) to normalize logic waveform flow.
Definition: eclDQM.h:130
std::vector< double > m_HitNumberUpperLimits
Parameters for number of hits histograms.
Definition: eclDQM.h:109
std::vector< double > m_TotalEnergyThresholds
Parameters for histograms w/ total energy.
Definition: eclDQM.h:105
TProfile * h_pedrms_thetaid
Histogram: Pedestal rms error vs.
Definition: eclDQM.h:173
std::vector< std::string > m_WaveformOption
Parameters for waveform histograms.
Definition: eclDQM.h:111
int m_DspArray[ECLElementNumbers::c_NCrystals][31]
WF sampling points for digit array.
Definition: eclDQM.h:121
TH1F * h_evtot_dphy
Histogram: Event no for dphy (auxiliary) to normalize dphy waveform flow.
Definition: eclDQM.h:134
std::vector< double > m_HitThresholds
Parameters for hit occ.
Definition: eclDQM.h:103
TH1F * h_quality
Histogram: Fit quality flag (0 - good, 1 - large amplitude, 3 - bad chi2).
Definition: eclDQM.h:136
StoreArray< ECLTrig > m_ECLTrigs
StoreArray ECLTrig.
Definition: eclDQM.h:87
StoreObjPtr< EventMetaData > m_eventmetadata
StoreObjPtr EventMetaData.
Definition: eclDQM.h:77
TH2F * h_trigtag2_trigid
Histogram: Trigger tag flag #2 vs.
Definition: eclDQM.h:167
std::vector< int > v_totalthrApsd
Vector to store psd wf amplitude threshold.
Definition: eclDQM.h:117
TH1F * h_quality_other
Histogram: Fit quality flag for waveform type 'other'.
Definition: eclDQM.h:138
std::vector< TH1F * > h_cids
Histogram vector: Hit map.
Definition: eclDQM.h:149
TProfile * h_pedrms_cellid
Histogram: Pedestal rms error vs.
Definition: eclDQM.h:171
DBObjPtr< ECLCrystalCalib > m_calibrationThrApsd
PSD waveform amplitude threshold.
Definition: eclDQM.h:91
std::vector< TH1F * > h_cells
Histogram vector: Waveforms vs CellID.
Definition: eclDQM.h:159
bool isRandomTrigger()
Definition: eclDQM.cc:438
virtual void defineHisto() override
Function to define histograms.
Definition: eclDQM.cc:81
std::vector< TH1F * > h_time_endcaps
Histogram vector: Reconstructed time for endcaps.
Definition: eclDQM.h:155
This class provides access to ECL channel map that is either a) Loaded from the database (see ecl/dbo...
The Class for ECL Geometry Parameters.
HistoModule.h is supposed to be used instead of Module.h for the modules with histogram definitions t...
Definition: HistoModule.h:29
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:96
const int c_NCrystals
Number of crystals.
Abstract base class for different kinds of events.