ATLAS Offline Software
Loading...
Searching...
No Matches
ReadoutGeomCnvAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 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:
41 struct ConstructionCache: public GeoDeDuplicator {
42 public:
43 ConstructionCache() = default;
45 std::unique_ptr<MuonGM::MuonDetectorManager> detMgr{};
47 PVLink world{};
49 std::set<PVConstLink> translatedStations{};
51 GeoIntrusivePtr<GeoIdentifierTag> newIdTag() {
52 return geoId(++m_id);
53 }
54 private:
55 unsigned int m_id{0};
56 };
57
63 StatusCode buildStation(const ActsTrk::GeometryContext& gctx,
64 const Identifier& stationId,
65 ConstructionCache& cacheObj) const;
70 StatusCode cloneReadoutVolume(const ActsTrk::GeometryContext& gctx,
71 const Identifier& stationId,
72 ConstructionCache& cacheObj,
73 GeoIntrusivePtr<GeoVFullPhysVol>& clonedPhysVol,
74 MuonGM::MuonStation* & station) const;
76 GeoIntrusivePtr<GeoVFullPhysVol> cloneNswWedge(const ActsTrk::GeometryContext& gctx,
78 ConstructionCache& cacheObj) const;
79
80 StatusCode buildMdt(const ActsTrk::GeometryContext& gctx,
81 ConstructionCache& cacheObj) const;
82
83 StatusCode buildRpc(const ActsTrk::GeometryContext& gctx,
84 ConstructionCache& cacheObj) const;
85
86 StatusCode buildSTGC(const ActsTrk::GeometryContext& gctx,
87 ConstructionCache& cacheObj) const;
88
89 StatusCode buildMM(const ActsTrk::GeometryContext& gctx,
90 ConstructionCache& cacheObj) const;
91
92 StatusCode buildTgc(const ActsTrk::GeometryContext& gctx,
93 ConstructionCache& cacheObj) const;
94
95
96 StatusCode dumpAndCompare(const ActsTrk::GeometryContext& gctx,
97 const MuonGMR4::RpcReadoutElement& refEle,
98 const MuonGM::RpcReadoutElement& testEle) const;
99
100 StatusCode dumpAndCompare(const ActsTrk::GeometryContext& gctx,
101 const MuonGMR4::MdtReadoutElement& refEle,
102 const MuonGM::MdtReadoutElement& testEle) const;
103
104 StatusCode dumpAndCompare(const ActsTrk::GeometryContext& gctx,
105 const MuonGMR4::MmReadoutElement& refEle,
106 const MuonGM::MMReadoutElement& testEle) const;
107
108 StatusCode dumpAndCompare(const ActsTrk::GeometryContext& gctx,
109 const MuonGMR4::TgcReadoutElement& refEle,
110 const MuonGM::TgcReadoutElement& testEle) const;
111
112 StatusCode dumpAndCompare(const ActsTrk::GeometryContext& gctx,
113 const MuonGMR4::sTgcReadoutElement& refEle,
114 const MuonGM::sTgcReadoutElement& testEle) const;
115
116 StatusCode checkIdCompability(const MuonGMR4::MuonReadoutElement& refEle,
117 const MuonGM::MuonReadoutElement& testEle) const;
118
119 ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
120
121 SG::WriteCondHandleKey<MuonGM::MuonDetectorManager> m_writeKey{this, "WriteKey", "MuonDetectorManager"};
122
124
125 Gaudi::Property<bool> m_checkGeo{this, "checkGeo", false, "Checks the positions of the sensors"};
126 Gaudi::Property<bool> m_dumpGeo{this, "dumpGeo", false, "Dumps the constructed geometry"};
127 Gaudi::Property<std::string> m_geoDumpName{this,"geoDumpName", "ConvMuonGeoModel.db",};
129
130
131};
132}
133#endif
Base class for conditions algorithms.
Base class for conditions algorithms.
The MuonReadoutElement is an abstract class representing the geometry representing the 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
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
StatusCode buildRpc(const ActsTrk::GeometryContext &gctx, ConstructionCache &cacheObj) const
GeoIntrusivePtr< GeoVFullPhysVol > cloneNswWedge(const ActsTrk::GeometryContext &gctx, const MuonGMR4::MuonReadoutElement *nswRE, ConstructionCache &cacheObj) const
Clones the fullPhysicalVolume of the.
StatusCode buildTgc(const ActsTrk::GeometryContext &gctx, ConstructionCache &cacheObj) const
Gaudi::Property< bool > m_dumpGeo
StatusCode buildSTGC(const ActsTrk::GeometryContext &gctx, ConstructionCache &cacheObj) const
StatusCode dumpAndCompare(const ActsTrk::GeometryContext &gctx, const MuonGMR4::RpcReadoutElement &refEle, const MuonGM::RpcReadoutElement &testEle) const
StatusCode checkIdCompability(const MuonGMR4::MuonReadoutElement &refEle, const MuonGM::MuonReadoutElement &testEle) const
StatusCode buildMM(const ActsTrk::GeometryContext &gctx, ConstructionCache &cacheObj) const
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.