8#include "TMatrixTSym.h"
50 cout <<
"ERROR in OFC::initGValues : indices were invalid!" << endl;
55 cout <<
"ERROR in OFC::initGValues : (diff) indices were invalid!" << endl;
62 TVectorD xi = sed->
xi(
m_gp.GetLwb(),
m_gp.GetUpb());
63 TVectorD xip = sed->
xip(
m_gp.GetLwb(),
m_gp.GetUpb());
92 double denom =
G()*
Gpp() -
Gp()*
Gp();
97 for (
int i =
lwb(); i <=
upb(); i++) {
98 m_a(i) = (
Gpp()*gam(i) -
Gp()*gamp(i))/denom;
99 m_b(i) = (
Gp()*gam(i) -
G()*gamp(i))/denom;
103 for (
int i =
lwb(); i <=
upb(); i++) {
104 for (
int j =
lwb(); j <=
upb(); j++) {
113 for (
int i =
lwb(); i <=
upb(); i++) {
114 for (
int j =
lwb(); j <=
upb(); j++) {
115 double rn = noiseCov(i, j) - (
Gpp()*
g(i)*
g(j) -
Gp()*(
g(i)*
gp(j) +
g(j)*
gp(i)) +
G()*
gp(i)*
gp(j))/denom;
135 for (
unsigned int k = 0; k <
nSamples() - 2; k++) {
147 TVectorD vals(
lwb(),
upb());
149 for (
int i =
lwb(); i <=
upb(); i++)
150 vals[i] =
data.value(i);
152 return dot(
a(), vals);
158 TVectorD vals(
lwb(),
upb());
160 for (
int i =
lwb(); i <=
upb(); i++)
161 vals[i] =
data.value(i);
163 return dot(
b(), vals);
169 return v + (-1)*
dot(
a(), v)*
g() + (-1)*
dot(
b(), v)*
gp();
173double OFC::dot(
const TVectorD& form,
const TVectorD& v)
const
176 for (
int i =
lwb(); i <=
upb(); i++) s += form[i]*v[i];
char data[hepevt_bytes_allocation_ATLAS]
std::pair< std::vector< unsigned int >, bool > res
int interpolate(double time, double &value, double &error) const
int interpolateDiff(double time, double &diff) const
void incrementInstanceCount() const
void decrementInstanceCount() const
const TVectorD & b() const
TVectorD residual(const TVectorD &v) const
const TVectorD & a() const
const TVectorD & gp() const
OFC(const AbsShape &shape, const AbsShape &data, int lwb=-1, int upb=-1, const ShapeErrorData *sed=0, bool withAutoCorr=true)
Constructor.
bool initOFCs(const AbsShape &data, const CovMatrix &refErr, bool useCorrs)
double B(const AbsShape &data) const
unsigned int nSamples() const
bool initGValues(const AbsShape &shape, const AbsShape &data, const ShapeErrorData *sed)
std::vector< unsigned int > m_rIdx
const TVectorD & g() const
double A(const AbsShape &data) const
std::vector< TVectorD > m_r
double dot(const TVectorD &form, const TVectorD &v) const
const TVectorD & xi() const
const TVectorD & xip() const
TMatrixTSym< double > CovMatrix