19 Double_t totalErr = 0;
21 TString flag = Form(
"%%4.%if", prec);
22 auto quadDif = [&](Double_t b) {
return TMath::Abs(fStatisticalUncert * fStatisticalUncert - b * b); };
23 auto measDif = [&](Double_t b) {
return TMath::Abs(fMeasurement - b); };
24 auto getForm = [&](Double_t val) {
return TString(Form(flag, val)); };
25 for (
auto i : fValues) {
26 auto uncerts = i.second;
27 Double_t uncertSum = 0;
29 for (
auto j : uncerts) {
30 Double_t xn = j.first;
31 Double_t en = j.second;
32 Double_t deltaSysj = TMath::Power(measDif(xn), 2) - quadDif(en);
36 uncertSum += deltaSysj * deltaSysj;
41 Double_t sigmaSysi = TMath::Sqrt(uncertSum / m);
48 totalErr += sigmaSysi * sigmaSysi;
52 totalErr = TMath::Sqrt(totalErr);
74 if (statUncert == -1) {
75 statUncert = TMath::Abs(fMeasurement - value);
76 }
else if (statUncert < 0) {
77 statUncert = fStatisticalUncert;
79 std::pair<Double_t, Double_t> p(value, statUncert);
80 for (
auto& i : fValues) {
81 if (i.first == name) {
82 i.second.push_back(p);
86 std::vector<std::pair<Double_t, Double_t>> vec;
88 std::pair<TString, std::vector<std::pair<Double_t, Double_t>>> pair(name, vec);
89 fValues.push_back(pair);
94 TString flag = Form(
"%%4.%if", prec);
95 auto getForm = [&](Double_t val) {
return TString(Form(flag, val)); };
97 for (
auto i : fValues) {
98 auto errors = GetAllUncerts(i.first);
100 for (
auto j : errors) {
101 maxErr = TMath::Max(maxErr, TMath::Abs(fMeasurement - j.first));
103 total += maxErr * maxErr;
109 return TMath::Sqrt(total);