#include <MuonGeoUtilityTool.h>
Definition at line 18 of file MuonGeoUtilityTool.h.
◆ MuonGeoUtilityTool()
MuonGMR4::MuonGeoUtilityTool::MuonGeoUtilityTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~MuonGeoUtilityTool()
MuonGMR4::MuonGeoUtilityTool::~MuonGeoUtilityTool |
( |
| ) |
|
|
finaloverridevirtualdefault |
◆ dumpShape()
std::string MuonGMR4::MuonGeoUtilityTool::dumpShape |
( |
const GeoShape * |
inShape | ) |
const |
|
finaloverride |
◆ dumpVolume() [1/2]
std::string MuonGMR4::MuonGeoUtilityTool::dumpVolume |
( |
const PVConstLink & |
physVol | ) |
const |
|
finaloverride |
◆ dumpVolume() [2/2]
std::string MuonGMR4::MuonGeoUtilityTool::dumpVolume |
( |
const PVConstLink & |
physVol, |
|
|
const std::string & |
childDelim |
|
) |
| const |
|
private |
Definition at line 94 of file MuonGeoUtilitiyTool.cxx.
95 std::stringstream sstr{};
96 if (!physVol || !physVol->getLogVol()){
97 ATH_MSG_WARNING(__FILE__<<
":"<<__LINE__<<
" "<<__func__<<
" No logical volume attached ");
103 <<
" Failed to extract shape from phys volume "
104 << physVol->getLogVol()->getName());
107 sstr<<
"logical volume "<<physVol->getLogVol()->getName()<<
", ";
108 if (physVol->isShared() || !physVol->getParent()){
109 sstr<<
"shared volume, ";
111 const GeoVPhysVol*
pv = physVol;
112 if (
typeid(*
pv) ==
typeid(GeoFullPhysVol)){
113 const Amg::Transform3D absTrans =
static_cast<const GeoFullPhysVol&
>(*physVol).getAbsoluteTransform();
124 sstr<<
"number of children "<<physVol->getNChildVols()<<
", "<<std::endl;
125 std::vector<GeoChildNodeWithTrf>
children = getChildrenWithRef(physVol,
false);
126 for (
unsigned int child = 0; child <
children.size(); ++child) {
◆ extractShape() [1/2]
const GeoShape * MuonGMR4::MuonGeoUtilityTool::extractShape |
( |
const GeoShape * |
inShape | ) |
const |
|
finaloverride |
Definition at line 46 of file MuonGeoUtilitiyTool.cxx.
49 ATH_MSG_INFO(__FILE__<<
":"<<__LINE__<<
" "<<__func__<<
" nullptr given ");
52 if (inShape->typeID() == GeoShapeShift::getClassTypeID()) {
53 const GeoShapeShift* shift = dynamic_pointer_cast<const GeoShapeShift>(compressShift(inShape));
56 <<
". Continue navigation "<<shift);
59 if (inShape->typeID() == GeoShapeSubtraction::getClassTypeID()){
61 "Shape is a subtraction. Extract the basic shape. Continue navigation "<<inShape);
62 const GeoShapeSubtraction* subtract =
static_cast<const GeoShapeSubtraction*
>(inShape);
◆ extractShape() [2/2]
const GeoShape * MuonGMR4::MuonGeoUtilityTool::extractShape |
( |
const PVConstLink & |
physVol | ) |
const |
|
finaloverride |
Definition at line 38 of file MuonGeoUtilitiyTool.cxx.
39 const GeoLogVol* logVol = physVol->getLogVol();
41 ATH_MSG_ERROR(__FILE__<<
":"<<__LINE__<<
" Physical volume has no logical volume attached ");
◆ extractShifts() [1/2]
Definition at line 76 of file MuonGeoUtilitiyTool.cxx.
78 ATH_MSG_ERROR(__FILE__<<
":"<<__LINE__<<
" "<<__func__<<
" nullptr given ");
79 return Amg::Transform3D::Identity();
82 if (inShape->typeID() == GeoShapeShift::getClassTypeID()) {
83 const GeoShapeShift* shift = dynamic_pointer_cast<const GeoShapeShift>(compressShift(inShape));
84 ATH_MSG_VERBOSE(__FILE__<<
":"<<__LINE__<<
" "<<__func__<<
" Shape is a shift . Continue navigation "<<shift);
85 sumTrans = shift->getX();
◆ extractShifts() [2/2]
Definition at line 67 of file MuonGeoUtilitiyTool.cxx.
68 const GeoLogVol* logVol = physVol->getLogVol();
70 ATH_MSG_ERROR(__FILE__<<
":"<<__LINE__<<
" Physical volume has no logical volume attached. ");
71 return Amg::Transform3D::Identity();
◆ findAlignableTransform()
const GeoAlignableTransform * MuonGMR4::MuonGeoUtilityTool::findAlignableTransform |
( |
const PVConstLink & |
physVol | ) |
const |
|
finaloverride |
Definition at line 133 of file MuonGeoUtilitiyTool.cxx.
134 PVConstLink
parent{physVol->getParent()}, child{physVol};
136 const GeoGraphNode *
const * node1 =
parent->findChildNode(child);
137 const GeoGraphNode *
const * fence =
parent->getChildNode(0);
140 if (
dynamic_cast<const GeoVPhysVol*
>(
node))
break;
141 const GeoAlignableTransform* alignTrans{
dynamic_cast<const GeoAlignableTransform*
>(
node)};
142 if (alignTrans)
return alignTrans;
145 parent = child->getParent();
◆ findAllLeafNodesByName()
std::vector< MuonGeoUtilityTool::physVolWithTrans > MuonGMR4::MuonGeoUtilityTool::findAllLeafNodesByName |
( |
const PVConstLink & |
physVol, |
|
|
const std::string & |
volumeName |
|
) |
| const |
|
finaloverride |
The logical volume has precisely the name for what we're searching for
There are no grand children of this volume. We're at a leaf node
Definition at line 150 of file MuonGeoUtilitiyTool.cxx.
151 const std::vector<physVolWithTrans>
children = getChildrenWithRef(physVol,
false);
152 std::vector<physVolWithTrans> foundVols{};
155 if (child.volume->getLogVol()->getName() == volumeName || child.nodeName == volumeName) {
156 foundVols.push_back(child);
159 if (!child.volume->getNChildVols()) {
164 std::make_move_iterator(grandChildren.end()), std::back_inserter(foundVols),
166 vol.transform = child.transform * vol.transform;
◆ getComponents()
std::vector< const GeoShape * > MuonGMR4::MuonGeoUtilityTool::getComponents |
( |
const GeoShape * |
booleanShape | ) |
const |
|
finaloverride |
◆ polygonEdges()
std::vector< Amg::Vector2D > MuonGMR4::MuonGeoUtilityTool::polygonEdges |
( |
const GeoSimplePolygonBrep & |
polygon | ) |
const |
|
override |
Transforms the vertices of the Polygon shape into a std::vector consisting of Amg::Vector2D objects.
Definition at line 176 of file MuonGeoUtilitiyTool.cxx.
179 for (
unsigned int i = 0;
i < polygon.getNVertices(); ++
i) {
180 polygonEdges.emplace_back(polygon.getXVertex(
i), polygon.getYVertex(
i));
◆ shapeEdges()
The documentation for this class was generated from the following files: