ATLAS Offline Software
Loading...
Searching...
No Matches
ScaledErrorData.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7#include <iostream>
8using std::cout;
9using std::endl;
10
11using namespace LArSamples;
12
13
14const TVectorD ScaledErrorData::offsets(int first, int last) const
15{
16 if (!checkRange(first, last)) {
17 cout << "ScaledErrorData::offsets : range error" << endl;
18 return TVectorD();
19 }
20
21 TVectorD offsets = xi();
22
23 double t = time() - tbar() /*- Definitions::samplingTime(lwb())*/;
24 offsets -= t*xip();
25 offsets *= scale();
26
27 return offsets.GetSub(first, last, "I"); // "I" => indexed as [first, last]
28}
29
30
31const CovMatrix ScaledErrorData::errors(int first, int last) const
32{
33 if (!checkRange(first, last)) {
34 cout << "ScaledErrorData::errors : range error" << endl;
35 return CovMatrix();
36 }
37
39 double t = time() - tbar() /*- Definitions::samplingTime(lwb())*/;
40 errors += t*t*xipErr();
41 errors *= scale()*scale();
42
43 return errors.GetSub(first, last, first, last, "I"); // "I" => indexed as [first, last]
44}
45
bool checkRange(int &l, int &h) const
const TVectorD offsets(int first=-1, int last=-1) const
const CovMatrix errors(int first=-1, int last=-1) const
const TVectorD & xi() const
const TVectorD & xip() const
const CovMatrix & xipErr() const
const CovMatrix & xiErr() const