 |
Belle II Software
release-05-02-19
|
13 #include <background/modules/BeamBkgHitRateMonitor/HitRateBase.h>
14 #include <framework/datastore/StoreArray.h>
15 #include <framework/database/DBObjPtr.h>
16 #include <top/dataobjects/TOPDigit.h>
17 #include <top/dbobjects/TOPCalChannelMask.h>
27 namespace Background {
35 class TOPHitRateCounter:
public HitRateBase {
78 virtual void clear()
override;
84 virtual void accumulate(
unsigned timeStamp)
override;
90 virtual void normalize(
unsigned timeStamp)
override;
107 std::map<unsigned, TreeStruct>
m_buffer;
virtual void initialize(TTree *tree) override
Class initializer: set branch addresses and other staf.
virtual void normalize(unsigned timeStamp) override
Normalize accumulated hits (e.g.
int numEvents
number of events accumulated
TH1F * m_hits
time distribution of hits in wide range
double m_activeTotal
total fraction of active channels
double m_timeOffset
time offset of hits [ns]
Class for accessing objects in the database.
bool valid
status: true = rates valid
double m_activeFractions[16]
fractions of active channels in slots
std::map< unsigned, TreeStruct > m_buffer
average rates in time stamps
void normalize()
normalize accumulated hits to single event
Abstract base class for different kinds of events.
double m_timeWindow
time window in which to count hits [ns]
DBObjPtr< TOPCalChannelMask > m_channelMask
channel mask
TreeStruct m_rates
tree variables
TOPHitRateCounter(double timeOffset, double timeWindow)
Constructor.
Accessor to arrays stored in the data store.
void setActiveFractions()
Sets fractions of active channels.
virtual void accumulate(unsigned timeStamp) override
Accumulate hits.
float slotRates[16]
hit rates per PMT of the modules (slots) [MHz]
float averageRate
average hit rate per PMT [MHz]
StoreArray< TOPDigit > m_digits
collection of digits
virtual void clear() override
Clear time-stamp buffer to prepare for 'accumulate'.
TH1F * m_hitsInWindow
time distribution of hits inside timeWindow