41 const G4String& requiredPhysicalVolumeName,
45 fRequiredPhysicalVolumeName (requiredPhysicalVolumeName),
46 fRequiredCopyNo (requiredCopyNo),
50 fVerbosity (verbosity),
51 fMultipleOccurrence (
false)
56 void G4PhysicalVolumeSearchScene::ProcessVolume (
const G4VSolid&) {
68 if (name.length() == fRequiredPhysicalVolumeName.length()) {
69 if (fRequiredPhysicalVolumeName == name) {
72 typedef std::vector<PVNodeID>
PVPath;
79 if ((fRequiredCopyNo < 0 ||
80 fRequiredCopyNo == pCurrentPV -> GetCopyNo ())) {
83 fFoundFullPVPath = fullPVPath;
84 fFoundDepth = currentDepth;
85 fpFoundPV = pCurrentPV;
86 fpFoundLV = pCurrentLV;
90 if (!fMultipleOccurrence && fVerbosity > 0) {
91 fMultipleOccurrence =
true;
92 G4cout <<
"G4PhysicalVolumeSearchScene::FindVolume:"
93 <<
"\n Required volume \""
94 << fRequiredPhysicalVolumeName
96 if (fRequiredCopyNo >= 0) {
97 G4cout <<
", copy no. " << fRequiredCopyNo <<
",";
99 G4cout <<
" found more than once."
100 "\n This function is not smart enough to distinguish identical"
101 "\n physical volumes which have different parentage. It is"
102 "\n tricky to specify in general. This function gives you access"
103 "\n to the first occurrence only."
const G4Transform3D * fpCurrentObjectTransformation
G4int GetCurrentDepth() const
G4PhysicalVolumeSearchScene(G4PhysicalVolumeModel *, const G4String &requiredPhysicalVolumeName, G4int requiredCopyNo, G4int verbosity=99)
G4GLOB_DLL std::ostream G4cout
G4PhysicalVolumeModel::G4PhysicalVolumeNodeID PVNodeID
std::vector< PVNodeID > PVPath
const std::vector< G4PhysicalVolumeNodeID > & GetFullPVPath() const
virtual ~G4PhysicalVolumeSearchScene()
G4LogicalVolume * GetCurrentLV() const
G4VPhysicalVolume * GetCurrentPV() const