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

#include <LineIntersection2D.h>

Collaboration diagram for Trk::LineIntersection2D:

Public Member Functions

 LineIntersection2D (double x1, double y1, double x2, double y2, double X1, double Y1, double X2, double Y2)
 

Public Attributes

bool valid
 
double interX
 
double interY
 
double k
 
double K
 
double d
 
double D
 

Detailed Description

Definition at line 31 of file LineIntersection2D.h.

Constructor & Destructor Documentation

◆ LineIntersection2D()

Trk::LineIntersection2D::LineIntersection2D ( double  x1,
double  y1,
double  x2,
double  y2,
double  X1,
double  Y1,
double  X2,
double  Y2 
)
inline

Definition at line 39 of file LineIntersection2D.h.

47  {
48  // diffs, k's and d's
49  double deltax = x2 - x1;
50  double deltay = y2 - y1;
51  double deltaX = X2 - X1;
52  double deltaY = Y2 - Y1;
53  k = deltay / deltax;
54  K = deltaY / deltaX;
55  d = y2 - k * x2;
56  D = Y2 - K * X2;
57  // check if valid
58  valid = ((k - K) * (k - K) > NUMERICALSTABLE);
59  if (valid) {
60  interX = (D - d) / (k - K);
61  interY = interX * k + d;
62  } else {
63  interX = -99999.;
64  interY = -99999.;
65  }
66  }

Member Data Documentation

◆ d

double Trk::LineIntersection2D::d

Definition at line 37 of file LineIntersection2D.h.

◆ D

double Trk::LineIntersection2D::D

Definition at line 37 of file LineIntersection2D.h.

◆ interX

double Trk::LineIntersection2D::interX

Definition at line 35 of file LineIntersection2D.h.

◆ interY

double Trk::LineIntersection2D::interY

Definition at line 36 of file LineIntersection2D.h.

◆ k

double Trk::LineIntersection2D::k

Definition at line 37 of file LineIntersection2D.h.

◆ K

double Trk::LineIntersection2D::K

Definition at line 37 of file LineIntersection2D.h.

◆ valid

bool Trk::LineIntersection2D::valid

Definition at line 34 of file LineIntersection2D.h.


The documentation for this struct was generated from the following file:
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
NUMERICALSTABLE
#define NUMERICALSTABLE
Definition: LineIntersection2D.h:16
Trk::LineIntersection2D::k
double k
Definition: LineIntersection2D.h:37
makeComparison.deltaY
int deltaY
Definition: makeComparison.py:44
Trk::LineIntersection2D::K
double K
Definition: LineIntersection2D.h:37
plotBeamSpotCompare.x2
x2
Definition: plotBeamSpotCompare.py:218
makeTRTBarrelCans.y1
tuple y1
Definition: makeTRTBarrelCans.py:15
Trk::LineIntersection2D::interX
double interX
Definition: LineIntersection2D.h:35
makeTRTBarrelCans.y2
tuple y2
Definition: makeTRTBarrelCans.py:18
compareGeometries.deltaX
float deltaX
Definition: compareGeometries.py:32
Trk::LineIntersection2D::interY
double interY
Definition: LineIntersection2D.h:36
Trk::LineIntersection2D::d
double d
Definition: LineIntersection2D.h:37
Trk::LineIntersection2D::D
double D
Definition: LineIntersection2D.h:37
Trk::LineIntersection2D::valid
bool valid
Definition: LineIntersection2D.h:34