ATLAS Offline Software
ChamberAssembleTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef SIMULATIONBASE
5 #ifndef MUONGEOMODELR4_MUONCHAMBERASSMBLETOOL_H
6 #define MUONGEOMODELR4_MUONCHAMBERASSMBLETOOL_H
7 
10 
15 #include <ActsGeoUtils/Defs.h>
16 
17 
18 namespace Acts{
19  class TrapezoidVolumeBounds;
20 }
21 
22 namespace MuonGMR4 {
23 
24 class MuonReadoutElement;
25 
26 class ChamberAssembleTool : public extends<AthAlgTool, IMuonReadoutGeomTool> {
27  public:
29  ChamberAssembleTool(const std::string &type, const std::string &name,
30  const IInterface *parent);
31 
32 
33  virtual StatusCode buildReadOutElements(MuonDetectorManager &mgr) override final;
34 
35  private:
36  using BoundType = Acts::TrapezoidVolumeBounds;
37 
38  using BoundTrfPair = std::pair<std::shared_ptr<BoundType>,
47  const std::vector<const MuonReadoutElement*>& readoutEles,
48  const Amg::Transform3D& globToLoc,
50  const double margin = 1.*Gaudi::Units::cm) const;
51 
55  static std::shared_ptr<BoundType> boundingBox(const MuonReadoutElement* reEle,
57 
61  static std::array<Amg::Vector3D, 4> cornerPointsPlane(const Amg::Transform3D& localToGlob,
62  const BoundType& bounds);
63 
67  static std::array<Amg::Vector3D, 8> cornerPoints(const Amg::Transform3D& localToGlob,
68  const BoundType& bounds);
69 
73  static Amg::Transform3D centerTrapezoid(const std::array<Amg::Vector3D, 8>& cornerPoints);
80  static double trapezoidEdgeDist(const Amg::Vector3D& linePos,
81  const Amg::Vector3D& lineDir,
82  const Amg::Vector3D& testMe,
83  bool leftEdge);
84 
85  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{this, "IdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
86  PublicToolHandle<IMuonGeoUtilityTool> m_geoUtilTool{this,"GeoUtilTool", "" };
87 
88 };
89 
90 }
91 
92 #endif
93 #endif
94 
MuonGMR4::ChamberAssembleTool::centerTrapezoid
static Amg::Transform3D centerTrapezoid(const std::array< Amg::Vector3D, 8 > &cornerPoints)
Returns the translation transform centering the 8 corner points of the trapezoid.
Definition: ChamberAssembleTool.cxx:145
MuonGMR4::MuonDetectorManager
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonDetectorManager.h:62
MuonGMR4::ChamberAssembleTool::BoundTrfPair
std::pair< std::shared_ptr< BoundType >, Amg::Transform3D > BoundTrfPair
Definition: ChamberAssembleTool.h:39
MuonGMR4::ChamberAssembleTool::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: ChamberAssembleTool.h:85
MuonGMR4::MuonReadoutElement
The MuonReadoutElement is an abstract class representing the geometry representing the muon detector.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonReadoutElement.h:38
MuonGMR4::ChamberAssembleTool::cornerPointsPlane
static std::array< Amg::Vector3D, 4 > cornerPointsPlane(const Amg::Transform3D &localToGlob, const BoundType &bounds)
Returns the 4 corners of the trapezoid in the x-y plane.
Definition: ChamberAssembleTool.cxx:122
MuonGMR4::ChamberAssembleTool::BoundType
Acts::TrapezoidVolumeBounds BoundType
Definition: ChamberAssembleTool.h:36
BchCleanup.mgr
mgr
Definition: BchCleanup.py:294
cm
const double cm
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/FCAL_ChannelMap.cxx:25
Defs.h
MuonGMR4
The ReadoutGeomCnvAlg converts the Run4 Readout geometry build from the GeoModelXML into the legacy M...
Definition: MdtCalibInput.h:20
Acts
Definition: ChamberAssembleTool.h:18
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
MuonGMR4::ChamberAssembleTool::cornerPoints
static std::array< Amg::Vector3D, 8 > cornerPoints(const Amg::Transform3D &localToGlob, const BoundType &bounds)
Returns the 8 corners marking the trapezoid.
Definition: ChamberAssembleTool.cxx:132
ActsGeometryContext
Include the GeoPrimitives which need to be put first.
Definition: ActsGeometryContext.h:27
MuonGMR4::ChamberAssembleTool::buildReadOutElements
virtual StatusCode buildReadOutElements(MuonDetectorManager &mgr) override final
Definition: ChamberAssembleTool.cxx:287
ActsTrk::SurfaceBoundSet
Definition: Tracking/Acts/ActsGeoUtils/ActsGeoUtils/Defs.h:17
MuonGMR4::ChamberAssembleTool::boundingBox
BoundTrfPair boundingBox(const ActsGeometryContext &gctx, const std::vector< const MuonReadoutElement * > &readoutEles, const Amg::Transform3D &globToLoc, ActsTrk::SurfaceBoundSet< BoundType > &boundSet, const double margin=1.*Gaudi::Units::cm) const
builds the bounding box trapezoidal volume bounds from the set of readout elements Returns a pair of ...
Definition: ChamberAssembleTool.cxx:162
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
MuonGMR4::ChamberAssembleTool::ChamberAssembleTool
ChamberAssembleTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard constructor of the tool.
Definition: ChamberAssembleTool.cxx:64
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
MdtReadoutElement.h
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
MuonGMR4::ChamberAssembleTool::trapezoidEdgeDist
static double trapezoidEdgeDist(const Amg::Vector3D &linePos, const Amg::Vector3D &lineDir, const Amg::Vector3D &testMe, bool leftEdge)
Returns the signed distances of an external point to the trapezoidal edge.
Definition: ChamberAssembleTool.cxx:70
MuonGMR4::ChamberAssembleTool
Definition: ChamberAssembleTool.h:26
IMuonReaoutGeomTool.h
MuonGMR4::ChamberAssembleTool::m_geoUtilTool
PublicToolHandle< IMuonGeoUtilityTool > m_geoUtilTool
Definition: ChamberAssembleTool.h:86
IMuonGeoUtilityTool.h
IMuonIdHelperSvc.h
IGeoDbTagSvc.h
ServiceHandle< Muon::IMuonIdHelperSvc >