ATLAS Offline Software
Loading...
Searching...
No Matches
Trk::TrkPlanarSurface Class Reference

#include <TrkPlanarSurface.h>

Collaboration diagram for Trk::TrkPlanarSurface:

Public Member Functions

 TrkPlanarSurface (const double Center[3], const double Normal[3], double Transform[3][3], double, const Surface *pS=0)
 ~TrkPlanarSurface ()=default
const double * getParameters ()
double getPar (int)
double radiusVector () const
const double * getCenter ()
const double * getNormal ()
double getRotMatrix (int, int)
double getInvRotMatrix (int, int)
double getRadLength () const
double calculateCombinedMatrix (int, int, TrkPlanarSurface *)
void rotateVectorToLocal (const double *, double *)
void rotateVectorToGlobal (const double *, double *)
void transformPointToLocal (const double *, double *)
void transformPointToGlobal (const double *, double *)
void setBreakPoint (double)
void unsetBreakPoint ()
bool isBreakPoint () const
double getInput () const
void report ()
const SurfacegetTrkSurface ()

Private Member Functions

void calculateInverseTransform ()

Private Attributes

double m_Params [4] {}
double m_Center [3] {}
double m_Normal [3] {}
double m_M [3][3] {}
double m_L [3][3] {}
double m_Rc
double m_radLength
double m_input
bool m_breakPoint
const Surfacem_trkSurface

Detailed Description

Constructor & Destructor Documentation

◆ TrkPlanarSurface()

TrkPlanarSurface::TrkPlanarSurface ( const double Center[3],
const double Normal[3],
double Transform[3][3],
double rl,
const Surface * pS = 0 )

Definition at line 23 of file TrkPlanarSurface.cxx.

25 : m_Rc(0.0), m_radLength(rl), m_input{}, m_trkSurface(pS) {
26 int i, j;
27
28 m_Params[3] = 0.0;
29
30 for (i = 0; i < 3; i++) {
31 m_Center[i] = c[i];
32 m_Normal[i] = n[i];
33 m_Params[i] = n[i];
34 m_Params[3] -= n[i] * c[i];
35 m_Rc += c[i] * c[i];
36 }
37 for (i = 0; i < 3; i++) {
38 for (j = 0; j < 3; j++)
39 m_L[i][j] = m[i][j];
40 }
41 m_Rc = sqrt(m_Rc);
43 m_breakPoint = false;
44}

◆ ~TrkPlanarSurface()

Trk::TrkPlanarSurface::~TrkPlanarSurface ( )
default

Member Function Documentation

◆ calculateCombinedMatrix()

double TrkPlanarSurface::calculateCombinedMatrix ( int i,
int j,
TrkPlanarSurface * pS )

Definition at line 92 of file TrkPlanarSurface.cxx.

92 {
93 double rc = 0;
94
95 for (int m = 0; m < 3; m++) rc += pS->m_M[i][m] * m_L[m][j];
96 return rc;
97 }
static Double_t rc

◆ calculateInverseTransform()

void TrkPlanarSurface::calculateInverseTransform ( )
private

Definition at line 50 of file TrkPlanarSurface.cxx.

50 {
51 m_M[0][0] = m_L[1][1] * m_L[2][2] - m_L[1][2] * m_L[2][1];
52 m_M[1][0] = -m_L[1][0] * m_L[2][2] + m_L[1][2] * m_L[2][0];
53 m_M[2][0] = m_L[1][0] * m_L[2][1] - m_L[1][1] * m_L[2][0];
54 m_M[0][1] = -m_L[0][1] * m_L[2][2] + m_L[0][2] * m_L[2][1];
55 m_M[1][1] = m_L[0][0] * m_L[2][2] - m_L[0][2] * m_L[2][0];
56 m_M[2][1] = -m_L[0][0] * m_L[2][1] + m_L[0][1] * m_L[2][0];
57 m_M[0][2] = m_L[0][1] * m_L[1][2] - m_L[0][2] * m_L[1][1];
58 m_M[1][2] = -m_L[0][0] * m_L[1][2] + m_L[0][2] * m_L[1][0];
59 m_M[2][2] = m_L[0][0] * m_L[1][1] - m_L[0][1] * m_L[1][0];
60 }

◆ getCenter()

const double * TrkPlanarSurface::getCenter ( )

Definition at line 64 of file TrkPlanarSurface.cxx.

64 {
65 return &m_Center[0];
66 }

◆ getInput()

double TrkPlanarSurface::getInput ( ) const

Definition at line 143 of file TrkPlanarSurface.cxx.

143 {
144 return m_input;
145 }

◆ getInvRotMatrix()

double TrkPlanarSurface::getInvRotMatrix ( int i,
int j )

Definition at line 88 of file TrkPlanarSurface.cxx.

88 {
89 return m_L[i][j];
90 }

◆ getNormal()

const double * TrkPlanarSurface::getNormal ( )

Definition at line 72 of file TrkPlanarSurface.cxx.

72 {
73 return &m_Normal[0];
74 }

◆ getPar()

double TrkPlanarSurface::getPar ( int i)

Definition at line 80 of file TrkPlanarSurface.cxx.

80 {
81 return m_Params[i];
82 }

◆ getParameters()

const double * TrkPlanarSurface::getParameters ( )

Definition at line 76 of file TrkPlanarSurface.cxx.

76 {
77 return &m_Params[0];
78 }

◆ getRadLength()

double TrkPlanarSurface::getRadLength ( ) const

Definition at line 129 of file TrkPlanarSurface.cxx.

129 {
130 //return 0.022;
131 return m_radLength;
132 }

◆ getRotMatrix()

double TrkPlanarSurface::getRotMatrix ( int i,
int j )

Definition at line 84 of file TrkPlanarSurface.cxx.

84 {
85 return m_M[i][j];
86 }

◆ getTrkSurface()

const Surface * TrkPlanarSurface::getTrkSurface ( )

Definition at line 46 of file TrkPlanarSurface.cxx.

46 {
47 return m_trkSurface;
48 }

◆ isBreakPoint()

bool TrkPlanarSurface::isBreakPoint ( ) const

Definition at line 139 of file TrkPlanarSurface.cxx.

139 {
140 return m_breakPoint;
141 }

◆ radiusVector()

double TrkPlanarSurface::radiusVector ( ) const

Definition at line 68 of file TrkPlanarSurface.cxx.

68 {
69 return m_Rc;
70 }

◆ report()

void TrkPlanarSurface::report ( )

Definition at line 147 of file TrkPlanarSurface.cxx.

147 {
148 printf("SURFACE: CENTER x=%f y=%f z=%f R=%f\n", m_Center[0], m_Center[1], m_Center[2], m_Rc);
149 printf(" NORMAL nx=%f ny=%f nz=%f\n", m_Normal[0], m_Normal[1], m_Normal[2]);
150 printf("EQUATION: (%f)x+(%f)y+(%f)z+(%f)=0\n", m_Params[0], m_Params[1], m_Params[2], m_Params[3]);
151 for (auto & i : m_M) {
152 for (double j : i) printf("%f ", j);
153 printf("\n");
154 }
155 }

◆ rotateVectorToGlobal()

void TrkPlanarSurface::rotateVectorToGlobal ( const double * X,
double * Y )

Definition at line 106 of file TrkPlanarSurface.cxx.

106 {
107 int i;
108
109 for (i = 0; i < 3; i++)
110 Y[i] = m_L[i][0] * X[0] + m_L[i][1] * X[1] + m_L[i][2] * X[2];
111 }

◆ rotateVectorToLocal()

void TrkPlanarSurface::rotateVectorToLocal ( const double * X,
double * Y )

Definition at line 99 of file TrkPlanarSurface.cxx.

99 {
100 int i;
101
102 for (i = 0; i < 3; i++)
103 Y[i] = m_M[i][0] * X[0] + m_M[i][1] * X[1] + m_M[i][2] * X[2];
104 }

◆ setBreakPoint()

void TrkPlanarSurface::setBreakPoint ( double u)

Definition at line 134 of file TrkPlanarSurface.cxx.

134 {
135 m_breakPoint = true;
136 m_input = u;
137 }
@ u
Enums for curvilinear frames.
Definition ParamDefs.h:77

◆ transformPointToGlobal()

void TrkPlanarSurface::transformPointToGlobal ( const double * X,
double * Y )

Definition at line 122 of file TrkPlanarSurface.cxx.

122 {
123 int i;
124
125 for (i = 0; i < 3; i++)
126 Y[i] = m_Center[i] + m_L[i][0] * X[0] + m_L[i][1] * X[1] + m_L[i][2] * X[2];
127 }

◆ transformPointToLocal()

void TrkPlanarSurface::transformPointToLocal ( const double * X,
double * Y )

Definition at line 113 of file TrkPlanarSurface.cxx.

113 {
114 int i;
115
116 for (i = 0; i < 3; i++)
117 Y[i] = m_M[i][0] * (X[0] - m_Center[0]) +
118 m_M[i][1] * (X[1] - m_Center[1]) +
119 m_M[i][2] * (X[2] - m_Center[2]);
120 }

◆ unsetBreakPoint()

void Trk::TrkPlanarSurface::unsetBreakPoint ( )
inline

Member Data Documentation

◆ m_breakPoint

bool Trk::TrkPlanarSurface::m_breakPoint
private

◆ m_Center

double Trk::TrkPlanarSurface::m_Center[3] {}
private

◆ m_input

double Trk::TrkPlanarSurface::m_input
private

◆ m_L

double Trk::TrkPlanarSurface::m_L[3][3] {}
private

◆ m_M

double Trk::TrkPlanarSurface::m_M[3][3] {}
private

◆ m_Normal

double Trk::TrkPlanarSurface::m_Normal[3] {}
private

◆ m_Params

double Trk::TrkPlanarSurface::m_Params[4] {}
private

◆ m_radLength

double Trk::TrkPlanarSurface::m_radLength
private

◆ m_Rc

double Trk::TrkPlanarSurface::m_Rc
private

◆ m_trkSurface

const Surface* Trk::TrkPlanarSurface::m_trkSurface
private

The documentation for this class was generated from the following files: