Belle II Software  release-08-01-10
KLMDQMModule.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 /* KLM headers. */
12 #include <klm/dataobjects/bklm/BKLMElementNumbers.h>
13 #include <klm/dataobjects/bklm/BKLMHit1d.h>
14 #include <klm/dataobjects/eklm/EKLMElementNumbers.h>
15 #include <klm/dataobjects/KLMHit2d.h>
16 #include <klm/dataobjects/KLMDigit.h>
17 #include <klm/dataobjects/KLMChannelArrayIndex.h>
18 #include <klm/dataobjects/KLMElementNumbers.h>
19 #include <klm/dataobjects/KLMSectorArrayIndex.h>
20 
21 /* Basf2 headers. */
22 #include <framework/core/HistoModule.h>
23 #include <framework/datastore/StoreArray.h>
24 #include <rawdata/dataobjects/RawFTSW.h>
25 #include <rawdata/dataobjects/RawKLM.h>
26 
27 /* ROOT headers. */
28 #include <TH1F.h>
29 #include <TH2F.h>
30 
31 namespace Belle2 {
43  class KLMDQMModule : public HistoModule {
44 
45  public:
46 
50  KLMDQMModule();
51 
55  ~KLMDQMModule();
56 
60  void defineHisto() override;
61 
65  void initialize() override;
66 
70  void beginRun() override;
71 
75  void event() override;
76 
80  void endRun() override;
81 
85  void terminate() override;
86 
87  private:
88 
91 
93  c_0x8 = 1,
94 
96  c_0x4 = 2,
97 
99  c_0x2 = 3,
100 
102  c_0x1 = 4,
103 
104  };
105 
108 
111 
113  double m_RPCTimeMin;
114 
116  double m_RPCTimeMax;
117 
120 
123 
126 
129 
132 
135 
137  TH1F* m_TimeRPC;
138 
141 
144 
147 
150 
152  TH1F* m_PlaneEKLM;
153 
158 
161 
163  TH1F* m_DigitsKLM;
164 
166  TH1F* m_DigitsRPC;
167 
170 
173 
176 
179 
182 
185 
188 
191 
194 
197 
200 
203 
206 
209 
212 
215 
218 
221 
224 
227 
228  };
229 
231 }
static constexpr int getMaximalSectorGlobalNumber()
Get maximal sector global number.
EKLM element numbers.
static constexpr int getMaximalSectionNumber()
Get maximal section number.
static constexpr int getMaximalSectorGlobalNumberKLMOrder()
Get maximal sector global number with KLM ordering (section, sector).
HistoModule.h is supposed to be used instead of Module.h for the modules with histogram definitions t...
Definition: HistoModule.h:29
KLM channel array index.
KLM data quality monitor module.
Definition: KLMDQMModule.h:43
double m_BKLMScintTimeMin
Min time for BKLM Scint.
Definition: KLMDQMModule.h:119
TH1F * m_DigitsMultiStripEKLM
Number of multi-strip digits: EKLM scintillators.
Definition: KLMDQMModule.h:178
StoreArray< RawFTSW > m_RawFtsws
Raw FTSW.
Definition: KLMDQMModule.h:214
const int m_ChannelHitHistogramsEKLM
Number of channel hit histograms per sector for EKLM.
Definition: KLMDQMModule.h:110
TH1F * m_PlaneBKLMPhi
Plane occupancy: BKLM, phi readout.
Definition: KLMDQMModule.h:146
TH1F * m_TriggerBitsBKLM
Trigger bits: BKLM scintillators.
Definition: KLMDQMModule.h:181
~KLMDQMModule()
Destructor.
Definition: KLMDQMModule.cc:69
TH1F * m_TimeScintillatorEKLM
Time: EKLM scintillators.
Definition: KLMDQMModule.h:143
double m_RPCTimeMax
Max time for RPC.
Definition: KLMDQMModule.h:116
StoreArray< KLMDigit > m_Digits
KLM digits.
Definition: KLMDQMModule.h:220
double m_RPCTimeMin
Min time for RPC.
Definition: KLMDQMModule.h:113
void initialize() override
Initializer.
TH1F * m_DigitsScintillatorEKLM
Number of digits: EKLM scintillators.
Definition: KLMDQMModule.h:172
TH1F ** m_ChannelHits[EKLMElementNumbers::getMaximalSectorGlobalNumberKLMOrder()+BKLMElementNumbers::getMaximalSectorGlobalNumber()]
Number of hits per channel.
Definition: KLMDQMModule.h:157
TH1F * m_TimeRPC
Time: BKLM RPCs.
Definition: KLMDQMModule.h:137
TH1F * m_DigitsKLM
Number of digits: whole KLM.
Definition: KLMDQMModule.h:163
void event() override
This method is called for each event.
const KLMElementNumbers * m_ElementNumbers
KLM element numbers.
Definition: KLMDQMModule.h:208
KLMDQMModule()
Constructor.
Definition: KLMDQMModule.cc:23
double m_EKLMScintTimeMax
Max time for EKLM Scint.
Definition: KLMDQMModule.h:128
const int m_ChannelHitHistogramsBKLM
Number of channel hit histograms per sector for BKLM.
Definition: KLMDQMModule.h:107
TH1F * m_TriggerBitsEKLM
Trigger bits: EKLM scintillators.
Definition: KLMDQMModule.h:184
void endRun() override
This method is called if the current run ends.
const EKLMElementNumbers * m_eklmElementNumbers
Element numbers.
Definition: KLMDQMModule.h:211
double m_BKLMScintTimeMax
Max time for BKLM Scint.
Definition: KLMDQMModule.h:122
void terminate() override
This method is called at the end of the event processing.
TH1F * m_PlaneBKLMZ
Plane occupancy: BKLM, z readout.
Definition: KLMDQMModule.h:149
TH1F * m_TimeScintillatorBKLM
Time: BKLM scintillators.
Definition: KLMDQMModule.h:140
TH1F * m_DigitsRPC
Number of digits: BKLM RPCs.
Definition: KLMDQMModule.h:166
TH1F * m_TriggersHERInj
Histogram to be used for normalization of occupancy after HER injection.
Definition: KLMDQMModule.h:196
void beginRun() override
Called when entering a new run.
TH1F * m_DigitsAfterHERInj
Number of KLM Digits after LER injection.
Definition: KLMDQMModule.h:193
TH1F * m_DigitsScintillatorBKLM
Number of digits: BKLM scintillators.
Definition: KLMDQMModule.h:169
TH1F * m_TriggersLERInj
Histogram to be used for normalization of occupancy after LER injection.
Definition: KLMDQMModule.h:190
TH1F * m_DigitsMultiStripBKLM
Number of multi-strip digits: BKLM scintillators.
Definition: KLMDQMModule.h:175
const KLMSectorArrayIndex * m_SectorArrayIndex
KLM sector array index.
Definition: KLMDQMModule.h:205
TriggerBitsBin
Bins for the trigger bits historgrams.
Definition: KLMDQMModule.h:90
StoreArray< BKLMHit1d > m_BklmHit1ds
BKLM 1d hits.
Definition: KLMDQMModule.h:223
TH1F * m_DigitsAfterLERInj
Number of KLM Digits after LER injection.
Definition: KLMDQMModule.h:187
TH1F * m_DAQInclusion
KLM DAQ inclusion.
Definition: KLMDQMModule.h:134
StoreArray< RawKLM > m_RawKlms
Raw KLM.
Definition: KLMDQMModule.h:217
TH1F * m_PlaneEKLM
Plane occupancy: EKLM.
Definition: KLMDQMModule.h:152
TH2F ** m_Spatial2DHitsEKLM[EKLMElementNumbers::getMaximalSectionNumber()]
Spatial distribution of EKLM 2d hits per layer.
Definition: KLMDQMModule.h:199
TH1F * m_MaskedChannelsPerSector
Masked channels per sector.
Definition: KLMDQMModule.h:160
double m_EKLMScintTimeMin
Min time for EKLM Scint.
Definition: KLMDQMModule.h:125
const KLMChannelArrayIndex * m_ChannelArrayIndex
KLM channel array index.
Definition: KLMDQMModule.h:202
std::string m_HistogramDirectoryName
Directory for KLM DQM histograms in ROOT file.
Definition: KLMDQMModule.h:131
void defineHisto() override
Definition of the histograms.
Definition: KLMDQMModule.cc:89
StoreArray< KLMHit2d > m_Hit2ds
KLM 2d hits.
Definition: KLMDQMModule.h:226
KLM element numbers.
KLM sector array index.
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Abstract base class for different kinds of events.