10#include <background/modules/BeamBkgHitRateMonitor/KLMHitRateCounter.h>
12using namespace Belle2::Background;
26 "]/F:averageRate/F:numEvents/I:valid/O";
27 tree->Branch(
"klm", &
m_rates, branches.c_str());
49 if (!klmDigit.inRPC() && !klmDigit.isGood())
51 uint16_t moduleNumber =
53 klmDigit.getSubdetector(), klmDigit.getSection(), klmDigit.getSector(),
57 rates.moduleRates[module] += 1;
59 B2ERROR(
"KLMHitRateCounter: module number out of range"
60 <<
LogVar(
"module", module));
62 rates.averageRate += 1;
83 if (activeStrips == 0)
std::map< unsigned, TreeStruct > m_buffer
Buffer.
TreeStruct m_rates
Tree data.
StoreArray< KLMDigit > m_digits
KLM digits.
DBObjPtr< KLMChannelStatus > m_ChannelStatus
KLM channel status.
virtual void initialize(TTree *tree) override
Class initializer.
const KLMElementNumbers * m_ElementNumbers
KLM element numbers.
virtual void accumulate(unsigned timeStamp) override
Accumulate hits.
const KLMModuleArrayIndex * m_ModuleArrayIndex
KLM module array index.
virtual void normalize(unsigned timeStamp) override
Normalize accumulated hits (i.e.
virtual void clear() override
Clear time-stamp buffer to prepare for 'accumulate'.
KLM digit (class representing a digitized hit in RPCs or scintillators).
uint16_t getNumber(uint16_t index) const
Get element number.
uint16_t getIndex(uint16_t number) const
Get element index.
static const KLMElementNumbers & Instance()
Instantiation.
static constexpr int getTotalModuleNumber()
Get total number of modules.
KLMModuleNumber moduleNumber(int subdetector, int section, int sector, int layer) const
Get module number.
static const KLMModuleArrayIndex & Instance()
Instantiation.
Class to store variables with their name which were sent to the logging service.
bool valid
Whether the rates are valid.
float moduleRates[KLMElementNumbers::getTotalModuleNumber()]
Hit rates in each module.
void normalize()
Normalize accumulated hits to single event.