ATLAS Offline Software
Loading...
Searching...
No Matches
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>
15
16#include "GeoModelKernel/GeoDefinitions.h"
17#include "GeoModelKernel/GeoVAlignmentStore.h"
18#include "GeoModelKernel/GeoVFullPhysVol.h"
19#include "GeoModelKernel/GeoAlignableTransform.h"
20
23
24class GeoAlignmentStore : public GeoVAlignmentStore {
25public:
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
81private:
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
86public:
87 DeltaMapPtr getDeltas() const;
90};
91
92inline const GeoTrf::Transform3D* GeoAlignmentStore::getDelta(const GeoAlignableTransform* axf) const {
93 return m_deltas->getTransform(axf);
94}
95inline const GeoTrf::Transform3D* GeoAlignmentStore::getAbsPosition(const GeoNodePositioning* fpv) const {
96 return m_absPositions->getTransform(fpv);
97}
98inline const GeoTrf::Transform3D* GeoAlignmentStore::getDefAbsPosition(const GeoNodePositioning* fpv) const {
99 return m_defAbsPositions->getTransform(fpv);
100}
101
102CLASS_DEF(GeoAlignmentStore, 135648236, 1)
104
105#endif
Hold mappings of ranges to condition objects.
#define CONDCONT_DEF(...)
Definition CondCont.h:1413
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Ensure that the extensions for the Vector3D are properly loaded.
PositioningMapPtr m_absPositions
GeoModel::TransientConstSharedPtr< PositioningMap > PositioningMapPtr
bool append(const GeoAlignmentStore &other)
: Copies, the deltas, the absolute and the nominal positions of the other map to this object.
PositioningMapPtr getDefAbsPositions() const
PositioningMapPtr getAbsPositions() const
virtual void setDelta(const GeoAlignableTransform *alignableNode, const GeoTrf::Transform3D &transform) override
: Assign the alignment delta transform with a alignable GeoModel node
void clearPosCache()
: Clears the position cache
GeoModel::TransientConstSharedPtr< DeltaMap > DeltaMapPtr
virtual void setDefAbsPosition(const GeoNodePositioning *fullPhysVol, const GeoTrf::Transform3D &unAlignedTrf) override final
: Caches the aboslute transform of the perfectly aligned physical volume.
PositioningMapPtr m_defAbsPositions
void lockDelta()
: Locks the delta transform cache
GeoAlignmentStore()=default
Default constructor.
TransformMap< GeoAlignableTransform, GeoTrf::Transform3D > DeltaMap
virtual const GeoTrf::Transform3D * getDelta(const GeoAlignableTransform *alignableNode) const override final
: Retrieve the alignment distortion associated with the alignable node.
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...
virtual const GeoTrf::Transform3D * getDefAbsPosition(const GeoNodePositioning *fullPhysVol) const override final
: Returns the nominal position of the full phyiscal volume.
void lockPosCache()
: Locks the position cache
TransformMap< GeoNodePositioning, GeoTrf::Transform3D > PositioningMap
virtual ~GeoAlignmentStore() override=default
Default destructor.
virtual const GeoTrf::Transform3D * getAbsPosition(const GeoNodePositioning *fullPhysVol) const override final
: Returns the aligned transform associated with the full physical volume.
DeltaMapPtr getDeltas() const
The TransientConstSharedPtr allows non-const access if the pointer itself is non-const but in the con...
Generic class to outsource the cache of transformations, Vectors, etc, from the core class instance.