ATLAS Offline Software
Loading...
Searching...
No Matches
MuonChamberToolTest.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 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
26namespace MuonGMR4 {
27
28
30 public:
31 using AthReentrantAlgorithm::AthReentrantAlgorithm;
33
34 StatusCode execute(const EventContext& ctx) const override;
35 StatusCode initialize() override;
36
37 bool isReEntrant() const override final {return false;}
38
39 private:
41 std::array<Amg::Vector3D, 8> cornerPoints(const ActsTrk::GeometryContext& gctx, const Acts::Volume& volume) const;
42 std::array<Amg::Vector3D, 8> cornerPoints(const ActsTrk::GeometryContext& gctx, const Acts::StrawSurface& surface) const;
43 std::array<Amg::Vector3D, 4> cornerPoints(const ActsTrk::GeometryContext& gctx, const Acts::PlaneSurface&) const;
44
45
47 const std::string& envName,
48 const Acts::Volume& envelopeVol,
49 const std::vector<const MuonGMR4::MuonReadoutElement*>& assocRE,
50 const std::vector<std::shared_ptr<Acts::Volume>>& subVolumes={}) const;
52 StatusCode checkChambers(const ActsTrk::GeometryContext& gctx) const;
54 StatusCode checkEnvelopes(const ActsTrk::GeometryContext& gctx) const;
56 template <class EnvelopeType>
58 const EnvelopeType& envelope) const;
59
68 template <class EnvelopeType>
69 StatusCode pointInside(const ActsTrk::GeometryContext& gctx,
70 const EnvelopeType& envelope,
71 const Acts::Volume& boundVol,
72 const Amg::Vector3D& point,
73 const std::string& descr,
74 const Identifier& channelId) const;
81 StatusCode pointInside(const ActsTrk::GeometryContext& gctx,
82 const Acts::TrackingVolume& volume,
83 const Amg::Vector3D& point,
84 const std::string& descr,
85 const Identifier& chamberId) const;
91 bool hasOverlap(const ActsTrk::GeometryContext& gctx,
92 const std::array<Amg::Vector3D, 8>& chamberEdges,
93 const Acts::Volume& volume) const;
100 template <class EnvelopeType>
101 StatusCode testReadoutEle(const ActsTrk::GeometryContext& gctx,
102 const MdtReadoutElement& readOutEle,
103 const EnvelopeType& envelope,
104 const Acts::Volume& boundVol) const;
105 template <class EnvelopeType>
106 StatusCode testReadoutEle(const ActsTrk::GeometryContext& gctx,
107 const RpcReadoutElement& readOutEle,
108 const EnvelopeType& envelope,
109 const Acts::Volume& boundVol) const;
110 template <class EnvelopeType>
112 const TgcReadoutElement& readOutEle,
113 const EnvelopeType& envelope,
114 const Acts::Volume& boundVol) const;
115 template <class EnvelopeType>
116 StatusCode testReadoutEle(const ActsTrk::GeometryContext& gctx,
117 const sTgcReadoutElement& readOutEle,
118 const EnvelopeType& envelope,
119 const Acts::Volume& boundVol) const;
120 template <class EnvelopeType>
122 const MmReadoutElement& readOutEle,
123 const EnvelopeType& envelope,
124 const Acts::Volume& boundVol) const;
125
126
127
129 "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
130
131 SG::ReadHandleKey<ActsTrk::GeometryContext> m_geoCtxKey{this, "AlignmentKey", "ActsAlignment", "cond handle key"};
132
133 ServiceHandle<ActsTrk::ITrackingGeometrySvc> m_trackingGeometrySvc{this, "TrackingGeometrySvc","ActsTrackingGeometrySvc"};
135 Gaudi::Property<unsigned> m_overlapSamples{this, "overlapSamples", 100};
137 Gaudi::Property<std::string> m_overlapChambObj{this, "chamberOverlapFile", "OverlapingChambers.obj"};
140 Gaudi::Property<bool> m_ignoreOverlapCh{this, "ignoreChamberOverlap", true};
142 Gaudi::Property<bool> m_dumpObjs{this, "dumpVolumes" , false};
144
145};
146}
147#endif
An algorithm that can be simultaneously executed in multiple threads.
const MuonDetectorManager * m_detMgr
StatusCode testReadoutEle(const ActsTrk::GeometryContext &gctx, const MmReadoutElement &readOutEle, const EnvelopeType &envelope, const Acts::Volume &boundVol) const
Gaudi::Property< bool > m_ignoreOverlapCh
The overlap of chamber volumes does not lead to a failure.
StatusCode checkEnvelopes(const ActsTrk::GeometryContext &gctx) const
Check envelopes.
void saveEnvelope(const ActsTrk::GeometryContext &gctx, const std::string &envName, const Acts::Volume &envelopeVol, const std::vector< const MuonGMR4::MuonReadoutElement * > &assocRE, const std::vector< std::shared_ptr< Acts::Volume > > &subVolumes={}) const
StatusCode execute(const EventContext &ctx) const override
StatusCode checkChambers(const ActsTrk::GeometryContext &gctx) const
Check whether the chamber envelopes are consistent.
Gaudi::Property< bool > m_dumpObjs
Dump the chambers & sectors as separate obj files.
StatusCode pointInside(const ActsTrk::GeometryContext &gctx, const EnvelopeType &envelope, 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.
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Gaudi::Property< std::string > m_overlapChambObj
Name of the chamber output obj file.
StatusCode testReadoutEle(const ActsTrk::GeometryContext &gctx, const MdtReadoutElement &readOutEle, const EnvelopeType &envelope, const Acts::Volume &boundVol) const
Checks whether all channels of a given readout element are fully covered by the envelope.
StatusCode testReadoutEle(const ActsTrk::GeometryContext &gctx, const TgcReadoutElement &readOutEle, const EnvelopeType &envelope, const Acts::Volume &boundVol) const
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...
ServiceHandle< ActsTrk::ITrackingGeometrySvc > m_trackingGeometrySvc
bool hasOverlap(const ActsTrk::GeometryContext &gctx, const std::array< Amg::Vector3D, 8 > &chamberEdges, const Acts::Volume &volume) const
Checks whether the 8 edge point from a trapezoid/cuboid form a volume overlapping with the given volu...
std::array< Amg::Vector3D, 8 > cornerPoints(const ActsTrk::GeometryContext &gctx, const Acts::Volume &volume) const
Returns the 8 edge points from a trapezoidal / cuboid volume.
StatusCode allReadoutInEnvelope(const ActsTrk::GeometryContext &ctx, const EnvelopeType &envelope) const
Checks whether the readout elements of an enevelope are completely embedded into the envelope.
SG::ReadHandleKey< ActsTrk::GeometryContext > m_geoCtxKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Eigen::Matrix< double, 3, 1 > Vector3D
The ReadoutGeomCnvAlg converts the Run4 Readout geometry build from the GeoModelXML into the legacy M...