Belle II Software development
ECLLocalRunCalibAcc.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#pragma once
9
10// STL
11#include <vector>
12// BOOST
13#include <boost/accumulators/accumulators.hpp>
14#include <boost/accumulators/statistics.hpp>
15namespace bacc = boost::accumulators;
16namespace Belle2 {
28 public:
37 const float& min_value,
38 const float& max_value,
39 const int* const ndevs);
47 int getNOfEvents() const;
52 int getCount() const;
56 float getMean() const;
60 float getStdDev() const;
64 void add(const float& value);
70 void calc();
71 private:
77 bool isValueInRange(const float& value) const;
86 float calcStdDev(const float& variance,
87 const int& count) const;
94 void updateLimits(const float& mean,
95 const float& stddev);
109 const int* const c_ndevs;
122 float m_mean;
126 float m_stddev;
130 std::vector<int> m_data;
131 };
133}
134
ECLLocalRunCalibAcc is the class designed to accumulate mean values, standard deviation and number of...
void calc()
Calculate mean value, standard deviation and number of accepted events.
float calcStdDev(const float &variance, const int &count) const
Calculate standard deviation using variance and number of accepted events.
float m_leftLimit
Lower value limit.
int getCount() const
Get number of accepted events.
float getMean() const
Get mean value.
float m_rightLimit
Upper value limit.
void updateLimits(const float &mean, const float &stddev)
Update value limits.
bool isValueInRange(const float &value) const
Check value.
std::vector< int > m_data
Vector of accepted values.
int m_nevents
Total number of events.
int getNOfEvents() const
Get total number of events.
void add(const float &value)
Add value.
const int *const c_ndevs
Number of standard deviations used to update value limits.
float getStdDev() const
Get standard deviation.
int m_count
Number of accepted events.
float m_stddev
Standard deviation.
Abstract base class for different kinds of events.