ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
Trk::RealQuadraticEquation Struct Reference

#include <RealQuadraticEquation.h>

Collaboration diagram for Trk::RealQuadraticEquation:

Public Member Functions

 RealQuadraticEquation (double alpha, double beta, double gamma)
 
 RealQuadraticEquation (double alpha, double beta, double gamma)
 

Public Attributes

double first
 
double second
 
RQESolutionType solutions
 

Detailed Description

Definition at line 51 of file TrkDetDescr/TrkSurfaces/TrkSurfaces/RealQuadraticEquation.h.

Constructor & Destructor Documentation

◆ RealQuadraticEquation() [1/2]

Trk::RealQuadraticEquation::RealQuadraticEquation ( double  alpha,
double  beta,
double  gamma 
)
inline

Definition at line 58 of file TrkDetDescr/TrkSurfaces/TrkSurfaces/RealQuadraticEquation.h.

59  : first(0.)
60  , second(0.)
61  {
62  double discriminant = beta * beta - 4 * alpha * gamma;
63  if (discriminant < 0)
64  solutions = none;
65  else {
66  solutions = (discriminant == 0) ? one : two;
67  double q = -0.5 * (beta + (beta > 0 ? sqrt(discriminant) : -sqrt(discriminant)));
68  first = q / alpha;
69  second = gamma / q;
70  }
71  }

◆ RealQuadraticEquation() [2/2]

Trk::RealQuadraticEquation::RealQuadraticEquation ( double  alpha,
double  beta,
double  gamma 
)
inline

Definition at line 60 of file TrkExtrapolation/TrkExUtils/TrkExUtils/RealQuadraticEquation.h.

61  : first{}
62  , second{}
63  {
64  double discriminant = beta * beta - 4 * alpha * gamma;
65  if (discriminant < 0)
66  solutions = none;
67  else {
68  solutions = (discriminant == 0) ? one : two;
69  double q =
70  -0.5 * (beta + (beta > 0 ? sqrt(discriminant) : -sqrt(discriminant)));
71  first = q / alpha;
72  second = gamma / q;
73  }
74  }

Member Data Documentation

◆ first

double Trk::RealQuadraticEquation::first

◆ second

double Trk::RealQuadraticEquation::second

◆ solutions

RQESolutionType Trk::RealQuadraticEquation::solutions

The documentation for this struct was generated from the following file:
Trk::RealQuadraticEquation::second
double second
Definition: TrkDetDescr/TrkSurfaces/TrkSurfaces/RealQuadraticEquation.h:55
Trk::none
@ none
Definition: TrkDetDescr/TrkSurfaces/TrkSurfaces/RealQuadraticEquation.h:21
Trk::one
@ one
Definition: TrkDetDescr/TrkSurfaces/TrkSurfaces/RealQuadraticEquation.h:22
Trk::RealQuadraticEquation::solutions
RQESolutionType solutions
Definition: TrkDetDescr/TrkSurfaces/TrkSurfaces/RealQuadraticEquation.h:56
Trk::two
@ two
Definition: TrkDetDescr/TrkSurfaces/TrkSurfaces/RealQuadraticEquation.h:23
TrigVtx::gamma
@ gamma
Definition: TrigParticleTable.h:26
TauJetParameters::discriminant
@ discriminant
Definition: TauJetParameters.h:166
Trk::RealQuadraticEquation::first
double first
Definition: TrkDetDescr/TrkSurfaces/TrkSurfaces/RealQuadraticEquation.h:54
extractSporadic.q
list q
Definition: extractSporadic.py:98
MuonParameters::beta
@ beta
Definition: MuonParamDefs.h:144