![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
7 # include "Acts/Surfaces/StrawSurface.hpp"
8 # include "Acts/Surfaces/PlaneSurface.hpp"
19 : GeoVDetectorElement(
args.physVol),
21 m_args{std::move(
args)} {
22 if (!m_idHelperSvc.retrieve().isSuccess()) {
25 m_stName = m_idHelperSvc->stationName(identify());
26 m_stEta = m_idHelperSvc->stationEta(identify());
27 m_stPhi = m_idHelperSvc->stationPhi(identify());
28 m_detElHash = m_idHelperSvc->detElementHash(identify());
29 m_chIdx = m_idHelperSvc->chamberIndex(identify());
35 return StatusCode::FAILURE;
40 static const IdentifierHash
hash{
static_cast<unsigned>(~0)-1};
46 const IdentifierHash&
hash)
const {
49 ATH_MSG_FATAL(__FILE__<<
":"<<__LINE__<<
" "<<__func__<<
"() -- "
55 return getMaterialGeom()->getAbsoluteTransform(alignStore ? alignStore->
geoModelAlignment.get() :
nullptr);
59 cache.second->releaseNominalCache();
65 unsigned int aligned{0};
67 cache.second->getTransform(&
store);
79 #ifndef SIMULATIONBASE
85 ActsTrk::SurfaceCacheSet::const_iterator cache =
m_surfaces.find(
hash);
86 if(cache !=
m_surfaces.end())
return (*cache)->getSurface();
98 std::shared_ptr<Acts::LineBounds> lBounds) {
104 <<
" no transform cache available for hash "<<
hash);
105 return StatusCode::FAILURE;
108 auto insert_itr =
m_surfaces.insert(std::make_unique<ActsTrk::SurfaceCache>(transformCache->second.get()));
109 if(!insert_itr.second){
111 <<
" Insertion to muon surface cache failed for hash "<<
hash);
112 return StatusCode::FAILURE;
115 (*insert_itr.first)->setSurface(Acts::Surface::makeShared<Acts::StrawSurface>(lBounds, **insert_itr.first));
116 return StatusCode::SUCCESS;
126 <<
" no transform cache available for hash "<<
hash);
127 return StatusCode::FAILURE;
129 auto insert_itr =
m_surfaces.insert(std::make_unique<ActsTrk::SurfaceCache>(transformCache->second.get()));
130 if(!insert_itr.second){
132 <<
" Insertion to muon surface cache failed for hash "<<
hash);
133 return StatusCode::FAILURE;
136 (*insert_itr.first)->setSurface(Acts::Surface::makeShared<Acts::PlaneSurface>(pBounds, **insert_itr.first));
137 return StatusCode::SUCCESS;
unsigned int storeAlignedTransforms(const ActsTrk::DetectorAlignStore &store) const override final
Caches the aligned transformation in the provided store. Returns the number of cached elements.
The TransientConstSharedPtr allows non-const access if the pointer itself is non-const but in the con...
std::shared_ptr< GeoAlignmentStore > geoModelAlignment
Store containing the aligned GeoModel nodes.
TransformCacheMap m_localToGlobalCaches
const Acts::Surface & surface() const override final
Returns the surface associated to the readout element plane.
ActsTrk::SurfaceCacheSet m_surfaces
Cache of all associated surfaces.
StatusCode createGeoTransform()
virtual DetectorType detectorType() const =0
Returns the detector element type.
Amg::Transform3D globalToLocalTrans(const ActsGeometryContext &ctx) const
Transformations to translate between local <-> global coordinates.
const Amg::Transform3D & toStation(const ActsTrk::DetectorAlignStore *alignStore) const
Returns the transformation into the center of the readout volume.
AlignmentStorePtr & getStore(const DetectorType type)
Returns the mutable alignable store for the ATLAS detector type (Pixel, Mdt, etc.)
void setChamberLink(GeoModel::TransientConstSharedPtr< MuonChamber > chamber)
Set's the link to the MuonChamber object to which the MuonReadoutElement belongs to.
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
A muon chamber is a collection of readout elements belonging to the same station.
const Muon::IMuonIdHelperSvc * idHelperSvc() const
Returns the pointer to the muonIdHelperSvc.
::StatusCode StatusCode
StatusCode definition for legacy code.
Eigen::Affine3d Transform3D
const MuonChamber * getChamber() const
Class to provide easy MsgStream access and capabilities.
Include the GeoPrimitives which need to be put first.
GeoModel::TransientConstSharedPtr< MuonChamber > m_chambLink
Pointer to the associated MuonChamber.
static IdentifierHash geoTransformHash()
Returns the hash that is associated with the surface cache holding the transformation that is placing...
const GeoAlignableTransform * alignableTransform() const
Returnsthe alignable transform of the readout element.
Helper struct to ship the defining arguments of the detector element around.
StatusCode strawSurfaceFactory(const IdentifierHash &hash, std::shared_ptr< Acts::LineBounds > lBounds)
Identifier identify() const override final
Return the athena identifier.
StatusCode planeSurfaceFactory(const IdentifierHash &hash, std::shared_ptr< Acts::PlanarBounds > pBounds)
std::shared_ptr< Acts::Surface > surfacePtr(const IdentifierHash &hash) const
Returns the pointer associated to a certain wire / plane.
void releaseUnAlignedTrfs() const
Releases all cached transforms that are not connected with alignment.
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
const Amg::Transform3D & localToGlobalTrans(const ActsGeometryContext &ctx) const
Returns the local to global transformation into the ATLAS coordinate system.
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
const Acts::Transform3 & transform(const Acts::GeometryContext &gctx) const override final
Returns the transformation to the origin of the chamber coordinate system.