ATLAS Offline Software
IMuonGeoUtilityTool.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 MUONGEOMODELR4_IMUONGEOUTILITYTOOL_H
5 #define MUONGEOMODELR4_IMUONGEOUTILITYTOOL_H
6 
7 
10 
11 #include <GeoModelKernel/GeoFullPhysVol.h>
12 #include <GeoModelKernel/GeoPhysVol.h>
13 #include <GeoModelKernel/GeoShape.h>
14 #include <GeoModelKernel/GeoSimplePolygonBrep.h>
15 #include <GeoModelKernel/GeoAlignableTransform.h>
16 #include <GeoModelHelpers/getChildNodesWithTrf.h>
17 #include <GaudiKernel/IAlgTool.h>
18 
19 class GeoShapeUnion;
20 
21 namespace MuonGMR4{
22 
23 class IMuonGeoUtilityTool : virtual public IAlgTool {
24  public:
27 
29  virtual const GeoAlignableTransform* findAlignableTransform(const PVConstLink& physVol) const = 0;
30 
31 
33  virtual const GeoShape* extractShape(const PVConstLink& physVol) const = 0;
34  virtual const GeoShape* extractShape(const GeoShape* inShape) const = 0;
35 
36  // Navigates through the volume to find the shifts / rotations etc. from the geo shape
37  virtual Amg::Transform3D extractShifts(const PVConstLink& physVol) const = 0;
38  virtual Amg::Transform3D extractShifts(const GeoShape* inShape) const = 0;
39 
42  using physVolWithTrans = GeoChildNodeWithTrf;
45  virtual std::vector<physVolWithTrans> findAllLeafNodesByName(const PVConstLink& physVol, const std::string& volumeName) const = 0;
47  virtual std::vector<const GeoShape*> getComponents(const GeoShape* booleanShape) const = 0;
48 
50  virtual std::string dumpShape(const GeoShape* inShape) const = 0;
52  virtual std::string dumpVolume(const PVConstLink& physVol) const = 0;
54  virtual std::vector<Amg::Vector2D> polygonEdges(const GeoSimplePolygonBrep& polygon) const = 0;
55 
57  virtual std::vector<Amg::Vector3D> shapeEdges(const GeoShape* shape,
58  const Amg::Transform3D& volTrf) const = 0;
59 
60 
61 };
62 
63 }
64 #endif
MuonGMR4::IMuonGeoUtilityTool::getComponents
virtual std::vector< const GeoShape * > getComponents(const GeoShape *booleanShape) const =0
Splits a boolean shape into its building blocks.
MuonGMR4::IMuonGeoUtilityTool::findAllLeafNodesByName
virtual std::vector< physVolWithTrans > findAllLeafNodesByName(const PVConstLink &physVol, const std::string &volumeName) const =0
Searches through all child volumes and collects the nodes where the logical volumes have the requeste...
MuonGMR4::IMuonGeoUtilityTool::findAlignableTransform
virtual const GeoAlignableTransform * findAlignableTransform(const PVConstLink &physVol) const =0
Returns the next Geo alignable transform in the GeoModelTree upstream.
MuonGMR4::IMuonGeoUtilityTool::shapeEdges
virtual std::vector< Amg::Vector3D > shapeEdges(const GeoShape *shape, const Amg::Transform3D &volTrf) const =0
Returns the edge points of the polygon like GeoShapes.
MuonGMR4::IMuonGeoUtilityTool::extractShape
virtual const GeoShape * extractShape(const PVConstLink &physVol) const =0
Navigates throughs the volume to find a Box / Prd shape.
MuonGMR4::IMuonGeoUtilityTool::extractShifts
virtual Amg::Transform3D extractShifts(const GeoShape *inShape) const =0
MuonGMR4::IMuonGeoUtilityTool::DeclareInterfaceID
DeclareInterfaceID(IMuonGeoUtilityTool, 1, 0)
Gaudi interface ID.
MuonGMR4::IMuonGeoUtilityTool
Definition: IMuonGeoUtilityTool.h:23
GeoPrimitives.h
MuonGMR4::IMuonGeoUtilityTool::extractShape
virtual const GeoShape * extractShape(const GeoShape *inShape) const =0
MuonGMR4
A muon chamber is a collection of readout elements belonging to the same station.
Definition: ChamberAssembleTool.h:16
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
MuonGMR4::IMuonGeoUtilityTool::physVolWithTrans
GeoChildNodeWithTrf physVolWithTrans
Helper struct to cache a PhysVolume pointer together with the transformation to go from the volume to...
Definition: IMuonGeoUtilityTool.h:42
MuonGMR4::IMuonGeoUtilityTool::dumpVolume
virtual std::string dumpVolume(const PVConstLink &physVol) const =0
MuonGMR4::IMuonGeoUtilityTool::dumpShape
virtual std::string dumpShape(const GeoShape *inShape) const =0
MuonGMR4::IMuonGeoUtilityTool::extractShifts
virtual Amg::Transform3D extractShifts(const PVConstLink &physVol) const =0
MuonGMR4::IMuonGeoUtilityTool::polygonEdges
virtual std::vector< Amg::Vector2D > polygonEdges(const GeoSimplePolygonBrep &polygon) const =0
Transforms the vertices of the Polygon shape into a std::vector consisting of Amg::Vector2D objects.