40 const G4String& requiredPhysicalVolumeName,
44 fRequiredPhysicalVolumeName (requiredPhysicalVolumeName),
45 fRequiredCopyNo (requiredCopyNo),
48 fVerbosity (verbosity),
49 fMultipleOccurrence (false)
54void G4PhysicalVolumeSearchScene::ProcessVolume (
const G4VSolid&) {
66 if (name.length() == fRequiredPhysicalVolumeName.length()) {
67 if (fRequiredPhysicalVolumeName == name) {
70 typedef std::vector<PVNodeID> PVPath;
73 if ((fRequiredCopyNo < 0 ||
74 fRequiredCopyNo == pCurrentPV -> GetCopyNo ())) {
77 fFoundFullPVPath = fullPVPath;
78 fFoundDepth = currentDepth;
79 fpFoundPV = pCurrentPV;
83 if (!fMultipleOccurrence && fVerbosity > 0) {
84 fMultipleOccurrence =
true;
85 G4cout <<
"G4PhysicalVolumeSearchScene::FindVolume:"
86 <<
"\n Required volume \""
87 << fRequiredPhysicalVolumeName
89 if (fRequiredCopyNo >= 0) {
90 G4cout <<
", copy no. " << fRequiredCopyNo <<
",";
92 G4cout <<
" found more than once."
93 "\n This function is not smart enough to distinguish identical"
94 "\n physical volumes which have different parentage. It is"
95 "\n tricky to specify in general. This function gives you access"
96 "\n to the first occurrence only."
G4GLOB_DLL std::ostream G4cout
G4VPhysicalVolume * GetCurrentPV() const
const std::vector< G4PhysicalVolumeNodeID > & GetFullPVPath() const
G4int GetCurrentDepth() const
G4PhysicalVolumeSearchScene(G4PhysicalVolumeModel *, const G4String &requiredPhysicalVolumeName, G4int requiredCopyNo, G4int verbosity=99)
virtual ~G4PhysicalVolumeSearchScene()
const G4Transform3D * fpCurrentObjectTransformation