ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
AFP::Parameterization::Equation Class Reference

Local class for storing parameterization equation. More...

Collaboration diagram for AFP::Parameterization::Equation:

Public Member Functions

 Equation (double energy, std::vector< std::unique_ptr< TF1 >> polynomial)
 Takes nominal energy and vector of polynomials as arguments. More...
 
double evaluate (double x, double y, double z, double sx, double sy, double E) const
 Evaluates value of function with given initial positions, slopes and energy. More...
 
const TF1 * getPolynomial (int iPoly) const
 Returns const raw poiner to polynomial of number iPoly. More...
 

Private Attributes

double m_energy
 Nominal energy of proton. More...
 
std::vector< std::unique_ptr< TF1 > > m_polynomial
 Vector of TF1 polynomials. More...
 

Detailed Description

Local class for storing parameterization equation.

Definition at line 26 of file Parameterization.h.

Constructor & Destructor Documentation

◆ Equation()

AFP::Parameterization::Equation::Equation ( double  energy,
std::vector< std::unique_ptr< TF1 >>  polynomial 
)
inline

Takes nominal energy and vector of polynomials as arguments.

Definition at line 29 of file Parameterization.h.

29 : m_energy(energy), m_polynomial(std::move(polynomial)) {}

Member Function Documentation

◆ evaluate()

double AFP::Parameterization::Equation::evaluate ( double  x,
double  y,
double  z,
double  sx,
double  sy,
double  E 
) const

Evaluates value of function with given initial positions, slopes and energy.

Definition at line 102 of file Parameterization.cxx.

102  {
103  const double xi = (m_energy - E)/m_energy;
104 
105  const double v0 = getPolynomial(0)->Eval(xi);
106  const double v1 = x * getPolynomial(1)->Eval(xi);
107  const double v2 = y * getPolynomial(2)->Eval(xi);
108  const double v3 = z * getPolynomial(3)->Eval(xi);
109  const double v4 = sx * getPolynomial(4)->Eval(xi);
110  const double v5 = sy * getPolynomial(5)->Eval(xi);
111  const double v6 = z*sx * getPolynomial(6)->Eval(xi);
112  const double v7 = z*sy * getPolynomial(7)->Eval(xi);
113 
114  return v0 + v1 + v2 + v3 + v4 + v5 + v6 + v7;
115  }

◆ getPolynomial()

const TF1* AFP::Parameterization::Equation::getPolynomial ( int  iPoly) const
inline

Returns const raw poiner to polynomial of number iPoly.

Definition at line 35 of file Parameterization.h.

35 { return m_polynomial.at(iPoly).get(); };

Member Data Documentation

◆ m_energy

double AFP::Parameterization::Equation::m_energy
private

Nominal energy of proton.

Definition at line 39 of file Parameterization.h.

◆ m_polynomial

std::vector<std::unique_ptr<TF1> > AFP::Parameterization::Equation::m_polynomial
private

Vector of TF1 polynomials.

Definition at line 42 of file Parameterization.h.


The documentation for this class was generated from the following files:
AFP::Parameterization::Equation::getPolynomial
const TF1 * getPolynomial(int iPoly) const
Returns const raw poiner to polynomial of number iPoly.
Definition: Parameterization.h:35
parseMapping.v0
def v0
Definition: parseMapping.py:149
z
#define z
AFP::Parameterization::Equation::m_polynomial
std::vector< std::unique_ptr< TF1 > > m_polynomial
Vector of TF1 polynomials.
Definition: Parameterization.h:42
VP1PartSpect::E
@ E
Definition: VP1PartSpectFlags.h:21
AFP::Parameterization::sy
double sy(double x0, double y0, double z0, double sx0, double sy0, double E) const
Evaluates value of vertical slope equation.
Definition: Parameterization.cxx:98
ReadCellNoiseFromCoolCompare.v2
v2
Definition: ReadCellNoiseFromCoolCompare.py:364
AFP::Parameterization::Equation::m_energy
double m_energy
Nominal energy of proton.
Definition: Parameterization.h:35
AFP::Parameterization::sx
double sx(double x0, double y0, double z0, double sx0, double sy0, double E) const
Evaluates value of horizontal slope equation.
Definition: Parameterization.cxx:94
AFP::Parameterization::energy
double energy() const
Returns nominal energy for which parametrization was performed.
Definition: Parameterization.h:66
AFP::Parameterization::y
double y(double x0, double y0, double z0, double sx0, double sy0, double E) const
Evaluates value of vertical position equation.
Definition: Parameterization.cxx:90
AFP::Parameterization::x
double x(double x0, double y0, double z0, double sx0, double sy0, double E) const
Evaluates value of horizontal position equation.
Definition: Parameterization.cxx:86