Belle II Software development
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/dataobjects/TOPProductionEventDebug.h>
16#include <top/dataobjects/TOPUnpackerErrors.h>
17#include <top/dbobjects/TOPCalCommonT0.h>
18
19// Basf2 headers.
20#include <framework/core/HistoModule.h>
21#include <framework/datastore/StoreArray.h>
22#include <framework/datastore/StoreObjPtr.h>
23#include <rawdata/dataobjects/RawFTSW.h>
24#include <mdst/dataobjects/Track.h>
25
26// ROOT headers.
27#include <TH1F.h>
28#include <TH1D.h>
29#include <TH2F.h>
30#include <TProfile.h>
31#include <TProfile2D.h>
32
33// C++ headers.
34#include <string>
35#include <vector>
36
37namespace Belle2 {
42
46 class TOPDQMModule : public HistoModule {
47
48 public:
49
54
59 virtual void defineHisto() override;
60
65 virtual void initialize() override;
66
71 virtual void beginRun() override;
72
76 virtual void event() override;
77
78 private:
79
85 int getModuleID(const Track& track) const;
86
87 // module parameters
90
91 // histograms
92 TH1D* m_BoolEvtMonitor = 0;
93 TH2F* m_window_vs_slot = 0;
94 TH1F* m_eventT0 = 0;
95 TH1F* m_bunchOffset = 0;
96 TH1F* m_time = 0;
97 TH1F* m_timeBG = 0;
98 TProfile* m_signalHits = 0;
99 TProfile* m_backgroundHits = 0;
100 TH2F* m_trackHits = 0;
101
104 TH1F* m_goodTDCAll = 0;
105 TH1F* m_badTDCAll = 0;
106
111
112 TProfile2D* m_nhitInjLER = 0;
113 TProfile2D* m_nhitInjHER = 0;
114 TProfile2D* m_nhitInjLERcut = 0;
115 TProfile2D* m_nhitInjHERcut = 0;
116 TH2F* m_eventInjLER = 0;
117 TH2F* m_eventInjHER = 0;
120
121 std::vector<TH2F*> m_window_vs_asic;
122 std::vector<TH2F*> m_goodHitsXY;
123 std::vector<TH2F*> m_badHitsXY;
124 std::vector<TH2F*> m_goodHitsAsics;
125 std::vector<TH2F*> m_badHitsAsics;
126 std::vector<TH1F*> m_goodTDC;
127 std::vector<TH1F*> m_badTDC;
128 std::vector<TH1F*> m_goodTiming;
129 std::vector<TH1F*> m_goodTimingBG;
130 std::vector<TH1F*> m_goodChannelHits;
131 std::vector<TH1F*> m_badChannelHits;
132 std::vector<TProfile*> m_pulseHeights;
133
134 TH2F* m_skipProcFlag = 0;
135 TH2F* m_injVetoFlag = 0;
137 TH2F* m_PSBypassMode = 0;
138
139 TProfile* m_unpackErr = 0;
140
141 // other
142 int m_numModules = 0;
143 double m_bunchTimeSep = 0;
144
145 // dataobjects
153
154 // dbobjects
156
157 };
158
160} // Belle2 namespace
161
Class for accessing objects in the database.
Definition DBObjPtr.h:21
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
std::vector< TH2F * > m_window_vs_asic
Histograms window w.r.t reference vs.
std::vector< TH1F * > m_badChannelHits
Histograms for bad channel hits.
int m_numModules
number of TOP modules
std::vector< TH2F * > m_goodHitsXY
Histograms (2D) for good hits in pixels.
std::vector< TH2F * > m_goodHitsAsics
Histograms (2D) for good hits in asic channels.
StoreObjPtr< TOPRecBunch > m_recBunch
reconstructed bunch and event T0
TH2F * m_eventInjHER
event distribution (HER injection)
DBObjPtr< TOPCalCommonT0 > m_commonT0
common T0 calibration constants
double m_momentumCut
momentum cut
TH2F * m_injVetoFlag
injection veto flag vs.
std::vector< TH2F * > m_badHitsXY
Histograms (2D) for bad hits in pixels.
TH1F * m_bunchOffset
reconstructed bunch: current offset
TProfile * m_unpackErr
fraction of events with boardstack unpacker errors
TProfile2D * m_nhitInjLER
average number of good digits (LER injection)
TProfile * m_backgroundHits
number of hits in the background time window vs.
StoreArray< TOPProductionEventDebug > m_productionEventDebugs
collection of event debug data
std::vector< TH1F * > m_badTDC
Histograms for TDC distribution of bad hits.
std::vector< TH1F * > m_goodChannelHits
Histograms for good channel hits.
TH1F * m_eventT0
reconstructed event T0
TH2F * m_eventInjLERcut
event distribution after cut (LER injection)
TH2F * m_window_vs_slot
Histogram window w.r.t reference vs.
TH1F * m_injVetoFlagDiff
check if injection veto flags differ in the event
std::vector< TH1F * > m_goodTDC
Histograms for TDC distribution of good hits.
std::vector< TH1F * > m_goodTimingBG
Histograms for timing distribution of good hits (background)
TH1F * m_timeBG
time distribution of good hits (background)
TH2F * m_eventInjLER
event distribution (LER injection)
StoreArray< RawFTSW > m_rawFTSWs
Input array for DAQ Status.
TH1F * m_TOPEOccAfterInjHER
Histogram for Nr Entries (=Triggrs) for normalization after HER injection.
std::string m_histogramDirectoryName
histogram directory in ROOT file
TProfile2D * m_nhitInjLERcut
average number of good digits after cut (LER injection)
StoreArray< Track > m_tracks
collection of tracks
TH1F * m_badHitsPerEventAll
Number of bad hits per event (all slots)
TH1F * m_TOPEOccAfterInjLER
Histogram for Nr Entries (=Triggrs) for normalization after LER injection.
std::vector< TH1F * > m_goodTiming
Histograms for timing distribution of good hits.
StoreObjPtr< TOPUnpackerErrors > m_unpackerErrors
unpacker error flags
TH1F * m_time
time distribution of good hits
TH1F * m_goodTDCAll
TDC distribution of good hits (all slots)
TProfile2D * m_nhitInjHER
average number of good digits (HER injection)
TH1F * m_TOPOccAfterInjLER
Histogram Ndigits after LER injection.
StoreArray< TOPDigit > m_digits
collection of digits
std::vector< TProfile * > m_pulseHeights
Pulse heights of good hits.
TH2F * m_eventInjHERcut
event distribution after cut (HER injection)
StoreArray< TOPTimeZero > m_timeZeros
reconstructed event T0 in case of cosmics
TProfile * m_signalHits
number of hits in the signal time window vs.
TH2F * m_trackHits
counting events w/ and w/o track in the slot vs.
TH2F * m_PSBypassMode
PS-bypass mode vs.
double m_bunchTimeSep
bunch separation time
TH1D * m_BoolEvtMonitor
Event desynchronization monitoring.
TProfile2D * m_nhitInjHERcut
average number of good digits after cut (HER injection)
std::vector< TH2F * > m_badHitsAsics
Histograms (2D) for bad hits in asic channels.
TH1F * m_TOPOccAfterInjHER
Histogram Ndigits after HER injection.
TH1F * m_badTDCAll
TDC distribution of bad hits (all slots)
TH1F * m_goodHitsPerEventAll
Number of good hits per event (all slots)
TH2F * m_skipProcFlag
skip processing flag vs.
Class that bundles various TrackFitResults.
Definition Track.h:25
TOPDQMModule()
Constructor.
virtual void initialize() override
Initialize the Module.
virtual void event() override
Event processor.
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()....
Abstract base class for different kinds of events.