ATLAS Offline Software
ActsDetectorElement.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 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
16 
17 // ACTS
18 #include "Acts/Geometry/DetectorElementBase.hpp"
19 #include "Acts/Geometry/GeometryContext.hpp"
20 
21 // STL
22 #include <iostream>
23 
24 namespace InDetDD {
25 class TRT_BaseElement;
26 class SiDetectorElement;
27 class HGTD_DetectorElement;
28 }
29 
30 namespace Trk {
31 class Surface;
32 }
33 
34 namespace Acts {
35 class SurfaceBounds;
36 }
37 
39 class IdentityHelper;
40 
43 
44 class ActsDetectorElement : public ActsTrk::IDetectorElement, public GeoVDetectorElement {
45 public:
48 
49 
51 
55  const Acts::Transform3 &trf, const InDetDD::TRT_BaseElement &detElem,
56  const Identifier &id // we need explicit ID here b/c of straws
57  );
58 
61  const InDetDD::HGTD_DetectorElement &detElem,
62  const Identifier &id // explicit id is needed for HGTD
63  );
64 
66  virtual ~ActsDetectorElement() = default;
67 
69  Identifier identify() const override final;
70 
73 
75  IdentifierHash identifyHash() const { return m_idHash; }
76 
77  virtual unsigned int storeAlignedTransforms(const ActsTrk::DetectorAlignStore& alignStore) const override;
78 
79  virtual const Acts::Transform3 &
80  transform(const Acts::GeometryContext &gctx) const final override;
81 
83  virtual const Acts::Surface &surface() const final override;
84 
86  virtual Acts::Surface &surface() final override;
87 
91 
93  virtual double thickness() const final override;
94 
96 
100  const Acts::Transform3 &getDefaultTransform() const;
101 
104  const GeoVDetectorElement *upstreamDetectorElement() const;
105 
106  Amg::Transform3D transform(const ActsTrk::DetectorAlignStore* store) const;
107 private:
109  DetectorType m_type{DetectorType::UnDefined};
112  const GeoVDetectorElement *m_detElement{nullptr};
114  std::shared_ptr<const Acts::SurfaceBounds> m_bounds{};
116  double m_thickness{0.};
118  std::shared_ptr<Acts::Surface> m_surface{};
119 
120  std::unique_ptr<const Amg::Transform3D> m_trtTrf{};
121 
123 };
124 
125 namespace ActsTrk{
126  template <> inline Amg::Transform3D
128  return m_parent->transform(store);
129  }
130 }
131 
132 #endif
SGTest::store
TestStore store
Definition: TestStore.cxx:23
ActsDetectorElement::m_type
DetectorType m_type
Definition: ActsDetectorElement.h:109
ActsTrk::DetectorType
DetectorType
Simple enum to Identify the Type of the ACTS sub detector.
Definition: GeometryDefs.h:17
ActsGeometryContext.h
ActsDetectorElement::m_detElement
const GeoVDetectorElement * m_detElement
Detector element as variant.
Definition: ActsDetectorElement.h:112
ActsDetectorElement::storeAlignedTransforms
virtual unsigned int storeAlignedTransforms(const ActsTrk::DetectorAlignStore &alignStore) const override
Caches the aligned transformation in the provided store. Returns the number of cached elements.
Definition: ActsDetectorElement.cxx:251
ActsTrk::DetectorAlignStore
Definition: DetectorAlignStore.h:20
ActsTrk::TransformCacheDetEle< ActsDetectorElement >
ActsDetectorElement::~ActsDetectorElement
virtual ~ActsDetectorElement()=default
Destructor.
InDetDD::HGTD_DetectorElement
Definition: HGTD_DetectorElement.h:40
Surface
Definition: Trigger/TrigAccel/TrigCudaFitter/src/Surface.h:8
ActsDetectorElement::upstreamDetectorElement
const GeoVDetectorElement * upstreamDetectorElement() const
Returns the underllying GeoModel detectorelement that this one is based on.
Definition: ActsDetectorElement.cxx:286
ActsDetectorElement::detectorType
DetectorType detectorType() const override final
Detector type.
Definition: ActsDetectorElement.cxx:289
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
ActsDetectorElement::m_trtTrf
std::unique_ptr< const Amg::Transform3D > m_trtTrf
Definition: ActsDetectorElement.h:120
ActsDetectorElement::m_idHash
IdentifierHash m_idHash
Definition: ActsDetectorElement.h:108
ActsGeometryContext::AlignmentStore
ActsTrk::DetectorAlignStore AlignmentStore
Definition: ActsGeometryContext.h:30
ActsDetectorElement::surface
virtual const Acts::Surface & surface() const final override
Return surface associated with this identifier, which should come from the.
Definition: ActsDetectorElement.cxx:261
GeoPrimitives.h
ActsDetectorElement::m_bounds
std::shared_ptr< const Acts::SurfaceBounds > m_bounds
Boundaries of the detector element.
Definition: ActsDetectorElement.h:114
Acts
Definition: MuonSpectrometer/MuonPhaseII/Event/xAOD/xAODMuonPrepData/xAODMuonPrepData/UtilFunctions.h:17
ActsTrackingGeometrySvc
Definition: ActsTrackingGeometrySvc.h:55
ActsDetectorElement::transform
virtual const Acts::Transform3 & transform(const Acts::GeometryContext &gctx) const final override
Definition: ActsDetectorElement.cxx:247
ActsDetectorElement::atlasSurface
const Trk::Surface & atlasSurface() const
Return a shared pointer on the ATLAS surface associated with this identifier,.
Definition: ActsDetectorElement.cxx:269
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
ActsDetectorElement::getDefaultTransform
const Acts::Transform3 & getDefaultTransform() const
Returns default transform.
Definition: ActsDetectorElement.cxx:257
ActsDetectorElement::m_surface
std::shared_ptr< Acts::Surface > m_surface
Corresponding Surface.
Definition: ActsDetectorElement.h:118
ActsDetectorElement
Definition: ActsDetectorElement.h:44
ActsDetectorElement::thickness
virtual double thickness() const final override
Returns the thickness of the module.
Definition: ActsDetectorElement.cxx:279
ActsDetectorElement::identityHelper
IdentityHelper identityHelper() const
Definition: ActsDetectorElement.cxx:239
ActsTrk::IDetectorElement
Base class interface for the actual readout elements.
Definition: IDetectorElement.h:43
columnar::final
CM final
Definition: ColumnAccessor.h:106
ActsDetectorElement::identify
Identifier identify() const override final
Identifier.
Definition: ActsDetectorElement.cxx:281
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Amg
Definition of ATLAS Math & Geometry primitives (Amg)
Definition: AmgStringHelpers.h:19
ActsDetectorElement::m_thickness
double m_thickness
Thickness of this detector element.
Definition: ActsDetectorElement.h:116
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
ActsDetectorElement::identifyHash
IdentifierHash identifyHash() const
Identifier hash.
Definition: ActsDetectorElement.h:75
TransformCache.h
ActsTrk::TransformCacheDetEle::fetchTransform
Amg::Transform3D fetchTransform(const DetectorAlignStore *store) const override final
ActsDetectorElement::m_trfCache
ActsTrk::TransformCacheDetEle< ActsDetectorElement > m_trfCache
Definition: ActsDetectorElement.h:110
InDetDD
Message Stream Member.
Definition: FakeTrackBuilder.h:8
ActsDetectorElement::m_explicitIdentifier
Identifier m_explicitIdentifier
Definition: ActsDetectorElement.h:122
private
#define private
Definition: xAODTruthCnvAlg.h:20
IDetectorElement.h
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition: MSTrackingVolumeBuilder.cxx:24
CaloLCW_tf.trf
trf
Definition: CaloLCW_tf.py:20
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
IdentityHelper
Definition: IdentityHelper.h:14
ActsDetectorElement::ActsDetectorElement
ActsDetectorElement(const InDetDD::SiDetectorElement &detElem)
Definition: ActsDetectorElement.cxx:53
InDetDD::TRT_BaseElement
Definition: TRT_BaseElement.h:52
Identifier
Definition: IdentifierFieldParser.cxx:14