Import Geant4 11.0.0.beta source tree
This commit is contained in:
@@ -38,10 +38,12 @@
|
||||
G4PhysicalVolumesSearchScene::G4PhysicalVolumesSearchScene
|
||||
(G4PhysicalVolumeModel* pSearchVolumesModel, // usually a world
|
||||
const G4String& requiredPhysicalVolumeName,
|
||||
G4int requiredCopyNo)
|
||||
G4int requiredCopyNo,
|
||||
G4int requiredContinuation)
|
||||
: fpSearchVolumesModel (pSearchVolumesModel)
|
||||
, fMatcher (requiredPhysicalVolumeName)
|
||||
, fRequiredCopyNo (requiredCopyNo)
|
||||
, fRequiredContinuation (requiredContinuation)
|
||||
{}
|
||||
|
||||
void G4PhysicalVolumesSearchScene::ProcessVolume (const G4VSolid&)
|
||||
@@ -68,6 +70,14 @@ void G4PhysicalVolumesSearchScene::ProcessVolume (const G4VSolid&)
|
||||
fpSearchVolumesModel->GetCurrentDepth(),
|
||||
basePath,
|
||||
*fpCurrentObjectTransformation));
|
||||
// If user has asked for limited descent
|
||||
if (fRequiredContinuation >= 0) {
|
||||
static G4int firstFoundDepth = fpSearchVolumesModel->GetCurrentDepth();
|
||||
G4int foundDepth = fpSearchVolumesModel->GetCurrentDepth();
|
||||
if (foundDepth >= firstFoundDepth + fRequiredContinuation) {
|
||||
fpSearchVolumesModel->CurtailDescent();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user