ATLAS Offline Software
Loading...
Searching...
No Matches
Trk::TrackSurfaceIntersection Class Referencefinal

An intersection with a Surface is given by. More...

#include <TrackSurfaceIntersection.h>

Collaboration diagram for Trk::TrackSurfaceIntersection:

Classes

class  IIntersectionCache
 Base class for cache block. More...

Public Member Functions

 TrackSurfaceIntersection (const Amg::Vector3D &pos, const Amg::Vector3D &dir, double path)
 Constructor.
 TrackSurfaceIntersection ()=default
 ~TrackSurfaceIntersection ()=default
 Destructor.
 TrackSurfaceIntersection (const TrackSurfaceIntersection &other)
 TrackSurfaceIntersection (const TrackSurfaceIntersection &other, std::unique_ptr< IIntersectionCache > cache)
TrackSurfaceIntersectionoperator= (const TrackSurfaceIntersection &other)
 TrackSurfaceIntersection (TrackSurfaceIntersection &&other)=default
TrackSurfaceIntersectionoperator= (TrackSurfaceIntersection &&other)=default
const Amg::Vector3Dposition () const
 Method to retrieve the position of the Intersection.
Amg::Vector3Dposition ()
const Amg::Vector3Ddirection () const
 Method to retrieve the direction at the Intersection.
Amg::Vector3Ddirection ()
double pathlength () const
 Method to retrieve the pathlength propagated till the Intersection.
double & pathlength ()
const IIntersectionCachecache () const
 Retrieve the associated cache block, if it exists.
IIntersectionCachecache ()

Private Attributes

Amg::Vector3D m_position
Amg::Vector3D m_direction
double m_pathlength {0}
std::unique_ptr< IIntersectionCachem_cache

Detailed Description

An intersection with a Surface is given by.

  • a global position
  • a momentum direction (unit vector)
  • the pathlength to go there from the starting point

We can optionally attach an additional block of data (‘cache’) for the private use of a particular intersection tool.

Author
Andre.nosp@m.as.S.nosp@m.alzbu.nosp@m.rger.nosp@m.@cern.nosp@m..ch

Definition at line 32 of file TrackSurfaceIntersection.h.

Constructor & Destructor Documentation

◆ TrackSurfaceIntersection() [1/5]

Trk::TrackSurfaceIntersection::TrackSurfaceIntersection ( const Amg::Vector3D & pos,
const Amg::Vector3D & dir,
double path )

Constructor.

Definition at line 19 of file TrackSurfaceIntersection.cxx.

◆ TrackSurfaceIntersection() [2/5]

Trk::TrackSurfaceIntersection::TrackSurfaceIntersection ( )
default

◆ ~TrackSurfaceIntersection()

Trk::TrackSurfaceIntersection::~TrackSurfaceIntersection ( )
default

Destructor.

◆ TrackSurfaceIntersection() [3/5]

Trk::TrackSurfaceIntersection::TrackSurfaceIntersection ( const TrackSurfaceIntersection & other)

Definition at line 29 of file TrackSurfaceIntersection.cxx.

31 : m_position(other.m_position)
32 , m_direction(other.m_direction)
33 , m_pathlength(other.m_pathlength)
34 , m_cache(other.m_cache ? other.m_cache->clone() : nullptr)
35{
36}
std::unique_ptr< IIntersectionCache > m_cache

◆ TrackSurfaceIntersection() [4/5]

Trk::TrackSurfaceIntersection::TrackSurfaceIntersection ( const TrackSurfaceIntersection & other,
std::unique_ptr< IIntersectionCache > cache )

Definition at line 38 of file TrackSurfaceIntersection.cxx.

41 : m_position(other.m_position)
42 , m_direction(other.m_direction)
43 , m_pathlength(other.m_pathlength)
44 , m_cache(std::move(cache))
45{
46}
const IIntersectionCache * cache() const
Retrieve the associated cache block, if it exists.

◆ TrackSurfaceIntersection() [5/5]

Trk::TrackSurfaceIntersection::TrackSurfaceIntersection ( TrackSurfaceIntersection && other)
default

Member Function Documentation

◆ cache() [1/2]

TrackSurfaceIntersection::IIntersectionCache * Trk::TrackSurfaceIntersection::cache ( )
inline

Definition at line 110 of file TrackSurfaceIntersection.h.

110 {
111 return m_cache.get();
112}

◆ cache() [2/2]

const TrackSurfaceIntersection::IIntersectionCache * Trk::TrackSurfaceIntersection::cache ( ) const
inline

Retrieve the associated cache block, if it exists.

Definition at line 105 of file TrackSurfaceIntersection.h.

105 {
106 return m_cache.get();
107}

◆ direction() [1/2]

Amg::Vector3D & Trk::TrackSurfaceIntersection::direction ( )
inline

Definition at line 92 of file TrackSurfaceIntersection.h.

92 {
93 return m_direction;
94}

◆ direction() [2/2]

const Amg::Vector3D & Trk::TrackSurfaceIntersection::direction ( ) const
inline

Method to retrieve the direction at the Intersection.

Definition at line 88 of file TrackSurfaceIntersection.h.

88 {
89 return m_direction;
90}

◆ operator=() [1/2]

Trk::TrackSurfaceIntersection & Trk::TrackSurfaceIntersection::operator= ( const TrackSurfaceIntersection & other)

Definition at line 49 of file TrackSurfaceIntersection.cxx.

50{
51 if (this != &other) {
52 m_position = other.m_position;
53 m_direction = other.m_direction;
54 m_pathlength = other.m_pathlength;
55 m_cache = other.m_cache ? other.m_cache->clone() : nullptr;
56 }
57 return *this;
58}

◆ operator=() [2/2]

TrackSurfaceIntersection & Trk::TrackSurfaceIntersection::operator= ( TrackSurfaceIntersection && other)
default

◆ pathlength() [1/2]

double & Trk::TrackSurfaceIntersection::pathlength ( )
inline

Definition at line 100 of file TrackSurfaceIntersection.h.

100 {
101 return m_pathlength;
102}

◆ pathlength() [2/2]

double Trk::TrackSurfaceIntersection::pathlength ( ) const
inline

Method to retrieve the pathlength propagated till the Intersection.

Definition at line 96 of file TrackSurfaceIntersection.h.

96 {
97 return m_pathlength;
98}

◆ position() [1/2]

Amg::Vector3D & Trk::TrackSurfaceIntersection::position ( )
inline

Definition at line 84 of file TrackSurfaceIntersection.h.

84 {
85 return m_position;
86}

◆ position() [2/2]

const Amg::Vector3D & Trk::TrackSurfaceIntersection::position ( ) const
inline

Method to retrieve the position of the Intersection.

Definition at line 80 of file TrackSurfaceIntersection.h.

80 {
81 return m_position;
82}

Member Data Documentation

◆ m_cache

std::unique_ptr<IIntersectionCache> Trk::TrackSurfaceIntersection::m_cache
private

Definition at line 77 of file TrackSurfaceIntersection.h.

◆ m_direction

Amg::Vector3D Trk::TrackSurfaceIntersection::m_direction
private

Definition at line 75 of file TrackSurfaceIntersection.h.

◆ m_pathlength

double Trk::TrackSurfaceIntersection::m_pathlength {0}
private

Definition at line 76 of file TrackSurfaceIntersection.h.

76{0};

◆ m_position

Amg::Vector3D Trk::TrackSurfaceIntersection::m_position
private

Definition at line 74 of file TrackSurfaceIntersection.h.


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