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 {
33
34 class EventMetaData;
35 class ECLDigit;
36 class ECLDsp;
37 class ECLTrig;
38 class ECLCalDigit;
39 class TRGSummary;
40
44 class ECLDQMModule : public HistoModule {
45
46 public:
47
50
52 virtual ~ECLDQMModule() override;
53
55 virtual void initialize() override;
57 virtual void beginRun() override;
59 virtual void event() override;
60
62 virtual void defineHisto() override;
63
64 private:
69 bool isRandomTrigger();
70
76
95
97 int m_iEvent{ -1};
103 bool m_DPHYTTYP{0};
105 std::string m_pi0PListName;
106
108 std::vector<double> m_HitThresholds = {};
110 std::vector<double> m_TotalEnergyThresholds = {};
112 std::vector<double> m_TimingThresholds = {};
114 std::vector<double> m_HitNumberUpperLimits = {};
116 std::vector<std::string> m_WaveformOption;
118 std::vector<double> ecltot = {};
120 std::vector<double> nhits = {};
122 std::vector<int> v_totalthrApsd = {};
123
124
131
133 TH1F* h_evtot{nullptr};
135 TH1F* h_evtot_logic{nullptr};
137 TH1F* h_evtot_rand{nullptr};
139 TH1F* h_evtot_dphy{nullptr};
141 TH1F* h_quality{nullptr};
143 TH1F* h_quality_other{nullptr};
145 TH1F* h_bad_quality{nullptr};
147 TH1F* h_trigtag1{nullptr};
149 TH1F* h_adc_hits{nullptr};
153 TH1F* h_pi0_mass{nullptr};
154
156 std::vector<TH1F*> h_cids = {};
158 std::vector<TH1F*> h_edeps = {};
160 std::vector<TH1F*> h_time_barrels = {};
162 std::vector<TH1F*> h_time_endcaps = {};
164 std::vector<TH1F*> h_ncevs = {};
166 std::vector<TH1F*> h_cells = {};
168 TH1F* h_cell_psd_norm{nullptr};
170 std::vector<TH1F*> h_time_crate_Thr1GeV = {};
172 TH2F* h_trigtime_trigid{nullptr};
174 TH2F* h_trigtag2_trigid{nullptr};
176 TProfile* h_pedmean_cellid{nullptr};
178 TProfile* h_pedrms_cellid{nullptr};
180 TProfile* h_pedrms_thetaid{nullptr};
181 };
182
183}; // end Belle2 namespace
Class for accessing objects in the database.
Definition DBObjPtr.h:21
Class to store calibrated ECLDigits: ECLCalDigits.
Definition ECLCalDigit.h:23
double m_PedestalMean[ECLElementNumbers::c_NCrystals]
Pedestal average values.
Definition eclDQM.h:128
TH1F * h_trigtag1
Histogram: Trigger tag flag #1.
Definition eclDQM.h:147
std::vector< double > nhits
Container for channel multiplicity.
Definition eclDQM.h:120
bool fillInvMassHistogram()
Fill entries for pi0 invariant mass distribution.
Definition eclDQM.cc:454
TH1F * h_bad_quality
Histogram: Cell IDs w/ bad fit quality flag.
Definition eclDQM.h:145
double m_PedestalRms[ECLElementNumbers::c_NCrystals]
Pedestal rms error values.
Definition eclDQM.h:130
bool m_DPHYTTYP
Flag to select events triggered by delayed bhabha.
Definition eclDQM.h:103
std::vector< double > m_TimingThresholds
Parameters for timing histograms.
Definition eclDQM.h:112
TH1F * h_adc_hits
Histogram: Fraction of digits above ADC threshold.
Definition eclDQM.h:149
StoreArray< ECLDsp > m_ECLDsps
StoreArray ECLDsp.
Definition eclDQM.h:88
virtual void initialize() override
Initialize the module.
Definition eclDQM.cc:255
virtual ~ECLDQMModule() override
Destructor.
Definition eclDQM.cc:84
StoreArray< ECLCalDigit > m_ECLCalDigits
StoreArray ECLCalDigit.
Definition eclDQM.h:92
StoreObjPtr< TRGSummary > m_l1Trigger
StoreObjPtr TRGSummary.
Definition eclDQM.h:82
TH1F * h_cell_psd_norm
Histogram: Normalize to psd hits for CellID.
Definition eclDQM.h:168
virtual void event() override
Event processor.
Definition eclDQM.cc:310
TH2F * h_trigtime_trigid
Histogram: Trigger time vs.
Definition eclDQM.h:172
ECLDQMModule()
< derived from HistoModule class.
Definition eclDQM.cc:56
std::vector< TH1F * > h_edeps
Histogram vector: Total energy.
Definition eclDQM.h:158
std::vector< TH1F * > h_ncevs
Histogram vector: Channel multiplicity.
Definition eclDQM.h:164
TH1F * h_evtot
Histogram: Total event no (auxiliary) to normalize hit map .
Definition eclDQM.h:133
int m_iEvent
Global event number.
Definition eclDQM.h:97
ECL::ECLGeometryPar * m_geom
Geometry.
Definition eclDQM.h:78
StoreArray< ECLDigit > m_ECLDigits
StoreArray ECLDigit.
Definition eclDQM.h:86
std::vector< double > ecltot
Container for energy.
Definition eclDQM.h:118
std::vector< TH1F * > h_time_barrels
Histogram vector: Reconstructed time for barrel.
Definition eclDQM.h:160
double m_EnergyUpperThr
Upper threshold of energy deposition in event, [GeV].
Definition eclDQM.h:101
TProfile * h_pedmean_cellid
Histogram: Pedestal Average vs.
Definition eclDQM.h:176
TH1F * h_evtot_rand
Histogram: Event no for rand (auxiliary) to normalize rand waveform flow.
Definition eclDQM.h:137
std::vector< TH1F * > h_time_crate_Thr1GeV
Histogram vector: Reconstructed signal time for all ECL crates above the threshold = 1 GeV.
Definition eclDQM.h:170
TH1F * h_time_crate_Thr1GeV_large
Histogram: Entries with crate time offsets > 100 ns (E > 1 GeV).
Definition eclDQM.h:151
virtual void beginRun() override
Call when a run begins.
Definition eclDQM.cc:275
std::string m_histogramDirectoryName
Histogram directory in ROOT file.
Definition eclDQM.h:99
ECL::ECLChannelMapper mapper
ECL channel mapper.
Definition eclDQM.h:84
TH1F * h_evtot_logic
Histogram: Event no for logic (auxiliary) to normalize logic waveform flow.
Definition eclDQM.h:135
std::vector< double > m_HitNumberUpperLimits
Parameters for number of hits histograms.
Definition eclDQM.h:114
std::vector< double > m_TotalEnergyThresholds
Parameters for histograms w/ total energy.
Definition eclDQM.h:110
TProfile * h_pedrms_thetaid
Histogram: Pedestal rms error vs.
Definition eclDQM.h:180
std::vector< std::string > m_WaveformOption
Parameters for waveform histograms.
Definition eclDQM.h:116
int m_DspArray[ECLElementNumbers::c_NCrystals][31]
WF sampling points for digit array.
Definition eclDQM.h:126
TH1F * h_evtot_dphy
Histogram: Event no for dphy (auxiliary) to normalize dphy waveform flow.
Definition eclDQM.h:139
std::vector< double > m_HitThresholds
Parameters for hit occ.
Definition eclDQM.h:108
TH1F * h_quality
Histogram: Fit quality flag (0 - good, 1 - large amplitude, 3 - bad chi2).
Definition eclDQM.h:141
StoreArray< ECLTrig > m_ECLTrigs
StoreArray ECLTrig.
Definition eclDQM.h:90
StoreObjPtr< EventMetaData > m_eventmetadata
StoreObjPtr EventMetaData.
Definition eclDQM.h:80
TH2F * h_trigtag2_trigid
Histogram: Trigger tag flag #2 vs.
Definition eclDQM.h:174
std::vector< int > v_totalthrApsd
Vector to store psd wf amplitude threshold.
Definition eclDQM.h:122
TH1F * h_pi0_mass
Histogram: pi0 mass.
Definition eclDQM.h:153
TH1F * h_quality_other
Histogram: Fit quality flag for waveform type 'other'.
Definition eclDQM.h:143
std::vector< TH1F * > h_cids
Histogram vector: Hit map.
Definition eclDQM.h:156
TProfile * h_pedrms_cellid
Histogram: Pedestal rms error vs.
Definition eclDQM.h:178
std::string m_pi0PListName
Name of the pi0 particle list.
Definition eclDQM.h:105
DBObjPtr< ECLCrystalCalib > m_calibrationThrApsd
PSD waveform amplitude threshold.
Definition eclDQM.h:94
std::vector< TH1F * > h_cells
Histogram vector: Waveforms vs CellID.
Definition eclDQM.h:166
virtual void defineHisto() override
Function to define histograms.
Definition eclDQM.cc:89
std::vector< TH1F * > h_time_endcaps
Histogram vector: Reconstructed time for endcaps.
Definition eclDQM.h:162
Class to store ECL digitized hits (output of ECLDigi) relation to ECLHit filled in ecl/modules/eclDig...
Definition ECLDigit.h:25
Class to store ECL ShaperDSP waveform ADC data.
Definition ECLDsp.h:25
Class to store ECLTrig, still need to be study relation to ECLHit filled in ecl/modules/eclDigitizer/...
Definition ECLTrig.h:25
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.
Store event, run, and experiment numbers.
HistoModule()
Constructor.
Definition HistoModule.h:32
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
Trigger Summary Information input bits input bits from subdetectors ftdl (Final Trigger Decision Logi...
Definition TRGSummary.h:32
const int c_NCrystals
Number of crystals.
Abstract base class for different kinds of events.