ATLAS Offline Software
Loading...
Searching...
No Matches
SurfacePlacement.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef MUONREADOUTGEOMETRY_SurfacePlacement_H
6#define MUONREADOUTGEOMETRY_SurfacePlacement_H
7#ifndef SIMULATIONBASE
8
13
14#include "Acts/Surfaces/SurfacePlacementBase.hpp"
15#include "Acts/Surfaces/Surface.hpp"
16#include "Acts/Surfaces/SurfaceBounds.hpp"
17
18namespace Acts{
19 class Surface;
20}
21namespace ActsTrk {
22
32 class SurfacePlacement final: public ISurfacePlacement {
33 public:
46 template <typename Surface_t,
47 typename Bounds_t>
48 static std::shared_ptr<SurfacePlacement> makeShared(IReadoutSurfacePositioning& transformCache,
49 std::shared_ptr<Bounds_t>&& bounds)
50 requires(std::is_base_of_v<Acts::SurfaceBounds, Bounds_t>);
51
52 virtual ~SurfacePlacement() = default;
53
55 SurfacePlacement(const SurfacePlacement& other) = delete;
63 const Acts::Transform3& localToGlobalTransform(const Acts::GeometryContext& tgContext) const override final;
64
66 const Acts::Surface& surface() const override final;
67
69 Acts::Surface& surface() override final;
70
72 std::shared_ptr<Acts::Surface> getSurface() const;
73
76
78 Identifier identify() const override final;
79
81 DetectorType detectorType() const override final;
82
85 private:
87 explicit SurfacePlacement(IReadoutSurfacePositioning* transformCache);
90 };
91
92 template <typename Surface_t, typename Bounds_t>
93 std::shared_ptr<SurfacePlacement>
95 std::shared_ptr<Bounds_t>&& bounds)
96 requires(std::is_base_of_v<Acts::SurfaceBounds, Bounds_t>){
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 }
104}
105
106#endif
107#endif
ATLAS interface of a detector element.
Interface extension for caches used to hold the transforms of surfaces from the readout geometry.
Extension of the interface of the Acts::SurfacePlacementBase for ATLAS.
DetectorType detectorType() const override final
Returns the detector element type.
SurfacePlacement & operator=(const SurfacePlacement &other)=delete
The copy assignment operator.
SurfacePlacement(SurfacePlacement &&other)=delete
Delete the move constructor.
std::shared_ptr< Acts::Surface > getSurface() const
Returns a mutable shared pointer to the surface held by the placement.
virtual ~SurfacePlacement()=default
const IReadoutSurfacePositioning * m_transformCache
Pointer to the parent.
Identifier identify() const override final
Return the ATLAS identifier of the surface.
SurfacePlacement(const SurfacePlacement &other)=delete
Delete the copy consturctor.
const Acts::Surface & surface() const override final
const IDetectorElement * detectorElement() const override final
Returns the detector element upstream.
static std::shared_ptr< SurfacePlacement > makeShared(IReadoutSurfacePositioning &transformCache, std::shared_ptr< Bounds_t > &&bounds)
Factory method to create a SurfacePlacement together with an Acts::Surface.
const Acts::Transform3 & localToGlobalTransform(const Acts::GeometryContext &tgContext) const override final
IdentifierHash hash() const
Identifierhash of the associated IReadoutSurfacePositioning.
SurfacePlacement & operator=(SurfacePlacement &&other)=delete
Delete the move assignment operator.
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.
STL namespace.
#define private
Definition testRead.cxx:27