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

Class to decide and return which approaching surface to be taken. More...

#include <ApproachDescriptor.h>

Inheritance diagram for Trk::ApproachDescriptor:
Collaboration diagram for Trk::ApproachDescriptor:

Public Member Functions

 ApproachDescriptor (std::unique_ptr< ApproachSurfaces > aSurfaces, bool rebuild=true)
 ApproachDescriptor (std::unique_ptr< BinnedArray< const ApproachSurfaces > > aSurfaceArray, std::unique_ptr< Surface > aSurfaceArraySurface=nullptr)
virtual const ApproachSurfacesapproachSurfaces (const Amg::Vector3D &pos, const Amg::Vector3D &dir) const override final
 get the compatible surfaces
void registerLayer (const Layer &lay)
bool rebuild () const

Protected Attributes

std::unique_ptr< ApproachSurfacesm_approachSurfaces
std::unique_ptr< Surfacem_approachSurfaceArraySurface
std::unique_ptr< BinnedArray< const ApproachSurfaces > > m_approachSurfaceArray
bool m_rebuild

Private Member Functions

void registerLayerToSurfaces (const Layer &lay, const ApproachSurfaces &aSurfaces)

Detailed Description

Class to decide and return which approaching surface to be taken.

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

Definition at line 24 of file ApproachDescriptor.h.

Constructor & Destructor Documentation

◆ ApproachDescriptor() [1/2]

Trk::ApproachDescriptor::ApproachDescriptor ( std::unique_ptr< ApproachSurfaces > aSurfaces,
bool rebuild = true )
inline

Definition at line 28 of file ApproachDescriptor.h.

30 : IApproachDescriptor(std::move(aSurfaces), rebuild)
31 {}
IApproachDescriptor(std::unique_ptr< ApproachSurfaces > aSurfaces, bool rebuild=true)

◆ ApproachDescriptor() [2/2]

Trk::ApproachDescriptor::ApproachDescriptor ( std::unique_ptr< BinnedArray< const ApproachSurfaces > > aSurfaceArray,
std::unique_ptr< Surface > aSurfaceArraySurface = nullptr )
inline

Definition at line 34 of file ApproachDescriptor.h.

37 : IApproachDescriptor(std::move(aSurfaceArray), std::move(aSurfaceArraySurface))
38 {}

Member Function Documentation

◆ approachSurfaces()

const Trk::ApproachSurfaces * Trk::ApproachDescriptor::approachSurfaces ( const Amg::Vector3D & pos,
const Amg::Vector3D & dir ) const
finaloverridevirtual

get the compatible surfaces

  • return : a boolean indicating if an actual intersection had been tried
  • fill vector of intersections
  • primary bin surface : sf
  • position & direction : pos, dir

Implements Trk::IApproachDescriptor.

Definition at line 12 of file ApproachDescriptor.cxx.

13 {
14 // return the single approach surfaces
15 if (m_approachSurfaces) return (m_approachSurfaces.get());
16 // there's new surface given
18 Trk::Intersection asInter =
19 m_approachSurfaceArraySurface->straightLineIntersection(pos, dir);
20 if (asInter.valid)
21 return (m_approachSurfaceArray->object(asInter.position));
22 }
23 // get the bin
24 return (m_approachSurfaceArray->object(pos));
25}
std::unique_ptr< ApproachSurfaces > m_approachSurfaces
std::unique_ptr< BinnedArray< const ApproachSurfaces > > m_approachSurfaceArray
std::unique_ptr< Surface > m_approachSurfaceArraySurface
Amg::Vector3D position

◆ rebuild()

bool Trk::IApproachDescriptor::rebuild ( ) const
inlineinherited

Definition at line 96 of file IApproachDescriptor.h.

◆ registerLayer()

void Trk::IApproachDescriptor::registerLayer ( const Layer & lay)
inlineinherited

Definition at line 98 of file IApproachDescriptor.h.

98 {
101 m_approachSurfaceArraySurface->associateLayer(lay);
103 }
105 std::span<ApproachSurfaces const * const> aSurfaceObjects =
106 m_approachSurfaceArray->arrayObjects();
107 for (auto& aSurfaces : aSurfaceObjects) {
108 registerLayerToSurfaces(lay, *aSurfaces);
109 }
110 }
111}
void registerLayerToSurfaces(const Layer &lay, const ApproachSurfaces &aSurfaces)

◆ registerLayerToSurfaces()

void Trk::IApproachDescriptor::registerLayerToSurfaces ( const Layer & lay,
const ApproachSurfaces & aSurfaces )
inlineprivateinherited

Definition at line 113 of file IApproachDescriptor.h.

114 {
115 for (Trk::Surface* aSurface : aSurfaces) {
116 aSurface->associateLayer(lay);
117 aSurface->setOwner(Trk::TGOwn);
118 }
119}

Member Data Documentation

◆ m_approachSurfaceArray

std::unique_ptr<BinnedArray<const ApproachSurfaces> > Trk::IApproachDescriptor::m_approachSurfaceArray
protectedinherited

Definition at line 92 of file IApproachDescriptor.h.

◆ m_approachSurfaceArraySurface

std::unique_ptr<Surface> Trk::IApproachDescriptor::m_approachSurfaceArraySurface
protectedinherited

Definition at line 91 of file IApproachDescriptor.h.

◆ m_approachSurfaces

std::unique_ptr<ApproachSurfaces> Trk::IApproachDescriptor::m_approachSurfaces
protectedinherited

Definition at line 90 of file IApproachDescriptor.h.

◆ m_rebuild

bool Trk::IApproachDescriptor::m_rebuild
protectedinherited

Definition at line 93 of file IApproachDescriptor.h.


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