Visitor to process all volumes under a GeoModel node.
More...
#include <GeoVisitVolumes.h>
Visitor to process all volumes under a GeoModel node.
Can take either an IGeoVisitVolumesAction or an IGeoVisitVolumesNoXformAction. In the latter case, we don't keep track of the geometrical transforms. It can be used as a faster option if you only care about the list of volumes but not where they're located.
Definition at line 76 of file GeoVisitVolumes.h.
◆ GeoVisitVolumes() [1/3]
Initialize to visit volumes keeping track of transformations.
Definition at line 23 of file GeoVisitVolumes.cxx.
30{
31 setDepthLimit (depthLimit);
33}
std::vector< const GeoTransform * > m_pendingTransformList
List of Pending Transformations.
const GeoIdentifierTag * m_idTag
A pointer to an identifier tag. If the volume is identified.
const GeoNameTag * m_nameTag
A pointer to a name tag. If the volume is named.
const GeoSerialDenominator * m_serialDenominator
A pointer to a serial denominator. If one exists.
const GeoSerialIdentifier * m_serialIdentifier
std::variant< IGeoVisitVolumesAction *, IGeoVisitVolumesNoXformAction * > m_action
Callback.
◆ GeoVisitVolumes() [2/3]
Initialize to visit volumes withoutkeeping track of transformations.
Definition at line 36 of file GeoVisitVolumes.cxx.
43{
44 setDepthLimit (depthLimit);
45}
◆ GeoVisitVolumes() [3/3]
◆ handleFullPhysVol()
| void GeoVisitVolumes::handleFullPhysVol |
( |
const GeoFullPhysVol * | vol | ) |
|
|
overridevirtual |
Handles a physical volume.
Definition at line 103 of file GeoVisitVolumes.cxx.
104{
106}
void handleVol(const GeoVPhysVol *vol)
◆ handleIdentifierTag()
| void GeoVisitVolumes::handleIdentifierTag |
( |
const GeoIdentifierTag * | idTag | ) |
|
|
overridevirtual |
◆ handleNameTag()
| void GeoVisitVolumes::handleNameTag |
( |
const GeoNameTag * | nameTag | ) |
|
|
overridevirtual |
◆ handlePhysVol()
| void GeoVisitVolumes::handlePhysVol |
( |
const GeoPhysVol * | vol | ) |
|
|
overridevirtual |
◆ handleSerialDenominator()
| void GeoVisitVolumes::handleSerialDenominator |
( |
const GeoSerialDenominator * | sD | ) |
|
|
overridevirtual |
◆ handleSerialIdentifier()
| void GeoVisitVolumes::handleSerialIdentifier |
( |
const GeoSerialIdentifier * | sI | ) |
|
|
overridevirtual |
◆ handleSerialTransformer()
| void GeoVisitVolumes::handleSerialTransformer |
( |
const GeoSerialTransformer * | sT | ) |
|
|
overridevirtual |
Handles a Serial Transformer.
Definition at line 130 of file GeoVisitVolumes.cxx.
131{
132 const GeoVPhysVol* vol = &*sT->getVolume();
133 unsigned int ncopies = sT->getNCopies();
134 int idbase = -1;
137 }
138
140 GeoTrf::Transform3D defTransform;
143 transform = GeoTrf::Transform3D::Identity();
144 defTransform = GeoTrf::Transform3D::Identity();
145 }
146 else {
152 defTransform = defTransform *
t->getDefTransform(
nullptr);
153 }
154 }
155 }
156
157 for (
unsigned int i = 0;
i < ncopies;
i++) {
158 int id = idbase;
159 if (id >= 0) {
161 }
162
166 }
167 else {
169 }
170
172 (*std::get<0>(
m_action)) (*
this,
id, name, vol,
173 transform * sT->getTransform (i),
174 defTransform * sT->getTransform (i));
175 }
176 else {
177 (*std::get<1>(
m_action)) (*
this,
id, name, vol);
178 }
179 }
180
184}
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
◆ handleTransform()
| void GeoVisitVolumes::handleTransform |
( |
const GeoTransform * | xform | ) |
|
|
overridevirtual |
◆ handleVol()
| void GeoVisitVolumes::handleVol |
( |
const GeoVPhysVol * | vol | ) |
|
|
private |
Definition at line 55 of file GeoVisitVolumes.cxx.
56{
57
58
59
60 if(getPath()->getLength()-1 == 0)
61 return;
62
63 const static std::string anon = "ANON";
65
67
70 GeoTrf::Transform3D defTransform;
71
73 transform = GeoTrf::Transform3D::Identity();
74 defTransform = GeoTrf::Transform3D::Identity();
75 }
76 else {
82 defTransform = defTransform *
t->getDefTransform(
nullptr);
83 }
84 }
85
86 (*std::get<0>(
m_action)) (*
this,
id, name, vol, transform, defTransform);
88 }
89 else {
90 (*std::get<1>(
m_action)) (*
this,
id, name, vol);
91 }
92
95}
◆ operator=()
◆ m_action
◆ m_idTag
| const GeoIdentifierTag* GeoVisitVolumes::m_idTag |
|
private |
A pointer to an identifier tag. If the volume is identified.
Definition at line 127 of file GeoVisitVolumes.h.
◆ m_nameTag
| const GeoNameTag* GeoVisitVolumes::m_nameTag |
|
private |
◆ m_pendingTransformList
| std::vector<const GeoTransform *> GeoVisitVolumes::m_pendingTransformList |
|
private |
◆ m_serialDenominator
| const GeoSerialDenominator* GeoVisitVolumes::m_serialDenominator |
|
private |
◆ m_serialIdentifier
| const GeoSerialIdentifier* GeoVisitVolumes::m_serialIdentifier |
|
private |
The documentation for this class was generated from the following files: