18 for (
unsigned int i = 0; i < n; i++)
add();
25 for (
unsigned int i =
lwb; i <=
upb; i++)
add();
49 cout <<
"Cannot add more variables to the Averager, data filling has started already." << endl;
72 cout <<
"Filling with wrong indices!" << endl;
77 for (
int i1 =
lwb(); i1 <=
upb(); i1++) {
78 double val1 = values(i1);
81 for (
int i2 =
lwb(); i2 <=
upb(); i2++) {
82 double val2 = values(i2);
106 m_n += other.nEntries();
107 m_wTot += other.totalWeight();
116 cout <<
"No entries filled yet!" << endl;
126 TVectorD dm(
lwb(),
upb());
128 cout <<
"No entries filled yet!" << endl;
132 for (
int i1 =
lwb(); i1 <=
upb(); i1++)
142 cout <<
"No entries filled yet!" << endl;
146 for (
int i1 =
lwb(); i1 <=
upb(); i1++)
147 for (
int i2 =
lwb(); i2 <=
upb(); i2++)
157 cout <<
"No entries filled yet!" << endl;
160 for (
int i1 =
lwb(); i1 <=
upb(); i1++)
161 for (
int i2 =
lwb(); i2 <=
upb(); i2++)
171 cout <<
"No entries filled yet!" << endl;
175 for (
int i1 =
lwb(); i1 <=
upb(); i1++)
176 for (
int i2 =
lwb(); i2 <=
upb(); i2++) {
194 cout <<
"Index " << i <<
" out of range" << endl;
204 cout <<
"Index " << i <<
" out of range" << endl;
214 cout <<
"Index " << i <<
" out of range" << endl;
224 cout <<
"Indices (" << i <<
", " << j <<
") out of range" << endl;
234 cout <<
"Indices (" << i <<
", " << j <<
") out of range" << endl;
244 return TMath::Sqrt(
x);
Averager & operator=(const Averager &other)
bool fill(const TVectorD &values, double w=1)
bool append(const Averager &other)
double covariance(unsigned int i, unsigned j) const
double mean(unsigned int i) const
bool add(double xMin=-DBL_MAX, double xMax=DBL_MAX)
CovMatrix meanErrorMatrix() const
Averager(unsigned int n=0)
Constructor.
double covarianceError(unsigned int i, unsigned j) const
std::vector< double > m_xMax
double meanError(unsigned int i) const
unsigned int nEntries() const
double rms(unsigned int i) const
CovMatrix covarianceMatrix() const
CovMatrix covarianceMatrixErrors() const
static double safeSqrt(double x)
TVectorD meanErrors() const
std::vector< double > m_xMin
bool isInRange(int i) const
bool hasSameRange(int lw, int up) const
TMatrixTSym< double > CovMatrix