ATLAS Offline Software
Loading...
Searching...
No Matches
MuonChamberToolTest.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 MUONGEOMODELTESTR4_MUONCHAMBERTOOLTEST_H
5#define MUONGEOMODELTESTR4_MUONCHAMBERTOOLTEST_H
6
8
16
20
21
22#include "Acts/Surfaces/Surface.hpp"
23#include "Acts/Surfaces/StrawSurface.hpp"
24#include "Acts/Surfaces/PlaneSurface.hpp"
25#include "Acts/Geometry/TrackingVolume.hpp"
26
27namespace MuonGMR4 {
28
29
31 public:
32 using AthReentrantAlgorithm::AthReentrantAlgorithm;
34
35 StatusCode execute(const EventContext& ctx) const override;
36 StatusCode initialize() override;
37
38 bool isReEntrant() const override final {return false;}
39
40 private:
42 std::vector<Amg::Vector3D> cornerPoints(const ActsTrk::GeometryContext& gctx, const Acts::Volume& volume) const;
43 std::vector<Amg::Vector3D> cornerPoints(const ActsTrk::GeometryContext& gctx, const Acts::Surface& surface) const;
44
46 const std::string& envName,
47 const Acts::Volume& envelopeVol,
48 const std::vector<const Acts::Surface*>& assocSurfaces,
49 const std::vector<const Acts::Volume*>& subVolumes={}) const;
50
51 StatusCode checkPortals(const ActsTrk::GeometryContext& gctx,
52 const Acts::TrackingVolume& volume) const;
53
55 StatusCode checkChambers(const ActsTrk::GeometryContext& gctx) const;
57 StatusCode checkEnvelopes(const ActsTrk::GeometryContext& gctx) const;
59 StatusCode checkTrackingGeometry(const ActsTrk::GeometryContext& gctx,
60 const Acts::TrackingGeometry& trackingGeometry) const;
63 const Chamber& envelope) const;
64
73 StatusCode pointInside(const ActsTrk::GeometryContext& gctx,
74 const Acts::Volume& boundVol,
75 const Amg::Vector3D& point,
76 const std::string& descr,
77 const Identifier& channelId) const;
83 bool hasOverlap(const ActsTrk::GeometryContext& gctx,
84 const std::vector<Amg::Vector3D>& chamberEdges,
85 const Acts::Volume& volume) const;
86
92 StatusCode testReadoutSurfaces(const ActsTrk::GeometryContext& gctx,
93 const MuonReadoutElement& element,
94 const Acts::Volume& boundVol) const;
95
101 StatusCode testReadoutEle(const ActsTrk::GeometryContext& gctx,
102 const MdtReadoutElement& readOutEle,
103 const Acts::Volume& boundVol) const;
109 StatusCode testReadoutEle(const ActsTrk::GeometryContext& gctx,
110 const RpcReadoutElement& readOutEle,
111 const Acts::Volume& boundVol) const;
117 StatusCode testReadoutEle(const ActsTrk::GeometryContext& gctx,
118 const TgcReadoutElement& readOutEle,
119 const Acts::Volume& boundVol) const;
125 StatusCode testReadoutEle(const ActsTrk::GeometryContext& gctx,
126 const sTgcReadoutElement& readOutEle,
127 const Acts::Volume& boundVol) const;
133 StatusCode testReadoutEle(const ActsTrk::GeometryContext& gctx,
134 const MmReadoutElement& readOutEle,
135 const Acts::Volume& boundVol) const;
136
137
138
140 "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
141
142 ActsTrk::GeoContextReadKey_t m_geoCtxKey{this, "AlignmentKey", "ActsAlignment", "cond handle key"};
143
144 ServiceHandle<ActsTrk::ITrackingGeometrySvc> m_trackingGeometrySvc{this, "TrackingGeometrySvc","ActsTrackingGeometrySvc"};
146 Gaudi::Property<unsigned> m_overlapSamples{this, "overlapSamples", 50};
148 Gaudi::Property<std::string> m_overlapChambObj{this, "chamberOverlapFile", "OverlapingChambers.obj"};
151 Gaudi::Property<bool> m_ignoreOverlapCh{this, "ignoreChamberOverlap", true};
153 Gaudi::Property<bool> m_ignoreOutsideSurf{this, "ignoreOutsideSurface", true};
155 Gaudi::Property<bool> m_dumpObjs{this, "dumpVolumes" , false};
157
158};
159}
160#endif
An algorithm that can be simultaneously executed in multiple threads.
const MuonDetectorManager * m_detMgr
Gaudi::Property< bool > m_ignoreOverlapCh
The overlap of chamber volumes does not lead to a failure.
ActsTrk::GeoContextReadKey_t m_geoCtxKey
StatusCode checkEnvelopes(const ActsTrk::GeometryContext &gctx) const
Check envelopes.
StatusCode checkPortals(const ActsTrk::GeometryContext &gctx, const Acts::TrackingVolume &volume) const
StatusCode execute(const EventContext &ctx) const override
StatusCode checkChambers(const ActsTrk::GeometryContext &gctx) const
Check whether the chamber envelopes are consistent.
StatusCode pointInside(const ActsTrk::GeometryContext &gctx, const Acts::Volume &boundVol, const Amg::Vector3D &point, const std::string &descr, const Identifier &channelId) const
Checks whether the point is inside of an envelope object, i.e.
void saveEnvelope(const ActsTrk::GeometryContext &gctx, const std::string &envName, const Acts::Volume &envelopeVol, const std::vector< const Acts::Surface * > &assocSurfaces, const std::vector< const Acts::Volume * > &subVolumes={}) const
Gaudi::Property< bool > m_dumpObjs
Dump the chambers & sectors as separate obj files.
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Gaudi::Property< std::string > m_overlapChambObj
Name of the chamber output obj file.
StatusCode allReadoutInEnvelope(const ActsTrk::GeometryContext &ctx, const Chamber &envelope) const
Checks whether the readout elements of an enevelope are completely embedded into the envelope.
StatusCode testReadoutSurfaces(const ActsTrk::GeometryContext &gctx, const MuonReadoutElement &element, const Acts::Volume &boundVol) const
Tests whether all surfaces defined by the readout element have a valid geometry identifier and whethe...
bool isReEntrant() const override final
Gaudi::Property< unsigned > m_overlapSamples
Number of points to scan along the lines between two volume corners to check whether they belong to a...
StatusCode testReadoutEle(const ActsTrk::GeometryContext &gctx, const MdtReadoutElement &readOutEle, const Acts::Volume &boundVol) const
Checks whether all channels of a given readout element are fully covered by the envelope.
ServiceHandle< ActsTrk::ITrackingGeometrySvc > m_trackingGeometrySvc
Gaudi::Property< bool > m_ignoreOutsideSurf
The exceeding surfaces does not lead to a failure.
StatusCode checkTrackingGeometry(const ActsTrk::GeometryContext &gctx, const Acts::TrackingGeometry &trackingGeometry) const
Check tracking geometry volumes.
std::vector< Amg::Vector3D > cornerPoints(const ActsTrk::GeometryContext &gctx, const Acts::Volume &volume) const
Returns the edge points from a trapezoidal / cuboid /diamond volume.
bool hasOverlap(const ActsTrk::GeometryContext &gctx, const std::vector< Amg::Vector3D > &chamberEdges, const Acts::Volume &volume) const
Checks whether the edge points from a trapezoid/cuboid/diamond form a volume overlapping with the giv...
SG::ReadHandleKey< GeometryContext > GeoContextReadKey_t
Abrivate the ReadHandleKey to declare the data dependency on the Geometry context.
Eigen::Matrix< double, 3, 1 > Vector3D
The ReadoutGeomCnvAlg converts the Run4 Readout geometry build from the GeoModelXML into the legacy M...