ATLAS Offline Software
Loading...
Searching...
No Matches
ActsTrk::ReadoutSurfacePositioning< CachingDetectorEle > Class Template Reference

Extension to handle the caching process of the transform held by the cache. More...

#include <TransformCache.h>

Inheritance diagram for ActsTrk::ReadoutSurfacePositioning< CachingDetectorEle >:
Collaboration diagram for ActsTrk::ReadoutSurfacePositioning< CachingDetectorEle >:

Public Member Functions

 ReadoutSurfacePositioning (const IdentifierHash &hash, const CachingDetectorEle *parentEle)
 : Standard constructor taking the hash of the sensor element and and the TransformMaker expressed usually as a lambda function
const CachingDetectorEle * parent () const override final
 Returns the parent IDetectorElement owning the cache.
Identifier identify () const override final
 Returns the Identifier of the.
Identifier identify () const
 Returns the Identifier of the.
Identifier identify () const
 Identifier of the transform cache equivalent to the Identifier of the first strip inside the gasGap.
Identifier identify () const
 Identifier of the transform cache equivalent to the Identifier of the first strip inside the gasGap.
Identifier identify () const
 Returns the Identifier of the.
Identifier identify () const
 Returns the Identifier of the.
virtual void releaseNominalCache () const final
 Release the nominal transform stored in the cache.
const SurfacePlacementplacement () const
 Returns the pointer to the associated surface placement.
 AlignableGeoPositioning (const IdentifierHash &cacheHash, const DetectorType type)
 Copy the constructors from the base class.
 AlignableGeoPositioning (const AlignableGeoPositioning &other) noexcept=delete
 Copy the constructors from the base class.
 AlignableGeoPositioning (AlignableGeoPositioning &&other) noexcept=delete
 Copy the constructors from the base class.
IdentifierHash hash () const
 Returns the sensor hash of this transformation cache.
const Amg::Transform3DgetTransform (const DetectorAlignStore *store) const
 Returns the matching transformation from the alignment store.
const Amg::Transform3DgetTransform (const GeometryContext &gctx) const
 returns the cached transform from the Acts Geometry context
const Amg::Transform3DgetTransform (const Acts::GeometryContext &tgContext) const
 returns the cached transform from the Acts Geometry context
bool storeTransform (DetectorAlignStore &store) const
 Store the final transform in the mutable alignment store.
DetectorType detectorType () const
 returns the detector type of the cache

Private Types

using TicketCounter = detail::TrfStoreTicketCounter

Private Member Functions

Amg::Transform3D fetchTransform (const DetectorAlignStore *store) const override final
Amg::Transform3D fetchTransform (const DetectorAlignStore *store) const
Amg::Transform3D fetchTransform (const DetectorAlignStore *store) const
Amg::Transform3D fetchTransform (const DetectorAlignStore *store) const
Amg::Transform3D fetchTransform (const DetectorAlignStore *store) const
Amg::Transform3D fetchTransform (const DetectorAlignStore *store) const
Amg::Transform3D fetchTransform (const DetectorAlignStore *store) const
Amg::Transform3D fetchTransform (const DetectorAlignStore *store) const

Private Attributes

const CachingDetectorEle * m_parent {nullptr}
std::shared_ptr< Acts::Surface > m_surface {}
 Holder of the surface owned by the surface placement.
std::shared_ptr< SurfacePlacementm_placement {}
 Holder of the surface placement pointer.
const IdentifierHash m_hash {}
const DetectorType m_type {DetectorType::UnDefined}
const unsigned int m_clientNo {TicketCounter::drawTicket(m_type)}
 Slot at which the aligned transforms can be put in the external DetectorAlignStore.
CxxUtils::CachedUniquePtrT< Amg::Transform3D > m_nomCache ATLAS_THREAD_SAFE {}
 Cache to hold the nominal transform, if no DetectorAlignStore is provided The cache is automatically erased as soon as an instantiated store is presented to the class.

Detailed Description

template<typename CachingDetectorEle>
class ActsTrk::ReadoutSurfacePositioning< CachingDetectorEle >

Extension to handle the caching process of the transform held by the cache.

The class is templated over the actual ATLAS implementation and overrides the interface functions from the TransformCache class. The identify and the fetchTransform method are not implemented yet. Their implementation needs to happen at the same place where the template specification of the class is instantiated. E.g.

class CakeDetectorElement : public IDetectorElement { public: using CakeSensorTrfCache_t = ReadoutSurfacePositioning<CakeDetectorElement>; }; Instantiate the identify and fetch transform methods after the class... Identifier ReadoutSurfacePositioning<CakeDetectorElement>::identify() const { return parent()->identify(); }

Amg::Transform3D ReadoutSurfacePositioning<CakeDetectorElement>::fetchTransform(const DetectorAlignStore* store) const { return parent()->nominalTrf() *parent()->alignShift(store); }

Definition at line 156 of file TransformCache.h.

Member Typedef Documentation

◆ TicketCounter

Constructor & Destructor Documentation

◆ ReadoutSurfacePositioning()

template<typename CachingDetectorEle>
ActsTrk::ReadoutSurfacePositioning< CachingDetectorEle >::ReadoutSurfacePositioning ( const IdentifierHash & hash,
const CachingDetectorEle * parentEle )
explicit

: Standard constructor taking the hash of the sensor element and and the TransformMaker expressed usually as a lambda function

Member Function Documentation

◆ AlignableGeoPositioning() [1/3]

ActsTrk::AlignableGeoPositioning::AlignableGeoPositioning ( AlignableGeoPositioning && other)
deletenoexceptinherited

Copy the constructors from the base class.

◆ AlignableGeoPositioning() [2/3]

ActsTrk::AlignableGeoPositioning::AlignableGeoPositioning ( const AlignableGeoPositioning & other)
deletenoexceptinherited

Copy the constructors from the base class.

◆ AlignableGeoPositioning() [3/3]

Copy the constructors from the base class.

Definition at line 49 of file TransformCache.cxx.

19 :
IdentifierHash hash() const
Returns the sensor hash of this transformation cache.

◆ detectorType()

DetectorType ActsTrk::AlignableGeoPositioning::detectorType ( ) const
inherited

returns the detector type of the cache

Definition at line 34 of file TransformCache.cxx.

34{ return m_type; }

◆ fetchTransform() [1/8]

◆ fetchTransform() [2/8]

◆ fetchTransform() [3/8]

◆ fetchTransform() [4/8]

◆ fetchTransform() [5/8]

◆ fetchTransform() [6/8]

◆ fetchTransform() [7/8]

Amg::Transform3D ActsTrk::ReadoutSurfacePositioning< ActsDetectorElement >::fetchTransform ( const DetectorAlignStore * store) const
inlineprivatevirtual

Implements ActsTrk::AlignableGeoPositioning.

Definition at line 144 of file ActsDetectorElement.h.

144 {
145 return m_parent->localToGlobal(store);
146 }
Extension to handle the caching process of the transform held by the cache.
const CachingDetectorEle * m_parent

◆ fetchTransform() [8/8]

template<typename CachingDetectorEle>
Amg::Transform3D ActsTrk::ReadoutSurfacePositioning< CachingDetectorEle >::fetchTransform ( const DetectorAlignStore * store) const
finaloverrideprivatevirtual

◆ getTransform() [1/3]

const Amg::Transform3D & ActsTrk::AlignableGeoPositioning::getTransform ( const Acts::GeometryContext & tgContext) const
inherited

returns the cached transform from the Acts Geometry context

Parameters
tgContextThe geometry context to be unpacked to the ATLAS geometry context

◆ getTransform() [2/3]

const Amg::Transform3D & ActsTrk::AlignableGeoPositioning::getTransform ( const DetectorAlignStore * store) const
inherited

Returns the matching transformation from the alignment store.

If a nullptr is given, then it's equivalent to the case that the transformation is pointing to a perfectly aligned surface. In this case, the internal nominal transformation cache is invoked.

Parameters
storePointer to the detector aligment store

◆ getTransform() [3/3]

const Amg::Transform3D & ActsTrk::AlignableGeoPositioning::getTransform ( const GeometryContext & gctx) const
inherited

returns the cached transform from the Acts Geometry context

Parameters
gctxThe geometry context holding the aligned transforms

◆ hash()

IdentifierHash ActsTrk::AlignableGeoPositioning::hash ( ) const
inherited

Returns the sensor hash of this transformation cache.

◆ identify() [1/6]

◆ identify() [2/6]

Identifier of the transform cache equivalent to the Identifier of the first strip inside the gasGap.

Implements ActsTrk::IReadoutSurfacePositioning.

◆ identify() [3/6]

Identifier of the transform cache equivalent to the Identifier of the first strip inside the gasGap.

Implements ActsTrk::IReadoutSurfacePositioning.

◆ identify() [4/6]

◆ identify() [5/6]

◆ identify() [6/6]

template<typename CachingDetectorEle>
Identifier ActsTrk::ReadoutSurfacePositioning< CachingDetectorEle >::identify ( ) const
finaloverridevirtual

Returns the Identifier of the.

Implements ActsTrk::IReadoutSurfacePositioning.

◆ parent()

template<typename CachingDetectorEle>
const CachingDetectorEle * ActsTrk::ReadoutSurfacePositioning< CachingDetectorEle >::parent ( ) const
finaloverridevirtual

Returns the parent IDetectorElement owning the cache.

Implements ActsTrk::IReadoutSurfacePositioning.

◆ placement()

const SurfacePlacement * ActsTrk::IReadoutSurfacePositioning::placement ( ) const
inherited

Returns the pointer to the associated surface placement.

Definition at line 46 of file TransformCache.cxx.

46{ return m_placement.get(); }
std::shared_ptr< SurfacePlacement > m_placement
Holder of the surface placement pointer.

◆ releaseNominalCache()

void ActsTrk::IReadoutSurfacePositioning::releaseNominalCache ( ) const
finalvirtualinherited

Release the nominal transform stored in the cache.

Reimplemented from ActsTrk::AlignableGeoPositioning.

Definition at line 36 of file TransformCache.cxx.

36 {
38 const GeoVDetectorElement* vParent = dynamic_cast<const GeoVDetectorElement*>(parent());
39 if (vParent) {
40 vParent->getMaterialGeom()->clearPositionInfo();
41 }
42 }
virtual void releaseNominalCache() const
resets the nominal cache associated with the detector element
virtual const IDetectorElement * parent() const =0
Returns the parent IDetectorElement owning the cache.

◆ storeTransform()

bool ActsTrk::AlignableGeoPositioning::storeTransform ( DetectorAlignStore & store) const
inherited

Store the final transform in the mutable alignment store.

Returns true whether a new transform was stored

Parameters
storeThe reference to the store where the cache stores its transform

Definition at line 26 of file TransformCache.cxx.

26 {
27 if (store.detType != detectorType() ||
28 store.trackingAlignment->getTransform(m_clientNo) != nullptr){
29 return false;
30 }
31 store.trackingAlignment->setTransform(m_clientNo, fetchTransform(&store));
32 return true;
33 }
const unsigned int m_clientNo
Slot at which the aligned transforms can be put in the external DetectorAlignStore.
DetectorType detectorType() const
returns the detector type of the cache
virtual Amg::Transform3D fetchTransform(const DetectorAlignStore *store) const =0
TestStore store
Definition TestStore.cxx:23

Member Data Documentation

◆ ATLAS_THREAD_SAFE

CxxUtils::CachedUniquePtrT<Amg::Transform3D> m_nomCache ActsTrk::AlignableGeoPositioning::ATLAS_THREAD_SAFE {}
mutableprivateinherited

Cache to hold the nominal transform, if no DetectorAlignStore is provided The cache is automatically erased as soon as an instantiated store is presented to the class.

Definition at line 99 of file TransformCache.h.

99{};

◆ m_clientNo

const unsigned int ActsTrk::AlignableGeoPositioning::m_clientNo {TicketCounter::drawTicket(m_type)}
privateinherited

Slot at which the aligned transforms can be put in the external DetectorAlignStore.

Definition at line 95 of file TransformCache.h.

static unsigned int drawTicket(const DetectorType detType)
Returns a unique ID to the client under which the client can store its transfomrm inside the containe...

◆ m_hash

const IdentifierHash ActsTrk::AlignableGeoPositioning::m_hash {}
privateinherited

Definition at line 90 of file TransformCache.h.

90{};

◆ m_parent

template<typename CachingDetectorEle>
const CachingDetectorEle* ActsTrk::ReadoutSurfacePositioning< CachingDetectorEle >::m_parent {nullptr}
private

Definition at line 170 of file TransformCache.h.

170{nullptr};

◆ m_placement

std::shared_ptr<SurfacePlacement> ActsTrk::IReadoutSurfacePositioning::m_placement {}
privateinherited

Holder of the surface placement pointer.

Definition at line 132 of file TransformCache.h.

132{};

◆ m_surface

std::shared_ptr<Acts::Surface> ActsTrk::IReadoutSurfacePositioning::m_surface {}
privateinherited

Holder of the surface owned by the surface placement.

Definition at line 130 of file TransformCache.h.

130{};

◆ m_type

const DetectorType ActsTrk::AlignableGeoPositioning::m_type {DetectorType::UnDefined}
privateinherited

Definition at line 91 of file TransformCache.h.

@ UnDefined
Small Thing Gap chambers (NSW).

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