52#define G4DEBUG_NAVIGATION 1
61 fTopPhysical(0), fCheck(false),
fPushed(false), fWarnPush(true)
161 const G4bool relativeSearch,
162 const G4bool ignoreDirection )
164 G4bool notKnownContained=
true, noResult;
176 if( considerDirection && pGlobalDirection != 0 )
178 globalDirection=*pGlobalDirection;
186 G4cout <<
"*** G4ITNavigator1::LocateGlobalPointAndSetup: ***" <<
G4endl;
188 <<
" Globalpoint = " << globalPoint <<
G4endl
189 <<
" RelativeSearch = " << relativeSearch <<
G4endl;
195 G4cout.precision(oldcoutPrec);
199 if ( !relativeSearch )
279 G4Exception(
"G4ITNavigator1::LocateGlobalPointAndSetup()",
281 "Not applicable for external volumes.");
287 notKnownContained =
false;
308 G4int noLevelsExited=0 ;
310 while (notKnownContained)
316 insideCode = targetSolid->
Inside(localPoint);
320 G4String solidResponse =
"-kInside-";
322 solidResponse =
"-kOutside-";
324 solidResponse =
"-kSurface-";
325 G4cout <<
"*** G4ITNavigator1::LocateGlobalPointAndSetup(): ***" <<
G4endl
326 <<
" Invoked Inside() for solid: " << targetSolid->
GetName()
327 <<
". Solid replied: " << solidResponse <<
G4endl
328 <<
" For local point p: " << localPoint <<
G4endl;
353 if( noLevelsExited > 1 )
377 if( (!
fExiting)&&considerDirection )
382 G4bool directionExiting =
false;
393 directionExiting =
normal.dot(localDirection) > 0.0;
394 isExiting = isExiting || directionExiting;
410 if( noLevelsExited > 1 )
432 notKnownContained=
false;
437 notKnownContained=
false;
458 if (!targetPhysical) {
break; }
516 G4Exception(
"G4ITNavigator1::LocateGlobalPointAndSetup()",
518 "Not applicable for external volumes.");
550#ifdef G4DEBUG_NAVIGATION
554 G4cout <<
"*** G4ITNavigator1::LocateGlobalPointAndSetup() ***" <<
G4endl;
569 if (targetPhysical) { curPhysVol_Name = targetPhysical->
GetName(); }
570 G4cout <<
" Return value = new volume = " << curPhysVol_Name <<
G4endl;
575 G4cout <<
"Upon exiting LocateGlobalPointAndSetup():" <<
G4endl;
578 G4cout.precision(oldcoutPrec);
584 return targetPhysical;
607#ifdef G4DEBUG_NAVIGATION
610 G4cout <<
"Entering LocateGlobalWithinVolume(): History = " <<
G4endl;
644 G4Exception(
"G4ITNavigator1::LocateGlobalPointWithinVolume()",
646 "Not applicable for replicated volumes.");
649 G4Exception(
"G4ITNavigator1::LocateGlobalPointWithinVolume()",
651 "Not applicable for external volumes.");
803 const G4double pCurrentProposedStepLength,
829 G4cout <<
"*** G4ITNavigator1::ComputeStep: ***" <<
G4endl;
831 <<
" - Proposed step length = " << pCurrentProposedStepLength
833#ifdef G4DEBUG_NAVIGATION
837 <<
" Globalpoint = " << std::setw(25) << pGlobalpoint <<
G4endl
838 <<
" Direction = " << std::setw(25) << pDirection <<
G4endl;
855 G4double moveLenSq = (newLocalPoint-oldLocalPoint).mag2();
877 pCurrentProposedStepLength,
894 pCurrentProposedStepLength,
922 "Point is relocated in voxels, while it should be outside!");
925 pCurrentProposedStepLength,
940 pCurrentProposedStepLength,
959 pCurrentProposedStepLength,
973 pCurrentProposedStepLength,
985 G4Exception(
"G4ITNavigator1::ComputeStep()",
"GeomNav0001",
989 G4Exception(
"G4ITNavigator1::ComputeStep()",
"GeomNav0001",
1000 G4bool calculatedExitNormal=
false;
1006 pCurrentProposedStepLength,
1010 calculatedExitNormal,
1044#ifdef G4DEBUG_NAVIGATION
1047 G4cout <<
"G4ITNavigator1::ComputeStep(): another zero step, # "
1049 <<
" at " << pGlobalpoint
1050 <<
" in volume " << motherPhysical->
GetName()
1051 <<
" nav-comp-step calls # " << sNavCScalls
1063 std::ostringstream message;
1064 message <<
"Track stuck or not moving." <<
G4endl
1065 <<
" Track stuck, not moving for "
1067 <<
" in volume -" << motherPhysical->
GetName()
1068 <<
"- at point " << pGlobalpoint <<
G4endl
1069 <<
" direction: " << pDirection <<
"." <<
G4endl
1070 <<
" Potential geometry or navigation problem !"
1072 <<
" Trying pushing it of " << Step <<
" mm ...";
1073 G4Exception(
"G4ITNavigator1::ComputeStep()",
"GeomNav1002",
1074 JustWarning, message,
"Potential overlap in geometry!");
1083 std::ostringstream message;
1084 message <<
"Stuck Track: potential geometry or navigation problem."
1086 <<
" Track stuck, not moving for "
1088 <<
" in volume -" << motherPhysical->
GetName()
1089 <<
"- at point " << pGlobalpoint <<
G4endl
1090 <<
" direction: " << pDirection <<
".";
1092 G4Exception(
"G4ITNavigator1::ComputeStep()",
"GeomNav0003",
1109#ifdef G4DEBUG_NAVIGATION
1112 G4cout <<
" At G4Nav CompStep End - if(exiting) - fExiting= " <<
fExiting
1173#ifdef G4DEBUG_NAVIGATION
1176 desc <<
"Problem in ComputeStep: Replica Navigation did not provide"
1177 <<
" valid exit Normal. " <<
G4endl;
1178 desc <<
" Do not know how calculate it in this case." <<
G4endl;
1179 desc <<
" Location = " << finalLocalPoint <<
G4endl;
1180 desc <<
" Volume name = " << motherPhysical->
GetName()
1182 G4Exception(
"G4ITNavigator1::ComputeStep()",
"GeomNav0003",
1183 JustWarning, desc,
"Normal not available for exiting.");
1228 G4cout <<
" Returned step= " << Step;
1232 G4cout <<
" Requested step= " << pCurrentProposedStepLength ;
1250 const G4double pCurrentProposedStepLength,
1261 pCurrentProposedStepLength,
1324 for ( i=1; i<=cdepth; i++ )
1353 ComputeMaterial(replicaNo, current, &touchable) );
1359 "Not applicable for external volumes.");
1386 if( candidateLogical )
1408 currentSolid= candidateLogical->
GetSolid();
1409 inSideIt = currentSolid->
Inside(daughterPointOwnLocal);
1410 onSurface = (inSideIt ==
kSurface);
1415 safety = (currentSolid->
DistanceToIn(daughterPointOwnLocal));
1418 else if (inSideIt ==
kInside )
1420 safety = (currentSolid->
DistanceToOut(daughterPointOwnLocal));
1427 nextSolidExitNormal =
1432 ExitNormal = -nextSolidExitNormal;
1440 std::ostringstream message;
1441 message <<
"Point not on surface ! " <<
G4endl
1443 << daughterPointOwnLocal <<
G4endl
1444 <<
" Physical volume = "
1446 <<
" Logical volume = "
1448 <<
" Solid = " << currentSolid->
GetName()
1451 << *currentSolid <<
G4endl;
1454 message <<
"Point is Outside. " <<
G4endl
1455 <<
" Safety (from outside) = " << safety <<
G4endl;
1459 message <<
"Point is Inside. " <<
G4endl
1460 <<
" Safety (from inside) = " << safety <<
G4endl;
1462 G4Exception(
"G4ITNavigator1::GetLocalExitNormal()",
"GeomNav1001",
1480 G4Exception(
"G4ITNavigator1::GetLocalExitNormal()",
1482 "Incorrect call to GetLocalSurfaceNormal." );
1495 desc <<
" Parameters of solid: " << *daughterSolid
1497 G4Exception(
"G4ITNavigator1::GetLocalExitNormal()",
1499 "Surface Normal returned by Solid is not a Unit Vector." );
1517 message <<
"Function called when *NOT* at a Boundary." <<
G4endl;
1518 G4Exception(
"G4ITNavigator1::GetLocalExitNormal()",
1534 G4int enteringReplicaNo,
1537 switch (enteringVolumeType)
1542 G4Exception(
"G4ITNavigator1::GetMotherToDaughterTransform()",
1544 "Method NOT Implemented yet for replica volumes.");
1552 pParam->
ComputeSolid(enteringReplicaNo, pEnteringPhysVol);
1566 G4Exception(
"G4ITNavigator1::GetMotherToDaughterTransform()",
1568 "Not applicable for external volumes.");
1592#ifdef G4DEBUG_NAVIGATION
1600 ExpectedBoundaryPointLocal =
1620 G4bool* pNormalCalculated)
1630 *pNormalCalculated =
true;
1638#ifdef G4DEBUG_NAVIGATION
1646 edN <<
" State of Navigator: " <<
G4endl;
1650 G4Exception(
"G4ITNavigator1::GetGlobalExitNormal()",
1652 "LocalExitNormalAndCheck() did not calculate Normal.");
1661 edN <<
"G4ITNavigator1::GetGlobalExitNormal: "
1662 <<
" Using Local Normal - from call to GetLocalExitNormalAndCheck. "
1664 <<
" Local Exit Normal = " << localNormal <<
" || = "
1665 << std::sqrt(localMag2) <<
G4endl
1666 <<
" Global Exit Normal = " << globalNormal <<
" || = "
1670 G4Exception(
"G4ITNavigator1::GetGlobalExitNormal()",
1672 "Value obtained from new local *solid* is incorrect.");
1673 localNormal = localNormal.
unit();
1679#ifdef G4DEBUG_NAVIGATION
1694 edDfn <<
"Found difference in normals in case of exiting mother "
1695 <<
"- when Get is called after ComputingStep " <<
G4endl;
1696 edDfn <<
" Magnitude of diff = " << diffNorm.
mag() <<
G4endl;
1699 edDfn <<
" Global Computed from Local = " << globalNormal <<
G4endl;
1700 G4Exception(
"G4ITNavigator1::GetGlobalExitNormal()",
"GeomNav0003",
1706 return globalNormal;
1710#define G4NEW_SAFETY 1
1727#ifdef G4DEBUG_NAVIGATION
1731 G4cout <<
"*** G4ITNavigator1::ComputeSafety: ***" <<
G4endl
1732 <<
" Called at point: " << pGlobalpoint <<
G4endl;
1736 <<
" - Maximum length = " << pMaxLength <<
G4endl;
1739 G4cout <<
" ----- Upon entering Compute Safety:" <<
G4endl;
1751 if( !(endpointOnSurface && stayedOnEndpoint) )
1764#ifdef G4DEBUG_NAVIGATION
1767 G4cout <<
" G4ITNavigator1::ComputeSafety() relocates-in-volume to point: "
1768 << pGlobalpoint <<
G4endl;
1785 *motherPhysical, pMaxLength);
1786 newSafety= safetyTwo;
1791 newSafety= safetyOldVoxel;
1810 G4Exception(
"G4ITNavigator1::ComputeSafety()",
"GeomNav0001",
1816 "Not applicable for external volumes.");
1828#ifdef G4DEBUG_NAVIGATION
1831 G4cout <<
" G4ITNavigator1::ComputeSafety() finds that point - "
1832 << pGlobalpoint <<
" - is on surface " <<
G4endl;
1849#ifdef G4DEBUG_NAVIGATION
1854 G4cout <<
" Returned value of Safety = " << newSafety <<
G4endl;
1856 G4cout.precision(oldcoutPrec);
1880 G4cout <<
"The current state of G4ITNavigator1 is: " <<
G4endl;
1885 <<
" BlockedPhysicalVolume= " ;
1898 G4cout << std::setw(30) <<
" ExitNormal " <<
" "
1899 << std::setw( 5) <<
" Valid " <<
" "
1900 << std::setw( 9) <<
" Exiting " <<
" "
1901 << std::setw( 9) <<
" Entering" <<
" "
1902 << std::setw(15) <<
" Blocked:Volume " <<
" "
1903 << std::setw( 9) <<
" ReplicaNo" <<
" "
1904 << std::setw( 8) <<
" LastStepZero " <<
" "
1910 << std::setw( 9) <<
fExiting <<
" "
1914 G4cout << std::setw(15) <<
"None";
1931 G4cout.precision(oldcoutPrec);
1960 G4double shiftOrigin = std::sqrt(shiftOriginSafSq);
1963 if( diffShiftSaf > fAccuracyForWarning )
1967 std::ostringstream message, suggestion;
1968 message <<
"Accuracy error or slightly inaccurate position shift."
1970 <<
" The Step's starting point has moved "
1971 << std::sqrt(moveLenSq)/
mm <<
" mm " <<
G4endl
1972 <<
" since the last call to a Locate method." <<
G4endl
1973 <<
" This has resulted in moving "
1974 << shiftOrigin/
mm <<
" mm "
1975 <<
" from the last point at which the safety "
1976 <<
" was calculated " <<
G4endl
1977 <<
" which is more than the computed safety= "
1979 <<
" This difference is "
1980 << diffShiftSaf/
mm <<
" mm." <<
G4endl
1981 <<
" The tolerated accuracy is "
1982 << fAccuracyForException/
mm <<
" mm.";
1986 if( ((++warnNow % 100) == 1) )
1989 <<
" This problem can be due to either " <<
G4endl
1990 <<
" - a process that has proposed a displacement"
1991 <<
" larger than the current safety , or" <<
G4endl
1992 <<
" - inaccuracy in the computation of the safety";
1993 suggestion <<
"We suggest that you " <<
G4endl
1994 <<
" - find i) what particle is being tracked, and "
1995 <<
" ii) through what part of your geometry " <<
G4endl
1996 <<
" for example by re-running this event with "
1998 <<
" /tracking/verbose 1 " <<
G4endl
1999 <<
" - check which processes you declare for"
2000 <<
" this particle (and look at non-standard ones)"
2002 <<
" - in case, create a detailed logfile"
2003 <<
" of this event using:" <<
G4endl
2004 <<
" /tracking/verbose 6 ";
2008 message,
G4String(suggestion.str()));
2009 G4cout.precision(oldcoutPrec);
2010 G4cerr.precision(oldcerrPrec);
2012#ifdef G4DEBUG_NAVIGATION
2015 G4cerr <<
"WARNING - G4ITNavigator1::ComputeStep()" <<
G4endl
2016 <<
" The Step's starting point has moved "
2017 << std::sqrt(moveLenSq) <<
"," <<
G4endl
2018 <<
" which has taken it to the limit of"
2019 <<
" the current safety. " <<
G4endl;
2024 if ( shiftOriginSafSq >
sqr(safetyPlus) )
2026 std::ostringstream message;
2027 message <<
"May lead to a crash or unreliable results." <<
G4endl
2028 <<
" Position has shifted considerably without"
2029 <<
" notifying the navigator !" <<
G4endl
2030 <<
" Tolerated safety: " << safetyPlus <<
G4endl
2031 <<
" Computed shift : " << shiftOriginSafSq;
2032 G4Exception(
"G4ITNavigator1::ComputeStep()",
"GeomNav1002",
2049 G4int oldcoutPrec = os.precision(4);
2050 if(
n.fVerbose >= 4 )
2052 os <<
"The current state of G4ITNavigator1 is: " <<
G4endl;
2053 os <<
" ValidExitNormal= " <<
n.fValidExitNormal <<
G4endl
2054 <<
" ExitNormal = " <<
n.fExitNormal <<
G4endl
2055 <<
" Exiting = " <<
n.fExiting <<
G4endl
2056 <<
" Entering = " <<
n.fEntering <<
G4endl
2057 <<
" BlockedPhysicalVolume= " ;
2058 if (
n.fBlockedPhysicalVolume==0)
2061 os <<
n.fBlockedPhysicalVolume->GetName();
2063 <<
" BlockedReplicaNo = " <<
n.fBlockedReplicaNo <<
G4endl
2064 <<
" LastStepWasZero = " <<
n.fLastStepWasZero <<
G4endl
2067 if( ( 1 <
n.fVerbose) && (
n.fVerbose < 4) )
2070 os << std::setw(30) <<
" ExitNormal " <<
" "
2071 << std::setw( 5) <<
" Valid " <<
" "
2072 << std::setw( 9) <<
" Exiting " <<
" "
2073 << std::setw( 9) <<
" Entering" <<
" "
2074 << std::setw(15) <<
" Blocked:Volume " <<
" "
2075 << std::setw( 9) <<
" ReplicaNo" <<
" "
2076 << std::setw( 8) <<
" LastStepZero " <<
" "
2078 os <<
"( " << std::setw(7) <<
n.fExitNormal.x()
2079 <<
", " << std::setw(7) <<
n.fExitNormal.y()
2080 <<
", " << std::setw(7) <<
n.fExitNormal.z() <<
" ) "
2081 << std::setw( 5) <<
n.fValidExitNormal <<
" "
2082 << std::setw( 9) <<
n.fExiting <<
" "
2083 << std::setw( 9) <<
n.fEntering <<
" ";
2084 if (
n.fBlockedPhysicalVolume==0 )
2085 { os << std::setw(15) <<
"None"; }
2087 { os << std::setw(15)<<
n.fBlockedPhysicalVolume->GetName(); }
2088 os << std::setw( 9) <<
n.fBlockedReplicaNo <<
" "
2089 << std::setw( 8) <<
n.fLastStepWasZero <<
" "
2092 if(
n.fVerbose > 2 )
2095 os <<
" Current Localpoint = " <<
n.fLastLocatedPointLocal <<
G4endl;
2096 os <<
" PreviousSftOrigin = " <<
n.fPreviousSftOrigin <<
G4endl;
2097 os <<
" PreviousSafety = " <<
n.fPreviousSafety <<
G4endl;
2099 if(
n.fVerbose > 3 ||
n.fVerbose == 0 )
2101 os <<
"Current History: " <<
G4endl <<
n.fHistory;
2104 os.precision(oldcoutPrec);
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
#define fWasLimitedByGeometry
#define G4DEBUG_NAVIGATION
static constexpr double perMillion
static constexpr double mm
CLHEP::Hep3Vector G4ThreeVector
G4ReferenceCountedHandle< G4TouchableHistory > G4TouchableHistoryHandle
G4GLOB_DLL std::ostream G4cerr
G4GLOB_DLL std::ostream G4cout
G4double GetSurfaceTolerance() const
static G4GeometryTolerance * GetInstance()
virtual void LocateGlobalPointWithinVolume(const G4ThreeVector &position)
G4TouchableHistory * CreateTouchableHistory() const
virtual G4ThreeVector GetGlobalExitNormal(const G4ThreeVector &point, G4bool *valid)
void ComputeStepLog(const G4ThreeVector &pGlobalpoint, G4double moveLenSq) const
virtual G4VPhysicalVolume * LocateGlobalPointAndSetup(const G4ThreeVector &point, const G4ThreeVector *direction=0, const G4bool pRelativeSearch=true, const G4bool ignoreDirection=true)
G4VoxelNavigation fvoxelNav
const G4AffineTransform GetLocalToGlobalTransform() const
G4bool fCalculatedExitNormal
G4int GetVerboseLevel() const
G4ThreeVector fStepEndPoint
G4bool fChangedGrandMotherRefFrame
G4double CheckNextStep(const G4ThreeVector &pGlobalPoint, const G4ThreeVector &pDirection, const G4double pCurrentProposedStepLength, G4double &pNewSafety)
G4ThreeVector ComputeLocalAxis(const G4ThreeVector &pVec) const
G4int fActionThreshold_NoZeroSteps
virtual G4VPhysicalVolume * ResetHierarchyAndLocate(const G4ThreeVector &point, const G4ThreeVector &direction, const G4TouchableHistory &h)
G4VPhysicalVolume * fBlockedPhysicalVolume
G4ParameterisedNavigation fparamNav
void ResetStackAndState()
G4int GetDaughtersRegularStructureId(const G4LogicalVolume *pLog) const
const G4AffineTransform & GetGlobalToLocalTransform() const
G4bool EnteredDaughterVolume() const
G4ReplicaNavigation freplicaNav
virtual G4double ComputeSafety(const G4ThreeVector &globalpoint, const G4double pProposedMaxLength=DBL_MAX, const G4bool keepState=true)
EVolume CharacteriseDaughters(const G4LogicalVolume *pLog) const
G4NavigationHistory fHistory
G4ThreeVector fPreviousSftOrigin
virtual G4ThreeVector GetLocalExitNormalAndCheck(const G4ThreeVector &point, G4bool *valid)
G4ThreeVector fLastStepEndPointLocal
void SetNavigatorState(G4ITNavigatorState_Lock1 *)
G4ThreeVector fExitNormalGlobalFrame
virtual void SetupHierarchy()
G4AffineTransform GetMotherToDaughterTransform(G4VPhysicalVolume *dVolume, G4int dReplicaNo, EVolume dVolumeType)
EVolume VolumeType(const G4VPhysicalVolume *pVol) const
G4ThreeVector fGrandMotherExitNormal
G4bool fLastTriedStepComputation
G4NormalNavigation fnormalNav
virtual G4double ComputeStep(const G4ThreeVector &pGlobalPoint, const G4ThreeVector &pDirection, const G4double pCurrentProposedStepLength, G4double &pNewSafety)
G4bool fWasLimitedByGeometry
virtual G4ThreeVector GetLocalExitNormal(G4bool *valid)
G4ITNavigatorState_Lock1 * GetNavigatorState()
G4SaveNavigatorState * fpSaveState
G4RegularNavigation fregularNav
G4ThreeVector fLastLocatedPointLocal
virtual ~G4ITNavigator1()
virtual G4TouchableHistoryHandle CreateTouchableHistoryHandle() const
G4ThreeVector fExitNormal
G4int fAbandonThreshold_NoZeroSteps
friend std::ostream & operator<<(std::ostream &os, const G4ITNavigator1 &n)
G4bool fLocatedOutsideWorld
G4VoxelSafety * fpVoxelSafety
void SetVerboseLevel(G4int level)
G4ThreeVector ComputeLocalPoint(const G4ThreeVector &rGlobPoint) const
virtual void ResetState()
G4VSolid * GetSolid() const
const G4String & GetName() const
void SetSolid(G4VSolid *pSolid)
G4SmartVoxelHeader * GetVoxelHeader() const
void UpdateMaterial(G4Material *pMaterial)
EVolume GetTopVolumeType() const
void NewLevel(G4VPhysicalVolume *pNewMother, EVolume vType=kNormal, G4int nReplica=-1)
G4int GetReplicaNo(G4int n) const
const G4AffineTransform & GetTopTransform() const
G4int GetTopReplicaNo() const
G4VPhysicalVolume * GetVolume(G4int n) const
G4VPhysicalVolume * GetTopVolume() const
EVolume GetVolumeType(G4int n) const
const G4AffineTransform & GetTransform(G4int n) const
G4double ComputeStep(const G4ThreeVector &localPoint, const G4ThreeVector &localDirection, const G4double currentProposedStepLength, G4double &newSafety, G4NavigationHistory &history, G4bool &validExitNormal, G4ThreeVector &exitNormal, G4bool &exiting, G4bool &entering, G4VPhysicalVolume *(*pBlockedPhysical), G4int &blockedReplicaNo)
G4double ComputeSafety(const G4ThreeVector &globalpoint, const G4NavigationHistory &history, const G4double pMaxLength=DBL_MAX)
G4bool LevelLocate(G4NavigationHistory &history, const G4VPhysicalVolume *blockedVol, const G4int blockedNum, const G4ThreeVector &globalPoint, const G4ThreeVector *globalDirection, const G4bool pLocatedOnEdge, G4ThreeVector &localPoint)
G4double ComputeStep(const G4ThreeVector &globalPoint, const G4ThreeVector &globalDirection, const G4double currentProposedStepLength, G4double &newSafety, G4NavigationHistory &history, G4bool &validExitNormal, G4ThreeVector &exitNormal, G4bool &exiting, G4bool &entering, G4VPhysicalVolume *(*pBlockedPhysical), G4int &blockedReplicaNo)
G4SmartVoxelNode * ParamVoxelLocate(G4SmartVoxelHeader *pHead, const G4ThreeVector &localPoint)
G4bool LevelLocate(G4NavigationHistory &history, const G4VPhysicalVolume *blockedVol, const G4int blockedNum, const G4ThreeVector &globalPoint, const G4ThreeVector *globalDirection, const G4bool pLocatedOnEdge, G4ThreeVector &localPoint)
G4double ComputeSafety(const G4ThreeVector &localPoint, const G4NavigationHistory &history, const G4double pProposedMaxLength=DBL_MAX)
void SetNormalNavigation(G4NormalNavigation *fnormnav)
G4bool LevelLocate(G4NavigationHistory &history, const G4VPhysicalVolume *blockedVol, const G4int blockedNum, const G4ThreeVector &globalPoint, const G4ThreeVector *globalDirection, const G4bool pLocatedOnEdge, G4ThreeVector &localPoint)
G4double ComputeSafety(const G4ThreeVector &localPoint, const G4NavigationHistory &history, const G4double pProposedMaxLength=DBL_MAX)
G4double ComputeStep(const G4ThreeVector &globalPoint, const G4ThreeVector &globalDirection, const G4double currentProposedStepLength, G4double &newSafety, G4NavigationHistory &history, G4bool &validExitNormal, G4ThreeVector &exitNormal, G4bool &exiting, G4bool &entering, G4VPhysicalVolume *(*pBlockedPhysical), G4int &blockedReplicaNo)
G4double ComputeStep(const G4ThreeVector &globalPoint, const G4ThreeVector &globalDirection, const G4ThreeVector &localPoint, const G4ThreeVector &localDirection, const G4double currentProposedStepLength, G4double &newSafety, G4NavigationHistory &history, G4bool &validExitNormal, G4bool &calculatedExitNormal, G4ThreeVector &exitNormal, G4bool &exiting, G4bool &entering, G4VPhysicalVolume *(*pBlockedPhysical), G4int &blockedReplicaNo)
G4double ComputeSafety(const G4ThreeVector &globalPoint, const G4ThreeVector &localPoint, G4NavigationHistory &history, const G4double pProposedMaxLength=DBL_MAX)
void ComputeTransformation(const G4int replicaNo, G4VPhysicalVolume *pVol, G4ThreeVector &point) const
G4bool LevelLocate(G4NavigationHistory &history, const G4VPhysicalVolume *blockedVol, const G4int blockedNum, const G4ThreeVector &globalPoint, const G4ThreeVector *globalDirection, const G4bool pLocatedOnEdge, G4ThreeVector &localPoint)
EInside BackLocate(G4NavigationHistory &history, const G4ThreeVector &globalPoint, G4ThreeVector &localPoint, const G4bool &exiting, G4bool ¬KnownInside) const
const G4NavigationHistory * GetHistory() const
G4int MoveUpHistory(G4int num_levels=1)
virtual G4VSolid * ComputeSolid(const G4int, G4VPhysicalVolume *)
virtual void ComputeTransformation(const G4int, G4VPhysicalVolume *) const =0
const G4RotationMatrix * GetRotation() const
virtual void SetCopyNo(G4int CopyNo)=0
const G4ThreeVector GetTranslation() const
virtual G4bool CheckOverlaps(G4int res=1000, G4double tol=0., G4bool verbose=true, G4int errMax=1)
G4LogicalVolume * GetLogicalVolume() const
virtual G4int GetCopyNo() const =0
const G4String & GetName() const
virtual G4int GetRegularStructureId() const =0
virtual G4VPVParameterisation * GetParameterisation() const =0
virtual EInside Inside(const G4ThreeVector &p) const =0
virtual void ComputeDimensions(G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
virtual G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=nullptr, G4ThreeVector *n=nullptr) const =0
virtual G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const =0
virtual G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const =0
virtual G4GeometryType GetEntityType() const =0
virtual G4double ComputeSafety(const G4ThreeVector &globalpoint, const G4NavigationHistory &history, const G4double pMaxLength=DBL_MAX)
virtual G4double ComputeStep(const G4ThreeVector &globalPoint, const G4ThreeVector &globalDirection, const G4double currentProposedStepLength, G4double &newSafety, G4NavigationHistory &history, G4bool &validExitNormal, G4ThreeVector &exitNormal, G4bool &exiting, G4bool &entering, G4VPhysicalVolume *(*pBlockedPhysical), G4int &blockedReplicaNo)
G4SmartVoxelNode * VoxelLocate(G4SmartVoxelHeader *pHead, const G4ThreeVector &localPoint)
virtual G4bool LevelLocate(G4NavigationHistory &history, const G4VPhysicalVolume *blockedVol, const G4int blockedNum, const G4ThreeVector &globalPoint, const G4ThreeVector *globalDirection, const G4bool pLocatedOnEdge, G4ThreeVector &localPoint)
G4double ComputeSafety(const G4ThreeVector &localPoint, const G4VPhysicalVolume ¤tPhysical, G4double maxLength=DBL_MAX)
static const G4double kInfinity
static constexpr double perMillion
static double normal(HepRandomEngine *eptr)
G4bool sLocatedOutsideWorld
G4VPhysicalVolume * spBlockedPhysicalVolume
G4ThreeVector sLastLocatedPointLocal
G4ThreeVector sExitNormal
G4bool sWasLimitedByGeometry
G4ThreeVector sPreviousSftOrigin