ATLAS Offline Software
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
ActsTrk::TransformCacheDetEle< CachingDetectorEle > Class Template Reference

#include <TransformCache.h>

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

Public Member Functions

 TransformCacheDetEle (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 More...
 
const IDetectorElementparent () const override final
 Returns the parent IDetectorElement owning the cache. More...
 
 TransformCacheDetEle (const IdentifierHash &hash, const MuonGMR4::MuonChamber *chamber)
 
const IDetectorElementparent () const
 Returns the parent IDetectorElement owning the cache. More...
 
 TransformCacheDetEle (const IdentifierHash &hash, const MuonGMR4::MuonChamber *chamber)
 
const IDetectorElementparent () const
 Returns the parent IDetectorElement owning the cache. More...
 
IdentifierHash hash () const
 Returns the sensor hash of this transformation cache. More...
 
const Amg::Transform3DgetTransform (const DetectorAlignStore *store) const
 Returns the matching transformation from the alignment store. More...
 
const Amg::Transform3Dtransform (const Acts::GeometryContext &gctx) const
 returns the cached transform from the Acts Geometry context More...
 
void releaseNominalCache () const
 resets the nominal cache associated with the detector element More...
 
DetectorType detectorType () const
 returns the detector type of the cache More...
 

Private Types

using TicketCounter = DetectorAlignStore::TrackingAlignStore
 

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
 
Amg::Transform3D fetchTransform (const DetectorAlignStore *store) const
 
Amg::Transform3D fetchTransform (const DetectorAlignStore *store) const
 

Private Attributes

const CachingDetectorEle * m_parent {nullptr}
 
const IdentifierHash m_hash {0}
 
const DetectorType m_type {DetectorType::UnDefined}
 
const unsigned int m_clientNo {TicketCounter::drawTicket(m_type)}
 
std::shared_mutex m_mutex ATLAS_THREAD_SAFE {}
 
CxxUtils::CachedUniquePtrT< Amg::Transform3D > m_nomCache ATLAS_THREAD_SAFE {}
 

Detailed Description

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

Definition at line 65 of file TransformCache.h.

Member Typedef Documentation

◆ TicketCounter

Definition at line 56 of file TransformCache.h.

Constructor & Destructor Documentation

◆ TransformCacheDetEle() [1/3]

template<typename CachingDetectorEle >
ActsTrk::TransformCacheDetEle< CachingDetectorEle >::TransformCacheDetEle ( 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

◆ TransformCacheDetEle() [2/3]

◆ TransformCacheDetEle() [3/3]

Definition at line 12 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonChamber.cxx.

13  :
14  TransformCache{hash, chamber->detectorType()},
15  m_parent{chamber} {}

Member Function Documentation

◆ detectorType()

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

returns the detector type of the cache

Definition at line 23 of file TransformCache.cxx.

23 { return m_type; }

◆ fetchTransform() [1/10]

If the store is given, assume that the tracking alignment already caches the transformations of the needed detector surfaces --> We can build a geo context on the fly.

Implements ActsTrk::TransformCache.

Definition at line 19 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonChamber.cxx.

19  {
20  ActsGeometryContext gctx{};
23  if (store) {
24  auto copyStore = std::make_unique<DetectorAlignStore>(detectorType());
25  copyStore->geoModelAlignment = store->geoModelAlignment;
26  copyStore->trackingAlignment = store->trackingAlignment;
27  copyStore->internalAlignment = store->internalAlignment;
28  gctx.setStore(std::move(copyStore));
29  }
30  const auto& pars{m_parent->parameters()};
31  return pars.readoutEles[0]->localToGlobalTrans(gctx) * pars.centerTrans;
32 
33  }

◆ fetchTransform() [2/10]

◆ fetchTransform() [3/10]

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

Implements ActsTrk::TransformCache.

Definition at line 123 of file ActsDetectorElement.h.

123  {
124  return m_parent->transform(store);
125  }

◆ fetchTransform() [4/10]

◆ fetchTransform() [5/10]

◆ fetchTransform() [6/10]

◆ fetchTransform() [7/10]

◆ fetchTransform() [8/10]

◆ fetchTransform() [9/10]

◆ fetchTransform() [10/10]

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

◆ getTransform()

const Amg::Transform3D& ActsTrk::TransformCache::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.

◆ hash()

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

Returns the sensor hash of this transformation cache.

◆ parent() [1/3]

Returns the parent IDetectorElement owning the cache.

Implements ActsTrk::TransformCache.

Definition at line 17 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonChamber.cxx.

17 { return nullptr; }

◆ parent() [2/3]

Returns the parent IDetectorElement owning the cache.

Implements ActsTrk::TransformCache.

◆ parent() [3/3]

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

Returns the parent IDetectorElement owning the cache.

Implements ActsTrk::TransformCache.

◆ releaseNominalCache()

void ActsTrk::TransformCache::releaseNominalCache ( ) const
inherited

resets the nominal cache associated with the detector element

Definition at line 17 of file TransformCache.cxx.

17  {
18  std::unique_lock guard{m_mutex};
19  m_nomCache.release();
20  const GeoVDetectorElement* vParent = dynamic_cast<const GeoVDetectorElement*>(parent());
21  if (vParent) vParent->getMaterialGeom()->clearPositionInfo();
22  }

◆ transform()

const Amg::Transform3D& ActsTrk::TransformCache::transform ( const Acts::GeometryContext &  gctx) const
inherited

returns the cached transform from the Acts Geometry context

Member Data Documentation

◆ ATLAS_THREAD_SAFE [1/2]

std::shared_mutex m_mutex ActsTrk::TransformCache::ATLAS_THREAD_SAFE {}
mutableprivateinherited

Definition at line 58 of file TransformCache.h.

◆ ATLAS_THREAD_SAFE [2/2]

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

Definition at line 59 of file TransformCache.h.

◆ m_clientNo

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

Definition at line 57 of file TransformCache.h.

◆ m_hash

const IdentifierHash ActsTrk::TransformCache::m_hash {0}
privateinherited

Definition at line 54 of file TransformCache.h.

◆ m_parent

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

Definition at line 76 of file TransformCache.h.

◆ m_type

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

Definition at line 55 of file TransformCache.h.


The documentation for this class was generated from the following file:
make_hlt_rep.pars
pars
Definition: make_hlt_rep.py:90
store
StoreGateSvc * store
Definition: fbtTestBasics.cxx:69
calibdata.chamber
chamber
Definition: calibdata.py:32
ActsTrk::TransformCache::parent
virtual const IDetectorElement * parent() const =0
Returns the parent IDetectorElement owning the cache.
ActsTrk::TransformCacheDetEle::m_parent
const CachingDetectorEle * m_parent
Definition: TransformCache.h:76
ActsTrk::TransformCache::m_type
const DetectorType m_type
Definition: TransformCache.h:55
ActsTrk::TransformCache::hash
IdentifierHash hash() const
Returns the sensor hash of this transformation cache.
ActsGeometryContext
Include the GeoPrimitives which need to be put first.
Definition: ActsGeometryContext.h:28
ActsTrk::TransformCache::TransformCache
TransformCache(const IdentifierHash &cacheHash, const DetectorType type)
Definition: TransformCache.cxx:12
ActsTrk::TransformCache::detectorType
DetectorType detectorType() const
returns the detector type of the cache
Definition: TransformCache.cxx:23