ATLAS Offline Software
ActsDetectorElement.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 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"
15 // ATHENA INCLUDES
19 #include "InDetIdentifier/SCT_ID.h"
23 #include "CxxUtils/CachedValue.h"
24 
25 // ACTS
26 #include "Acts/Geometry/DetectorElementBase.hpp"
27 #include "Acts/Geometry/GeometryContext.hpp"
28 
29 // STL
30 #include <iostream>
31 
32 namespace Acts {
33 class SurfaceBounds;
34 }
35 
37 class IdentityHelper;
38 
41 
42 class ActsDetectorElement : public ActsTrk::IDetectorElement, public GeoVDetectorElement {
43 public:
46 
47 
49 
53  const Acts::Transform3 &trf, const InDetDD::TRT_BaseElement &detElem,
54  const Identifier &id // we need explicit ID here b/c of straws
55  );
56 
59  const InDetDD::HGTD_DetectorElement &detElem,
60  const Identifier &id // explicit id is needed for HGTD
61  );
62 
64  virtual ~ActsDetectorElement() = default;
65 
67  Identifier identify() const override final;
69  DetectorType detectorType() const override final;
70 
71 
72  virtual unsigned int storeAlignedTransforms(const ActsTrk::DetectorAlignStore& alignStore) const override;
73 
74  virtual const Acts::Transform3 &
75  transform(const Acts::GeometryContext &gctx) const final override;
76 
78  virtual const Acts::Surface &surface() const final override;
79 
81  virtual Acts::Surface &surface() final override;
82 
86 
88  virtual double thickness() const final override;
89 
91 
95  const Acts::Transform3 &getDefaultTransform() const;
96 
99  const GeoVDetectorElement *upstreamDetectorElement() const;
100 
101  Amg::Transform3D transform(const ActsTrk::DetectorAlignStore* store) const;
102 private:
103  DetectorType m_type{DetectorType::UnDefined};
104 
107  const GeoVDetectorElement *m_detElement{nullptr};
109  std::shared_ptr<const Acts::SurfaceBounds> m_bounds{};
111  double m_thickness{0.};
113  std::shared_ptr<Acts::Surface> m_surface{};
114  std::vector<std::shared_ptr<const Acts::Surface>> m_surfaces{};
115 
116  std::unique_ptr<const Amg::Transform3D> m_trtTrf{};
117 
119 };
120 
121 namespace ActsTrk{
122  template <> inline Amg::Transform3D
124  return m_parent->transform(store);
125  }
126 }
127 
128 #endif
PixelID.h
This is an Identifier helper class for the Pixel subdetector. This class is a factory for creating co...
store
StoreGateSvc * store
Definition: fbtTestBasics.cxx:69
ActsDetectorElement::m_surfaces
std::vector< std::shared_ptr< const Acts::Surface > > m_surfaces
Definition: ActsDetectorElement.h:114
ActsDetectorElement::m_type
DetectorType m_type
Definition: ActsDetectorElement.h:103
SCT_ID.h
This is an Identifier helper class for the SCT subdetector. This class is a factory for creating comp...
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:107
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:241
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:7
ActsDetectorElement::upstreamDetectorElement
const GeoVDetectorElement * upstreamDetectorElement() const
Returns the underllying GeoModel detectorelement that this one is based on.
Definition: ActsDetectorElement.cxx:288
ActsDetectorElement::detectorType
DetectorType detectorType() const override final
Detector type.
Definition: ActsDetectorElement.cxx:291
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:562
ActsDetectorElement::m_trtTrf
std::unique_ptr< const Amg::Transform3D > m_trtTrf
Definition: ActsDetectorElement.h:116
ActsGeometryContext::AlignmentStore
ActsTrk::DetectorAlignStore AlignmentStore
Definition: ActsGeometryContext.h:31
ActsDetectorElement::surface
virtual const Acts::Surface & surface() const final override
Return surface associated with this identifier, which should come from the.
Definition: ActsDetectorElement.cxx:251
GeoPrimitives.h
ActsDetectorElement::m_bounds
std::shared_ptr< const Acts::SurfaceBounds > m_bounds
Boundaries of the detector element.
Definition: ActsDetectorElement.h:109
AnnulusBounds.h
Acts
Definition: MultiTrajectory.h:45
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
ActsTrackingGeometrySvc
Definition: ActsTrackingGeometrySvc.h:51
ActsDetectorElement::transform
virtual const Acts::Transform3 & transform(const Acts::GeometryContext &gctx) const final override
Definition: ActsDetectorElement.cxx:237
ActsDetectorElement::atlasSurface
const Trk::Surface & atlasSurface() const
Return a shared pointer on the ATLAS surface associated with this identifier,.
Definition: ActsDetectorElement.cxx:259
HGTD_DetectorElement.h
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
ActsDetectorElement::getDefaultTransform
const Acts::Transform3 & getDefaultTransform() const
Returns default transform.
Definition: ActsDetectorElement.cxx:247
ActsDetectorElement::m_surface
std::shared_ptr< Acts::Surface > m_surface
Corresponding Surface.
Definition: ActsDetectorElement.h:113
ActsDetectorElement
Definition: ActsDetectorElement.h:42
ActsDetectorElement::thickness
virtual double thickness() const final override
Returns the thickness of the module.
Definition: ActsDetectorElement.cxx:269
ActsDetectorElement::identityHelper
IdentityHelper identityHelper() const
Definition: ActsDetectorElement.cxx:229
ActsTrk::IDetectorElement
Definition: IDetectorElement.h:28
ActsDetectorElement::identify
Identifier identify() const override final
Identifier.
Definition: ActsDetectorElement.cxx:271
TRT_BaseElement.h
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
CachedValue.h
Cached value with atomic update.
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
ActsDetectorElement::m_thickness
double m_thickness
Thickness of this detector element.
Definition: ActsDetectorElement.h:111
HGTD_ID.h
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
SiDetectorElement.h
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:105
ActsDetectorElement::m_explicitIdentifier
Identifier m_explicitIdentifier
Definition: ActsDetectorElement.h:118
IDetectorElement.h
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition: MuonDetectorBuilderTool.cxx:34
CaloLCW_tf.trf
trf
Definition: CaloLCW_tf.py:20
IdentityHelper
Definition: IdentityHelper.h:14
ActsDetectorElement::ActsDetectorElement
ActsDetectorElement(const InDetDD::SiDetectorElement &detElem)
Definition: ActsDetectorElement.cxx:51
InDetDD::TRT_BaseElement
Definition: TRT_BaseElement.h:57