ATLAS Offline Software
CurvilinearUVT.icc
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 namespace Trk {
6 
7 inline CurvilinearUVT::CurvilinearUVT(const Amg::Vector3D& dir)
8  : m_curvT(dir)
9 {
10  // make it safe for tracks progressing along the z axis
11  if (std::abs(dir.normalized().dot(Amg::Vector3D::UnitZ())) < 0.99) {
12  Amg::Vector3D curvZcrossT = -(m_curvT.cross(Amg::Vector3D::UnitZ()));
13  m_curvU = curvZcrossT.normalized();
14  m_curvV = m_curvT.cross(m_curvU);
15  } else {
16  Amg::Vector3D curvZcrossT = -(m_curvT.cross(Amg::Vector3D::UnitX()));
17  m_curvU = curvZcrossT.normalized();
18  m_curvV = m_curvT.cross(m_curvU);
19  }
20 }
21 
22 inline const Amg::Vector3D&
23 CurvilinearUVT::curvU() const
24 {
25  return (m_curvU);
26 }
27 
28 inline const Amg::Vector3D&
29 CurvilinearUVT::curvV() const
30 {
31  return (m_curvV);
32 }
33 
34 inline const Amg::Vector3D&
35 CurvilinearUVT::curvT() const
36 {
37  return (m_curvT);
38 }
39 
40 }