11#include <framework/logging/Logger.h>
39 return (this->*f)(trkAngle) ;
107 TF1* f = (TF1*) gROOT->GetFunction(TString::Format(
"chebyshev%lu",
m_chebyCoeffs.size() - 1));
110 return f->Eval(trkAngle);
127 TGraph* g =
new TGraph(
m_x.size(), &
m_x[0], &
m_y[0]);
128 double returnvalue = g->Eval(trkAngle);
class to contain the MC fudge factor formulae
std::vector< double > m_chebyCoeffs
function parameters & implementations
void set_graphPoints(std::vector< double > x, std::vector< double > y)
Set vectors of TGraph points (x for angles, y for sigmas) Input:
int m_current
current function ID
SVDMCFudgeFactorFunction & operator=(const Belle2::SVDMCFudgeFactorFunction &a)
operator =
double tgraph_v0(double trkAngle) const
tgraph_v0 implementation
double cheby_v0(double trkAngle) const
cheby_v0 implementation
ClassDef(SVDMCFudgeFactorFunction, 2)
Do not stream this, please throw it in the WC.
void set_chebyCoeffs(std::vector< double > c)
Set the vector of Chebyshev coefficients Input:
double getFudgeFactor(double trkAngle) const
returns the fudge factor, depending on the track's angle
double(SVDMCFudgeFactorFunction::* fudgeFactorFunction)(double) const
typedef of the return value of the fudge factor function
std::vector< double > m_y
Vectors of TGraph points for the sigmas.
SVDMCFudgeFactorFunction()
constructor
void set_current(int current)
allows to choose the function version
std::vector< double > m_x
ID = {1}, rel07: fudge factor parametrized with linear interpolation between graph points.
static std::vector< fudgeFactorFunction > m_implementations
vector of functions for fudge factor computation, we use the m_current
Abstract base class for different kinds of events.