Belle II Software  release-08-01-10
ECLLocalRunCalibAcc Class Reference

ECLLocalRunCalibAcc is the class designed to accumulate mean values, standard deviation and number of accepted events. More...

#include <ECLLocalRunCalibAcc.h>

Collaboration diagram for ECLLocalRunCalibAcc:

Public Member Functions

 ECLLocalRunCalibAcc (const float &min_value, const float &max_value, const int *const ndevs)
 Constructor. More...
 
 ~ECLLocalRunCalibAcc ()
 Destructor.
 
int getNOfEvents () const
 Get total number of events.
 
int getCount () const
 Get number of accepted events.
 
float getMean () const
 Get mean value.
 
float getStdDev () const
 Get standard deviation.
 
void add (const float &value)
 Add value.
 
void calc ()
 Calculate mean value, standard deviation and number of accepted events.
 

Private Member Functions

bool isValueInRange (const float &value) const
 Check value. More...
 
float calcStdDev (const float &variance, const int &count) const
 Calculate standard deviation using variance and number of accepted events. More...
 
void updateLimits (const float &mean, const float &stddev)
 Update value limits. More...
 

Private Attributes

float m_leftLimit
 Lower value limit.
 
float m_rightLimit
 Upper value limit.
 
const int *const c_ndevs
 Number of standard deviations used to update value limits.
 
int m_nevents
 Total number of events.
 
int m_count
 Number of accepted events.
 
float m_mean
 Mean value.
 
float m_stddev
 Standard deviation.
 
std::vector< int > m_data
 Vector of accepted values.
 

Detailed Description

ECLLocalRunCalibAcc is the class designed to accumulate mean values, standard deviation and number of accepted events.

Definition at line 27 of file ECLLocalRunCalibAcc.h.

Constructor & Destructor Documentation

◆ ECLLocalRunCalibAcc()

ECLLocalRunCalibAcc ( const float &  min_value,
const float &  max_value,
const int *const  ndevs 
)

Constructor.

Parameters
min_valueis the lower value limit.
max_valueis the upper value limit
ndevsis the number of standard deviations. used to update value limits.

Definition at line 18 of file ECLLocalRunCalibAcc.cc.

21  :
22  m_leftLimit(min_value),
23  m_rightLimit(max_value),
24  c_ndevs(ndevs),
25  m_nevents(0),
26  m_count(0),
27  m_mean(0.),
28  m_stddev(0.)
29 {
30  m_data.reserve(1000);
31 }
float m_leftLimit
Lower value limit.
float m_rightLimit
Upper value limit.
std::vector< int > m_data
Vector of accepted values.
int m_nevents
Total number of events.
const int *const c_ndevs
Number of standard deviations used to update value limits.
int m_count
Number of accepted events.
float m_stddev
Standard deviation.

Member Function Documentation

◆ calcStdDev()

float calcStdDev ( const float &  variance,
const int &  count 
) const
private

Calculate standard deviation using variance and number of accepted events.

Parameters
varianceis the variance.
countis the number of accepted events.

Definition at line 50 of file ECLLocalRunCalibAcc.cc.

◆ isValueInRange()

bool isValueInRange ( const float &  value) const
private

Check value.

Parameters
valueis the amplitude or time value

Definition at line 37 of file ECLLocalRunCalibAcc.cc.

◆ updateLimits()

void updateLimits ( const float &  mean,
const float &  stddev 
)
private

Update value limits.

Parameters
meanis the mean value.
stddevis the standard deviation.

Definition at line 56 of file ECLLocalRunCalibAcc.cc.


The documentation for this class was generated from the following files: