54 fTopPhysical(0), fCheck(false),
fPushed(false), fWarnPush(true)
127 const G4bool relativeSearch,
128 const G4bool ignoreDirection )
130 G4bool notKnownContained=
true, noResult;
142 if( considerDirection && pGlobalDirection != 0 )
144 globalDirection=*pGlobalDirection;
151 G4cout <<
"*** G4Navigator::LocateGlobalPointAndSetup: ***" <<
G4endl;
152 G4cout <<
" Called with arguments: " << G4endl
153 <<
" Globalpoint = " << globalPoint << G4endl
154 <<
" RelativeSearch = " << relativeSearch <<
G4endl;
160 G4cout.precision(oldcoutPrec);
164 G4int noLevelsExited=0 ;
165 G4int noLevelsEntered= 0;
167 if ( !relativeSearch )
267 notKnownContained =
false;
289 while (notKnownContained)
295 insideCode = targetSolid->
Inside(localPoint);
299 G4String solidResponse =
"-kInside-";
301 solidResponse =
"-kOutside-";
303 solidResponse =
"-kSurface-";
304 G4cout <<
"*** G4Navigator::LocateGlobalPointAndSetup(): ***" <<
G4endl
305 <<
" Invoked Inside() for solid: " << targetSolid->
GetName()
306 <<
". Solid replied: " << solidResponse <<
G4endl
307 <<
" For local point p: " << localPoint <<
G4endl;
332 if( noLevelsExited > 1 )
356 if( (!
fExiting)&&considerDirection )
361 G4bool directionExiting =
false;
372 directionExiting = normal.dot(localDirection) > 0.0;
373 isExiting = isExiting || directionExiting;
389 if( noLevelsExited > 1 )
412 notKnownContained=
false;
417 notKnownContained=
false;
438 if (!targetPhysical) {
break; }
531 #ifdef G4DEBUG_NAVIGATION
535 G4cout <<
"*** G4Navigator::LocateGlobalPointAndSetup() ***" <<
G4endl;
550 if (targetPhysical) { curPhysVol_Name = targetPhysical->
GetName(); }
551 G4cout <<
" Return value = new volume = " << curPhysVol_Name <<
G4endl;
556 G4cout <<
"Upon exiting LocateGlobalPointAndSetup():" <<
G4endl;
559 G4cout.precision(oldcoutPrec);
565 return targetPhysical;
584 #ifdef G4DEBUG_NAVIGATION
594 #ifdef G4DEBUG_NAVIGATION
597 G4cout <<
"Entering LocateGlobalWithinVolume(): History = " <<
G4endl;
631 G4Exception(
"G4Navigator::LocateGlobalPointWithinVolume()",
633 "Not applicable for replicated volumes.");
749 const G4double pCurrentProposedStepLength,
775 G4cout <<
"*** G4Navigator::ComputeStep: ***" <<
G4endl;
777 <<
" - Proposed step length = " << pCurrentProposedStepLength
779 #ifdef G4DEBUG_NAVIGATION
782 G4cout <<
" Called with the arguments: " << G4endl
783 <<
" Globalpoint = " << std::setw(25) << pGlobalpoint << G4endl
784 <<
" Direction = " << std::setw(25) << pDirection <<
G4endl;
801 G4double moveLenSq = (newLocalPoint-oldLocalPoint).mag2();
803 if ( moveLenSq >=
fSqTol )
823 pCurrentProposedStepLength,
840 pCurrentProposedStepLength,
868 "Point is relocated in voxels, while it should be outside!");
871 pCurrentProposedStepLength,
886 pCurrentProposedStepLength,
905 pCurrentProposedStepLength,
919 pCurrentProposedStepLength,
931 G4Exception(
"G4Navigator::ComputeStep()",
"GeomNav0001",
942 G4bool calculatedExitNormal;
947 pCurrentProposedStepLength,
951 calculatedExitNormal,
985 #ifdef G4DEBUG_NAVIGATION
988 G4cout <<
"G4Navigator::ComputeStep(): another 'zero' step, # "
990 <<
", at " << pGlobalpoint
991 <<
", in volume " << motherPhysical->
GetName()
992 <<
", nav-comp-step calls # " << sNavCScalls
993 <<
", Step= " << Step
1005 std::ostringstream message;
1006 message <<
"Track stuck or not moving." <<
G4endl
1007 <<
" Track stuck, not moving for "
1009 <<
" in volume -" << motherPhysical->
GetName()
1010 <<
"- at point " << pGlobalpoint
1011 <<
" (local point " << newLocalPoint <<
")" <<
G4endl
1012 <<
" direction: " << pDirection
1013 <<
" (local direction: " << localDirection <<
")." <<
G4endl
1014 <<
" Potential geometry or navigation problem !"
1016 <<
" Trying pushing it of " << Step <<
" mm ...";
1017 G4Exception(
"G4Navigator::ComputeStep()",
"GeomNav1002",
1018 JustWarning, message,
"Potential overlap in geometry!");
1027 std::ostringstream message;
1028 message <<
"Stuck Track: potential geometry or navigation problem."
1030 <<
" Track stuck, not moving for "
1032 <<
" in volume -" << motherPhysical->
GetName()
1033 <<
"- at point " << pGlobalpoint <<
G4endl
1034 <<
" direction: " << pDirection <<
".";
1041 G4Exception(
"G4Navigator::ComputeStep()",
"GeomNav0003",
1054 +
std::min(Step,pCurrentProposedStepLength) * pDirection;
1059 #ifdef G4DEBUG_NAVIGATION
1062 G4cout <<
" At G4Nav CompStep End - if(exiting) - fExiting= " <<
fExiting
1123 #ifdef G4DEBUG_NAVIGATION
1126 desc <<
"Problem in ComputeStep: Replica Navigation did not provide"
1127 <<
" valid exit Normal. " <<
G4endl;
1128 desc <<
" Do not know how calculate it in this case." <<
G4endl;
1129 desc <<
" Location = " << finalLocalPoint <<
G4endl;
1130 desc <<
" Volume name = " << motherPhysical->
GetName()
1132 G4Exception(
"G4Navigator::ComputeStep()",
"GeomNav0003",
1133 JustWarning, desc,
"Normal not available for exiting.");
1177 G4cout <<
" Returned step= " << Step;
1181 G4cout <<
" Requested step= " << pCurrentProposedStepLength ;
1199 const G4double pCurrentProposedStepLength,
1210 pCurrentProposedStepLength,
1277 for ( i=1; i<=cdepth; i++ )
1315 ComputeMaterial(replicaNo, current, pTouchable) );
1343 if( candidateLogical )
1365 currentSolid= candidateLogical->
GetSolid();
1366 inSideIt = currentSolid->
Inside(daughterPointOwnLocal);
1367 onSurface = (inSideIt ==
kSurface);
1372 safety = (currentSolid->
DistanceToIn(daughterPointOwnLocal));
1375 else if (inSideIt ==
kInside )
1377 safety = (currentSolid->
DistanceToOut(daughterPointOwnLocal));
1384 nextSolidExitNormal =
1389 ExitNormal = -nextSolidExitNormal;
1397 std::ostringstream message;
1398 message <<
"Point not on surface ! " <<
G4endl
1400 << daughterPointOwnLocal <<
G4endl
1401 <<
" Physical volume = "
1403 <<
" Logical volume = "
1405 <<
" Solid = " << currentSolid->
GetName()
1408 << *currentSolid <<
G4endl;
1411 message <<
"Point is Outside. " << G4endl
1412 <<
" Safety (from outside) = " << safety <<
G4endl;
1416 message <<
"Point is Inside. " << G4endl
1417 <<
" Safety (from inside) = " << safety <<
G4endl;
1419 G4Exception(
"G4Navigator::GetLocalExitNormal()",
"GeomNav1001",
1439 "Incorrect call to GetLocalSurfaceNormal." );
1452 desc <<
" Parameters of solid: " << *daughterSolid
1456 "Surface Normal returned by Solid is not a Unit Vector." );
1474 message <<
"Function called when *NOT* at a Boundary." <<
G4endl;
1475 message <<
"Exit Normal not calculated." <<
G4endl;
1492 G4int enteringReplicaNo,
1495 switch (enteringVolumeType)
1500 G4Exception(
"G4Navigator::GetMotherToDaughterTransform()",
1502 "Method NOT Implemented yet for replica volumes.");
1510 pParam->
ComputeSolid(enteringReplicaNo, pEnteringPhysVol);
1546 #ifdef G4DEBUG_NAVIGATION
1551 G4ThreeVector ExpectedBoundaryPointLocal;
1554 ExpectedBoundaryPointLocal =
1575 G4bool* pNormalCalculated)
1594 G4double normMag2 = globalNormal.mag2();
1595 if( std::fabs ( normMag2 - 1.0 ) <
perMillion )
1597 *pNormalCalculated =
true;
1603 message.precision(10);
1604 message <<
" WARNING> Expected normal-global-frame to be valid, "
1605 <<
" i.e. a unit vector!" <<
G4endl
1606 <<
" - but |normal| = " << std::sqrt(normMag2)
1607 <<
" - and |normal|^2 = " << normMag2 <<
G4endl
1608 <<
" which differs from 1.0 by " << normMag2 - 1.0 <<
G4endl
1610 <<
" Global point: " << IntersectPointGlobal <<
G4endl
1621 message <<
"============================================================"
1625 message <<
" State of Navigator: " <<
G4endl;
1626 message << *
this <<
G4endl;
1628 message <<
"============================================================"
1633 "Value obtained from stored global-normal is not a unit vector.");
1650 #ifdef G4DEBUG_NAVIGATION
1660 edN <<
" State of Navigator: " <<
G4endl;
1666 "LocalExitNormalAndCheck() did not calculate Normal.");
1670 G4double localMag2= localNormal.mag2();
1675 edN <<
"G4Navigator::GetGlobalExitNormal: "
1676 <<
" Using Local Normal - from call to GetLocalExitNormalAndCheck. "
1678 <<
" Local Exit Normal : " <<
" || = " << std::sqrt(localMag2)
1679 <<
" vec = " << localNormal <<
G4endl
1680 <<
" Global Exit Normal : " <<
" || = " << globalNormal.mag()
1681 <<
" vec = " << globalNormal <<
G4endl
1682 <<
" Global point: " << IntersectPointGlobal <<
G4endl;
1696 "Value obtained from new local *solid* is incorrect.");
1697 localNormal = localNormal.unit();
1703 #ifdef G4DEBUG_NAVIGATION
1718 edDfn <<
"Found difference in normals in case of exiting mother "
1719 <<
"- when Get is called after ComputingStep " <<
G4endl;
1720 edDfn <<
" Magnitude of diff = " << diffNorm.mag() <<
G4endl;
1721 edDfn <<
" Normal stored (Global) = " << fExitNormalGlobalFrame
1723 edDfn <<
" Global Computed from Local = " << globalNormAgn <<
G4endl;
1724 G4Exception(
"G4Navigator::GetGlobalExitNormal()",
"GeomNav0003",
1734 return globalNormal;
1738 #define G4NEW_SAFETY 1
1755 #ifdef G4DEBUG_NAVIGATION
1759 G4cout <<
"*** G4Navigator::ComputeSafety: ***" <<
G4endl
1760 <<
" Called at point: " << pGlobalpoint <<
G4endl;
1764 <<
" - Maximum length = " << pMaxLength <<
G4endl;
1767 G4cout <<
" ----- Upon entering Compute Safety:" <<
G4endl;
1777 if( endpointOnSurface && stayedOnEndpoint )
1779 #ifdef G4DEBUG_NAVIGATION
1782 G4cout <<
" G4Navigator::ComputeSafety() finds that point - "
1783 << pGlobalpoint <<
" - is on surface " <<
G4endl;
1808 #ifdef G4DEBUG_NAVIGATION
1811 G4cout <<
" G4Navigator::ComputeSafety() relocates-in-volume to point: "
1812 << pGlobalpoint <<
G4endl;
1829 *motherPhysical, pMaxLength);
1830 newSafety= safetyTwo;
1835 newSafety= safetyOldVoxel;
1854 G4Exception(
"G4Navigator::ComputeSafety()",
"GeomNav0001",
1878 #ifdef G4DEBUG_NAVIGATION
1883 G4cout <<
" Returned value of Safety = " << newSafety <<
G4endl;
1885 G4cout.precision(oldcoutPrec);
1926 #ifdef CHECK_ORDER_OF_METHODS
1929 G4Exception(
"G4Navigator::RecheckDistanceToCurrentBoundary()",
1931 "Method must be called after ComputeStep(), before call to LocateMethod.");
1961 G4ThreeVector dgDirection= nextLevelTrf.TransformAxis(localDirection);
1962 locatedDaug = candSolid->
Inside(dgPosition);
1971 true, &validExitNormal, &exitNormal);
1972 daughterStep= - distanceBackOut;
1999 daughterSafety= 0.0;
2008 *prDistance= daughterStep;
2009 if( prNewSafety ) { *prNewSafety= daughterSafety; }
2029 if( ProposedMove >= motherSafety )
2033 true, &validExitNormal, &exitNormal);
2037 motherStep= ProposedMove;
2042 motherSafety= motherSolid->
DistanceToIn(localPosition);
2043 if( ProposedMove >= motherSafety )
2053 if( prNewSafety ) { *prNewSafety= motherSafety; }
2062 *prDistance=
std::min( motherStep, daughterStep );
2065 *prNewSafety=
std::min( motherSafety, daughterSafety );
2089 G4cout <<
"The current state of G4Navigator is: " <<
G4endl;
2094 <<
" BlockedPhysicalVolume= " ;
2111 G4cout << std::setw(30) <<
" ExitNormal " <<
" "
2112 << std::setw( 5) <<
" Valid " <<
" "
2113 << std::setw( 9) <<
" Exiting " <<
" "
2114 << std::setw( 9) <<
" Entering" <<
" "
2115 << std::setw(15) <<
" Blocked:Volume " <<
" "
2116 << std::setw( 9) <<
" ReplicaNo" <<
" "
2117 << std::setw( 8) <<
" LastStepZero " <<
" "
2121 <<
", " << std::setw(7) <<
fExitNormal.z() <<
" ) "
2123 << std::setw( 9) <<
fExiting <<
" "
2126 {
G4cout << std::setw(15) <<
"None"; }
2140 G4cout.precision(oldcoutPrec);
2169 G4double shiftOrigin = std::sqrt(shiftOriginSafSq);
2172 if( diffShiftSaf > fAccuracyForWarning )
2176 std::ostringstream message, suggestion;
2177 message <<
"Accuracy error or slightly inaccurate position shift."
2179 <<
" The Step's starting point has moved "
2180 << std::sqrt(moveLenSq)/
mm <<
" mm " <<
G4endl
2181 <<
" since the last call to a Locate method." <<
G4endl
2182 <<
" This has resulted in moving "
2183 << shiftOrigin/
mm <<
" mm "
2184 <<
" from the last point at which the safety "
2185 <<
" was calculated " <<
G4endl
2186 <<
" which is more than the computed safety= "
2187 << fPreviousSafety/
mm <<
" mm at that point." <<
G4endl
2188 <<
" This difference is "
2189 << diffShiftSaf/
mm <<
" mm." <<
G4endl
2190 <<
" The tolerated accuracy is "
2191 << fAccuracyForException/
mm <<
" mm.";
2195 if( ((++warnNow % 100) == 1) )
2198 <<
" This problem can be due to either " <<
G4endl
2199 <<
" - a process that has proposed a displacement"
2200 <<
" larger than the current safety , or" <<
G4endl
2201 <<
" - inaccuracy in the computation of the safety";
2202 suggestion <<
"We suggest that you " << G4endl
2203 <<
" - find i) what particle is being tracked, and "
2204 <<
" ii) through what part of your geometry " << G4endl
2205 <<
" for example by re-running this event with "
2207 <<
" /tracking/verbose 1 " << G4endl
2208 <<
" - check which processes you declare for"
2209 <<
" this particle (and look at non-standard ones)"
2211 <<
" - in case, create a detailed logfile"
2212 <<
" of this event using:" << G4endl
2213 <<
" /tracking/verbose 6 ";
2217 message,
G4String(suggestion.str()));
2218 G4cout.precision(oldcoutPrec);
2219 G4cerr.precision(oldcerrPrec);
2221 #ifdef G4DEBUG_NAVIGATION
2224 G4cerr <<
"WARNING - G4Navigator::ComputeStep()" <<
G4endl
2225 <<
" The Step's starting point has moved "
2226 << std::sqrt(moveLenSq) <<
"," <<
G4endl
2227 <<
" which has taken it to the limit of"
2228 <<
" the current safety. " <<
G4endl;
2233 if ( shiftOriginSafSq >
sqr(safetyPlus) )
2235 std::ostringstream message;
2236 message <<
"May lead to a crash or unreliable results." <<
G4endl
2237 <<
" Position has shifted considerably without"
2238 <<
" notifying the navigator !" <<
G4endl
2239 <<
" Tolerated safety: " << safetyPlus <<
G4endl
2240 <<
" Computed shift : " << shiftOriginSafSq;
2241 G4Exception(
"G4Navigator::ComputeStep()",
"GeomNav1002",
2258 G4int oldcoutPrec = os.precision(4);
2261 os <<
"The current state of G4Navigator is: " <<
G4endl;
2264 <<
" Exiting = " << n.
fExiting << G4endl
2265 <<
" Entering = " << n.
fEntering << G4endl
2266 <<
" BlockedPhysicalVolume= " ;
2279 os << std::setw(30) <<
" ExitNormal " <<
" "
2280 << std::setw( 5) <<
" Valid " <<
" "
2281 << std::setw( 9) <<
" Exiting " <<
" "
2282 << std::setw( 9) <<
" Entering" <<
" "
2283 << std::setw(15) <<
" Blocked:Volume " <<
" "
2284 << std::setw( 9) <<
" ReplicaNo" <<
" "
2285 << std::setw( 8) <<
" LastStepZero " <<
" "
2289 <<
", " << std::setw(7) << n.
fExitNormal.z() <<
" ) "
2291 << std::setw( 9) << n.
fExiting <<
" "
2294 { os << std::setw(15) <<
"None"; }
2313 os.precision(oldcoutPrec);
G4ReplicaNavigation freplicaNav
static constexpr double perMillion
G4ParameterisedNavigation fparamNav
G4SmartVoxelHeader * GetVoxelHeader() const
G4ThreeVector sExitNormal
G4VPhysicalVolume * GetTopVolume() const
G4VoxelNavigation fvoxelNav
G4VPhysicalVolume * fBlockedPhysicalVolume
virtual void ResetState()
G4bool fLastTriedStepComputation
virtual G4bool LevelLocate(G4NavigationHistory &history, const G4VPhysicalVolume *blockedVol, const G4int blockedNum, const G4ThreeVector &globalPoint, const G4ThreeVector *globalDirection, const G4bool pLocatedOnEdge, G4ThreeVector &localPoint)
G4VoxelSafety * fpVoxelSafety
static constexpr double mm
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)
static const G4double kInfinity
virtual G4bool IsNested() const
#define fWasLimitedByGeometry
std::ostringstream G4ExceptionDescription
void UpdateMaterial(G4Material *pMaterial)
CLHEP::Hep3Vector G4ThreeVector
CLHEP::HepRotation G4RotationMatrix
G4ThreeVector fLastStepEndPointLocal
virtual void ComputeDimensions(G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
G4int GetVerboseLevel() const
G4ThreeVector fGrandMotherExitNormal
G4ThreeVector ComputeLocalAxis(const G4ThreeVector &pVec) const
virtual G4TouchableHistoryHandle CreateTouchableHistoryHandle() const
virtual G4VSolid * ComputeSolid(const G4int, G4VPhysicalVolume *)
void ResetStackAndState()
G4double GetSurfaceTolerance() const
G4VPhysicalVolume * spBlockedPhysicalVolume
virtual G4double ComputeStep(const G4ThreeVector &pGlobalPoint, const G4ThreeVector &pDirection, const G4double pCurrentProposedStepLength, G4double &pNewSafety)
G4VSolid * GetSolid() const
G4double ComputeSafety(const G4ThreeVector &localPoint, const G4VPhysicalVolume ¤tPhysical, G4double maxLength=DBL_MAX)
void SetSolid(G4VSolid *pSolid)
G4int fAbandonThreshold_NoZeroSteps
G4SmartVoxelNode * ParamVoxelLocate(G4SmartVoxelHeader *pHead, const G4ThreeVector &localPoint)
const G4RotationMatrix * GetRotation() const
EVolume GetVolumeType(G4int n) const
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)
const G4AffineTransform GetLocalToGlobalTransform() const
virtual G4GeometryType GetEntityType() const =0
G4ReferenceCountedHandle< G4TouchableHistory > G4TouchableHistoryHandle
G4bool LevelLocate(G4NavigationHistory &history, const G4VPhysicalVolume *blockedVol, const G4int blockedNum, const G4ThreeVector &globalPoint, const G4ThreeVector *globalDirection, const G4bool pLocatedOnEdge, G4ThreeVector &localPoint)
void ComputeTransformation(const G4int replicaNo, G4VPhysicalVolume *pVol, G4ThreeVector &point) const
virtual G4VPhysicalVolume * ResetHierarchyAndLocate(const G4ThreeVector &point, const G4ThreeVector &direction, const G4TouchableHistory &h)
G4ThreeVector fExitNormalGlobalFrame
virtual G4ThreeVector GetLocalExitNormalAndCheck(const G4ThreeVector &point, G4bool *valid)
G4int GetTopReplicaNo() const
void SetVerboseLevel(G4int level)
G4double ComputeSafety(const G4ThreeVector &globalpoint, const G4NavigationHistory &history, const G4double pMaxLength=DBL_MAX)
static double normal(HepRandomEngine *eptr)
G4bool fWasLimitedByGeometry
G4bool sWasLimitedByGeometry
G4NormalNavigation fnormalNav
void SetNormalNavigation(G4NormalNavigation *fnormnav)
G4double ComputeSafety(const G4ThreeVector &localPoint, const G4NavigationHistory &history, const G4double pProposedMaxLength=DBL_MAX)
G4GLOB_DLL std::ostream G4cout
const G4String & GetName() const
virtual EInside Inside(const G4ThreeVector &p) const =0
virtual G4ThreeVector GetLocalExitNormal(G4bool *valid)
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)
G4ThreeVector fPreviousSftOrigin
G4double CheckNextStep(const G4ThreeVector &pGlobalPoint, const G4ThreeVector &pDirection, const G4double pCurrentProposedStepLength, G4double &pNewSafety)
EVolume GetTopVolumeType() const
virtual G4int GetRegularStructureId() const =0
G4NavigationHistory fHistory
virtual G4double ComputeSafety(const G4ThreeVector &globalpoint, const G4NavigationHistory &history, const G4double pMaxLength=DBL_MAX)
virtual G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const =0
virtual G4VPVParameterisation * GetParameterisation() const =0
virtual void SetCopyNo(G4int CopyNo)=0
G4int GetReplicaNo(G4int n) const
G4bool LevelLocate(G4NavigationHistory &history, const G4VPhysicalVolume *blockedVol, const G4int blockedNum, const G4ThreeVector &globalPoint, const G4ThreeVector *globalDirection, const G4bool pLocatedOnEdge, G4ThreeVector &localPoint)
G4ThreeVector sLastLocatedPointLocal
EVolume CharacteriseDaughters() const
virtual G4bool RecheckDistanceToCurrentBoundary(const G4ThreeVector &pGlobalPoint, const G4ThreeVector &pDirection, const G4double CurrentProposedStepLength, G4double *prDistance, G4double *prNewSafety=0) const
G4bool EnteredDaughterVolume() const
virtual G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const =0
#define G4DEBUG_NAVIGATION
EVolume CharacteriseDaughters(const G4LogicalVolume *pLog) const
G4ThreeVector fLastLocatedPointLocal
G4bool fLocatedOutsideWorld
G4ThreeVector ComputeLocalPoint(const G4ThreeVector &rGlobPoint) const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
const G4ThreeVector & GetTranslation() const
void NewLevel(G4VPhysicalVolume *pNewMother, EVolume vType=kNormal, G4int nReplica=-1)
G4TouchableHistory * CreateTouchableHistory() 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)
G4AffineTransform GetMotherToDaughterTransform(G4VPhysicalVolume *dVolume, G4int dReplicaNo, EVolume dVolumeType)
G4LogicalVolume * GetLogicalVolume() const
const G4AffineTransform & GetTransform(G4int n) const
virtual G4ThreeVector GetGlobalExitNormal(const G4ThreeVector &point, G4bool *valid)
G4int GetDaughtersRegularStructureId(const G4LogicalVolume *pLog) const
virtual void ComputeTransformation(const G4int, G4VPhysicalVolume *) const =0
virtual G4int GetCopyNo() const =0
const G4AffineTransform & GetGlobalToLocalTransform() const
virtual G4VPhysicalVolume * LocateGlobalPointAndSetup(const G4ThreeVector &point, const G4ThreeVector *direction=0, const G4bool pRelativeSearch=true, const G4bool ignoreDirection=true)
struct G4Navigator::G4SaveNavigatorState fSaveState
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
G4SmartVoxelNode * VoxelLocate(G4SmartVoxelHeader *pHead, const G4ThreeVector &localPoint)
G4double ComputeSafety(const G4ThreeVector &localPoint, const G4NavigationHistory &history, const G4double pProposedMaxLength=DBL_MAX)
const G4AffineTransform & GetTopTransform() const
std::ostream & operator<<(std::ostream &os, const G4Navigator &n)
G4bool fCalculatedExitNormal
G4ThreeVector fStepEndPoint
const G4NavigationHistory * GetHistory() const
G4ThreeVector fExitNormal
G4int fActionThreshold_NoZeroSteps
G4bool fChangedGrandMotherRefFrame
G4int MoveUpHistory(G4int num_levels=1)
const G4String & GetName() const
G4double ComputeSafety(const G4ThreeVector &globalPoint, const G4ThreeVector &localPoint, G4NavigationHistory &history, const G4double pProposedMaxLength=DBL_MAX)
G4bool LevelLocate(G4NavigationHistory &history, const G4VPhysicalVolume *blockedVol, const G4int blockedNum, const G4ThreeVector &globalPoint, const G4ThreeVector *globalDirection, const G4bool pLocatedOnEdge, G4ThreeVector &localPoint)
G4VPhysicalVolume * GetVolume(G4int n) const
G4bool LevelLocate(G4NavigationHistory &history, const G4VPhysicalVolume *blockedVol, const G4int blockedNum, const G4ThreeVector &globalPoint, const G4ThreeVector *globalDirection, const G4bool pLocatedOnEdge, G4ThreeVector &localPoint)
virtual G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const =0
virtual G4double ComputeSafety(const G4ThreeVector &globalpoint, const G4double pProposedMaxLength=DBL_MAX, const G4bool keepState=true)
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)
G4RegularNavigation fregularNav
EInside BackLocate(G4NavigationHistory &history, const G4ThreeVector &globalPoint, G4ThreeVector &localPoint, const G4bool &exiting, G4bool ¬KnownInside) const
virtual void SetupHierarchy()
virtual G4bool CheckOverlaps(G4int res=1000, G4double tol=0., G4bool verbose=true, G4int errMax=1)
G4ThreeVector sPreviousSftOrigin
EVolume VolumeType(const G4VPhysicalVolume *pVol) const
static G4GeometryTolerance * GetInstance()
virtual void LocateGlobalPointWithinVolume(const G4ThreeVector &position)
void ComputeStepLog(const G4ThreeVector &pGlobalpoint, G4double moveLenSq) const
G4GLOB_DLL std::ostream G4cerr
G4bool sLocatedOutsideWorld