ATLAS Offline Software
Loading...
Searching...
No Matches
SurfaceCache.cxx
Go to the documentation of this file.
1
2/*
3 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
4*/
6#ifndef SIMULATIONBASE
7#include <Acts/Surfaces/Surface.hpp>
8#include <GeoModelKernel/throwExcept.h>
9
10namespace ActsTrk{
11
14
16 const Acts::Transform3& SurfaceCache::localToGlobalTransform(const Acts::GeometryContext& anygctx) const {
17 return m_transformCache->getTransform(anygctx);
18 }
20 return m_transformCache->getTransform(store);
21 }
22 const Acts::Surface& SurfaceCache::surface() const {
23 if (!m_surface) THROW_EXCEPTION("Surface has not been set before");
24 return *m_surface;
25 }
26 Acts::Surface& SurfaceCache::surface() {
27 if (!m_surface) THROW_EXCEPTION("Surface has not been set before");
28 return *m_surface;
29 }
30 std::shared_ptr<Acts::Surface> SurfaceCache::getSurface() const { return m_surface; }
31 void SurfaceCache::setSurface(std::shared_ptr<Acts::Surface> surface) { m_surface = surface; }
33 Identifier SurfaceCache::identify() const { return m_transformCache->identify(); }
34 DetectorType SurfaceCache::detectorType() const { return m_transformCache->detectorType(); }
35 bool SurfaceCache::isSensitive() const { return m_transformCache->parent()->isSensitive(); }
36}
37#endif
Identifier identify() const override final
Returns the identifier of the Surface.
SurfaceCache(const TransformCache *transformCache)
: Standard constructor taking the tranasform cache of the element and the detector type.
const Acts::Transform3 & localToGlobalTransform(const Acts::GeometryContext &gctx) const override final
Returns the transformation stored in the TransformCache.
bool isSensitive() const override final
Returns whether the detector element is sensitive.
const Acts::Surface & surface() const override final
Returns the dereferenced pointer cache.
DetectorType detectorType() const override final
Returns the detector type.
const TransformCache * transformCache() const
Returns the associated transform cache.
void setSurface(const std::shared_ptr< Acts::Surface > surface)
Cache the pointer to the surface that's constructed from this cache.
std::shared_ptr< Acts::Surface > getSurface() const
Returns the pointer to the cached surface.
IdentifierHash hash() const
Hash of the SurfaceCache which is the same as the one of the TransformCache.
Implementation used for the Detector elements.
This is a "hash" representation of an Identifier.
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
DetectorType
Simple enum to Identify the Type of the ACTS sub detector.
Eigen::Affine3d Transform3D
#define THROW_EXCEPTION(MESSAGE)
Definition throwExcept.h:10