BayesianAnalysisToolkit
0.9.3
Main Page
Namespaces
Classes
Files
File List
File Members
models
mvc
BCMVCMeasurement.cxx
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2007-2013, the BAT core developer team
3
* All rights reserved.
4
*
5
* For the licensing terms see doc/COPYING.
6
* For documentation see http://mpp.mpg.de/bat
7
*/
8
9
// ---------------------------------------------------------
10
11
#include "
BCMVCMeasurement.h
"
12
13
#include <cmath>
14
15
// ---------------------------------------------------------
16
BCMVCMeasurement::BCMVCMeasurement
(std::string name) : fName(name)
17
, fObservable(-1)
18
, fCentralValue(0.)
19
, fUncertainties(0)
20
, fFlagActive(true)
21
{
22
}
23
24
// ---------------------------------------------------------
25
BCMVCMeasurement::~BCMVCMeasurement
()
26
{
27
}
28
29
// ---------------------------------------------------------
30
double
BCMVCMeasurement::GetTotalUncertainty
()
31
{
32
int
n = int(
fUncertainties
.size());
33
34
double
sum2 = 0;
35
36
// sum all uncertainties in quadrature
37
for
(
int
i = 0; i < n; ++i) {
38
double
unc =
GetUncertainty
(i);
39
sum2+=unc*unc;
40
}
41
42
return
sqrt(sum2);
43
}
44
45
// ---------------------------------------------------------
Generated by
1.8.4