ATLAS Offline Software
Loading...
Searching...
No Matches
Trk::RealLinearEquation Struct Reference

Mathematic struct for solving real linear equation. More...

#include <RealLinearEquation.h>

Collaboration diagram for Trk::RealLinearEquation:

Public Member Functions

 RealLinearEquation (double px, double py, double k, double xprime)

Public Attributes

double yOfX
 the result of x
double segLength
 length of the line segment

Detailed Description

Mathematic struct for solving real linear equation.

Mathematical motivation:

  • 2D: The equation is given by:
    \( y(x') = k \cdot x' + d \)

    The constructor is called from a point \( p=(p_x,p_y) \) that fullfills the equation, an incline \( k \) and a parameter \( x' \).

Author
Andre.nosp@m.as.S.nosp@m.alzbu.nosp@m.rger.nosp@m.@cern.nosp@m..ch

Definition at line 31 of file RealLinearEquation.h.

Constructor & Destructor Documentation

◆ RealLinearEquation()

Trk::RealLinearEquation::RealLinearEquation ( double px,
double py,
double k,
double xprime )
inline

Definition at line 37 of file RealLinearEquation.h.

38 {
39 double deltax = xprime - px;
40 yOfX = py + k * (deltax);
41 double deltay = yOfX - py;
42 segLength = sqrt(deltax * deltax + deltay * deltay);
43 }
@ px
Definition ParamDefs.h:59
@ py
Definition ParamDefs.h:60
double yOfX
the result of x
double segLength
length of the line segment

Member Data Documentation

◆ segLength

double Trk::RealLinearEquation::segLength

length of the line segment

Definition at line 35 of file RealLinearEquation.h.

◆ yOfX

double Trk::RealLinearEquation::yOfX

the result of x

Definition at line 34 of file RealLinearEquation.h.


The documentation for this struct was generated from the following file: