41 const G4String& requiredPhysicalVolumeName,
42 G4int requiredCopyNo):
44 fRequiredPhysicalVolumeName (requiredPhysicalVolumeName),
45 fRequiredCopyNo (requiredCopyNo),
46 fpCurrentObjectTransformation (0),
50 fMultipleOccurrence (false)
55void G4PhysicalVolumeSearchScene::FindVolume (
const G4VSolid&) {
58 typedef std::vector<PVNodeID> PVPath;
73 if (fRequiredPhysicalVolumeName == pCurrentPV -> GetName () &&
74 (fRequiredCopyNo < 0 ||
75 fRequiredCopyNo == pCurrentPV -> GetCopyNo ())) {
78 fFoundFullPVPath = fullPVPath;
79 fFoundDepth = currentDepth;
80 fpFoundPV = pCurrentPV;
81 fpFoundLV = pCurrentLV;
82 fFoundObjectTransformation = *fpCurrentObjectTransformation;
85 if (!fMultipleOccurrence) {
86 fMultipleOccurrence =
true;
87 G4cout <<
"G4PhysicalVolumeSearchScene::FindVolume:"
88 <<
"\n Required volume \""
89 << fRequiredPhysicalVolumeName
91 if (fRequiredCopyNo >= 0) {
92 G4cout <<
", copy no. " << fRequiredCopyNo <<
",";
94 G4cout <<
" found more than once."
95 "\n This function is not smart enough to distinguish identical"
96 "\n physical volumes which have different parentage. It is"
97 "\n tricky to specify in general. This function gives you access"
98 "\n to the first occurrence only."
G4DLLIMPORT std::ostream G4cout
G4VPhysicalVolume * GetCurrentPV() const
G4LogicalVolume * GetCurrentLV() const
const std::vector< G4PhysicalVolumeNodeID > & GetFullPVPath() const
G4int GetCurrentDepth() const
G4PhysicalVolumeSearchScene(G4PhysicalVolumeModel *, const G4String &requiredPhysicalVolumeName, G4int requiredCopyNo)
virtual ~G4PhysicalVolumeSearchScene()