Belle II Software  release-06-01-15
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 // Copied 6 lines below from PXDDQMModule.h
12 #undef DQM
13 #ifndef DQM
14 #include <framework/core/HistoModule.h>
15 #else
16 #include <daq/dqm/modules/DqmHistoManagerModule.h>
17 #endif
18 
19 //FRAMEWORK
20 #include <framework/datastore/StoreObjPtr.h>
21 #include <framework/datastore/StoreArray.h>
22 #include <framework/core/ModuleParam.templateDetails.h>
23 #include <framework/database/DBObjPtr.h>
24 
25 //ECL
26 #include <ecl/utility/ECLChannelMapper.h>
27 #include <ecl/geometry/ECLGeometryPar.h>
28 #include <ecl/dbobjects/ECLCrystalCalib.h>
29 
30 class TH1F;
31 class TH2F;
32 class TProfile;
33 
34 namespace Belle2 {
40  class EventMetaData;
41  class ECLDigit;
42  class ECLDsp;
43  class ECLTrig;
44  class ECLCalDigit;
45  class TRGSummary;
46 
50  class ECLDQMModule : public HistoModule {
52  public:
53 
55  ECLDQMModule();
56 
58  virtual ~ECLDQMModule();
59 
61  virtual void initialize() override;
63  virtual void beginRun() override;
65  virtual void event() override;
67  virtual void endRun() override;
69  virtual void terminate() override;
70 
72  virtual void defineHisto() override;
73 
74  private:
79  bool isRandomTrigger();
80 
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};
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  };
183 }; // 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:50
TH1F * h_trigtag1
Histogram: Trigger tag flag #1.
Definition: eclDQM.h:149
std::vector< double > nhits
Container for channel multiplicity.
Definition: eclDQM.h:122
int m_DspArray[8736][31]
WF sampling points for digit array.
Definition: eclDQM.h:128
TH1F * h_bad_quality
Histogram: Cell IDs w/ bad fit quality flag.
Definition: eclDQM.h:147
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:114
TH1F * h_adc_hits
Histogram: Fraction of digits above ADC threshold.
Definition: eclDQM.h:151
StoreArray< ECLDsp > m_ECLDsps
StoreArray ECLDsp.
Definition: eclDQM.h:92
virtual void initialize() override
Initialize the module.
Definition: eclDQM.cc:259
virtual ~ECLDQMModule()
Destructor.
Definition: eclDQM.cc:75
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:168
double m_PedestalRms[8736]
Pedestal rms error values.
Definition: eclDQM.h:132
virtual void event() override
Event processor.
Definition: eclDQM.cc:306
TH2F * h_trigtime_trigid
Histogram: Trigger time vs.
Definition: eclDQM.h:172
ECLDQMModule()
< derived from HistoModule class.
Definition: eclDQM.cc:51
std::vector< TH1F * > h_edeps
Histogram vector: Total energy.
Definition: eclDQM.h:158
virtual void endRun() override
Call when a run ends.
Definition: eclDQM.cc:446
std::vector< TH1F * > h_ncevs
Histogram vector: Channel multiplicity.
Definition: eclDQM.h:164
virtual void terminate() override
Terminate.
Definition: eclDQM.cc:451
TH1F * h_evtot
Histogram: Total event no (auxiliary) to normalize hit map .
Definition: eclDQM.h:135
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:120
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:105
TProfile * h_pedmean_cellid
Histogram: Pedestal Average vs.
Definition: eclDQM.h:176
double m_PedestalMean[8736]
Pedestal average values.
Definition: eclDQM.h:130
TH1F * h_evtot_rand
Histogram: Event no for rand (auxiliary) to normalize rand waveform flow.
Definition: eclDQM.h:139
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:153
virtual void beginRun() override
Call when a run begins.
Definition: eclDQM.cc:279
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:137
std::vector< double > m_HitNumberUpperLimits
Parameters for number of hits histograms.
Definition: eclDQM.h:116
std::vector< double > m_TotalEnergyThresholds
Parameters for histograms w/ total energy.
Definition: eclDQM.h:112
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:118
TH1F * h_evtot_dphy
Histogram: Event no for dphy (auxiliary) to normalize dphy waveform flow.
Definition: eclDQM.h:141
std::vector< double > m_HitThresholds
Parameters for hit occ.
Definition: eclDQM.h:110
TH1F * h_quality
Histogram: Fit quality flag (0 - good, 1 - large amplitude, 3 - bad chi2).
Definition: eclDQM.h:143
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:174
std::vector< int > v_totalthrApsd
Vector to store psd wf amplitude threshold.
Definition: eclDQM.h:124
TH1F * h_quality_other
Histogram: Fit quality flag for waveform type 'other'.
Definition: eclDQM.h:145
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
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:166
bool isRandomTrigger()
Definition: eclDQM.cc:455
virtual void defineHisto() override
Function to define histograms.
Definition: eclDQM.cc:80
std::vector< TH1F * > h_time_endcaps
Histogram vector: Reconstructed time for endcaps.
Definition: eclDQM.h:162
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:95
Abstract base class for different kinds of events.