ATLAS Offline Software
Loading...
Searching...
No Matches
ActsDetectorElement.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 ACTSGEOMETRY_ACTSDETECTORELEMENT_H
6#define ACTSGEOMETRY_ACTSDETECTORELEMENT_H
7
8// Amg Eigen plugin includes
10
11#include "GeoModelKernel/GeoVDetectorElement.h"
14// ATHENA INCLUDES
17
18// ACTS
19#include "Acts/Geometry/GeometryContext.hpp"
20#include "Acts/Utilities/PointerTraits.hpp"
21
22// STL
23#include <memory>
24
25namespace InDetDD {
26class TRT_BaseElement;
29}
30
31namespace Trk {
32class Surface;
33}
34
35namespace Acts {
36class SurfaceBounds;
37}
38
39class IdentityHelper;
40
41
46const ActsDetectorElement* getActsDetectorElement(const Acts::Surface& surf);
47template <Acts::PointerConcept ptr_t>
49 requires(std::is_base_of_v<Acts::Surface, Acts::RemovePointer_t<ptr_t>>) {
50 if (!surf) {
51 return nullptr;
52 }
53 return getActsDetectorElement(*surf);
54 }
55
57
58class ActsDetectorElement : public ActsTrk::IDetectorElement, public GeoVDetectorElement {
59public:
62
63
65
69 const Acts::Transform3 &trf, const InDetDD::TRT_BaseElement &detElem,
70 const Identifier &id // we need explicit ID here b/c of straws
71 );
72
75 const InDetDD::HGTD_DetectorElement &detElem,
76 const Identifier &id // explicit id is needed for HGTD
77 );
78
80 virtual ~ActsDetectorElement() = default;
81
83 Identifier identify() const override final;
84
86 DetectorType detectorType() const override final;
87
90
91 virtual unsigned int storeAlignedTransforms(ActsTrk::DetectorAlignStore& alignStore) const override;
92
93 const Acts::Transform3& localToGlobalTransform(const Acts::GeometryContext& tgContext) const;
94
95 const Acts::Transform3& localToGlobalTransform(const ActsTrk::GeometryContext& gctx) const override;
96
97 virtual const Acts::Transform3 &
98 localToGlobalTransform(const ActsTrk::DetectorAlignStore* store) const final override;
100 const Acts::Surface &surface() const;
101
103 Acts::Surface &surface();
104
107 const Trk::Surface &atlasSurface() const;
108
110 double thickness() const;
111
113
117 const Acts::Transform3 &getDefaultTransform() const;
118
121 const GeoVDetectorElement *upstreamDetectorElement() const;
122
123 Acts::Transform3 localToGlobal(const ActsTrk::DetectorAlignStore* store) const;
124private:
126 DetectorType m_type{DetectorType::UnDefined};
128
129 std::shared_ptr<ActsTrk::SurfacePlacement> m_surfHolder{};
131 const GeoVDetectorElement *m_detElement{nullptr};
133 std::shared_ptr<const Acts::SurfaceBounds> m_bounds{};
135 double m_thickness{0.};
136
137 std::unique_ptr<const Acts::Transform3> m_trtTrf{};
138
140};
141
142namespace ActsTrk{
143 template <> inline Acts::Transform3
145 return m_parent->localToGlobal(store);
146 }
147}
148
149#endif
const ActsDetectorElement * getActsDetectorElement(const Acts::Surface &surf)
Attempts to retrieve the ActsDetectorElement associated to the passed ActsSurface.
ActsDetectorElement(const InDetDD::SiDetectorElement &detElem)
ActsTrk::GeometryContext::AlignmentStore AlignmentStore
const Acts::Transform3 & getDefaultTransform() const
Returns default transform.
ActsTrk::DetectorType DetectorType
const Acts::Transform3 & localToGlobalTransform(const Acts::GeometryContext &tgContext) const
const Trk::Surface & atlasSurface() const
Return a shared pointer on the ATLAS surface associated with this identifier,.
double m_thickness
Thickness of this detector element.
const Acts::Surface & surface() const
Return surface associated with this identifier, which should come from the.
DetectorType detectorType() const override final
Detector type.
ActsTrk::ReadoutSurfacePositioning< ActsDetectorElement > m_trfCache
virtual ~ActsDetectorElement()=default
Destructor.
std::shared_ptr< const Acts::SurfaceBounds > m_bounds
Boundaries of the detector element.
Identifier identify() const override final
Identifier.
IdentifierHash identifyHash() const
Identifier hash.
IdentityHelper identityHelper() const
std::unique_ptr< const Acts::Transform3 > m_trtTrf
virtual unsigned int storeAlignedTransforms(ActsTrk::DetectorAlignStore &alignStore) const override
Caches the aligned transformation in the provided store.
std::shared_ptr< ActsTrk::SurfacePlacement > m_surfHolder
const GeoVDetectorElement * m_detElement
Detector element as variant.
double thickness() const
Returns the thickness of the module.
const GeoVDetectorElement * upstreamDetectorElement() const
Returns the underllying GeoModel detectorelement that this one is based on.
Acts::Transform3 localToGlobal(const ActsTrk::DetectorAlignStore *store) const
ActsTrk::DetectorAlignStore AlignmentStore
ATLAS interface of a detector element.
Extension to handle the caching process of the transform held by the cache.
Acts::Transform3 fetchTransform(const DetectorAlignStore *store) const override final
This is a "hash" representation of an Identifier.
Class to hold geometrical description of an HGTD detector element.
Class to hold geometrical description of a silicon detector element.
Virtual base class of TRT readout elements.
Abstract Base Class for tracking surfaces.
Definition Surface.h:79
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.
Message Stream Member.
Ensure that the ATLAS eigen extensions are properly loaded.