Belle II Software  release-05-02-19
eclDQM.cc
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 //THIS MODULE
16 #include <ecl/modules/eclDQM/eclDQM.h>
17 
18 //Boost
19 #include <boost/format.hpp>
20 #include <boost/range/combine.hpp>
21 
22 //FRAMEWORK
23 #include <framework/core/HistoModule.h>
24 #include <framework/dataobjects/EventMetaData.h>
25 #include <framework/gearbox/Unit.h>
26 #include <framework/logging/Logger.h>
27 
28 //ECL
29 #include <ecl/dataobjects/ECLDigit.h>
30 #include <ecl/dataobjects/ECLCalDigit.h>
31 #include <ecl/dataobjects/ECLTrig.h>
32 #include <ecl/dataobjects/ECLDsp.h>
33 #include <ecl/utility/ECLChannelMapper.h>
34 #include <ecl/geometry/ECLGeometryPar.h>
35 
36 //TRG
37 #include <mdst/dataobjects/TRGSummary.h>
38 
39 //ROOT
40 #include <TProfile.h>
41 #include <TH1F.h>
42 #include <TH2F.h>
43 #include <TDirectory.h>
44 
45 //STL
46 #include <iostream>
47 #include <iterator>
48 #include <cmath>
49 
50 //NAMESPACE(S)
51 using namespace Belle2;
52 using namespace ECL;
53 
54 REG_MODULE(ECLDQM)
55 
57  : HistoModule(),
58  m_calibrationThrApsd("ECL_FPGA_StoreWaveform")
59 {
60  //Set module properties.
61  setDescription("ECL Data Quality Monitor");
62  setPropertyFlags(c_ParallelProcessingCertified); // specify parallel processing.
63 
64  m_WaveformOption = {"psd", "logic", "rand", "dphy", "other"};
65 
66  addParam("histogramDirectoryName", m_histogramDirectoryName,
67  "histogram directory in ROOT file", std::string("ECL"));
68  addParam("EnergyUpperThr", m_EnergyUpperThr, "Upper threshold of energy deposition in event, [GeV]", 20.0 * Belle2::Unit::GeV);
69  addParam("HitThresholds", m_HitThresholds, "Thresholds to display hit occupancy, MeV", std::vector<double> {0, 5, 10, 50});
70  addParam("TotalEnergyThresholds", m_TotalEnergyThresholds, "Thresholds to display total energy, MeV", std::vector<double> {0, 5, 7});
71  addParam("TimingThresholds", m_TimingThresholds, "Thresholds (MeV) to display ECL timing", std::vector<double> {5, 10, 50});
72  addParam("HitNumberUpperlimits", m_HitNumberUpperLimits,
73  "Upper limit (# of hits) to display hit multiplicity", std::vector<double> {10000, 1000, 700, 200});
74  addParam("WaveformOption", m_WaveformOption, "Option (all,psd,logic,rand,dphy,other) to display waveform flow",
75  m_WaveformOption);
76  addParam("DPHYTTYP", m_DPHYTTYP,
77  "Flag to control trigger of delayed bhabha events; 0 - select events by 'bha_delay' trigger bit, 1 - select by TTYP_DPHY", false);
78 }
79 
81 {
82 }
83 
84 
86 {
87  TDirectory* oldDir = gDirectory;
88 
89  // Create a separate histogram directory and cd into it.
90 
91  TDirectory* dirDAQ = dynamic_cast<TDirectory*>(oldDir->Get(m_histogramDirectoryName.c_str()));
92  if (!dirDAQ) dirDAQ = oldDir->mkdir(m_histogramDirectoryName.c_str());
93  dirDAQ->cd();
94 
95  //1D histograms creation.
96  h_evtot = new TH1F("event", "Total event bank", 1, 0, 1);
97  h_evtot->SetOption("LIVE");
98 
99  h_quality = new TH1F("quality", "Fit quality flag. 0-good, 1-integer overflow, 2-low amplitude, 3-bad chi2", 4, 0, 4);
100  h_quality->GetXaxis()->SetTitle("Flag number");
101  h_quality->GetYaxis()->SetTitle("ECL hits count");
102  h_quality->SetFillColor(kPink - 4);
103  h_quality->SetOption("LIVE");
104 
105  h_quality_other = new TH1F("quality_other", "Fit quality flag for unexpectedly saved waveforms", 4, 0, 4);
106  h_quality_other->GetXaxis()->SetTitle("Flag number. 0-good,1-int overflow,2-low amplitude,3-bad chi2");
107  h_quality_other->SetFillColor(kPink - 4);
108  h_quality_other->SetOption("LIVE");
109 
110  h_bad_quality = new TH1F("bad_quality", "Fraction of hits with bad chi2 (qual=3) and E > 1 GeV vs Cell ID", 8736, 1, 8737);
111  h_bad_quality->GetXaxis()->SetTitle("Cell ID");
112  h_bad_quality->GetYaxis()->SetTitle("ECL hits count");
113  h_bad_quality->SetOption("LIVE");
114 
115  h_trigtag1 = new TH1F("trigtag1", "Consistency b/w global event number and trigger tag. 0-good, 1-DQM error", 2, 0, 2);
116  h_trigtag1->GetXaxis()->SetTitle("Flag number");
117  h_trigtag1->GetYaxis()->SetTitle("Events count");
118  h_trigtag1->SetDrawOption("hist");
119  h_trigtag1->SetOption("LIVE");
120  h_trigtag1->SetFillColor(kPink - 4);
121 
122  h_adc_hits = new TH1F("adc_hits", "Fraction of high-energy hits (E > 50 MeV)", 1001, 0, 1.001);
123  h_adc_hits->GetXaxis()->SetTitle("Fraction");
124  h_adc_hits->GetYaxis()->SetTitle("Events count");
125  h_adc_hits->SetOption("LIVE");
126 
127  h_time_crate_Thr1GeV_large = new TH1F("time_crate_Thr1GeV_large",
128  "Number of hits with timing outside #pm 100 ns per Crate ID (E > 1 GeV)",
129  52, 1, 53);
130  h_time_crate_Thr1GeV_large->GetXaxis()->SetTitle("Crate ID (same as ECLCollector ID)");
131  h_time_crate_Thr1GeV_large->GetYaxis()->SetTitle("ECL hits count");
132  h_time_crate_Thr1GeV_large->SetOption("LIVE");
133 
134  for (const auto& id : m_HitThresholds) {
135  std::string h_name, h_title;
136  h_name = str(boost::format("cid_Thr%1%MeV") % id);
137  h_title = str(boost::format("Occupancy per Cell ID (E > %1% MeV)") % id);
138  TH1F* h = new TH1F(h_name.c_str(), h_title.c_str(), 8736, 1, 8737);
139  h->GetXaxis()->SetTitle("Cell ID");
140  h->GetYaxis()->SetTitle("Occupancy (hits / events_count)");
141  h->SetOption("LIVE");
142  h_cids.push_back(h);
143  }
144 
145  for (const auto& id : m_TotalEnergyThresholds) {
146  std::string h_name, h_title;
147  h_name = str(boost::format("edep_Thr%1%MeV") % id);
148  h_title = str(boost::format("Total energy (thr = %1% MeV)") % id);
149  TH1F* h = new TH1F(h_name.c_str(), h_title.c_str(), (int)(100 * m_EnergyUpperThr), 0, m_EnergyUpperThr);
150  h->GetXaxis()->SetTitle("Energy, [GeV]");
151  h->SetOption("LIVE");
152  h_edeps.push_back(h);
153  }
154 
155  for (const auto& id : m_TimingThresholds) {
156  std::string h_bar_name, h_bar_title;
157  std::string h_end_name, h_end_title;
158  h_bar_name = str(boost::format("time_barrel_Thr%1%MeV") % id);
159  h_bar_title = str(boost::format("Reconstructed time for ECL barrel (E > %1% MeV)") % id);
160  h_end_name = str(boost::format("time_endcaps_Thr%1%MeV") % id);
161  h_end_title = str(boost::format("Reconstructed time for ECL endcaps (E > %1% MeV)") % id);
162  TH1F* h_time_barrel = new TH1F(h_bar_name.c_str(), h_bar_title.c_str(), 206, -1030, 1030);
163  TH1F* h_time_endcap = new TH1F(h_end_name.c_str(), h_end_title.c_str(), 206, -1030, 1030);
164  h_time_barrel->GetXaxis()->SetTitle("Time, [ns]");
165  h_time_endcap->GetXaxis()->SetTitle("Time, [ns]");
166  h_time_barrel->SetOption("LIVE");
167  h_time_endcap->SetOption("LIVE");
168  h_time_barrels.push_back(h_time_barrel);
169  h_time_endcaps.push_back(h_time_endcap);
170  }
171 
172  for (const auto& id : boost::combine(m_HitThresholds, m_HitNumberUpperLimits)) {
173  double id1 = 0, id2 = 0;
174  boost::tie(id1, id2) = id;
175  std::string h_name, h_title;
176  h_name = str(boost::format("ncev_Thr%1%MeV") % id1);
177  h_title = str(boost::format("Number of hits in event (E > %1% MeV)") % id1);
178  TH1F* h = new TH1F(h_name.c_str(), h_title.c_str(), id2, 0, id2);
179  h->GetXaxis()->SetTitle("Number of hits");
180  h->SetOption("LIVE");
181  h_ncevs.push_back(h);
182  }
183 
184  for (int i = 0; i < ECL_CRATES; i++) {
185  int crate = i + 1;
186  std::string h_name, h_title;
187  h_name = str(boost::format("time_crate_%1%_Thr1GeV") % (crate));
188  h_title = str(boost::format("Reconstructed time for ECL crate #%1% with E > 1 GeV") % (crate));
189  TH1F* h = new TH1F(h_name.c_str(), h_title.c_str(), 400, -100, 100);
190  h->GetXaxis()->SetTitle("Time [ns]");
191  h->SetOption("LIVE");
192  h_time_crate_Thr1GeV.push_back(h);
193  }
194 
195  for (const auto& id : m_WaveformOption) {
196  if (id != "all" && id != "psd" && id != "logic" && id != "rand" && id != "dphy" && id != "other")
197  B2WARNING("Waveform Options are not correctly assigned. They must be 'all', 'psd', 'logic', 'rand', 'dphy', 'other'!");
198  std::string h_title;
199  std::string h_cell_name;
200  if (id == "other") h_title = "Unexpectedly saved waveforms";
201  if (id == "psd") h_title = "#frac{Saved}{Expected} waveforms for high-energy hits (E > 50 MeV)";
202  if (id == "logic") h_title = "#frac{Saved}{Expected} waveforms for every 1000th event";
203  if (id == "rand") h_title = "#frac{Saved}{Expected} waveforms for random trigger events";
204  if (id == "dphy") h_title = "#frac{Saved}{Expected} waveforms for delayed bhabha (DPHY) events";
205  if (id == "all") h_title = "#frac{Saved}{Expected} waveforms for all events";
206  h_cell_name = str(boost::format("wf_cid_%1%") % (id));
207  TH1F* h_cell = new TH1F(h_cell_name.c_str(), h_title.c_str(), 8736, 1, 8737);
208  h_cell->GetXaxis()->SetTitle("Cell ID");
209  h_cell->SetOption("LIVE");
210  if (id == "psd") {
211  h_cell_psd_norm = new TH1F("psd_cid", "Normalization to psd hits for cid", 8736, 1, 8737);
212  h_cell_psd_norm->SetOption("LIVE");
213  }
214  if (id == "logic") {
215  h_evtot_logic = new TH1F("event_logic", "Event bank for logic", 1, 0, 1);
216  h_evtot_logic->SetOption("LIVE");
217  }
218  if (id == "rand") {
219  h_evtot_rand = new TH1F("event_rand", "Event bank for rand", 1, 0, 1);
220  h_evtot_rand->SetOption("LIVE");
221  }
222  if (id == "dphy") {
223  h_evtot_dphy = new TH1F("event_dphy", "Event bank for dphy", 1, 0, 1);
224  h_evtot_dphy->SetOption("LIVE");
225  }
226  h_cells.push_back(h_cell);
227  }
228 
229  //2D histograms creation.
230 
231  h_trigtag2_trigid = new TH2F("trigtag2_trigid", "Internal data consistency vs crate. 0-good, 1-data corruption",
232  52, 1, 53, 11, -1, 10);
233  h_trigtag2_trigid->GetXaxis()->SetTitle("Crate ID (same as ECLCollector ID)");
234  h_trigtag2_trigid->GetYaxis()->SetTitle("Data consistency flag");
235  h_trigtag2_trigid->SetOption("LIVE");
236 
237  h_pedmean_cellid = new TProfile("pedmean_cellid", "Pedestal vs Cell ID", 8736, 1, 8737);
238  h_pedmean_cellid->GetXaxis()->SetTitle("Cell ID");
239  h_pedmean_cellid->GetYaxis()->SetTitle("Ped. average (ADC units, #approx 0.05 MeV)");
240  h_pedmean_cellid->SetOption("LIVE");
241 
242  h_pedrms_cellid = new TProfile("pedrms_cellid", "Pedestal stddev vs Cell ID",
243  8736, 1, 8737);
244  h_pedrms_cellid->GetXaxis()->SetTitle("Cell ID");
245  h_pedrms_cellid->GetYaxis()->SetTitle("Ped. stddev (ADC units, #approx 0.05 MeV)");
246  h_pedrms_cellid->SetOption("LIVE");
247 
248  h_pedrms_thetaid = new TProfile("pedrms_thetaid", "Pedestal stddev vs #theta ID",
249  68, 0, 68);
250  h_pedrms_thetaid->GetXaxis()->SetTitle("#theta ID (0-12=FWD, 59-67=BWD endcap)");
251  h_pedrms_thetaid->GetYaxis()->SetTitle("Ped. stddev (ADC units, #approx 0.05 MeV)");
252  h_pedrms_thetaid->SetOption("LIVE");
253 
254  h_trigtime_trigid = new TH2F("trigtime_trigid", "Trigger time vs Crate ID", 52, 1, 53, 145, 0, 145);
255  h_trigtime_trigid->GetXaxis()->SetTitle("Crate ID (same as ECLCollector ID)");
256  h_trigtime_trigid->GetYaxis()->SetTitle("Trigger time (only even, 0-142)");
257  h_trigtime_trigid->SetOption("LIVE");
258 
259  //cd into parent directory.
260 
261  oldDir->cd();
262 }
263 
265 {
266  REG_HISTOGRAM; // required to register histograms to HistoManager.
267  m_ECLDigits.isRequired();
268  m_ECLCalDigits.isOptional();
269  m_ECLTrigs.isOptional();
270  m_ECLDsps.isOptional();
271  m_l1Trigger.isOptional();
272 
273  if (!mapper.initFromDB()) B2FATAL("ECL DQM: Can't initialize eclChannelMapper");
274 
275  ecltot.resize(m_TotalEnergyThresholds.size());
276  nhits.resize(m_HitNumberUpperLimits.size());
277 
278  m_geom = ECLGeometryPar::Instance();
279 
280  v_totalthrApsd.resize((m_calibrationThrApsd->getCalibVector()).size());
281  for (size_t i = 0; i < v_totalthrApsd.size(); i++) v_totalthrApsd[i] = (int)(m_calibrationThrApsd->getCalibVector())[i];
282 }
283 
285 {
286  h_evtot->Reset();
287  h_evtot_logic->Reset();
288  h_evtot_rand->Reset();
289  h_evtot_dphy->Reset();
290  h_quality->Reset();
291  h_quality_other->Reset();
292  h_bad_quality->Reset();
293  h_trigtag1->Reset();
294  h_adc_hits->Reset();
295  h_time_crate_Thr1GeV_large->Reset();
296  h_cell_psd_norm->Reset();
297  std::for_each(h_cids.begin(), h_cids.end(), [](auto & it) {it->Reset();});
298  std::for_each(h_edeps.begin(), h_edeps.end(), [](auto & it) {it->Reset();});
299  std::for_each(h_time_barrels.begin(), h_time_barrels.end(), [](auto & it) {it->Reset();});
300  std::for_each(h_time_endcaps.begin(), h_time_endcaps.end(), [](auto & it) {it->Reset();});
301  std::for_each(h_ncevs.begin(), h_ncevs.end(), [](auto & it) {it->Reset();});
302  std::for_each(h_cells.begin(), h_cells.end(), [](auto & it) {it->Reset();});
303  for (int i = 0; i < ECL_CRATES; i++) h_time_crate_Thr1GeV[i]->Reset();
304  h_trigtag2_trigid->Reset();
305  h_pedmean_cellid->Reset();
306  h_pedrms_cellid->Reset();
307  h_pedrms_thetaid->Reset();
308  h_trigtime_trigid->Reset();
309 }
310 
312 {
313  int trigtag1 = 0;
314  int NDigits = 0;
315  for (auto& value : ecltot) value = 0;
316  for (auto& value : nhits) value = 0;
317  bool bhatrig = false;
318 
319  if (m_l1Trigger.isValid() && m_DPHYTTYP) bhatrig = m_l1Trigger->getTimType() == TRGSummary::ETimingType::TTYP_DPHY;
320  else if (m_l1Trigger.isValid() && !m_DPHYTTYP) bhatrig = m_l1Trigger->testInput("bha_delay");
321 
322  m_iEvent = -1;
323  if (m_eventmetadata.isValid()) {
324  if (m_eventmetadata->getErrorFlag() != 0x10) {
325  m_iEvent = m_eventmetadata->getEvent();
326  h_evtot->Fill(0);
327  for (const auto& id : m_WaveformOption) {
328  if (id == "logic" && m_iEvent % 1000 == 999) h_evtot_logic->Fill(0);
329  if (id == "rand" && isRandomTrigger()) h_evtot_rand->Fill(0);
330  if (id == "dphy" && bhatrig) h_evtot_dphy->Fill(0);
331  }
332  }
333  }
334 
335  for (auto& aECLDigit : m_ECLDigits) {
336  int i = aECLDigit.getCellId() - 1;
337  h_quality->Fill(aECLDigit.getQuality()); //Fit quality histogram filling.
338  if (aECLDigit.getAmp() > 2.e04 && aECLDigit.getQuality() == 3) h_bad_quality->Fill(aECLDigit.getCellId());
339  if (aECLDigit.getAmp() >= (v_totalthrApsd[i] / 4 * 4)) NDigits ++;
340  for (const auto& id : m_WaveformOption) {
341  if (id != "psd") continue;
342  else if (id == "psd" && (m_iEvent % 1000 == 999 ||
343  isRandomTrigger() ||
344  bhatrig ||
345  aECLDigit.getAmp() < (v_totalthrApsd[i] / 4 * 4))) continue;
346  h_cell_psd_norm->Fill(aECLDigit.getCellId());
347  }
348  }
349 
350  for (auto& aECLTrig : m_ECLTrigs) {
351  double itrg = aECLTrig.getTimeTrig();
352  //trigger time conversion to acceptable units in range (0, ..., 142).
353  //one trigger time clock corresponds to 0.567/144*1000 = 3.93 ns
354  int tg = (int)itrg - 2 * ((int)itrg / 8);
355  h_trigtime_trigid->Fill(aECLTrig.getTrigId(), tg); //Trigger time histogram filling.
356  trigtag1 += aECLTrig.getTrigTag();
357  h_trigtag2_trigid->Fill(aECLTrig.getTrigId(), aECLTrig.getTrigTagQualityFlag()); //Data consistency histogram filling.
358  }
359 
360  if (m_ECLTrigs.getEntries() > 0) {
361  int flagtag = 1;
362  trigtag1 /= m_ECLTrigs.getEntries();
363  int compar = (65535 & m_iEvent);
364  if (compar == trigtag1) flagtag = 0;
365  h_trigtag1->Fill(flagtag); //Trigger tag flag #1 histogram filling.
366  }
367 
368  for (auto& aECLCalDigit : m_ECLCalDigits) {
369  int cid = aECLCalDigit.getCellId();
370  double energy = aECLCalDigit.getEnergy(); //get calibrated energy.
371  double timing = aECLCalDigit.getTime(); //get calibrated time.
372 
373  for (const auto& id : m_HitThresholds) {
374  auto scale = id / 1000.;
375  auto index = std::distance(m_HitThresholds.begin(), std::find(m_HitThresholds.begin(), m_HitThresholds.end(), id));
376  if (energy > scale) {
377  h_cids[index]->Fill(cid);
378  nhits[index] += 1;
379  }
380  }
381 
382  for (const auto& id : m_TotalEnergyThresholds) {
383  auto scale = id / 1000.;
384  auto index = std::distance(m_TotalEnergyThresholds.begin(), std::find(m_TotalEnergyThresholds.begin(),
385  m_TotalEnergyThresholds.end(), id));
386  if (energy > scale) ecltot[index] += energy;
387  }
388 
389  for (const auto& id : m_TimingThresholds) {
390  auto scale = id / 1000.;
391  auto index = std::distance(m_TimingThresholds.begin(), std::find(m_TimingThresholds.begin(), m_TimingThresholds.end(), id));
392  if (energy > scale) {
393  if (cid > ECL_FWD_CHANNELS && cid <= ECL_FWD_CHANNELS + ECL_BARREL_CHANNELS) h_time_barrels[index]->Fill(timing);
394  else h_time_endcaps[index]->Fill(timing);
395  }
396  }
397 
398  if (energy > 1.000 && std::abs(timing) < 100.) h_time_crate_Thr1GeV[mapper.getCrateID(cid) - 1]->Fill(timing);
399  if (energy > 1.000 && std::abs(timing) > 100.) h_time_crate_Thr1GeV_large->Fill(mapper.getCrateID(cid));
400  }
401 
402  for (auto& h : h_edeps) {
403  auto index = std::distance(h_edeps.begin(), std::find(h_edeps.begin(), h_edeps.end(), h));
404  h->Fill(ecltot[index]);
405  }
406 
407  for (auto& h : h_ncevs) {
408  auto index = std::distance(h_ncevs.begin(), std::find(h_ncevs.begin(), h_ncevs.end(), h));
409  h->Fill(nhits[index]);
410  }
411 
412  for (auto& aECLDsp : m_ECLDsps) {
413  int i = aECLDsp.getCellId() - 1; //get number of Cell ID in m_DspArray.
414  aECLDsp.getDspA(m_DspArray[i]);
415  m_PedestalMean[i] = 0;
416  m_PedestalRms[i] = 0;
417 
418  for (int j = 0; j < 16; j++) m_PedestalMean[i] += m_DspArray[i][j];
419  m_PedestalMean[i] /= 16;
420  h_pedmean_cellid->Fill(aECLDsp.getCellId(), m_PedestalMean[i]); //Pedestal Avg histogram filling.
421 
422  for (int j = 0; j < 16; j++) m_PedestalRms[i] += pow(m_DspArray[i][j] - m_PedestalMean[i], 2);
423  m_PedestalRms[i] = sqrt(m_PedestalRms[i] / 15.);
424  h_pedrms_cellid->Fill(aECLDsp.getCellId(), m_PedestalRms[i]); //Pedestal stddev histogram filling.
425  m_geom->Mapping(i);
426  h_pedrms_thetaid->Fill(m_geom->GetThetaID(), m_PedestalRms[i]);
427 
428  ECLDigit* aECLDigit = aECLDsp.getRelated<ECLDigit>();
429 
430  for (const auto& id : m_WaveformOption) {
431  auto index = std::distance(m_WaveformOption.begin(), std::find(m_WaveformOption.begin(), m_WaveformOption.end(), id));
432  if (id != "all" && id != "psd" && id != "logic" && id != "rand" && id != "dphy" && id != "other") continue;
433  else if (id == "psd" && (m_iEvent % 1000 == 999 || isRandomTrigger() || bhatrig ||
434  !aECLDigit || aECLDigit->getAmp() < (v_totalthrApsd[i] / 4 * 4))) continue;
435  else if (id == "logic" && m_iEvent % 1000 != 999) continue;
436  else if (id == "rand" && (m_iEvent % 1000 == 999 || !isRandomTrigger())) continue;
437  else if (id == "dphy" && (m_iEvent % 1000 == 999 || !bhatrig)) continue;
438  else if (id == "other" && (m_iEvent % 1000 == 999 || isRandomTrigger() || bhatrig ||
439  (aECLDigit && aECLDigit->getAmp() >= (v_totalthrApsd[i] / 4 * 4)))) continue;
440  h_cells[index]->Fill(aECLDsp.getCellId());
441  if (id == "other" && aECLDigit) h_quality_other->Fill(aECLDigit->getQuality());
442  }
443  }
444  if (m_ECLDigits.getEntries() > 0)
445  h_adc_hits->Fill((double)NDigits / (double)m_ECLDigits.getEntries()); //Fraction of high-energy hits
446 }
447 
449 {
450 }
451 
452 
454 {
455 }
456 
458 {
459  if (!m_l1Trigger.isValid()) return false;
460  return m_l1Trigger->getTimType() == TRGSummary::ETimingType::TTYP_RAND ||
461  m_l1Trigger->getTimType() == TRGSummary::ETimingType::TTYP_POIS;
462 }
463 
Belle2::ECLDQMModule::terminate
virtual void terminate() override
Terminate.
Definition: eclDQM.cc:453
Belle2::ECLDigit::getQuality
int getQuality() const
Get Fitting Quality.
Definition: ECLDigit.h:90
Belle2::ECLDQMModule::defineHisto
virtual void defineHisto() override
Function to define histograms.
Definition: eclDQM.cc:85
REG_MODULE
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition: Module.h:652
Belle2::RelationsInterface::getRelated
T * getRelated(const std::string &name="", const std::string &namedRelation="") const
Get the object to or from which this object has a relation.
Definition: RelationsObject.h:280
Belle2::ECL::ECLGeometryPar::Instance
static ECLGeometryPar * Instance()
Static method to get a reference to the ECLGeometryPar instance.
Definition: ECLGeometryPar.cc:151
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::ECLDQMModule::~ECLDQMModule
virtual ~ECLDQMModule()
Destructor.
Definition: eclDQM.cc:80
Belle2::ECLDQMModule::isRandomTrigger
bool isRandomTrigger()
Definition: eclDQM.cc:457
Belle2::ECLDQMModule::beginRun
virtual void beginRun() override
Call when a run begins.
Definition: eclDQM.cc:284
Belle2::ECLDigit
Class to store ECL digitized hits (output of ECLDigi) relation to ECLHit filled in ecl/modules/eclDig...
Definition: ECLDigit.h:34
Belle2::ECLDQMModule::endRun
virtual void endRun() override
Call when a run ends.
Definition: eclDQM.cc:448
Belle2::ECLDigit::getAmp
int getAmp() const
Get Fitting Amplitude.
Definition: ECLDigit.h:80
Belle2::ECLDQMModule::event
virtual void event() override
Event processor.
Definition: eclDQM.cc:311
Belle2::ECLDQMModule
This module is created to monitor ECL Data Quality.
Definition: eclDQM.h:56
Belle2::Unit::GeV
static const double GeV
Standard of [energy, momentum, mass].
Definition: Unit.h:61
Belle2::ECLDQMModule::initialize
virtual void initialize() override
Initialize the module.
Definition: eclDQM.cc:264
Belle2::HistoModule
HistoModule.h is supposed to be used instead of Module.h for the modules with histogram definitions t...
Definition: HistoModule.h:29