ATLAS Offline Software
Loading...
Searching...
No Matches
SurfaceCache.cxx
Go to the documentation of this file.
1
2/*
3 Copyright (C) 2002-2024 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::transform(const Acts::GeometryContext& anygctx) const {
17 return m_transformCache->transform(anygctx);
18 }
19 const Acts::Surface& SurfaceCache::surface() const {
20 if (!m_surface) THROW_EXCEPTION("Surface has not been set before");
21 return *m_surface;
22 }
23 Acts::Surface& SurfaceCache::surface() {
24 if (!m_surface) THROW_EXCEPTION("Surface has not been set before");
25 return *m_surface;
26 }
27 std::shared_ptr<Acts::Surface> SurfaceCache::getSurface() const { return m_surface; }
28 double SurfaceCache::thickness() const { return 0.; }
29 void SurfaceCache::setSurface(std::shared_ptr<Acts::Surface> surface) { m_surface = surface; }
31 Identifier SurfaceCache::identify() const { return m_transformCache->identify(); }
32 DetectorType SurfaceCache::detectorType() const { return m_transformCache->detectorType(); }
33}
34#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 & transform(const Acts::GeometryContext &gctx) const override final
Returns the transformation stored in the TransformCache.
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.
double thickness() const override final
Dummy override to satisfy the interface of the Acts::DetElementBase.
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.
#define THROW_EXCEPTION(MESSAGE)
Definition throwExcept.h:10