ATLAS Offline Software
TrackSurfaceIntersection.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // TrackSurfaceIntersection.cxx, (c) ATLAS Detector software
8 
9 // Trk
11 // Gaudi
12 #include "GaudiKernel/MsgStream.h"
13 // STD
14 #include <iomanip>
15 #include <iostream>
16 
17 // constructor
19  const Amg::Vector3D& pos,
20  const Amg::Vector3D& dir,
21  double path)
22  : m_position(pos)
23  , m_direction(dir)
24  , m_pathlength(path)
25 {
26 }
27 
30  : m_position(other.m_position)
31  , m_direction(other.m_direction)
32  , m_pathlength(other.m_pathlength)
33  , m_cache(other.m_cache ? other.m_cache->clone() : nullptr)
34 {
35 }
36 
39  std::unique_ptr<IIntersectionCache> cache)
40  : m_position(other.m_position)
41  , m_direction(other.m_direction)
42  , m_pathlength(other.m_pathlength)
43  , m_cache(std::move(cache))
44 {
45 }
46 
49 {
50  if (this != &other) {
51  m_position = other.m_position;
52  m_direction = other.m_direction;
53  m_pathlength = other.m_pathlength;
54  m_cache = other.m_cache ? other.m_cache->clone() : nullptr;
55  }
56  return *this;
57 }
58 
59 // Overload of << operator for both, MsgStream and std::ostream for debug output
60 MsgStream&
61 Trk::operator<<(MsgStream& sl, const Trk::TrackSurfaceIntersection& tsfi)
62 {
63  const std::streamsize ss = sl.precision();
64  sl << std::setiosflags(std::ios::fixed);
65  sl << std::setprecision(7);
66  sl << MSG::DEBUG << "Trk::TrackSurfaceIntersection " << std::endl;
67  sl << " position [mm] = (" << tsfi.position().x() << ", "
68  << tsfi.position().y() << ", " << tsfi.position().z() << ")" << std::endl;
69  sl << " direction [mm] = (" << tsfi.direction().x() << ", "
70  << tsfi.direction().y() << ", " << tsfi.direction().z() << ")"
71  << std::endl;
72  sl << " delta pathlength = " << tsfi.pathlength() << std::endl;
73  sl.precision(ss);
74  return sl;
75 }
76 
77 std::ostream&
78 Trk::operator<<(std::ostream& sl, const Trk::TrackSurfaceIntersection& tsfi)
79 {
80  const std::streamsize ss = sl.precision();
81  sl << std::setiosflags(std::ios::fixed);
82  sl << std::setprecision(7);
83  sl << "Trk::TrackSurfaceIntersection " << std::endl;
84  sl << " position [mm] = (" << tsfi.position().x() << ", "
85  << tsfi.position().y() << ", " << tsfi.position().z() << ")" << std::endl;
86  sl << " direction [mm] = (" << tsfi.direction().x() << ", "
87  << tsfi.direction().y() << ", " << tsfi.direction().z() << ")"
88  << std::endl;
89  sl << " delta pathlength = " << tsfi.pathlength() << std::endl;
90  sl.precision(ss);
91  return sl;
92 }
athena.path
path
python interpreter configuration --------------------------------------—
Definition: athena.py:128
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
Trk::TrackSurfaceIntersection
Definition: TrackSurfaceIntersection.h:32
Trk::TrackSurfaceIntersection::pathlength
double pathlength() const
Method to retrieve the pathlength propagated till the Intersection.
Definition: TrackSurfaceIntersection.h:96
python.Utilities.clone
clone
Definition: Utilities.py:134
Trk::TrackSurfaceIntersection::position
const Amg::Vector3D & position() const
Method to retrieve the position of the Intersection.
Definition: TrackSurfaceIntersection.h:80
beamspotman.dir
string dir
Definition: beamspotman.py:623
Trk::TrackSurfaceIntersection::TrackSurfaceIntersection
TrackSurfaceIntersection()=default
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::TrackSurfaceIntersection::direction
const Amg::Vector3D & direction() const
Method to retrieve the direction at the Intersection.
Definition: TrackSurfaceIntersection.h:88
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
Trk::operator<<
MsgStream & operator<<(MsgStream &sl, const AlignModule &alignModule)
overload of << operator for MsgStream for debug output
Definition: AlignModule.cxx:204
DEBUG
#define DEBUG
Definition: page_access.h:11
TrackSurfaceIntersection.h
Trk::TrackSurfaceIntersection::operator=
TrackSurfaceIntersection & operator=(const TrackSurfaceIntersection &other)
Definition: TrackSurfaceIntersection.cxx:48