|
ATLAS Offline Software
|
Go to the documentation of this file.
10 std::cout <<
"Reading parameterization from file: \"" <<
filename <<
"\"" <<
'\n';
16 errorMsg <<
"Parameterization::load(): \tCould not open parameterization file: \"" <<
filename <<
"\"";
17 throw std::runtime_error(
errorMsg.str().data());
20 while (
file.peek() ==
'#') {
33 file.ignore(1000,
'\n');
36 std::vector<std::unique_ptr<TF1>>
poly;
40 for (
int iEqu = 0; iEqu < m_numberOfEquations; iEqu++) {
41 file.ignore(1000,
'\n');
42 std::vector<double>
coef;
44 for (
int iPoly = 0; iPoly < m_numberOfPolynomials; iPoly++) {
49 for (
int i = 0;
i <=
N;
i++) {
53 <<
"\" does not contain a correct parameterization";
54 throw std::runtime_error(
errorMsg.str().data());
61 file.ignore(1000,
'\n');
64 name.Form(
"pol%d",
N);
65 auto temp = std::make_unique<TF1>(
name,
name);
66 for (
int iCoef = 0; iCoef <=
N; ++iCoef) {
67 temp->SetParameter(iCoef,
coef.at(iCoef));
71 if (iEqu == 1 or iEqu == 3) {
72 m_yIsUsed = m_yIsUsed or not (
N == 0 and
coef[0] == 0);
75 poly.push_back(std::move(temp));
79 m_equation.push_back(std::make_unique<Equation>(m_energy, std::move(
poly)));
83 std::cout <<
"Finished reading parameterization: \"" <<
filename <<
"\"\n\n";
114 return v0 + v1 +
v2 + v3 + v4 + v5 + v6 + v7;
const TF1 * getPolynomial(int iPoly) const
Returns const raw poiner to polynomial of number iPoly.
const Equation * getEquation(int iEqu) const
Returns const raw pointer to equation of number iEqu.
Header file for interface of SiGlobAlignDBTool used to read global alignment for database.
std::array< double, 2 > m_slopeInitIP
Crossing angles in rad.
constexpr double poly(const double x)
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.
Parameterization(std::string_view filename)
Takes filename of parametrization file as argument.
double sy(double x0, double y0, double z0, double sx0, double sy0, double E) const
Evaluates value of vertical slope equation.
std::array< double, 3 > m_positionInitIP
Initial vertex postition.
double m_energy
Nominal energy of proton.
double sx(double x0, double y0, double z0, double sx0, double sy0, double E) const
Evaluates value of horizontal slope equation.
double y(double x0, double y0, double z0, double sx0, double sy0, double E) const
Evaluates value of vertical position equation.
double x(double x0, double y0, double z0, double sx0, double sy0, double E) const
Evaluates value of horizontal position equation.