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 <mdst/dataobjects/SoftwareTriggerResult.h>
18#include <framework/core/HistoModule.h>
19#include <framework/core/ModuleParam.templateDetails.h>
20#include <framework/datastore/StoreArray.h>
21#include <framework/datastore/StoreObjPtr.h>
22#include <framework/database/DBObjPtr.h>
23
24class TH1F;
25class TH2F;
26class TProfile;
27
28namespace Belle2 {
34 class EventMetaData;
35 class ECLDigit;
36 class ECLDsp;
37 class ECLTrig;
38 class ECLCalDigit;
39 class TRGSummary;
40
44 class ECLDQMModule : public HistoModule {
46 public:
47
50
52 virtual ~ECLDQMModule();
53
55 virtual void initialize() override;
57 virtual void beginRun() override;
59 virtual void event() override;
61 virtual void endRun() override;
63 virtual void terminate() override;
64
66 virtual void defineHisto() override;
67
68 private:
73 bool isRandomTrigger();
74
80
99
101 int m_iEvent{ -1};
107 bool m_DPHYTTYP{0};
109 std::string m_pi0PListName;
110
112 std::vector<double> m_HitThresholds = {};
114 std::vector<double> m_TotalEnergyThresholds = {};
116 std::vector<double> m_TimingThresholds = {};
118 std::vector<double> m_HitNumberUpperLimits = {};
120 std::vector<std::string> m_WaveformOption;
122 std::vector<double> ecltot = {};
124 std::vector<double> nhits = {};
126 std::vector<int> v_totalthrApsd = {};
127
128
135
137 TH1F* h_evtot{nullptr};
139 TH1F* h_evtot_logic{nullptr};
141 TH1F* h_evtot_rand{nullptr};
143 TH1F* h_evtot_dphy{nullptr};
145 TH1F* h_quality{nullptr};
147 TH1F* h_quality_other{nullptr};
149 TH1F* h_bad_quality{nullptr};
151 TH1F* h_trigtag1{nullptr};
153 TH1F* h_adc_hits{nullptr};
157 TH1F* h_pi0_mass{nullptr};
158
160 std::vector<TH1F*> h_cids = {};
162 std::vector<TH1F*> h_edeps = {};
164 std::vector<TH1F*> h_time_barrels = {};
166 std::vector<TH1F*> h_time_endcaps = {};
168 std::vector<TH1F*> h_ncevs = {};
170 std::vector<TH1F*> h_cells = {};
172 TH1F* h_cell_psd_norm{nullptr};
174 std::vector<TH1F*> h_time_crate_Thr1GeV = {};
176 TH2F* h_trigtime_trigid{nullptr};
178 TH2F* h_trigtag2_trigid{nullptr};
180 TProfile* h_pedmean_cellid{nullptr};
182 TProfile* h_pedrms_cellid{nullptr};
184 TProfile* h_pedrms_thetaid{nullptr};
185 };
187}; // 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:44
double m_PedestalMean[ECLElementNumbers::c_NCrystals]
Pedestal average values.
Definition: eclDQM.h:132
TH1F * h_trigtag1
Histogram: Trigger tag flag #1.
Definition: eclDQM.h:151
std::vector< double > nhits
Container for channel multiplicity.
Definition: eclDQM.h:124
bool fillInvMassHistogram()
Fill entries for pi0 invariant mass distribution.
Definition: eclDQM.cc:459
TH1F * h_bad_quality
Histogram: Cell IDs w/ bad fit quality flag.
Definition: eclDQM.h:149
double m_PedestalRms[ECLElementNumbers::c_NCrystals]
Pedestal rms error values.
Definition: eclDQM.h:134
bool m_DPHYTTYP
Flag to select events triggered by delayed bhabha.
Definition: eclDQM.h:107
std::vector< double > m_TimingThresholds
Parameters for timing histograms.
Definition: eclDQM.h:116
TH1F * h_adc_hits
Histogram: Fraction of digits above ADC threshold.
Definition: eclDQM.h:153
StoreArray< ECLDsp > m_ECLDsps
StoreArray ECLDsp.
Definition: eclDQM.h:92
virtual void initialize() override
Initialize the module.
Definition: eclDQM.cc:251
virtual ~ECLDQMModule()
Destructor.
Definition: eclDQM.cc:83
StoreArray< ECLCalDigit > m_ECLCalDigits
StoreArray ECLCalDigit.
Definition: eclDQM.h:96
StoreObjPtr< TRGSummary > m_l1Trigger
StoreObjPtr TRGSummary
Definition: eclDQM.h:86
TH1F * h_cell_psd_norm
Histogram: Normalize to psd hits for CellID.
Definition: eclDQM.h:172
virtual void event() override
Event processor.
Definition: eclDQM.cc:306
TH2F * h_trigtime_trigid
Histogram: Trigger time vs.
Definition: eclDQM.h:176
ECLDQMModule()
< derived from HistoModule class.
Definition: eclDQM.cc:56
std::vector< TH1F * > h_edeps
Histogram vector: Total energy.
Definition: eclDQM.h:162
virtual void endRun() override
Call when a run ends.
Definition: eclDQM.cc:443
std::vector< TH1F * > h_ncevs
Histogram vector: Channel multiplicity.
Definition: eclDQM.h:168
virtual void terminate() override
Terminate.
Definition: eclDQM.cc:448
TH1F * h_evtot
Histogram: Total event no (auxiliary) to normalize hit map .
Definition: eclDQM.h:137
int m_iEvent
Global event number.
Definition: eclDQM.h:101
ECL::ECLGeometryPar * m_geom
Geometry.
Definition: eclDQM.h:82
StoreArray< ECLDigit > m_ECLDigits
StoreArray ECLDigit.
Definition: eclDQM.h:90
std::vector< double > ecltot
Container for energy.
Definition: eclDQM.h:122
std::vector< TH1F * > h_time_barrels
Histogram vector: Reconstructed time for barrel.
Definition: eclDQM.h:164
double m_EnergyUpperThr
Upper threshold of energy deposition in event, [GeV].
Definition: eclDQM.h:105
TProfile * h_pedmean_cellid
Histogram: Pedestal Average vs.
Definition: eclDQM.h:180
TH1F * h_evtot_rand
Histogram: Event no for rand (auxiliary) to normalize rand waveform flow.
Definition: eclDQM.h:141
std::vector< TH1F * > h_time_crate_Thr1GeV
Histogram vector: Reconstructed signal time for all ECL crates above the threshold = 1 GeV.
Definition: eclDQM.h:174
TH1F * h_time_crate_Thr1GeV_large
Histogram: Entries with crate time offsets > 100 ns (E > 1 GeV).
Definition: eclDQM.h:155
virtual void beginRun() override
Call when a run begins.
Definition: eclDQM.cc:271
std::string m_histogramDirectoryName
Histogram directory in ROOT file.
Definition: eclDQM.h:103
ECL::ECLChannelMapper mapper
ECL channel mapper.
Definition: eclDQM.h:88
TH1F * h_evtot_logic
Histogram: Event no for logic (auxiliary) to normalize logic waveform flow.
Definition: eclDQM.h:139
std::vector< double > m_HitNumberUpperLimits
Parameters for number of hits histograms.
Definition: eclDQM.h:118
std::vector< double > m_TotalEnergyThresholds
Parameters for histograms w/ total energy.
Definition: eclDQM.h:114
TProfile * h_pedrms_thetaid
Histogram: Pedestal rms error vs.
Definition: eclDQM.h:184
std::vector< std::string > m_WaveformOption
Parameters for waveform histograms.
Definition: eclDQM.h:120
int m_DspArray[ECLElementNumbers::c_NCrystals][31]
WF sampling points for digit array.
Definition: eclDQM.h:130
TH1F * h_evtot_dphy
Histogram: Event no for dphy (auxiliary) to normalize dphy waveform flow.
Definition: eclDQM.h:143
std::vector< double > m_HitThresholds
Parameters for hit occ.
Definition: eclDQM.h:112
TH1F * h_quality
Histogram: Fit quality flag (0 - good, 1 - large amplitude, 3 - bad chi2).
Definition: eclDQM.h:145
StoreArray< ECLTrig > m_ECLTrigs
StoreArray ECLTrig.
Definition: eclDQM.h:94
StoreObjPtr< EventMetaData > m_eventmetadata
StoreObjPtr EventMetaData.
Definition: eclDQM.h:84
TH2F * h_trigtag2_trigid
Histogram: Trigger tag flag #2 vs.
Definition: eclDQM.h:178
std::vector< int > v_totalthrApsd
Vector to store psd wf amplitude threshold.
Definition: eclDQM.h:126
TH1F * h_pi0_mass
Histogram: pi0 mass.
Definition: eclDQM.h:157
TH1F * h_quality_other
Histogram: Fit quality flag for waveform type 'other'.
Definition: eclDQM.h:147
std::vector< TH1F * > h_cids
Histogram vector: Hit map.
Definition: eclDQM.h:160
TProfile * h_pedrms_cellid
Histogram: Pedestal rms error vs.
Definition: eclDQM.h:182
std::string m_pi0PListName
Name of the pi0 particle list.
Definition: eclDQM.h:109
DBObjPtr< ECLCrystalCalib > m_calibrationThrApsd
PSD waveform amplitude threshold.
Definition: eclDQM.h:98
std::vector< TH1F * > h_cells
Histogram vector: Waveforms vs CellID.
Definition: eclDQM.h:170
bool isRandomTrigger()
Definition: eclDQM.cc:452
virtual void defineHisto() override
Function to define histograms.
Definition: eclDQM.cc:88
std::vector< TH1F * > h_time_endcaps
Histogram vector: Reconstructed time for endcaps.
Definition: eclDQM.h:166
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.