ATLAS Offline Software
GeoAlignmentStore.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 GEOMODELUTILITIES_GEOALIGNMENTSTORE_H
6 #define GEOMODELUTILITIES_GEOALIGNMENTSTORE_H
7 
9 #include <stdexcept>
13 #include "AthenaKernel/CLASS_DEF.h"
14 #include "AthenaKernel/CondCont.h"
15 
16 #include "GeoModelKernel/GeoDefinitions.h"
17 #include "GeoModelKernel/GeoVAlignmentStore.h"
18 #include "GeoModelKernel/GeoVFullPhysVol.h"
19 #include "GeoModelKernel/GeoAlignableTransform.h"
20 
23 
24 class GeoAlignmentStore : public GeoVAlignmentStore {
25 public:
27  GeoAlignmentStore() = default;
29  virtual ~GeoAlignmentStore() override = default;
30 
34  virtual void setDelta(const GeoAlignableTransform* alignableNode,
35  const GeoTrf::Transform3D& transform) override;
36 
40  void setDelta(const GeoAlignableTransform* alignableNode,
41  std::shared_ptr<const GeoTrf::Transform3D> trans);
42 
46  virtual const GeoTrf::Transform3D* getDelta(const GeoAlignableTransform* alignableNode) const override final;
47 
52  virtual void setAbsPosition(const GeoNodePositioning* fullPhysVol,
53  const GeoTrf::Transform3D& physVolTrf) override final;
56  virtual const GeoTrf::Transform3D* getAbsPosition(const GeoNodePositioning* fullPhysVol) const override final;
60  virtual void setDefAbsPosition(const GeoNodePositioning* fullPhysVol,
61  const GeoTrf::Transform3D& unAlignedTrf) override final;
64  virtual const GeoTrf::Transform3D* getDefAbsPosition(const GeoNodePositioning* fullPhysVol) const override final;
65 
68  bool append(const GeoAlignmentStore& other);
70  void clearPosCache();
72  void lockDelta();
74  void lockPosCache();
75 
78 
81 private:
82  DeltaMapPtr m_deltas{std::make_unique<DeltaMap>()};
83  PositioningMapPtr m_absPositions{std::make_unique<PositioningMap>()};
84  PositioningMapPtr m_defAbsPositions{std::make_unique<PositioningMap>()};
85 
86 public:
87  DeltaMapPtr getDeltas() const;
90 };
91 
92 inline const GeoTrf::Transform3D* GeoAlignmentStore::getDelta(const GeoAlignableTransform* axf) const {
93  return m_deltas->getTransform(axf);
94 }
95 inline const GeoTrf::Transform3D* GeoAlignmentStore::getAbsPosition(const GeoNodePositioning* fpv) const {
96  return m_absPositions->getTransform(fpv);
97 }
98 inline const GeoTrf::Transform3D* GeoAlignmentStore::getDefAbsPosition(const GeoNodePositioning* fpv) const {
99  return m_defAbsPositions->getTransform(fpv);
100 }
101 
102 CLASS_DEF(GeoAlignmentStore, 135648236, 1)
104 
105 #endif
GeoAlignmentStore
Ensure that the extensions for the Vector3D are properly loaded.
Definition: GeoAlignmentStore.h:24
GeoModel::TransientConstSharedPtr< DeltaMap >
GeoAlignmentStore::GeoAlignmentStore
GeoAlignmentStore()=default
Default constructor.
CondCont.h
Hold mappings of ranges to condition objects.
GeoAlignmentStore::m_defAbsPositions
PositioningMapPtr m_defAbsPositions
Definition: GeoAlignmentStore.h:84
GeoAlignmentStore::lockDelta
void lockDelta()
: Locks the delta transform cache
Definition: GeoAlignmentStore.cxx:20
GeoAlignmentStore::setDefAbsPosition
virtual void setDefAbsPosition(const GeoNodePositioning *fullPhysVol, const GeoTrf::Transform3D &unAlignedTrf) override final
: Caches the aboslute transform of the perfectly aligned physical volume.
Definition: GeoAlignmentStore.cxx:17
GeoAlignmentStore::m_absPositions
PositioningMapPtr m_absPositions
Definition: GeoAlignmentStore.h:83
GeoAlignmentStore::getDefAbsPosition
virtual const GeoTrf::Transform3D * getDefAbsPosition(const GeoNodePositioning *fullPhysVol) const override final
: Returns the nominal position of the full phyiscal volume.
Definition: GeoAlignmentStore.h:98
GeoAlignmentStore::DeltaMapPtr
GeoModel::TransientConstSharedPtr< DeltaMap > DeltaMapPtr
Definition: GeoAlignmentStore.h:77
GeoAlignmentStore::getDefAbsPositions
PositioningMapPtr getDefAbsPositions() const
Definition: GeoAlignmentStore.cxx:41
CONDCONT_DEF
CONDCONT_DEF(GeoAlignmentStore, 33985726)
TransformMap::getTransform
const X * getTransform(const T *obj) const
: Returns the transform that's associated with input object.
GeoAlignmentStore::~GeoAlignmentStore
virtual ~GeoAlignmentStore() override=default
Default destructor.
GeoPrimitives.h
GeoAlignmentStore::setDelta
virtual void setDelta(const GeoAlignableTransform *alignableNode, const GeoTrf::Transform3D &transform) override
: Assign the alignment delta transform with a alignable GeoModel node
Definition: GeoAlignmentStore.cxx:7
TransformMap
Generic class to outsource the cache of transformations, Vectors, etc, from the core class instance.
Definition: TransformMap.h:21
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
GeoAlignmentStore::setAbsPosition
virtual void setAbsPosition(const GeoNodePositioning *fullPhysVol, const GeoTrf::Transform3D &physVolTrf) override final
: Caches the absolute transform including the alignment distortions that's associated with the full p...
Definition: GeoAlignmentStore.cxx:14
GeoAlignmentStore::getDelta
virtual const GeoTrf::Transform3D * getDelta(const GeoAlignableTransform *alignableNode) const override final
: Retrieve the alignment distortion associated with the alignable node.
Definition: GeoAlignmentStore.h:92
TransformMap.h
GeoAlignmentStore::getAbsPositions
PositioningMapPtr getAbsPositions() const
Definition: GeoAlignmentStore.cxx:38
GeoAlignmentStore::getDeltas
DeltaMapPtr getDeltas() const
Definition: GeoAlignmentStore.cxx:35
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
TransientConstSharedPtr.h
GeoAlignmentStore::clearPosCache
void clearPosCache()
: Clears the position cache
Definition: GeoAlignmentStore.cxx:44
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
GeoAlignmentStore::append
bool append(const GeoAlignmentStore &other)
: Copies, the deltas, the absolute and the nominal positions of the other map to this object.
Definition: GeoAlignmentStore.cxx:29
GeoAlignmentStore::lockPosCache
void lockPosCache()
: Locks the position cache
Definition: GeoAlignmentStore.cxx:23
GeoAlignmentStore::PositioningMapPtr
GeoModel::TransientConstSharedPtr< PositioningMap > PositioningMapPtr
Definition: GeoAlignmentStore.h:80
GeoAlignmentStore::getAbsPosition
virtual const GeoTrf::Transform3D * getAbsPosition(const GeoNodePositioning *fullPhysVol) const override final
: Returns the aligned transform associated with the full physical volume.
Definition: GeoAlignmentStore.h:95
CLASS_DEF.h
macros to associate a CLID to a type
GeoAlignmentStore::m_deltas
DeltaMapPtr m_deltas
Definition: GeoAlignmentStore.h:82