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
13namespace Belle2 {
25 public:
34 const float& min_value,
35 const float& max_value,
36 const int* const ndevs);
44 int getNOfEvents() const;
49 int getCount() const;
53 float getMean() const;
57 float getStdDev() const;
61 void add(const float& value);
67 void calc();
68 private:
74 bool isValueInRange(const float& value) const;
83 float calcStdDev(const float& variance,
84 const int& count) const;
91 void updateLimits(const float& mean,
92 const float& stddev);
106 const int* const c_ndevs;
119 float m_mean;
123 float m_stddev;
127 std::vector<int> m_data;
128 };
129
130}
131
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.
ECLLocalRunCalibAcc(const float &min_value, const float &max_value, const int *const ndevs)
Constructor.
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.