ATLAS Offline Software
Loading...
Searching...
No Matches
ActsTrk::SurfacePlacement Class Referencefinal

: Helper class to assign a @Acts::SurfacePlacementBase to the Acts::Surfaces in order to make them alignable. More...

#include <SurfacePlacement.h>

Inheritance diagram for ActsTrk::SurfacePlacement:
Collaboration diagram for ActsTrk::SurfacePlacement:

Public Member Functions

virtual ~SurfacePlacement ()=default
 SurfacePlacement (const SurfacePlacement &other)=delete
 Delete the copy consturctor.
SurfacePlacementoperator= (const SurfacePlacement &other)=delete
 The copy assignment operator.
 SurfacePlacement (SurfacePlacement &&other)=delete
 Delete the move constructor.
SurfacePlacementoperator= (SurfacePlacement &&other)=delete
 Delete the move assignment operator.
const Acts::Transform3 & localToGlobalTransform (const Acts::GeometryContext &tgContext) const override final
const Acts::Surface & surface () const override final
Acts::Surface & surface () override final
std::shared_ptr< Acts::Surface > getSurface () const
 Returns a mutable shared pointer to the surface held by the placement.
IdentifierHash hash () const
 Identifierhash of the associated IReadoutSurfacePositioning.
Identifier identify () const override final
 Return the ATLAS identifier of the surface.
DetectorType detectorType () const override final
 Returns the detector element type.
const IDetectorElementdetectorElement () const override final
 Returns the detector element upstream.
virtual bool isSensitive () const override final
 Define all ISurfacePlacements to be sensitive.

Static Public Member Functions

template<typename Surface_t, typename Bounds_t>
requires (std::is_base_of_v<Acts::SurfaceBounds, Bounds_t>)
static std::shared_ptr< SurfacePlacementmakeShared (IReadoutSurfacePositioning &transformCache, std::shared_ptr< Bounds_t > &&bounds)
 Factory method to create a SurfacePlacement together with an Acts::Surface.

Private Member Functions

 SurfacePlacement (IReadoutSurfacePositioning *transformCache)
 Constructor taking the SurfacePositioning object.

Private Attributes

const IReadoutSurfacePositioningm_transformCache {nullptr}
 Pointer to the parent.

Detailed Description

: Helper class to assign a @Acts::SurfacePlacementBase to the Acts::Surfaces in order to make them alignable.

The class implements the ISurfacePlacement extension to make the surface's ATLAS identifier available to the user. It uses the IReadoutElementPositioning to forward the handling of the alignment. Also, it is used to take shared ownership of the associated Surface and of the SurfacePlacement instance itself.

The class constructor is protected. Instead the factory method makeShared shall be used to create the SurfacePlacement together with the Acts::Surface to align

Definition at line 32 of file SurfacePlacement.h.

Constructor & Destructor Documentation

◆ ~SurfacePlacement()

virtual ActsTrk::SurfacePlacement::~SurfacePlacement ( )
virtualdefault

◆ SurfacePlacement() [1/3]

ActsTrk::SurfacePlacement::SurfacePlacement ( const SurfacePlacement & other)
delete

Delete the copy consturctor.

◆ SurfacePlacement() [2/3]

ActsTrk::SurfacePlacement::SurfacePlacement ( SurfacePlacement && other)
delete

Delete the move constructor.

◆ SurfacePlacement() [3/3]

ActsTrk::SurfacePlacement::SurfacePlacement ( IReadoutSurfacePositioning * transformCache)
explicitprivate

Constructor taking the SurfacePositioning object.

Definition at line 11 of file SurfacePlacement.cxx.

11 :
12 m_transformCache{transformCache}{}
const IReadoutSurfacePositioning * m_transformCache
Pointer to the parent.

Member Function Documentation

◆ detectorElement()

const IDetectorElement * ActsTrk::SurfacePlacement::detectorElement ( ) const
finaloverridevirtual

Returns the detector element upstream.

Implements ActsTrk::ISurfacePlacement.

Definition at line 14 of file SurfacePlacement.cxx.

14{ return m_transformCache->parent(); }

◆ detectorType()

DetectorType ActsTrk::SurfacePlacement::detectorType ( ) const
finaloverridevirtual

Returns the detector element type.

Implements ActsTrk::ISurfacePlacement.

Definition at line 27 of file SurfacePlacement.cxx.

27{ return m_transformCache->detectorType(); }

◆ getSurface()

std::shared_ptr< Acts::Surface > ActsTrk::SurfacePlacement::getSurface ( ) const

Returns a mutable shared pointer to the surface held by the placement.

Definition at line 24 of file SurfacePlacement.cxx.

24{ return m_transformCache->m_surface; }

◆ hash()

IdentifierHash ActsTrk::SurfacePlacement::hash ( ) const

Identifierhash of the associated IReadoutSurfacePositioning.

Definition at line 25 of file SurfacePlacement.cxx.

25{ return m_transformCache->hash(); }

◆ identify()

Identifier ActsTrk::SurfacePlacement::identify ( ) const
finaloverridevirtual

Return the ATLAS identifier of the surface.

Implements ActsTrk::ISurfacePlacement.

Definition at line 26 of file SurfacePlacement.cxx.

26{ return m_transformCache->identify(); }

◆ isSensitive()

virtual bool ActsTrk::ISurfacePlacement::isSensitive ( ) const
inlinefinaloverridevirtualinherited

Define all ISurfacePlacements to be sensitive.

Definition at line 29 of file ISurfacePlacement.h.

29{ return true; }

◆ localToGlobalTransform()

const Acts::Transform3 & ActsTrk::SurfacePlacement::localToGlobalTransform ( const Acts::GeometryContext & tgContext) const
finaloverride

Definition at line 15 of file SurfacePlacement.cxx.

15 {
16 return m_transformCache->getTransform(tgContext);
17 }

◆ makeShared()

template<typename Surface_t, typename Bounds_t>
requires (std::is_base_of_v<Acts::SurfaceBounds, Bounds_t>)
std::shared_ptr< SurfacePlacement > ActsTrk::SurfacePlacement::makeShared ( IReadoutSurfacePositioning & transformCache,
std::shared_ptr< Bounds_t > && bounds )
static

Factory method to create a SurfacePlacement together with an Acts::Surface.

The method is templated over the concrete Surface type which is to be instantiated e.g. Acts::PlaneSurface, and the surface bounds type that's passed to the surface at its construction. E.g.

auto bounds = std::make_shared<Acts::RectangleBounds>(5._cm, 5._cm); auto placement = SurfacePlacement::makeShared<Acts::RectangleSurface>(transformCache, std::move(bounds)); creates the placement, together with the bounds. The passed transform cache automatically takes over ownership. over the surface and the SurfacePlacement

Parameters
transformCacheThe mutable reference taking ownership over the constructed placement and surface
boundsThe surface bounds with which the surface is instantiated.

Definition at line 94 of file SurfacePlacement.h.

96 {
97 if (transformCache.m_surface || transformCache.m_placement) {
98 return nullptr;
99 }
100 transformCache.m_placement.reset(new SurfacePlacement(&transformCache));
101 transformCache.m_surface = Acts::Surface::makeShared<Surface_t>(std::move(bounds), *transformCache.m_placement);
102 return transformCache.m_placement;
103 }
SurfacePlacement(const SurfacePlacement &other)=delete
Delete the copy consturctor.

◆ operator=() [1/2]

SurfacePlacement & ActsTrk::SurfacePlacement::operator= ( const SurfacePlacement & other)
delete

The copy assignment operator.

◆ operator=() [2/2]

SurfacePlacement & ActsTrk::SurfacePlacement::operator= ( SurfacePlacement && other)
delete

Delete the move assignment operator.

◆ surface() [1/2]

const Acts::Surface & ActsTrk::SurfacePlacement::surface ( ) const
finaloverride

Definition at line 18 of file SurfacePlacement.cxx.

18 {
19 return *m_transformCache->m_surface;
20 }

◆ surface() [2/2]

Acts::Surface & ActsTrk::SurfacePlacement::surface ( )
finaloverride

Definition at line 21 of file SurfacePlacement.cxx.

21 {
22 return *m_transformCache->m_surface;
23 }

Member Data Documentation

◆ m_transformCache

const IReadoutSurfacePositioning* ActsTrk::SurfacePlacement::m_transformCache {nullptr}
private

Pointer to the parent.

Definition at line 89 of file SurfacePlacement.h.

89{nullptr};

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