ATLAS Offline Software
Loading...
Searching...
No Matches
ReadoutGeomCnvAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef MUONGEOMETRYCNV_ReadoutGeomCnvAlg_H
5#define MUONGEOMETRYCNV_ReadoutGeomCnvAlg_H
6
7#include "TrkSurfaces/Surface.h" // Work around cppcheck false positive
12
16
17#include "GeoModelKernel/GeoTransform.h"
18#include "GeoModelHelpers/GeoDeDuplicator.h"
19#include "GeoModelKernel/GeoVFullPhysVol.h"
20#include "GeoModelKernel/GeoIdentifierTag.h"
21
24
30
31namespace MuonGMR4{
33 public:
34 using AthCondAlgorithm::AthCondAlgorithm;
35 ~ReadoutGeomCnvAlg() = default;
36
37 StatusCode execute(const EventContext& ctx) const override;
38 StatusCode initialize() override;
39
40 private:
44 struct ConstructionCache: public GeoDeDuplicator {
45 public:
46 ConstructionCache() = default;
48 std::unique_ptr<MuonGM::MuonDetectorManager> detMgr{};
50 PVLink world{};
52 std::set<PVConstLink> translatedStations{};
54 GeoIntrusivePtr<GeoIdentifierTag> newIdTag() {
55 return geoId(++m_id);
56 }
57 private:
58 unsigned m_id{0};
59 };
60
67 StatusCode buildStation(const ActsTrk::GeometryContext& gctx,
68 const Identifier& stationId,
69 ConstructionCache& cacheObj) const;
78 StatusCode cloneReadoutVolume(const ActsTrk::GeometryContext& gctx,
79 const Identifier& stationId,
80 ConstructionCache& cacheObj,
81 GeoIntrusivePtr<GeoVFullPhysVol>& clonedPhysVol,
82 MuonGM::MuonStation* & station) const;
87 GeoIntrusivePtr<GeoVFullPhysVol> cloneNswWedge(const ActsTrk::GeometryContext& gctx,
89 ConstructionCache& cacheObj) const;
94 StatusCode buildMdt(const ActsTrk::GeometryContext& gctx,
95 ConstructionCache& cacheObj) const;
100 StatusCode buildRpc(const ActsTrk::GeometryContext& gctx,
101 ConstructionCache& cacheObj) const;
106 StatusCode buildSTGC(const ActsTrk::GeometryContext& gctx,
107 ConstructionCache& cacheObj) const;
112 StatusCode buildMM(const ActsTrk::GeometryContext& gctx,
113 ConstructionCache& cacheObj) const;
118 StatusCode buildTgc(const ActsTrk::GeometryContext& gctx,
119 ConstructionCache& cacheObj) const;
127 StatusCode dumpAndCompare(const ActsTrk::GeometryContext& gctx,
128 const MuonGMR4::RpcReadoutElement& refEle,
129 const MuonGM::RpcReadoutElement& testEle) const;
137 StatusCode dumpAndCompare(const ActsTrk::GeometryContext& gctx,
138 const MuonGMR4::MdtReadoutElement& refEle,
139 const MuonGM::MdtReadoutElement& testEle) const;
147 StatusCode dumpAndCompare(const ActsTrk::GeometryContext& gctx,
148 const MuonGMR4::MmReadoutElement& refEle,
149 const MuonGM::MMReadoutElement& testEle) const;
157 StatusCode dumpAndCompare(const ActsTrk::GeometryContext& gctx,
158 const MuonGMR4::TgcReadoutElement& refEle,
159 const MuonGM::TgcReadoutElement& testEle) const;
167 StatusCode dumpAndCompare(const ActsTrk::GeometryContext& gctx,
168 const MuonGMR4::sTgcReadoutElement& refEle,
169 const MuonGM::sTgcReadoutElement& testEle) const;
175 StatusCode checkIdCompability(const MuonGMR4::MuonReadoutElement& refEle,
176 const MuonGM::MuonReadoutElement& testEle) const;
177
178 ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
179
180 SG::WriteCondHandleKey<MuonGM::MuonDetectorManager> m_writeKey{this, "WriteKey", "MuonDetectorManager"};
181
183
184 Gaudi::Property<bool> m_checkGeo{this, "checkGeo", false, "Checks the positions of the sensors"};
185 Gaudi::Property<bool> m_dumpGeo{this, "dumpGeo", false, "Dumps the constructed geometry"};
187 Gaudi::Property<bool> m_splitTrfCache{this, "splitTrfCache", false, ""};
188 Gaudi::Property<std::string> m_geoDumpName{this,"geoDumpName", "ConvMuonGeoModel.db",};
190
191
192};
193}
194#endif
Base class for conditions algorithms.
Base class for conditions algorithms.
Readout element to describe the Monitored Drift Tube (Mdt) chambers Mdt chambers usually comrpise out...
MuonReadoutElement is an abstract class representing the geometry of a muon detector.
StatusCode buildStation(const ActsTrk::GeometryContext &gctx, const Identifier &stationId, ConstructionCache &cacheObj) const
builds a station object from readout element.
Gaudi::Property< std::string > m_geoDumpName
StatusCode buildMdt(const ActsTrk::GeometryContext &gctx, ConstructionCache &cacheObj) const
Converts all Mdt readout elements from the R4 format into the legacy Trk format.
StatusCode initialize() override
StatusCode cloneReadoutVolume(const ActsTrk::GeometryContext &gctx, const Identifier &stationId, ConstructionCache &cacheObj, GeoIntrusivePtr< GeoVFullPhysVol > &clonedPhysVol, MuonGM::MuonStation *&station) const
Clones the fullPhysical volume of the readoutElement and embeds it into the associated station.
StatusCode execute(const EventContext &ctx) const override
SG::WriteCondHandleKey< MuonGM::MuonDetectorManager > m_writeKey
Gaudi::Property< bool > m_splitTrfCache
Instantiate a new transform cache to ensure lazy transform population in the event processing.
GeoIntrusivePtr< GeoVFullPhysVol > cloneNswWedge(const ActsTrk::GeometryContext &gctx, const MuonGMR4::MuonReadoutElement &nswRE, ConstructionCache &cacheObj) const
Clones the full phyical volume associated to the NSw readout element.
StatusCode buildRpc(const ActsTrk::GeometryContext &gctx, ConstructionCache &cacheObj) const
Converts all Rpc readout elements from the R4 format into the legacy Trk format.
StatusCode buildTgc(const ActsTrk::GeometryContext &gctx, ConstructionCache &cacheObj) const
Converts all Tgc readout elements from the R4 format into the legacy Trk format.
Gaudi::Property< bool > m_dumpGeo
StatusCode buildSTGC(const ActsTrk::GeometryContext &gctx, ConstructionCache &cacheObj) const
Converts all sTgc readout elements from the R4 format into the legacy Trk format.
StatusCode dumpAndCompare(const ActsTrk::GeometryContext &gctx, const MuonGMR4::RpcReadoutElement &refEle, const MuonGM::RpcReadoutElement &testEle) const
Compares the R4 readout element with the constructed Trk readout element.
StatusCode checkIdCompability(const MuonGMR4::MuonReadoutElement &refEle, const MuonGM::MuonReadoutElement &testEle) const
Checks whether the Identifier fields of both readout elements are identical.
StatusCode buildMM(const ActsTrk::GeometryContext &gctx, ConstructionCache &cacheObj) const
Converts all Mm readout elements from the R4 format into the legacy Trk format.
SG::ReadCondHandleKeyArray< ActsTrk::DetectorAlignStore > m_alignStoreKeys
const MuonGMR4::MuonDetectorManager * m_detMgr
Gaudi::Property< bool > m_checkGeo
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
An MMReadoutElement corresponds to a single STGC module; therefore typicaly a barrel muon station con...
Base class for the XxxReadoutElement, with Xxx = Mdt, Rpc, Tgc, Csc.
An RpcReadoutElement corresponds to a single RPC module; therefore typicaly a barrel muon station con...
A TgcReadoutElement corresponds to a single TGC chamber; therefore typically a TGC station contains s...
An sTgcReadoutElement corresponds to a single STGC module; therefore typicaly a barrel muon station c...
The ReadoutGeomCnvAlg converts the Run4 Readout geometry build from the GeoModelXML into the legacy M...
HandleKeyArray< ReadCondHandle< T >, CondHandleDefault::Key< ReadCondHandleKey< T > >, Gaudi::DataHandle::Reader > ReadCondHandleKeyArray
std::unique_ptr< MuonGM::MuonDetectorManager > detMgr
Pointer to the legacy MuonDetectorManager.
GeoIntrusivePtr< GeoIdentifierTag > newIdTag()
Returns an identifier tag.
std::set< PVConstLink > translatedStations
Set of all translated Physical volumes.