ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
AFPProtonTransportParam Class Reference

Class for the parameterization used by the proton transport tool. More...

#include <AFPProtonTransportParam.h>

Collaboration diagram for AFPProtonTransportParam:

Public Member Functions

 AFPProtonTransportParam (double beam_energy, AFPProtonTransportPolynomial *poly_array[8])
 Constructor which sets m_energy and m_polynomial. More...
 
 ~AFPProtonTransportParam ()
 Destructor of the class. It deletes the polynomial objects set in the constructor. More...
 
double evaluate (double x0, double y0, double z0, double sx, double sy, double E) const
 This function evaluates value of the parameterization given a certain polynomial. It takes as arguments the inital position, slope and nominal energy and uses it along with the polynomial objects given to the constructor to calculate the value of the parameterization. More...
 

Private Attributes

double m_energy
 Nominal beam energy. More...
 
AFPProtonTransportPolynomialm_polynomial [8]
 Object of the AFPProtonTransportPolynomial class used for the position calculations. More...
 

Detailed Description

Class for the parameterization used by the proton transport tool.

This class calculates the parameterization for a given polynomial. Using the given polynomial and the inital positon, slope and nominal beam energy it can calculate the parameterization.

Definition at line 16 of file AFPProtonTransportParam.h.

Constructor & Destructor Documentation

◆ AFPProtonTransportParam()

AFPProtonTransportParam::AFPProtonTransportParam ( double  beam_energy,
AFPProtonTransportPolynomial poly_array[8] 
)

Constructor which sets m_energy and m_polynomial.

Parameters
beam_energynominal beam energy
poly_arrayarray of pointers to 8 polynomials with transport parametrisation

Definition at line 7 of file AFPProtonTransportParam.cxx.

7  {
9  for (int i = 0; i < 8; i++) m_polynomial[i] = poly_array[i];
10 }

◆ ~AFPProtonTransportParam()

AFPProtonTransportParam::~AFPProtonTransportParam ( )

Destructor of the class. It deletes the polynomial objects set in the constructor.

Definition at line 12 of file AFPProtonTransportParam.cxx.

12  {
13  for (int i = 0; i < 8; i++)
14  delete m_polynomial[i];
15 }

Member Function Documentation

◆ evaluate()

double AFPProtonTransportParam::evaluate ( double  x0,
double  y0,
double  z0,
double  sx,
double  sy,
double  E 
) const

This function evaluates value of the parameterization given a certain polynomial. It takes as arguments the inital position, slope and nominal energy and uses it along with the polynomial objects given to the constructor to calculate the value of the parameterization.

Definition at line 17 of file AFPProtonTransportParam.cxx.

17  {
18  const double xi = (m_energy - E) / m_energy;
19 
20  double v0 = m_polynomial[0]->evaluate(xi);
21  double v1 = x0 * m_polynomial[1]->evaluate(xi);
22  double v2 = y0 * m_polynomial[2]->evaluate(xi);
23  double v3 = z0 * m_polynomial[3]->evaluate(xi);
24  double v4 = sx0 * m_polynomial[4]->evaluate(xi);
25  double v5 = sy0 * m_polynomial[5]->evaluate(xi);
26  double v6 = z0 * sx0 * m_polynomial[6]->evaluate(xi);
27  double v7 = z0 * sy0 * m_polynomial[7]->evaluate(xi);
28 
29  double value = v0 + v1 + v2 + v3 + v4 + v5 + v6 + v7;
30 
31  return value;
32 }

Member Data Documentation

◆ m_energy

double AFPProtonTransportParam::m_energy
private

Nominal beam energy.

Definition at line 30 of file AFPProtonTransportParam.h.

◆ m_polynomial

AFPProtonTransportPolynomial* AFPProtonTransportParam::m_polynomial[8]
private

Object of the AFPProtonTransportPolynomial class used for the position calculations.

Definition at line 32 of file AFPProtonTransportParam.h.


The documentation for this class was generated from the following files:
athena.value
value
Definition: athena.py:124
AFPProtonTransportPolynomial::evaluate
double evaluate(double x) const
This function of returns the sum of the polynomial coeficients of a given argument x.
Definition: AFPProtonTransportPolynomial.cxx:32
parseMapping.v0
def v0
Definition: parseMapping.py:149
lumiFormat.i
int i
Definition: lumiFormat.py:85
trigbs_createHLTBSTestFile.beam_energy
beam_energy
Definition: trigbs_createHLTBSTestFile.py:124
TRT::Track::z0
@ z0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:63
MuonR4::SegmentFit::ParamDefs::x0
@ x0
MuonR4::SegmentFit::ParamDefs::y0
@ y0
VP1PartSpect::E
@ E
Definition: VP1PartSpectFlags.h:21
ReadCellNoiseFromCoolCompare.v2
v2
Definition: ReadCellNoiseFromCoolCompare.py:364
AFPProtonTransportParam::m_energy
double m_energy
Nominal beam energy.
Definition: AFPProtonTransportParam.h:30
AFPProtonTransportParam::m_polynomial
AFPProtonTransportPolynomial * m_polynomial[8]
Object of the AFPProtonTransportPolynomial class used for the position calculations.
Definition: AFPProtonTransportParam.h:32