Belle II Software  release-08-01-10
TOPDQMModule.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 // TOP headers.
12 #include <top/dataobjects/TOPDigit.h>
13 #include <top/dataobjects/TOPRecBunch.h>
14 #include <top/dataobjects/TOPTimeZero.h>
15 #include <top/dbobjects/TOPCalCommonT0.h>
16 
17 // Basf2 headers.
18 #include <framework/core/HistoModule.h>
19 #include <framework/datastore/StoreArray.h>
20 #include <framework/datastore/StoreObjPtr.h>
21 #include <rawdata/dataobjects/RawFTSW.h>
22 #include <mdst/dataobjects/Track.h>
23 
24 // ROOT headers.
25 #include <TH1F.h>
26 #include <TH1D.h>
27 #include <TH2F.h>
28 #include <TProfile.h>
29 #include <TProfile2D.h>
30 
31 // C++ headers.
32 #include <string>
33 #include <vector>
34 
35 namespace Belle2 {
47  class TOPDQMModule : public HistoModule {
48 
49  public:
50 
54  TOPDQMModule();
55 
59  virtual ~TOPDQMModule();
60 
65  virtual void defineHisto() override;
66 
71  virtual void initialize() override;
72 
77  virtual void beginRun() override;
78 
82  virtual void event() override;
83 
84  private:
85 
91  int getModuleID(const Track& track) const;
92 
93  // module parameters
95  double m_momentumCut;
97  // histograms
98  TH1D* m_BoolEvtMonitor = 0;
99  TH2F* m_window_vs_slot = 0;
100  TH1F* m_eventT0 = 0;
101  TH1F* m_bunchOffset = 0;
102  TH1F* m_time = 0;
103  TH1F* m_timeBG = 0;
104  TProfile* m_signalHits = 0;
105  TProfile* m_backgroundHits = 0;
106  TH2F* m_trackHits = 0;
110  TH1F* m_goodTDCAll = 0;
111  TH1F* m_badTDCAll = 0;
118  TProfile2D* m_nhitInjLER = 0;
119  TProfile2D* m_nhitInjHER = 0;
120  TProfile2D* m_nhitInjLERcut = 0;
121  TProfile2D* m_nhitInjHERcut = 0;
122  TH2F* m_eventInjLER = 0;
123  TH2F* m_eventInjHER = 0;
124  TH2F* m_eventInjLERcut = 0;
125  TH2F* m_eventInjHERcut = 0;
127  std::vector<TH2F*> m_window_vs_asic;
128  std::vector<TH2F*> m_goodHitsXY;
129  std::vector<TH2F*> m_badHitsXY;
130  std::vector<TH2F*> m_goodHitsAsics;
131  std::vector<TH2F*> m_badHitsAsics;
132  std::vector<TH1F*> m_goodTDC;
133  std::vector<TH1F*> m_badTDC;
134  std::vector<TH1F*> m_goodTiming;
135  std::vector<TH1F*> m_goodTimingBG;
136  std::vector<TH1F*> m_goodChannelHits;
137  std::vector<TH1F*> m_badChannelHits;
138  std::vector<TProfile*> m_pulseHeights;
140  // other
141  int m_numModules = 0;
142  double m_bunchTimeSep = 0;
144  // dataobjects
151  // dbobjects
154  };
155 
157 } // Belle2 namespace
158 
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
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
TOP DQM histogrammer.
Definition: TOPDQMModule.h:47
std::vector< TH2F * > m_window_vs_asic
Histograms window w.r.t reference vs.
Definition: TOPDQMModule.h:127
std::vector< TH1F * > m_badChannelHits
Histograms for bad channel hits.
Definition: TOPDQMModule.h:137
int m_numModules
number of TOP modules
Definition: TOPDQMModule.h:141
std::vector< TH2F * > m_goodHitsXY
Histograms (2D) for good hits in pixels.
Definition: TOPDQMModule.h:128
std::vector< TH2F * > m_goodHitsAsics
Histograms (2D) for good hits in asic channels.
Definition: TOPDQMModule.h:130
StoreObjPtr< TOPRecBunch > m_recBunch
reconstructed bunch and event T0
Definition: TOPDQMModule.h:147
TH2F * m_eventInjHER
event distribution (HER injection)
Definition: TOPDQMModule.h:123
DBObjPtr< TOPCalCommonT0 > m_commonT0
common T0 calibration constants
Definition: TOPDQMModule.h:152
double m_momentumCut
momentum cut
Definition: TOPDQMModule.h:95
std::vector< TH2F * > m_badHitsXY
Histograms (2D) for bad hits in pixels.
Definition: TOPDQMModule.h:129
TH1F * m_bunchOffset
reconstructed bunch: current offset
Definition: TOPDQMModule.h:101
TProfile2D * m_nhitInjLER
average number of good digits (LER injection)
Definition: TOPDQMModule.h:118
TProfile * m_backgroundHits
number of hits in the background time window vs.
Definition: TOPDQMModule.h:105
std::vector< TH1F * > m_badTDC
Histograms for TDC distribution of bad hits.
Definition: TOPDQMModule.h:133
std::vector< TH1F * > m_goodChannelHits
Histograms for good channel hits.
Definition: TOPDQMModule.h:136
TH1F * m_eventT0
reconstructed event T0
Definition: TOPDQMModule.h:100
TH2F * m_eventInjLERcut
event distribution after cut (LER injection)
Definition: TOPDQMModule.h:124
TH2F * m_window_vs_slot
Histogram window w.r.t reference vs.
Definition: TOPDQMModule.h:99
std::vector< TH1F * > m_goodTDC
Histograms for TDC distribution of good hits.
Definition: TOPDQMModule.h:132
std::vector< TH1F * > m_goodTimingBG
Histograms for timing distribution of good hits (background)
Definition: TOPDQMModule.h:135
TH1F * m_timeBG
time distribution of good hits (background)
Definition: TOPDQMModule.h:103
TH2F * m_eventInjLER
event distribution (LER injection)
Definition: TOPDQMModule.h:122
StoreArray< RawFTSW > m_rawFTSWs
Input array for DAQ Status.
Definition: TOPDQMModule.h:145
TH1F * m_TOPEOccAfterInjHER
Histogram for Nr Entries (=Triggrs) for normalization after HER injection.
Definition: TOPDQMModule.h:116
std::string m_histogramDirectoryName
histogram directory in ROOT file
Definition: TOPDQMModule.h:94
TProfile2D * m_nhitInjLERcut
average number of good digits after cut (LER injection)
Definition: TOPDQMModule.h:120
StoreArray< Track > m_tracks
collection of tracks
Definition: TOPDQMModule.h:149
TH1F * m_badHitsPerEventAll
Number of bad hits per event (all slots)
Definition: TOPDQMModule.h:109
TH1F * m_TOPEOccAfterInjLER
Histogram for Nr Entries (=Triggrs) for normalization after LER injection.
Definition: TOPDQMModule.h:115
std::vector< TH1F * > m_goodTiming
Histograms for timing distribution of good hits.
Definition: TOPDQMModule.h:134
TH1F * m_time
time distribution of good hits
Definition: TOPDQMModule.h:102
TH1F * m_goodTDCAll
TDC distribution of good hits (all slots)
Definition: TOPDQMModule.h:110
TProfile2D * m_nhitInjHER
average number of good digits (HER injection)
Definition: TOPDQMModule.h:119
TH1F * m_TOPOccAfterInjLER
Histogram Ndigits after LER injection.
Definition: TOPDQMModule.h:113
StoreArray< TOPDigit > m_digits
collection of digits
Definition: TOPDQMModule.h:146
std::vector< TProfile * > m_pulseHeights
Pulse heights of good hits.
Definition: TOPDQMModule.h:138
TH2F * m_eventInjHERcut
event distribution after cut (HER injection)
Definition: TOPDQMModule.h:125
StoreArray< TOPTimeZero > m_timeZeros
reconstructed event T0 in case of cosmics
Definition: TOPDQMModule.h:148
TProfile * m_signalHits
number of hits in the signal time window vs.
Definition: TOPDQMModule.h:104
TH2F * m_trackHits
counting events w/ and w/o track in the slot vs.
Definition: TOPDQMModule.h:106
double m_bunchTimeSep
bunch separation time
Definition: TOPDQMModule.h:142
TH1D * m_BoolEvtMonitor
Event desynchronization monitoring.
Definition: TOPDQMModule.h:98
TProfile2D * m_nhitInjHERcut
average number of good digits after cut (HER injection)
Definition: TOPDQMModule.h:121
std::vector< TH2F * > m_badHitsAsics
Histograms (2D) for bad hits in asic channels.
Definition: TOPDQMModule.h:131
TH1F * m_TOPOccAfterInjHER
Histogram Ndigits after HER injection.
Definition: TOPDQMModule.h:114
TH1F * m_badTDCAll
TDC distribution of bad hits (all slots)
Definition: TOPDQMModule.h:111
TH1F * m_goodHitsPerEventAll
Number of good hits per event (all slots)
Definition: TOPDQMModule.h:108
Class that bundles various TrackFitResults.
Definition: Track.h:25
TOPDQMModule()
Constructor.
Definition: TOPDQMModule.cc:41
virtual void initialize() override
Initialize the Module.
virtual void event() override
Event processor.
virtual ~TOPDQMModule()
Destructor.
Definition: TOPDQMModule.cc:55
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:59
Abstract base class for different kinds of events.