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 Acts::Volume& volume) const;
42 std::array<Amg::Vector3D, 8> cornerPoints(const Acts::GeometryContext& gctx, const Acts::StrawSurface& surface) const;
43 std::array<Amg::Vector3D, 4> cornerPoints(const Acts::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
67 template <class EnvelopeType>
68 StatusCode pointInside(const EnvelopeType& envelope,
69 const Acts::Volume& boundVol,
70 const Amg::Vector3D& point,
71 const std::string& descr,
72 const Identifier& channelId) const;
73
79 StatusCode pointInside(const Acts::TrackingVolume& volume,
80 const Amg::Vector3D& point,
81 const std::string& descr,
82 const Identifier& chamberId) const;
83
84 bool hasOverlap(const std::array<Amg::Vector3D, 8>& chamberEdges,
85 const Acts::Volume& volume) const;
86
93 template <class EnvelopeType>
94 StatusCode testReadoutEle(const ActsTrk::GeometryContext& gctx,
95 const MdtReadoutElement& readOutEle,
96 const EnvelopeType& envelope,
97 const Acts::Volume& boundVol) const;
98 template <class EnvelopeType>
99 StatusCode testReadoutEle(const ActsTrk::GeometryContext& gctx,
100 const RpcReadoutElement& readOutEle,
101 const EnvelopeType& envelope,
102 const Acts::Volume& boundVol) const;
103 template <class EnvelopeType>
105 const TgcReadoutElement& readOutEle,
106 const EnvelopeType& envelope,
107 const Acts::Volume& boundVol) const;
108 template <class EnvelopeType>
109 StatusCode testReadoutEle(const ActsTrk::GeometryContext& gctx,
110 const sTgcReadoutElement& readOutEle,
111 const EnvelopeType& envelope,
112 const Acts::Volume& boundVol) const;
113 template <class EnvelopeType>
115 const MmReadoutElement& readOutEle,
116 const EnvelopeType& envelope,
117 const Acts::Volume& boundVol) const;
118
119
120
122 "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
123
124 SG::ReadHandleKey<ActsTrk::GeometryContext> m_geoCtxKey{this, "AlignmentKey", "ActsAlignment", "cond handle key"};
125
126 ServiceHandle<ActsTrk::ITrackingGeometrySvc> m_trackingGeometrySvc{this, "TrackingGeometrySvc","ActsTrackingGeometrySvc"};
128 Gaudi::Property<unsigned> m_overlapSamples{this, "overlapSamples", 100};
130 Gaudi::Property<std::string> m_overlapChambObj{this, "chamberOverlapFile", "OverlapingChambers.obj"};
133 Gaudi::Property<bool> m_ignoreOverlapCh{this, "ignoreChamberOverlap", true};
135 Gaudi::Property<bool> m_dumpObjs{this, "dumpVolumes" , false};
137
138};
139}
140#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
std::array< Amg::Vector3D, 8 > cornerPoints(const Acts::Volume &volume) const
Returns the 8 edge points from a trapezoidal / cuboid volume.
Gaudi::Property< bool > m_ignoreOverlapCh
The overlap of chamber volumes does not lead to a failure.
StatusCode pointInside(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.
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
bool hasOverlap(const std::array< Amg::Vector3D, 8 > &chamberEdges, const Acts::Volume &volume) const
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.
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
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...