Belle II Software  release-08-01-08
TOPDQMModule.cc
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 #include <top/modules/TOPDQM/TOPDQMModule.h>
10 #include <top/geometry/TOPGeometryPar.h>
11 #include <tracking/dataobjects/ExtHit.h>
12 #include <framework/gearbox/Unit.h>
13 #include <framework/gearbox/Const.h>
14 #include <framework/logging/Logger.h>
15 #include "TDirectory.h"
16 #include <boost/format.hpp>
17 #include <algorithm>
18 
19 using namespace std;
20 using boost::format;
21 
22 namespace Belle2 {
28  using namespace TOP;
29 
30  //-----------------------------------------------------------------
32  //-----------------------------------------------------------------
33 
34  REG_MODULE(TOPDQM);
35 
36  //-----------------------------------------------------------------
37  // Implementation
38  //-----------------------------------------------------------------
39 
40  TOPDQMModule::TOPDQMModule() : HistoModule()
41  {
42  // set module description (e.g. insert text)
43  setDescription("TOP DQM histogrammer");
45 
46  // Add parameters
47  addParam("histogramDirectoryName", m_histogramDirectoryName,
48  "histogram directory in ROOT file", string("TOP"));
49  addParam("momentumCut", m_momentumCut,
50  "momentum cut used to histogram number of photons per track", 0.5);
51  }
52 
53 
55  {
56  }
57 
59  {
60  // Create a separate histogram directory and cd into it.
61 
62  TDirectory* oldDir = gDirectory;
63  oldDir->mkdir(m_histogramDirectoryName.c_str())->cd();
64 
65  // Variables needed for booking
66 
67  const auto* geo = TOPGeometryPar::Instance()->getGeometry();
68  m_numModules = geo->getNumModules();
69  double bunchTimeSep = geo->getNominalTDC().getSyncTimeBase() / 24;
70 
71  // Histograms
72 
73  m_BoolEvtMonitor = new TH1D("BoolEvtMonitor", "Event synchronization", 2, -0.5, 1.5);
74  m_BoolEvtMonitor->GetYaxis()->SetTitle("number of digits");
75  m_BoolEvtMonitor->GetXaxis()->SetBinLabel(1, "synchronized");
76  m_BoolEvtMonitor->GetXaxis()->SetBinLabel(2, "de-synchronized");
77  m_BoolEvtMonitor->GetXaxis()->SetLabelSize(0.05);
78  m_BoolEvtMonitor->GetXaxis()->SetAlphanumeric();
79  m_BoolEvtMonitor->SetMinimum(0);
80 
81  m_window_vs_slot = new TH2F("window_vs_slot", "Asic windows", 16, 0.5, 16.5, 512, 0, 512);
82  m_window_vs_slot->SetXTitle("slot number");
83  m_window_vs_slot->SetYTitle("window number w.r.t reference window");
84  m_window_vs_slot->SetStats(kFALSE);
85  m_window_vs_slot->SetMinimum(0);
86  m_window_vs_slot->GetXaxis()->SetNdivisions(16);
87 
88  int nbinsT0 = 75;
89  double rangeT0 = nbinsT0 * bunchTimeSep;
90  m_eventT0 = new TH1F("eventT0", "Event T0; event T0 [ns]; events per bin", nbinsT0, -rangeT0 / 2, rangeT0 / 2);
91 
92  m_bunchOffset = new TH1F("bunchOffset", "Bunch offset", 100, -bunchTimeSep / 2, bunchTimeSep / 2);
93  m_bunchOffset->SetXTitle("offset [ns]");
94  m_bunchOffset->SetYTitle("events per bin");
95  m_bunchOffset->SetMinimum(0);
96 
97  m_time = new TH1F("goodHitTimes", "Time distribution of good hits", 1000, -20, 80);
98  m_time->SetXTitle("time [ns]");
99  m_time->SetYTitle("hits per bin");
100 
101  m_timeBG = new TH1F("goodHitTimesBG", "Time distribution of good hits (background)", 1000, -20, 80);
102  m_timeBG->SetXTitle("time [ns]");
103  m_timeBG->SetYTitle("hits per bin");
104 
105  m_signalHits = new TProfile("signalHits", "Number of good hits per track in [0, 50] ns", 16, 0.5, 16.5, 0, 1000);
106  m_signalHits->SetXTitle("slot number");
107  m_signalHits->SetYTitle("hits per track");
108  m_signalHits->SetMinimum(0);
109  m_signalHits->GetXaxis()->SetNdivisions(16);
110 
111  m_backgroundHits = new TProfile("backgroundHits", "Number of good hits pet track in [-50, 0] ns", 16, 0.5, 16.5, 0, 1000);
112  m_backgroundHits->SetXTitle("slot number");
113  m_backgroundHits->SetYTitle("hits per track");
114  m_backgroundHits->SetMinimum(0);
115  m_backgroundHits->GetXaxis()->SetNdivisions(16);
116 
117  m_trackHits = new TH2F("trackHits", "Number of events w/ and w/o track in the slot", 16, 0.5, 16.5, 2, 0, 2);
118  m_trackHits->SetXTitle("slot number");
119  m_trackHits->SetYTitle("numTracks > 0");
120 
121  int nbinsHits = 1000;
122  double xmaxHits = 10000;
123  m_goodHitsPerEventAll = new TH1F("goodHitsPerEventAll", "Number of good hits per event", nbinsHits, 0, xmaxHits);
124  m_goodHitsPerEventAll->GetXaxis()->SetTitle("hits per event");
125  m_goodHitsPerEventAll->GetYaxis()->SetTitle("entries per bin");
126 
127  m_badHitsPerEventAll = new TH1F("badHitsPerEventAll", "Number of junk hits per event", nbinsHits, 0, xmaxHits);
128  m_badHitsPerEventAll->GetXaxis()->SetTitle("hits per event");
129  m_badHitsPerEventAll->GetYaxis()->SetTitle("entries per bin");
130 
131  int nbinsTDC = 400;
132  double xminTDC = -100;
133  double xmaxTDC = 700;
134  m_goodTDCAll = new TH1F("goodTDCAll", "Raw time distribution of good hits", nbinsTDC, xminTDC, xmaxTDC);
135  m_goodTDCAll->SetXTitle("raw time [samples]");
136  m_goodTDCAll->SetYTitle("hits per sample");
137 
138  m_badTDCAll = new TH1F("badTDCAll", "Raw time distribution of junk hits", nbinsTDC, xminTDC, xmaxTDC);
139  m_badTDCAll->SetXTitle("raw time [samples]");
140  m_badTDCAll->SetYTitle("hits per sample");
141 
142  m_TOPOccAfterInjLER = new TH1F("TOPOccInjLER", "TOPOccInjLER/Time;Time in #mus;Nhits/Time (#mus bins)", 4000, 0, 20000);
143  m_TOPOccAfterInjHER = new TH1F("TOPOccInjHER", "TOPOccInjHER/Time;Time in #mus;Nhits/Time (#mus bins)", 4000, 0, 20000);
144  m_TOPEOccAfterInjLER = new TH1F("TOPEOccInjLER", "TOPEOccInjLER/Time;Time in #mus;Triggers/Time (#mus bins)", 4000, 0, 20000);
145  m_TOPEOccAfterInjHER = new TH1F("TOPEOccInjHER", "TOPEOccInjHER/Time;Time in #mus;Triggers/Time (#mus bins)", 4000, 0, 20000);
146 
147  for (int i = 0; i < m_numModules; i++) {
148  int module = i + 1;
149  string name, title;
150  TH1F* h1 = 0;
151  TH2F* h2 = 0;
152 
153  name = str(format("window_vs_asic_%1%") % (module));
154  title = str(format("Asic windows for slot #%1%") % (module));
155  h2 = new TH2F(name.c_str(), title.c_str(), 64, 0, 64, 512, 0, 512);
156  h2->SetStats(kFALSE);
157  h2->SetXTitle("ASIC number");
158  h2->SetYTitle("window number w.r.t reference window");
159  h2->SetMinimum(0);
160  m_window_vs_asic.push_back(h2);
161 
162  name = str(format("good_hits_xy_%1%") % (module));
163  title = str(format("Distribution of good hits for slot #%1%") % (module));
164  h2 = new TH2F(name.c_str(), title.c_str(), 64, 0.5, 64.5, 8, 0.5, 8.5);
165  h2->SetStats(kFALSE);
166  h2->GetXaxis()->SetTitle("pixel column");
167  h2->GetYaxis()->SetTitle("pixel row");
168  h2->SetMinimum(0);
169  m_goodHitsXY.push_back(h2);
170 
171  name = str(format("bad_hits_xy_%1%") % (module));
172  title = str(format("Distribution of junk hits for slot #%1%") % (module));
173  h2 = new TH2F(name.c_str(), title.c_str(), 64, 0.5, 64.5, 8, 0.5, 8.5);
174  h2->SetStats(kFALSE);
175  h2->GetXaxis()->SetTitle("pixel column");
176  h2->GetYaxis()->SetTitle("pixel row");
177  h2->SetMinimum(0);
178  m_badHitsXY.push_back(h2);
179 
180  name = str(format("good_hits_asics_%1%") % (module));
181  title = str(format("Distribution of good hits for slot #%1%") % (module));
182  h2 = new TH2F(name.c_str(), title.c_str(), 64, 0, 64, 8, 0, 8);
183  h2->SetStats(kFALSE);
184  h2->GetXaxis()->SetTitle("ASIC number");
185  h2->GetYaxis()->SetTitle("ASIC channel");
186  h2->SetMinimum(0);
187  m_goodHitsAsics.push_back(h2);
188 
189  name = str(format("bad_hits_asics_%1%") % (module));
190  title = str(format("Distribution of junk hits for slot #%1%") % (module));
191  h2 = new TH2F(name.c_str(), title.c_str(), 64, 0, 64, 8, 0, 8);
192  h2->SetStats(kFALSE);
193  h2->GetXaxis()->SetTitle("ASIC number");
194  h2->GetYaxis()->SetTitle("ASIC channel");
195  h2->SetMinimum(0);
196  m_badHitsAsics.push_back(h2);
197 
198  name = str(format("good_TDC_%1%") % (module));
199  title = str(format("Raw time distribution of good hits for slot #%1%") % (module));
200  h1 = new TH1F(name.c_str(), title.c_str(), nbinsTDC, xminTDC, xmaxTDC);
201  h1->GetXaxis()->SetTitle("raw time [samples]");
202  h1->GetYaxis()->SetTitle("hits per sample");
203  m_goodTDC.push_back(h1);
204 
205  name = str(format("bad_TDC_%1%") % (module));
206  title = str(format("Raw time distribution of junk hits for slot #%1%") % (module));
207  h1 = new TH1F(name.c_str(), title.c_str(), nbinsTDC, xminTDC, xmaxTDC);
208  h1->GetXaxis()->SetTitle("raw time [samples]");
209  h1->GetYaxis()->SetTitle("hits per sample");
210  m_badTDC.push_back(h1);
211 
212  name = str(format("good_timing_%1%") % (module));
213  title = str(format("Time distribution of good hits for slot #%1%") % (module));
214  h1 = new TH1F(name.c_str(), title.c_str(), 200, -20, 80);
215  h1->GetXaxis()->SetTitle("time [ns]");
216  h1->GetYaxis()->SetTitle("hits per time bin");
217  m_goodTiming.push_back(h1);
218 
219  name = str(format("good_timing_%1%BG") % (module));
220  title = str(format("Time distribution of good hits (background) for slot #%1%") % (module));
221  h1 = new TH1F(name.c_str(), title.c_str(), 200, -20, 80);
222  h1->GetXaxis()->SetTitle("time [ns]");
223  h1->GetYaxis()->SetTitle("hits per time bin");
224  m_goodTimingBG.push_back(h1);
225 
226  name = str(format("good_channel_hits_%1%") % (module));
227  title = str(format("Distribution of good hits for slot #%1%") % (module));
228  int numPixels = geo->getModule(i + 1).getPMTArray().getNumPixels();
229  h1 = new TH1F(name.c_str(), title.c_str(), numPixels, 0, numPixels);
230  h1->GetXaxis()->SetTitle("channel number");
231  h1->GetYaxis()->SetTitle("hits per channel");
232  h1->SetMinimum(0);
233  m_goodChannelHits.push_back(h1);
234 
235  name = str(format("bad_channel_hits_%1%") % (module));
236  title = str(format("Distribution of junk hits for slot #%1%") % (module));
237  h1 = new TH1F(name.c_str(), title.c_str(), numPixels, 0, numPixels);
238  h1->GetXaxis()->SetTitle("channel number");
239  h1->GetYaxis()->SetTitle("hits per channel");
240  h1->SetMinimum(0);
241  m_badChannelHits.push_back(h1);
242 
243  name = str(format("pulseHeights_%1%") % (module));
244  title = str(format("Average pulse heights for slot #%1%") % (module));
245  auto* prof = new TProfile(name.c_str(), title.c_str(), 32, 0.5, 32.5, 0, 2000);
246  prof->GetXaxis()->SetTitle("PMT number");
247  prof->GetYaxis()->SetTitle("pulse height [ADC counts]");
248  prof->SetMarkerStyle(20);
249  prof->SetMinimum(0);
250  m_pulseHeights.push_back(prof);
251  }
252 
253  // cd back to root directory
254  oldDir->cd();
255  }
256 
258  {
259  // Register histograms (calls back defineHisto)
260 
261  REG_HISTOGRAM;
262 
263  // register dataobjects
264 
265  m_rawFTSW.isOptional();
266  m_digits.isRequired();
267  m_recBunch.isOptional();
268  m_timeZeros.isOptional();
269  m_tracks.isOptional();
270 
271  }
272 
274  {
275  m_BoolEvtMonitor->Reset();
276  m_window_vs_slot->Reset();
277  m_eventT0->Reset();
278  m_bunchOffset->Reset();
279  m_time->Reset();
280  m_timeBG->Reset();
281  m_signalHits->Reset();
282  m_backgroundHits->Reset();
283  m_trackHits->Reset();
284  m_goodTDCAll->Reset();
285  m_badTDCAll->Reset();
286  m_goodHitsPerEventAll->Reset();
287  m_badHitsPerEventAll->Reset();
288  m_TOPOccAfterInjLER->Reset();
289  m_TOPOccAfterInjHER->Reset();
290  m_TOPEOccAfterInjLER->Reset();
291  m_TOPEOccAfterInjHER->Reset();
292 
293  for (int i = 0; i < m_numModules; i++) {
294  m_window_vs_asic[i]->Reset();
295  m_goodHitsXY[i]->Reset();
296  m_badHitsXY[i]->Reset();
297  m_goodHitsAsics[i]->Reset();
298  m_badHitsAsics[i]->Reset();
299  m_goodTDC[i]->Reset();
300  m_badTDC[i]->Reset();
301  m_goodTiming[i]->Reset();
302  m_goodTimingBG[i]->Reset();
303  m_goodChannelHits[i]->Reset();
304  m_badChannelHits[i]->Reset();
305  m_pulseHeights[i]->Reset();
306  }
307  }
308 
310  {
311 
312  // check if event time is reconstructed; distinguish collision data and cosmics
313 
314  bool recBunchValid = false;
315  bool cosmics = false;
316  if (m_recBunch.isValid()) { // collision data
317  recBunchValid = m_recBunch->isReconstructed(); // event time is reconstructed
318  } else if (m_timeZeros.getEntries() == 1) { // cosmics w/ reconstructed event time
319  cosmics = true;
320  m_eventT0->Fill(m_timeZeros[0]->getTime());
321  }
322 
323  // fill bunch offset
324 
325  if (recBunchValid) {
326  double t0 = m_commonT0->isRoughlyCalibrated() ? m_commonT0->getT0() : 0;
327  m_bunchOffset->Fill(m_recBunch->getCurrentOffset() - t0);
328  m_eventT0->Fill(m_recBunch->getTime());
329  }
330 
331  // fill event desynchronization
332 
333  if (m_digits.getEntries() > 0) {
334  for (const auto& digit : m_digits) {
335  int x = digit.getFirstWindow() != m_digits[0]->getFirstWindow() ? 1 : 0 ;
336  m_BoolEvtMonitor->Fill(x);
337  }
338  }
339 
340  // count tracks in the modules and store the momenta
341 
342  std::vector<int> numTracks(m_numModules, 0);
343  std::vector<double> trackMomenta(m_numModules, 0);
344  for (const auto& track : m_tracks) {
345  const auto* fitResult = track.getTrackFitResultWithClosestMass(Const::pion);
346  if (not fitResult) continue;
347  int slot = getModuleID(track);
348  if (slot == 0) continue;
349  numTracks[slot - 1]++;
350  trackMomenta[slot - 1] = std::max(trackMomenta[slot - 1], fitResult->getMomentum().R());
351  }
352 
353  // count events w/ and w/o track in the slot
354 
355  if (recBunchValid or cosmics) {
356  for (size_t i = 0; i < numTracks.size(); i++) {
357  bool hit = numTracks[i] > 0;
358  m_trackHits->Fill(i + 1, hit);
359  }
360  }
361 
362  // select modules for counting hits in signal and background time windows
363 
364  std::vector<bool> selectedSlots(m_numModules, false);
365  for (size_t i = 0; i < selectedSlots.size(); i++) {
366  selectedSlots[i] = (recBunchValid or cosmics) and numTracks[i] == 1 and trackMomenta[i] > m_momentumCut;
367  }
368 
369  // prepare counters
370 
371  int nHits_good = 0;
372  int nHits_bad = 0;
373  std::vector<int> numSignalHits(m_numModules, 0);
374  std::vector<int> numBackgroundHits(m_numModules, 0);
375 
376  // loop over digits, fill histograms and increment counters
377 
378  for (const auto& digit : m_digits) {
379  int slot = digit.getModuleID();
380  if (slot < 1 or slot > m_numModules) {
381  B2ERROR("Invalid slot ID found in TOPDigits: ID = " << slot);
382  continue;
383  }
384  int asic_no = digit.getChannel() / 8;
385  int asic_ch = digit.getChannel() % 8;
386 
387  m_window_vs_slot->Fill(digit.getModuleID(), digit.getRawTime() / 64 + 220);
388  m_window_vs_asic[slot - 1]->Fill(asic_no, digit.getRawTime() / 64 + 220);
389 
390  if (digit.getHitQuality() != TOPDigit::c_Junk) { // good hits
391  m_goodHitsXY[slot - 1]->Fill(digit.getPixelCol(), digit.getPixelRow());
392  m_goodHitsAsics[slot - 1]->Fill(asic_no, asic_ch);
393  m_goodTDC[slot - 1]->Fill(digit.getRawTime());
394  m_goodTDCAll->Fill(digit.getRawTime());
395  m_goodChannelHits[slot - 1]->Fill(digit.getChannel());
396  m_pulseHeights[slot - 1]->Fill(digit.getPMTNumber(), digit.getPulseHeight());
397  nHits_good++;
398  if (digit.hasStatus(TOPDigit::c_EventT0Subtracted)) {
399  double time = digit.getTime();
400  if (cosmics) time += 10; // move for 10 ns in order to get the complete signal at positive times
401  if (numTracks[slot - 1] > 0) {
402  m_goodTiming[slot - 1]->Fill(time);
403  m_time->Fill(time);
404  } else {
405  m_goodTimingBG[slot - 1]->Fill(time);
406  m_timeBG->Fill(time);
407  }
408  if (selectedSlots[slot - 1] and abs(time) < 50) {
409  if (time > 0) numSignalHits[slot - 1]++;
410  else numBackgroundHits[slot - 1]++;
411  }
412  }
413  } else { // bad hits: FE not valid, pedestal jump, too short or too wide pulses
414  m_badHitsXY[slot - 1]->Fill(digit.getPixelCol(), digit.getPixelRow());
415  m_badHitsAsics[slot - 1]->Fill(asic_no, asic_ch);
416  m_badTDC[slot - 1]->Fill(digit.getRawTime());
417  m_badTDCAll->Fill(digit.getRawTime());
418  m_badChannelHits[slot - 1]->Fill(digit.getChannel());
419  nHits_bad++;
420  }
421  }
422 
423  // histogram counters
424 
425  m_goodHitsPerEventAll->Fill(nHits_good);
426  m_badHitsPerEventAll->Fill(nHits_bad);
427  for (int slot = 1; slot <= m_numModules; slot++) {
428  if (selectedSlots[slot - 1]) {
429  m_signalHits->Fill(slot, numSignalHits[slot - 1]);
430  m_backgroundHits->Fill(slot, numBackgroundHits[slot - 1]);
431  }
432  }
433 
434  // fill injection histograms
435 
436  for (auto& it : m_rawFTSW) {
437  B2DEBUG(29, "TTD FTSW : " << hex << it.GetTTUtime(0) << " " << it.GetTTCtime(0) << " EvtNr " << it.GetEveNo(0) << " Type " <<
438  (it.GetTTCtimeTRGType(0) & 0xF) << " TimeSincePrev " << it.GetTimeSincePrevTrigger(0) << " TimeSinceInj " <<
439  it.GetTimeSinceLastInjection(0) << " IsHER " << it.GetIsHER(0) << " Bunch " << it.GetBunchNumber(0));
440  auto difference = it.GetTimeSinceLastInjection(0);
441  if (difference != 0x7FFFFFFF) {
442  unsigned int nentries = m_digits.getEntries();
443  float diff2 = difference / 127.; // 127MHz clock ticks to us, inexact rounding
444  if (it.GetIsHER(0)) {
445  m_TOPOccAfterInjHER->Fill(diff2, nentries);
446  m_TOPEOccAfterInjHER->Fill(diff2);
447  } else {
448  m_TOPOccAfterInjLER->Fill(diff2, nentries);
449  m_TOPEOccAfterInjLER->Fill(diff2);
450  }
451  }
452  }
453 
454  }
455 
456 
457  int TOPDQMModule::getModuleID(const Track& track) const
458  {
459  Const::EDetector myDetID = Const::EDetector::TOP;
460  int pdgCode = std::abs(Const::pion.getPDGCode());
461 
462  RelationVector<ExtHit> extHits = track.getRelationsWith<ExtHit>();
463  for (const auto& extHit : extHits) {
464  if (std::abs(extHit.getPdgCode()) != pdgCode) continue;
465  if (extHit.getDetectorID() != myDetID) continue;
466  if (extHit.getCopyID() < 1 or extHit.getCopyID() > m_numModules) continue;
467  return extHit.getCopyID();
468  }
469 
470  return 0;
471  }
472 
473 
475 } // end Belle2 namespace
476 
EDetector
Enum for identifying the detector components (detector and subdetector).
Definition: Const.h:42
static const ChargedStable pion
charged pion particle
Definition: Const.h:652
Store one Ext hit as a ROOT object.
Definition: ExtHit.h:32
int getCopyID() const
Get detector-element ID of sensitive element within detector.
Definition: ExtHit.h:126
HistoModule.h is supposed to be used instead of Module.h for the modules with histogram definitions t...
Definition: HistoModule.h:29
void setDescription(const std::string &description)
Sets the description of the module.
Definition: Module.cc:214
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
Definition: Module.cc:208
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
Definition: Module.h:80
Class for type safe access to objects that are referred to in relations.
std::vector< TH2F * > m_window_vs_asic
Histograms window w.r.t reference vs.
Definition: TOPDQMModule.h:117
std::vector< TH1F * > m_badChannelHits
Histograms for bad channel hits.
Definition: TOPDQMModule.h:127
int m_numModules
number of TOP modules
Definition: TOPDQMModule.h:131
std::vector< TH2F * > m_goodHitsXY
Histograms (2D) for good hits in pixels.
Definition: TOPDQMModule.h:118
std::vector< TH2F * > m_goodHitsAsics
Histograms (2D) for good hits in asic channels.
Definition: TOPDQMModule.h:120
StoreObjPtr< TOPRecBunch > m_recBunch
reconstructed bunch and event T0
Definition: TOPDQMModule.h:136
DBObjPtr< TOPCalCommonT0 > m_commonT0
common T0 calibration constants
Definition: TOPDQMModule.h:141
double m_momentumCut
momentum cut
Definition: TOPDQMModule.h:94
std::vector< TH2F * > m_badHitsXY
Histograms (2D) for bad hits in pixels.
Definition: TOPDQMModule.h:119
TH1F * m_bunchOffset
reconstructed bunch: current offset
Definition: TOPDQMModule.h:100
TProfile * m_backgroundHits
number of hits in the background time window vs.
Definition: TOPDQMModule.h:104
std::vector< TH1F * > m_badTDC
Histograms for TDC distribution of bad hits.
Definition: TOPDQMModule.h:123
std::vector< TH1F * > m_goodChannelHits
Histograms for good channel hits.
Definition: TOPDQMModule.h:126
TH1F * m_eventT0
reconstructed event T0
Definition: TOPDQMModule.h:99
StoreArray< RawFTSW > m_rawFTSW
Input array for DAQ Status.
Definition: TOPDQMModule.h:134
TH2F * m_window_vs_slot
Histogram window w.r.t reference vs.
Definition: TOPDQMModule.h:98
std::vector< TH1F * > m_goodTDC
Histograms for TDC distribution of good hits.
Definition: TOPDQMModule.h:122
std::vector< TH1F * > m_goodTimingBG
Histograms for timing distribution of good hits (background)
Definition: TOPDQMModule.h:125
TH1F * m_timeBG
time distribution of good hits (background)
Definition: TOPDQMModule.h:102
TH1F * m_TOPEOccAfterInjHER
Histogram for Nr Entries (=Triggrs) for normalization after HER injection.
Definition: TOPDQMModule.h:115
std::string m_histogramDirectoryName
histogram directory in ROOT file
Definition: TOPDQMModule.h:93
StoreArray< Track > m_tracks
collection of tracks
Definition: TOPDQMModule.h:138
TH1F * m_badHitsPerEventAll
Number of bad hits per event (all slots)
Definition: TOPDQMModule.h:108
TH1F * m_TOPEOccAfterInjLER
Histogram for Nr Entries (=Triggrs) for normalization after LER injection.
Definition: TOPDQMModule.h:114
std::vector< TH1F * > m_goodTiming
Histograms for timing distribution of good hits.
Definition: TOPDQMModule.h:124
TH1F * m_time
time distribution of good hits
Definition: TOPDQMModule.h:101
TH1F * m_goodTDCAll
TDC distribution of good hits (all slots)
Definition: TOPDQMModule.h:109
TH1F * m_TOPOccAfterInjLER
Histogram Ndigits after LER injection.
Definition: TOPDQMModule.h:112
StoreArray< TOPDigit > m_digits
collection of digits
Definition: TOPDQMModule.h:135
std::vector< TProfile * > m_pulseHeights
Pulse heights of good hits.
Definition: TOPDQMModule.h:128
StoreArray< TOPTimeZero > m_timeZeros
reconstructed event T0 in case of cosmics
Definition: TOPDQMModule.h:137
TProfile * m_signalHits
number of hits in the signal time window vs.
Definition: TOPDQMModule.h:103
TH2F * m_trackHits
counting events w/ and w/o track in the slot vs.
Definition: TOPDQMModule.h:105
TH1D * m_BoolEvtMonitor
Event desynchronization monitoring.
Definition: TOPDQMModule.h:97
std::vector< TH2F * > m_badHitsAsics
Histograms (2D) for bad hits in asic channels.
Definition: TOPDQMModule.h:121
TH1F * m_TOPOccAfterInjHER
Histogram Ndigits after HER injection.
Definition: TOPDQMModule.h:113
TH1F * m_badTDCAll
TDC distribution of bad hits (all slots)
Definition: TOPDQMModule.h:110
TH1F * m_goodHitsPerEventAll
Number of good hits per event (all slots)
Definition: TOPDQMModule.h:107
const TOPGeometry * getGeometry() const
Returns pointer to geometry object using basf2 units.
static TOPGeometryPar * Instance()
Static method to obtain the pointer to its instance.
Class that bundles various TrackFitResults.
Definition: Track.h:25
void addParam(const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
Definition: Module.h:560
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition: Module.h:650
virtual void initialize() override
Initialize the Module.
virtual void event() override
Event processor.
virtual ~TOPDQMModule()
Destructor.
Definition: TOPDQMModule.cc:54
virtual void beginRun() override
Called when entering a new run.
int getModuleID(const Track &track) const
Returns slot ID of the module that is hit by the track.
virtual void defineHisto() override
Histogram definitions such as TH1(), TH2(), TNtuple(), TTree()....
Definition: TOPDQMModule.cc:58
Abstract base class for different kinds of events.