Import Geant4 10.6.0 source tree
This commit is contained in:
@@ -23,9 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// class G4Navigator Inline implementation
|
||||
//
|
||||
// ********************************************************************
|
||||
@@ -88,7 +85,7 @@ G4VPhysicalVolume* G4Navigator::GetWorldVolume() const
|
||||
inline
|
||||
void G4Navigator::SetWorldVolume(G4VPhysicalVolume* pWorld)
|
||||
{
|
||||
if ( !(pWorld->GetTranslation()==G4ThreeVector(0,0,0)) )
|
||||
if ( !(pWorld->GetTranslation() == G4ThreeVector(0,0,0)) )
|
||||
{
|
||||
G4Exception ("G4Navigator::SetWorldVolume()", "GeomNav0002",
|
||||
FatalException, "Volume must be centered on the origin.");
|
||||
@@ -113,7 +110,7 @@ void G4Navigator::SetWorldVolume(G4VPhysicalVolume* pWorld)
|
||||
inline
|
||||
void G4Navigator::SetGeometricallyLimitedStep()
|
||||
{
|
||||
fWasLimitedByGeometry=true;
|
||||
fWasLimitedByGeometry = true;
|
||||
}
|
||||
|
||||
// ********************************************************************
|
||||
@@ -160,7 +157,7 @@ GetDaughtersRegularStructureId(const G4LogicalVolume *pLog) const
|
||||
G4int regId = 0;
|
||||
G4VPhysicalVolume *pVol;
|
||||
|
||||
if ( pLog->GetNoDaughters()==1 )
|
||||
if ( pLog->GetNoDaughters() == 1 )
|
||||
{
|
||||
pVol = pLog->GetDaughter(0);
|
||||
regId = pVol->GetRegularStructureId();
|
||||
@@ -289,10 +286,10 @@ void G4Navigator::LocateGlobalPointAndUpdateTouchableHandle(
|
||||
if( fEnteredDaughter || fExitedMother )
|
||||
{
|
||||
oldTouchableToUpdate = CreateTouchableHistory();
|
||||
if( pPhysVol == 0 )
|
||||
if( pPhysVol == nullptr )
|
||||
{
|
||||
// We want to ensure that the touchable is correct in this case.
|
||||
// The method below should do this and recalculate a lot more ....
|
||||
// The method below should do this and recalculate a lot more ....
|
||||
//
|
||||
oldTouchableToUpdate->UpdateYourself( pPhysVol, &fHistory );
|
||||
}
|
||||
@@ -356,6 +353,7 @@ void G4Navigator::SetVerboseLevel(G4int level)
|
||||
fparamNav.SetVerboseLevel(level);
|
||||
freplicaNav.SetVerboseLevel(level);
|
||||
fregularNav.SetVerboseLevel(level);
|
||||
if (fpExternalNav != nullptr) fpExternalNav->SetVerboseLevel(level);
|
||||
}
|
||||
|
||||
// ********************************************************************
|
||||
@@ -413,6 +411,7 @@ void G4Navigator::CheckMode(G4bool mode)
|
||||
fparamNav.CheckMode(mode);
|
||||
freplicaNav.CheckMode(mode);
|
||||
fregularNav.CheckMode(mode);
|
||||
if (fpExternalNav != nullptr) fpExternalNav->CheckMode(mode);
|
||||
}
|
||||
|
||||
// ********************************************************************
|
||||
@@ -445,9 +444,11 @@ void G4Navigator::SetPushVerbosity(G4bool mode)
|
||||
inline
|
||||
G4int G4Navigator::SeverityOfZeroStepping( G4int* noZeroSteps ) const
|
||||
{
|
||||
G4int severity=0, noZeros= fNumberZeroSteps;
|
||||
if( noZeroSteps) *noZeroSteps = fNumberZeroSteps;
|
||||
|
||||
G4int severity = 0, noZeros = fNumberZeroSteps;
|
||||
if( noZeroSteps )
|
||||
{
|
||||
*noZeroSteps = fNumberZeroSteps;
|
||||
}
|
||||
if( noZeros >= fAbandonThreshold_NoZeroSteps )
|
||||
{
|
||||
severity = 10;
|
||||
@@ -480,3 +481,39 @@ inline void G4Navigator::EnableBestSafety( G4bool value )
|
||||
{
|
||||
fvoxelNav.EnableBestSafety( value );
|
||||
}
|
||||
|
||||
// ********************************************************************
|
||||
// SetExternalNavigation
|
||||
// ********************************************************************
|
||||
//
|
||||
inline
|
||||
G4VExternalNavigation* G4Navigator::GetExternalNavigation() const
|
||||
{
|
||||
return fpExternalNav;
|
||||
}
|
||||
|
||||
// ********************************************************************
|
||||
// SetExternalNavigation
|
||||
// ********************************************************************
|
||||
//
|
||||
inline
|
||||
void G4Navigator::SetExternalNavigation(G4VExternalNavigation* externalNav)
|
||||
{
|
||||
fpExternalNav = externalNav;
|
||||
}
|
||||
|
||||
// ********************************************************************
|
||||
// Clone
|
||||
// ********************************************************************
|
||||
//
|
||||
inline
|
||||
G4Navigator* G4Navigator::Clone() const
|
||||
{
|
||||
G4Navigator* clone_nav = new G4Navigator();
|
||||
clone_nav->SetWorldVolume(fTopPhysical);
|
||||
if( fpExternalNav != nullptr )
|
||||
{
|
||||
clone_nav->SetExternalNavigation(fpExternalNav->Clone());
|
||||
}
|
||||
return clone_nav;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user