23#ifndef LARACCUMULATEDDIGIT_H
24#define LARACCUMULATEDDIGIT_H
56 const std::vector<uint64_t>& sampleSum_value,
57 const std::vector<uint64_t>& sampleSquare_value,
58 uint32_t nTrigger_value);
91 float mean(
int n_min=-1,
int n_max=-1)
const;
94 float RMS(
int n_min=-1,
int n_max=-1)
const;
const HWIdentifier & hardwareID() const
Return HWIdentifier.
CaloGain::CaloGain m_gain
gain
const std::vector< uint64_t > & sampleSum() const
return the sample-sums
const std::vector< uint64_t > & sampleSquare() const
return a reference to a stl vector containing the sum of the squares of the sample
float RMS(int n_min=-1, int n_max=-1) const
Calculates and returns the RMS value of ADC samples.
std::vector< uint64_t > m_sampleSquare
vector(index: j from s_i*s_{i+j})
HWIdentifier m_hardwareID
Online Identifier.
LArAccumulatedDigit(HWIdentifier &channel_value, CaloGain::CaloGain gain_value, const std::vector< uint64_t > &sampleSum_value, const std::vector< uint64_t > &sampleSquare_value, uint32_t nTrigger_value)
Constructor (first type)
float mean(int n_min=-1, int n_max=-1) const
Calculates and returns the Mean value of ADC samples.
CaloGain::CaloGain gain() const
return gain value
int nsample() const
return number of samples
LArAccumulatedDigit()
default constructor for persistency
bool setAddDigit(const std::vector< short > &digit)
Accumulate single digit.
bool setAddSubStep(const LArAccumulatedDigit &ad)
uint32_t m_nTrigger
number of total triggers
unsigned nTrigger() const
return the number of triggers
std::vector< uint64_t > m_sampleSum
sampleSum over ntrigger*nsamples
void getCov(std::vector< float > &cov, int normalize) const
Compute the autocorrelation elements.
~LArAccumulatedDigit()=default
Destructor.
const HWIdentifier & channelID() const
Return channel ID.
bool setAddSubStep(const CaloGain::CaloGain gain_value, const HWIdentifier chid, const std::vector< uint64_t > &sampleSum, const std::vector< uint64_t > &sampleSquare, const unsigned nTrigger)
Accumulate new values.