11#include <background/modules/BeamBkgHitRateMonitor/HitRateBase.h>
12#include <framework/datastore/StoreArray.h>
13#include <ecl/dataobjects/ECLDigit.h>
14#include <ecl/dataobjects/ECLDsp.h>
15#include <ecl/geometry/ECLGeometryPar.h>
23 namespace Background {
48 for (
int i = 0; i < 16; i++) {
71 virtual void clear()
override;
77 virtual void accumulate(
unsigned timeStamp)
override;
83 virtual void normalize(
unsigned timeStamp)
override;
Class for monitoring beam background hit rates of ECL.
std::map< int, int > m_segmentMap
map with keys containing ECL CellID and values containing segment number
int m_crystalsInSegment[16]
array cotaining the number of crystals in given segment
std::map< unsigned, TreeStruct > m_buffer
average rates in time stamps
TreeStruct m_rates
tree variables
void findElectronicsNoise()
Find the electronics noise correction for each cellID Reads a file with a histogram containing electr...
StoreArray< ECLDsp > m_dsps
collection of ECL waveforms
virtual void initialize(TTree *tree) override
Class initializer: set branch addresses and other staf.
Belle2::ECL::ECLGeometryPar * m_geometry
pointer to ECLGeometryPar
std::vector< float > m_waveformNoise
vector used to store ECL electronic noise constants foe each crystal
virtual void accumulate(unsigned timeStamp) override
Accumulate hits.
StoreArray< ECLDigit > m_digits
collection of digits
int findECLSegment(int cellid)
Find the correcsponding ECL segment based on the cellID.
void segmentECL()
Performs ECL segmentation; Done once per run; Populates a map which connects each ECL crystal with a ...
virtual void normalize(unsigned timeStamp) override
Normalize accumulated hits (e.g.
virtual void clear() override
Clear time-stamp buffer to prepare for 'accumulate'.
ECLHitRateCounter()
Constructor.
std::vector< float > m_ADCtoEnergy
vector used to store ECL calibration constants for each crystal
Abstract base class for monitoring beam background hit rates All the monitoring classes must inherit ...
The Class for ECL Geometry Parameters.
Accessor to arrays stored in the data store.
Abstract base class for different kinds of events.
bool validDspRate
status for rates calculated from waveforms, true if waveforms for all crystals are recorded
int numEvents
number of valid events
float averageDspBkgRate[16]
average background rate per crystal in given segment, calculated using ECL waveforms [hits/second]
void normalize()
normalize accumulated rates based on ECL waveforms