Belle II Software  release-05-02-19
TOPDQMModule.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Marko Staric, Dan Santel, Boqun Wang *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <framework/core/Module.h>
14 #include <string>
15 #include <vector>
16 #include "TH1F.h"
17 #include "TH2F.h"
18 #include "TProfile.h"
19 #include "TProfile2D.h"
20 
21 // dataobject classes
22 #include <framework/datastore/StoreArray.h>
23 #include <framework/datastore/StoreObjPtr.h>
24 #include <top/dataobjects/TOPDigit.h>
25 #include <rawdata/dataobjects/RawFTSW.h>
26 #include <top/dataobjects/TOPRecBunch.h>
27 #include <mdst/dataobjects/Track.h>
28 
29 namespace Belle2 {
41  class TOPDQMModule : public HistoModule {
42 
43  public:
44 
48  TOPDQMModule();
49 
53  virtual ~TOPDQMModule();
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 
82  virtual void endRun() override;
83 
88  virtual void terminate() override;
89 
90  private:
91 
92  // module parameters
93  std::string m_histogramDirectoryName;
94  double m_momentumCut;
95  double m_pValueCut;
96  bool m_usePionID;
97  int m_cutNphot;
99  // histograms
100  TH1F* m_BoolEvtMonitor = 0;
102  TH1F* m_recoTime = 0;
103  TH1F* m_recoTimeBg = 0;
104  TH1F* m_recoTimeMinT0 = 0;
105  TH1F* m_recoTimeDiff = 0;
106  TH1F* m_recoPull = 0;
107  TH2F* m_recoTimeDiff_Phic = 0;
108  TProfile* m_recoPull_Phic = 0;
109  TH1F* m_goodHitsPerEventAll = 0;
111  TH1F* m_goodTDCAll = 0;
112  TH1F* m_badTDCAll = 0;
114  TH1F* m_goodHits = nullptr;
115  TH1F* m_badHits = nullptr;
116  TH2F* m_window_vs_slot = 0;
117  TH1F* m_bunchOffset = 0;
118  TH1F* m_time = 0;
119  TProfile* m_goodHitsPerEventProf = 0;
120  TProfile* m_badHitsPerEventProf = 0;
121  TH1F* m_TOPOccAfterInjLER = 0;
126  std::vector<TH2F*> m_window_vs_asic;
127  std::vector<TH2F*> m_goodHitsXY;
128  std::vector<TH2F*> m_badHitsXY;
129  std::vector<TH2F*> m_goodHitsAsics;
130  std::vector<TH2F*> m_badHitsAsics;
131  std::vector<TH1F*> m_goodTdc;
132  std::vector<TH1F*> m_badTdc;
133  std::vector<TH1F*> m_goodTiming;
134  std::vector<TH1F*> m_goodChannelHits;
135  std::vector<TH1F*> m_badChannelHits;
136  std::vector<TH1F*> m_goodHitsPerEvent;
137  std::vector<TH1F*> m_badHitsPerEvent;
138  std::vector<TProfile2D*> m_goodHitsXYTrack;
139  std::vector<TProfile2D*> m_goodHitsXYTrackBkg;
141  // other
142  int m_numModules = 0;
144  // dataobjects
150  };
151 
153 } // Belle2 namespace
154 
Belle2::TOPDQMModule::m_badHitsPerEventAll
TH1F * m_badHitsPerEventAll
Histograms for bad hits per event (all slots)
Definition: TOPDQMModule.h:118
Belle2::TOPDQMModule::m_goodTDCAll
TH1F * m_goodTDCAll
Histograms for TDC distribution of good hits (all slots)
Definition: TOPDQMModule.h:119
Belle2::TOPDQMModule::m_tracks
StoreArray< Track > m_tracks
collection of tracks
Definition: TOPDQMModule.h:156
Belle2::TOPDQMModule::m_recoTimeDiff
TH1F * m_recoTimeDiff
residual distribution
Definition: TOPDQMModule.h:113
Belle2::TOPDQMModule::m_goodHitsXYTrackBkg
std::vector< TProfile2D * > m_goodHitsXYTrackBkg
Histograms (2D) for good hits in x-y per module with bkg track.
Definition: TOPDQMModule.h:147
Belle2::TOPDQMModule::m_badTDCAll
TH1F * m_badTDCAll
Histograms for TDC distribution of bad hits (all slots)
Definition: TOPDQMModule.h:120
Belle2::TOPDQMModule::m_recoPull
TH1F * m_recoPull
pull distribution
Definition: TOPDQMModule.h:114
Belle2::TOPDQMModule::m_recBunch
StoreObjPtr< TOPRecBunch > m_recBunch
reconstructed bunch
Definition: TOPDQMModule.h:155
Belle2::TOPDQMModule::m_histogramDirectoryName
std::string m_histogramDirectoryName
histogram directory in ROOT file
Definition: TOPDQMModule.h:101
Belle2::TOPDQMModule::m_momentumCut
double m_momentumCut
momentum cut
Definition: TOPDQMModule.h:102
Belle2::TOPDQMModule::m_BoolEvtMonitor
TH1F * m_BoolEvtMonitor
Event desynchronization monitoring.
Definition: TOPDQMModule.h:108
Belle2::TOPDQMModule::m_recoTimeBg
TH1F * m_recoTimeBg
time distribution background
Definition: TOPDQMModule.h:111
Belle2::TOPDQMModule::m_badChannelHits
std::vector< TH1F * > m_badChannelHits
Histograms for bad channel hits.
Definition: TOPDQMModule.h:143
Belle2::TOPDQMModule::event
virtual void event() override
Event processor.
Definition: TOPDQMModule.cc:418
Belle2::TOPDQMModule::terminate
virtual void terminate() override
Termination action.
Definition: TOPDQMModule.cc:554
Belle2::TOPDQMModule::m_badHitsPerEventProf
TProfile * m_badHitsPerEventProf
a profile histogram of bad hits per event
Definition: TOPDQMModule.h:128
Belle2::TOPDQMModule::m_numModules
int m_numModules
number of TOP modules
Definition: TOPDQMModule.h:150
Belle2::TOPDQMModule::m_pValueCut
double m_pValueCut
pValue cut
Definition: TOPDQMModule.h:103
Belle2::TOPDQMModule::m_window_vs_asic
std::vector< TH2F * > m_window_vs_asic
Histograms window w.r.t reference vs.
Definition: TOPDQMModule.h:134
Belle2::TOPDQMModule::m_goodHits
TH1F * m_goodHits
Histogram for number of accumulated good hits.
Definition: TOPDQMModule.h:122
Belle2::TOPDQMModule::TOPDQMModule
TOPDQMModule()
Constructor.
Definition: TOPDQMModule.cc:61
Belle2::TOPDQMModule::beginRun
virtual void beginRun() override
Called when entering a new run.
Definition: TOPDQMModule.cc:372
Belle2::TOPDQMModule::m_goodHitsPerEventProf
TProfile * m_goodHitsPerEventProf
a profile histogram of good hits per event
Definition: TOPDQMModule.h:127
Belle2::TOPDQMModule::m_goodTdc
std::vector< TH1F * > m_goodTdc
Histograms for TDC distribution of good hits.
Definition: TOPDQMModule.h:139
Belle2::TOPDQMModule::m_badHitsXY
std::vector< TH2F * > m_badHitsXY
Histograms (2D) for bad hits in x-y.
Definition: TOPDQMModule.h:136
Belle2::TOPDQMModule::m_digits
StoreArray< TOPDigit > m_digits
collection of digits
Definition: TOPDQMModule.h:154
Belle2::TOPDQMModule::m_goodChannelHits
std::vector< TH1F * > m_goodChannelHits
Histograms for good channel hits.
Definition: TOPDQMModule.h:142
Belle2::TOPDQMModule::m_goodHitsAsics
std::vector< TH2F * > m_goodHitsAsics
Histograms (2D) for good hits for asics.
Definition: TOPDQMModule.h:137
Belle2::TOPDQMModule::endRun
virtual void endRun() override
End-of-run action.
Definition: TOPDQMModule.cc:550
Belle2::TOPDQMModule::m_recoTimeDiff_Phic
TH2F * m_recoTimeDiff_Phic
residuals vs phiCer
Definition: TOPDQMModule.h:115
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TOPDQMModule::m_goodTiming
std::vector< TH1F * > m_goodTiming
Histograms for timing distribution of good hits.
Definition: TOPDQMModule.h:141
Belle2::StoreObjPtr
Type-safe access to single objects in the data store.
Definition: ParticleList.h:33
Belle2::TOPDQMModule::m_TOPOccAfterInjLER
TH1F * m_TOPOccAfterInjLER
Histogram Ndigits after LER injection.
Definition: TOPDQMModule.h:129
Belle2::TOPDQMModule::m_badHitsPerEvent
std::vector< TH1F * > m_badHitsPerEvent
Histograms for bad hits per event.
Definition: TOPDQMModule.h:145
Belle2::TOPDQMModule::m_bunchOffset
TH1F * m_bunchOffset
reconstructed bunch: current offset
Definition: TOPDQMModule.h:125
Belle2::TOPDQMModule::m_recoPull_Phic
TProfile * m_recoPull_Phic
pulls vs phiCer
Definition: TOPDQMModule.h:116
Belle2::TOPDQMModule::m_TOPOccAfterInjHER
TH1F * m_TOPOccAfterInjHER
Histogram Ndigits after HER injection.
Definition: TOPDQMModule.h:130
Belle2::TOPDQMModule::m_TOPEOccAfterInjLER
TH1F * m_TOPEOccAfterInjLER
Histogram for Nr Entries (=Triggrs) for normalization after LER injection.
Definition: TOPDQMModule.h:131
Belle2::TOPDQMModule::m_goodHitsPerEventAll
TH1F * m_goodHitsPerEventAll
Histograms for good hits per event (all slots)
Definition: TOPDQMModule.h:117
Belle2::TOPDQMModule::m_badHits
TH1F * m_badHits
Histogram for number of accumulated bad hits.
Definition: TOPDQMModule.h:123
Belle2::TOPDQMModule::m_goodHitsXY
std::vector< TH2F * > m_goodHitsXY
Histograms (2D) for good hits in x-y.
Definition: TOPDQMModule.h:135
Belle2::TOPDQMModule::m_TOPEOccAfterInjHER
TH1F * m_TOPEOccAfterInjHER
Histogram for Nr Entries (=Triggrs) for normalization after HER injection.
Definition: TOPDQMModule.h:132
Belle2::TOPDQMModule::initialize
virtual void initialize() override
Initialize the Module.
Definition: TOPDQMModule.cc:359
Belle2::TOPDQMModule::defineHisto
virtual void defineHisto() override
Histogram definitions such as TH1(), TH2(), TNtuple(), TTree()....
Definition: TOPDQMModule.cc:84
Belle2::TOPDQMModule::m_rawFTSW
StoreArray< RawFTSW > m_rawFTSW
Input array for DAQ Status.
Definition: TOPDQMModule.h:153
Belle2::TOPDQMModule::m_badTdc
std::vector< TH1F * > m_badTdc
Histograms for TDC distribution of bad hits.
Definition: TOPDQMModule.h:140
Belle2::TOPDQMModule::m_recoTime
TH1F * m_recoTime
time distribution
Definition: TOPDQMModule.h:110
Belle2::TOPDQMModule::m_recoTimeMinT0
TH1F * m_recoTimeMinT0
time distribution in respect to the first peak
Definition: TOPDQMModule.h:112
Belle2::StoreArray
Accessor to arrays stored in the data store.
Definition: ECLMatchingPerformanceExpertModule.h:33
Belle2::TOPDQMModule::~TOPDQMModule
virtual ~TOPDQMModule()
Destructor.
Definition: TOPDQMModule.cc:80
Belle2::TOPDQMModule::m_cutNphot
int m_cutNphot
Number of photon cut.
Definition: TOPDQMModule.h:105
Belle2::TOPDQMModule::m_time
TH1F * m_time
time distribution of good hits
Definition: TOPDQMModule.h:126
Belle2::TOPDQMModule::m_goodHitsPerEvent
std::vector< TH1F * > m_goodHitsPerEvent
Histograms for good hits per event.
Definition: TOPDQMModule.h:144
Belle2::TOPDQMModule::m_badHitsAsics
std::vector< TH2F * > m_badHitsAsics
Histograms (2D) for bad hits for asics.
Definition: TOPDQMModule.h:138
Belle2::TOPDQMModule::m_goodHitsXYTrack
std::vector< TProfile2D * > m_goodHitsXYTrack
Histograms (2D) for good hits in x-y per module with track.
Definition: TOPDQMModule.h:146
Belle2::TOPDQMModule::m_usePionID
bool m_usePionID
use pion ID in track selection
Definition: TOPDQMModule.h:104
Belle2::TOPDQMModule::m_window_vs_slot
TH2F * m_window_vs_slot
Histogram window w.r.t reference vs.
Definition: TOPDQMModule.h:124