60 fTopPhysical(0), fCheck(false),
fPushed(false), fWarnPush(true)
133 const G4bool relativeSearch,
134 const G4bool ignoreDirection )
136 G4bool notKnownContained=
true, noResult;
148 if( considerDirection && pGlobalDirection != 0 )
150 globalDirection=*pGlobalDirection;
157 G4cout <<
"*** G4Navigator::LocateGlobalPointAndSetup: ***" <<
G4endl;
158 G4cout <<
" Called with arguments: " << G4endl
159 <<
" Globalpoint = " << globalPoint << G4endl
160 <<
" RelativeSearch = " << relativeSearch <<
G4endl;
166 G4cout.precision(oldcoutPrec);
170 G4int noLevelsExited=0 ;
171 G4int noLevelsEntered= 0;
173 if ( !relativeSearch )
273 notKnownContained =
false;
295 while (notKnownContained)
301 insideCode = targetSolid->
Inside(localPoint);
305 G4String solidResponse =
"-kInside-";
307 solidResponse =
"-kOutside-";
309 solidResponse =
"-kSurface-";
310 G4cout <<
"*** G4Navigator::LocateGlobalPointAndSetup(): ***" <<
G4endl
311 <<
" Invoked Inside() for solid: " << targetSolid->
GetName()
312 <<
". Solid replied: " << solidResponse <<
G4endl
313 <<
" For local point p: " << localPoint <<
G4endl;
338 if( noLevelsExited > 1 )
362 if( (!
fExiting)&&considerDirection )
367 G4bool directionExiting =
false;
378 directionExiting = normal.
dot(localDirection) > 0.0;
379 isExiting = isExiting || directionExiting;
395 if( noLevelsExited > 1 )
418 notKnownContained=
false;
423 notKnownContained=
false;
444 if (!targetPhysical) {
break; }
537 #ifdef G4DEBUG_NAVIGATION
541 G4cout <<
"*** G4Navigator::LocateGlobalPointAndSetup() ***" <<
G4endl;
556 if (targetPhysical) { curPhysVol_Name = targetPhysical->
GetName(); }
557 G4cout <<
" Return value = new volume = " << curPhysVol_Name <<
G4endl;
562 G4cout <<
"Upon exiting LocateGlobalPointAndSetup():" <<
G4endl;
565 G4cout.precision(oldcoutPrec);
571 return targetPhysical;
590 #ifdef G4DEBUG_NAVIGATION
600 #ifdef G4DEBUG_NAVIGATION
603 G4cout <<
"Entering LocateGlobalWithinVolume(): History = " <<
G4endl;
637 G4Exception(
"G4Navigator::LocateGlobalPointWithinVolume()",
639 "Not applicable for replicated volumes.");
755 const G4double pCurrentProposedStepLength,
781 G4cout <<
"*** G4Navigator::ComputeStep: ***" <<
G4endl;
783 <<
" - Proposed step length = " << pCurrentProposedStepLength
785 #ifdef G4DEBUG_NAVIGATION
788 G4cout <<
" Called with the arguments: " << G4endl
789 <<
" Globalpoint = " << std::setw(25) << pGlobalpoint << G4endl
790 <<
" Direction = " << std::setw(25) << pDirection <<
G4endl;
807 G4double moveLenSq = (newLocalPoint-oldLocalPoint).mag2();
809 if ( moveLenSq >=
fSqTol )
829 pCurrentProposedStepLength,
846 pCurrentProposedStepLength,
874 "Point is relocated in voxels, while it should be outside!");
877 pCurrentProposedStepLength,
892 pCurrentProposedStepLength,
911 pCurrentProposedStepLength,
925 pCurrentProposedStepLength,
937 G4Exception(
"G4Navigator::ComputeStep()",
"GeomNav0001",
948 G4bool calculatedExitNormal;
953 pCurrentProposedStepLength,
957 calculatedExitNormal,
991 #ifdef G4DEBUG_NAVIGATION
994 G4cout <<
"G4Navigator::ComputeStep(): another 'zero' step, # "
996 <<
", at " << pGlobalpoint
997 <<
", in volume " << motherPhysical->
GetName()
998 <<
", nav-comp-step calls # " << sNavCScalls
999 <<
", Step= " << Step
1012 message.precision(16);
1013 message <<
"Track stuck or not moving." <<
G4endl
1014 <<
" Track stuck, not moving for "
1016 <<
" in volume -" << motherPhysical->
GetName()
1017 <<
"- at point " << pGlobalpoint
1018 <<
" (local point " << newLocalPoint <<
")" <<
G4endl
1019 <<
" direction: " << pDirection
1020 <<
" (local direction: " << localDirection <<
")." <<
G4endl
1021 <<
" Potential geometry or navigation problem !"
1023 <<
" Trying pushing it of " << Step <<
" mm ...";
1024 G4Exception(
"G4Navigator::ComputeStep()",
"GeomNav1002",
1025 JustWarning, message,
"Potential overlap in geometry!");
1035 message <<
"Stuck Track: potential geometry or navigation problem."
1037 <<
" Track stuck, not moving for "
1039 <<
" in volume -" << motherPhysical->
GetName()
1040 <<
"- at point " << pGlobalpoint <<
G4endl
1041 <<
" direction: " << pDirection <<
".";
1048 G4Exception(
"G4Navigator::ComputeStep()",
"GeomNav0003",
1061 +
std::min(Step,pCurrentProposedStepLength) * pDirection;
1066 #ifdef G4DEBUG_NAVIGATION
1069 G4cout <<
" At G4Nav CompStep End - if(exiting) - fExiting= " <<
fExiting
1130 #ifdef G4DEBUG_NAVIGATION
1133 desc <<
"Problem in ComputeStep: Replica Navigation did not provide"
1134 <<
" valid exit Normal. " <<
G4endl;
1135 desc <<
" Do not know how calculate it in this case." <<
G4endl;
1136 desc <<
" Location = " << finalLocalPoint <<
G4endl;
1137 desc <<
" Volume name = " << motherPhysical->
GetName()
1139 G4Exception(
"G4Navigator::ComputeStep()",
"GeomNav0003",
1140 JustWarning, desc,
"Normal not available for exiting.");
1182 G4cout <<
" Returned step= " << Step;
1186 G4cout <<
" Requested step= " << pCurrentProposedStepLength ;
1204 const G4double pCurrentProposedStepLength,
1215 pCurrentProposedStepLength,
1282 for ( i=1; i<=cdepth; i++ )
1320 ComputeMaterial(replicaNo, current, pTouchable) );
1349 if( candidateLogical )
1371 currentSolid= candidateLogical->
GetSolid();
1372 inSideIt = currentSolid->
Inside(daughterPointOwnLocal);
1373 onSurface = (inSideIt ==
kSurface);
1378 safety = (currentSolid->
DistanceToIn(daughterPointOwnLocal));
1381 else if (inSideIt ==
kInside )
1383 safety = (currentSolid->
DistanceToOut(daughterPointOwnLocal));
1390 nextSolidExitNormal =
1406 message <<
"Point not on surface ! " <<
G4endl
1408 << daughterPointOwnLocal <<
G4endl
1409 <<
" Physical volume = "
1411 <<
" Logical volume = "
1413 <<
" Solid = " << currentSolid->
GetName()
1416 << *currentSolid <<
G4endl;
1419 message <<
"Point is Outside. " << G4endl
1420 <<
" Safety (from outside) = " << safety <<
G4endl;
1424 message <<
"Point is Inside. " << G4endl
1425 <<
" Safety (from inside) = " << safety <<
G4endl;
1427 G4Exception(
"G4Navigator::GetLocalExitNormal()",
"GeomNav1001",
1447 "Incorrect call to GetLocalSurfaceNormal." );
1460 desc <<
" Parameters of solid: " << *daughterSolid
1464 "Surface Normal returned by Solid is not a Unit Vector." );
1482 message <<
"Function called when *NOT* at a Boundary." <<
G4endl;
1483 message <<
"Exit Normal not calculated." <<
G4endl;
1500 G4int enteringReplicaNo,
1503 switch (enteringVolumeType)
1508 G4Exception(
"G4Navigator::GetMotherToDaughterTransform()",
1510 "Method NOT Implemented yet for replica volumes.");
1518 pParam->
ComputeSolid(enteringReplicaNo, pEnteringPhysVol);
1554 #ifdef G4DEBUG_NAVIGATION
1559 G4ThreeVector ExpectedBoundaryPointLocal;
1562 ExpectedBoundaryPointLocal =
1583 G4bool* pNormalCalculated)
1605 *pNormalCalculated =
true;
1611 message.precision(10);
1612 message <<
" WARNING> Expected normal-global-frame to be valid, "
1613 <<
" i.e. a unit vector!" <<
G4endl
1614 <<
" - but |normal| = " << std::sqrt(normMag2)
1615 <<
" - and |normal|^2 = " << normMag2 <<
G4endl
1616 <<
" which differs from 1.0 by " << normMag2 - 1.0 <<
G4endl
1618 <<
" Global point: " << IntersectPointGlobal <<
G4endl
1629 message <<
"============================================================"
1633 message <<
" State of Navigator: " <<
G4endl;
1634 message << *
this <<
G4endl;
1636 message <<
"============================================================"
1641 "Value obtained from stored global-normal is not a unit vector.");
1656 #ifdef G4DEBUG_NAVIGATION
1666 edN <<
" State of Navigator: " <<
G4endl;
1672 "LocalExitNormalAndCheck() did not calculate Normal.");
1681 edN <<
"G4Navigator::GetGlobalExitNormal: "
1682 <<
" Using Local Normal - from call to GetLocalExitNormalAndCheck. "
1684 <<
" Local Exit Normal : " <<
" || = " << std::sqrt(localMag2)
1685 <<
" vec = " << localNormal <<
G4endl
1686 <<
" Global Exit Normal : " <<
" || = " << globalNormal.
mag()
1687 <<
" vec = " << globalNormal <<
G4endl
1688 <<
" Global point: " << IntersectPointGlobal <<
G4endl;
1702 "Value obtained from new local *solid* is incorrect.");
1703 localNormal = localNormal.
unit();
1708 #ifdef G4DEBUG_NAVIGATION
1722 edDfn <<
"Found difference in normals in case of exiting mother "
1723 <<
"- when Get is called after ComputingStep " <<
G4endl;
1724 edDfn <<
" Magnitude of diff = " << diffNorm.
mag() <<
G4endl;
1725 edDfn <<
" Normal stored (Global) = " << fExitNormalGlobalFrame
1727 edDfn <<
" Global Computed from Local = " << globalNormAgn <<
G4endl;
1728 G4Exception(
"G4Navigator::GetGlobalExitNormal()",
"GeomNav0003",
1738 return globalNormal;
1742 #define G4NEW_SAFETY 1
1759 #ifdef G4DEBUG_NAVIGATION
1763 G4cout <<
"*** G4Navigator::ComputeSafety: ***" <<
G4endl
1764 <<
" Called at point: " << pGlobalpoint <<
G4endl;
1768 <<
" - Maximum length = " << pMaxLength <<
G4endl;
1771 G4cout <<
" ----- Upon entering Compute Safety:" <<
G4endl;
1781 if( endpointOnSurface && stayedOnEndpoint )
1783 #ifdef G4DEBUG_NAVIGATION
1786 G4cout <<
" G4Navigator::ComputeSafety() finds that point - "
1787 << pGlobalpoint <<
" - is on surface " <<
G4endl;
1812 #ifdef G4DEBUG_NAVIGATION
1815 G4cout <<
" G4Navigator::ComputeSafety() relocates-in-volume to point: "
1816 << pGlobalpoint <<
G4endl;
1833 *motherPhysical, pMaxLength);
1834 newSafety= safetyTwo;
1839 newSafety= safetyOldVoxel;
1858 G4Exception(
"G4Navigator::ComputeSafety()",
"GeomNav0001",
1882 #ifdef G4DEBUG_NAVIGATION
1887 G4cout <<
" Returned value of Safety = " << newSafety <<
G4endl;
1889 G4cout.precision(oldcoutPrec);
1930 #ifdef CHECK_ORDER_OF_METHODS
1933 G4Exception(
"G4Navigator::RecheckDistanceToCurrentBoundary()",
1935 "Method must be called after ComputeStep(), before call to LocateMethod.");
1964 G4ThreeVector dgPosition= nextLevelTrf.TransformPoint(localPosition);
1965 G4ThreeVector dgDirection= nextLevelTrf.TransformAxis(localDirection);
1966 locatedDaug = candSolid->
Inside(dgPosition);
1975 true, &validExitNormal, &exitNormal);
1976 daughterStep= - distanceBackOut;
2003 daughterSafety= 0.0;
2012 *prDistance= daughterStep;
2013 if( prNewSafety ) { *prNewSafety= daughterSafety; }
2033 if( ProposedMove >= motherSafety )
2037 true, &validExitNormal, &exitNormal);
2041 motherStep= ProposedMove;
2046 motherSafety= motherSolid->
DistanceToIn(localPosition);
2047 if( ProposedMove >= motherSafety )
2057 if( prNewSafety ) { *prNewSafety= motherSafety; }
2066 *prDistance=
std::min( motherStep, daughterStep );
2069 *prNewSafety=
std::min( motherSafety, daughterSafety );
2093 G4cout <<
"The current state of G4Navigator is: " <<
G4endl;
2098 <<
" BlockedPhysicalVolume= " ;
2115 G4cout << std::setw(30) <<
" ExitNormal " <<
" "
2116 << std::setw( 5) <<
" Valid " <<
" "
2117 << std::setw( 9) <<
" Exiting " <<
" "
2118 << std::setw( 9) <<
" Entering" <<
" "
2119 << std::setw(15) <<
" Blocked:Volume " <<
" "
2120 << std::setw( 9) <<
" ReplicaNo" <<
" "
2121 << std::setw( 8) <<
" LastStepZero " <<
" "
2127 << std::setw( 9) <<
fExiting <<
" "
2130 {
G4cout << std::setw(15) <<
"None"; }
2144 G4cout.precision(oldcoutPrec);
2173 G4double shiftOrigin = std::sqrt(shiftOriginSafSq);
2176 if( diffShiftSaf > fAccuracyForWarning )
2180 std::ostringstream
message, suggestion;
2181 message <<
"Accuracy error or slightly inaccurate position shift."
2183 <<
" The Step's starting point has moved "
2184 << std::sqrt(moveLenSq)/
mm <<
" mm " <<
G4endl
2185 <<
" since the last call to a Locate method." <<
G4endl
2186 <<
" This has resulted in moving "
2187 << shiftOrigin/
mm <<
" mm "
2188 <<
" from the last point at which the safety "
2189 <<
" was calculated " <<
G4endl
2190 <<
" which is more than the computed safety= "
2191 << fPreviousSafety/
mm <<
" mm at that point." <<
G4endl
2192 <<
" This difference is "
2193 << diffShiftSaf/
mm <<
" mm." <<
G4endl
2194 <<
" The tolerated accuracy is "
2195 << fAccuracyForException/
mm <<
" mm.";
2199 if( ((++warnNow % 100) == 1) )
2202 <<
" This problem can be due to either " <<
G4endl
2203 <<
" - a process that has proposed a displacement"
2204 <<
" larger than the current safety , or" <<
G4endl
2205 <<
" - inaccuracy in the computation of the safety";
2206 suggestion <<
"We suggest that you " << G4endl
2207 <<
" - find i) what particle is being tracked, and "
2208 <<
" ii) through what part of your geometry " << G4endl
2209 <<
" for example by re-running this event with "
2211 <<
" /tracking/verbose 1 " << G4endl
2212 <<
" - check which processes you declare for"
2213 <<
" this particle (and look at non-standard ones)"
2215 <<
" - in case, create a detailed logfile"
2216 <<
" of this event using:" << G4endl
2217 <<
" /tracking/verbose 6 ";
2221 message,
G4String(suggestion.str()));
2222 G4cout.precision(oldcoutPrec);
2223 G4cerr.precision(oldcerrPrec);
2225 #ifdef G4DEBUG_NAVIGATION
2228 G4cerr <<
"WARNING - G4Navigator::ComputeStep()" <<
G4endl
2229 <<
" The Step's starting point has moved "
2230 << std::sqrt(moveLenSq) <<
"," <<
G4endl
2231 <<
" which has taken it to the limit of"
2232 <<
" the current safety. " <<
G4endl;
2237 if ( shiftOriginSafSq >
sqr(safetyPlus) )
2240 message <<
"May lead to a crash or unreliable results." <<
G4endl
2241 <<
" Position has shifted considerably without"
2242 <<
" notifying the navigator !" <<
G4endl
2243 <<
" Tolerated safety: " << safetyPlus <<
G4endl
2244 <<
" Computed shift : " << shiftOriginSafSq;
2245 G4Exception(
"G4Navigator::ComputeStep()",
"GeomNav1002",
2262 G4int oldcoutPrec = os.precision(4);
2265 os <<
"The current state of G4Navigator is: " <<
G4endl;
2268 <<
" Exiting = " << n.
fExiting << G4endl
2269 <<
" Entering = " << n.
fEntering << G4endl
2270 <<
" BlockedPhysicalVolume= " ;
2283 os << std::setw(30) <<
" ExitNormal " <<
" "
2284 << std::setw( 5) <<
" Valid " <<
" "
2285 << std::setw( 9) <<
" Exiting " <<
" "
2286 << std::setw( 9) <<
" Entering" <<
" "
2287 << std::setw(15) <<
" Blocked:Volume " <<
" "
2288 << std::setw( 9) <<
" ReplicaNo" <<
" "
2289 << std::setw( 8) <<
" LastStepZero " <<
" "
2295 << std::setw( 9) << n.
fExiting <<
" "
2298 { os << std::setw(15) <<
"None"; }
2317 os.precision(oldcoutPrec);
G4bool fCalculatedExitNormal
EInside BackLocate(G4NavigationHistory &history, const G4ThreeVector &globalPoint, G4ThreeVector &localPoint, const G4bool &exiting, G4bool ¬KnownInside) const
G4ThreeVector sExitNormal
void ComputeStepLog(const G4ThreeVector &pGlobalpoint, G4double moveLenSq) const
EVolume VolumeType(const G4VPhysicalVolume *pVol) const
virtual G4double ComputeStep(const G4ThreeVector &pGlobalPoint, const G4ThreeVector &pDirection, const G4double pCurrentProposedStepLength, G4double &pNewSafety)
static constexpr double perThousand
CLHEP::Hep3Vector G4ThreeVector
std::ostringstream G4ExceptionDescription
virtual G4ThreeVector GetLocalExitNormal(G4bool *valid)
G4LogicalVolume * GetLogicalVolume() const
G4double ComputeSafety(const G4ThreeVector &globalpoint, const G4NavigationHistory &history, const G4double pMaxLength=DBL_MAX)
static const G4double kInfinity
G4ThreeVector fLastStepEndPointLocal
std::ostream & operator<<(std::ostream &, const BasicVector3D< float > &)
G4ThreeVector fExitNormal
G4bool EnteredDaughterVolume() const
G4ThreeVector fGrandMotherExitNormal
static constexpr double mm
virtual void LocateGlobalPointWithinVolume(const G4ThreeVector &position)
virtual G4VPVParameterisation * GetParameterisation() const =0
G4TouchableHistory * CreateTouchableHistory() const
G4SmartVoxelHeader * GetVoxelHeader() const
void message(RunManager *runmanager)
void UpdateMaterial(G4Material *pMaterial)
static const G4double kToleranceNormalCheck
void NewLevel(G4VPhysicalVolume *pNewMother, EVolume vType=kNormal, G4int nReplica=-1)
G4ThreeVector fStepEndPoint
static double normal(HepRandomEngine *eptr)
double dot(const Hep3Vector &) const
struct G4Navigator::G4SaveNavigatorState fSaveState
G4int GetDaughtersRegularStructureId(const G4LogicalVolume *pLog) const
G4int fActionThreshold_NoZeroSteps
virtual G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const =0
G4bool LevelLocate(G4NavigationHistory &history, const G4VPhysicalVolume *blockedVol, const G4int blockedNum, const G4ThreeVector &globalPoint, const G4ThreeVector *globalDirection, const G4bool pLocatedOnEdge, G4ThreeVector &localPoint)
G4bool fChangedGrandMotherRefFrame
G4NormalNavigation fnormalNav
const G4ThreeVector & GetTranslation() const
virtual G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const =0
G4VoxelSafety * fpVoxelSafety
G4SmartVoxelNode * VoxelLocate(G4SmartVoxelHeader *pHead, const G4ThreeVector &localPoint)
G4double ComputeSafety(const G4ThreeVector &localPoint, const G4NavigationHistory &history, const G4double pProposedMaxLength=DBL_MAX)
void ComputeTransformation(const G4int replicaNo, G4VPhysicalVolume *pVol, G4ThreeVector &point) const
virtual EInside Inside(const G4ThreeVector &p) const =0
virtual G4VSolid * ComputeSolid(const G4int, G4VPhysicalVolume *)
const G4AffineTransform & GetGlobalToLocalTransform() const
virtual G4bool CheckOverlaps(G4int res=1000, G4double tol=0., G4bool verbose=true, G4int errMax=1)
G4ReferenceCountedHandle< G4TouchableHistory > G4TouchableHistoryHandle
G4ThreeVector fLastLocatedPointLocal
EVolume CharacteriseDaughters() const
G4bool sLocatedOutsideWorld
G4VPhysicalVolume * spBlockedPhysicalVolume
G4bool LevelLocate(G4NavigationHistory &history, const G4VPhysicalVolume *blockedVol, const G4int blockedNum, const G4ThreeVector &globalPoint, const G4ThreeVector *globalDirection, const G4bool pLocatedOnEdge, G4ThreeVector &localPoint)
virtual G4int GetRegularStructureId() const =0
const G4NavigationHistory * GetHistory() const
G4bool fWasLimitedByGeometry
void SetSolid(G4VSolid *pSolid)
virtual G4bool IsNested() const
G4ReplicaNavigation freplicaNav
#define G4DEBUG_NAVIGATION
const G4AffineTransform & GetTopTransform() 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 & GetTransform(G4int n) const
G4int fAbandonThreshold_NoZeroSteps
virtual G4int GetCopyNo() const =0
G4SmartVoxelNode * ParamVoxelLocate(G4SmartVoxelHeader *pHead, const G4ThreeVector &localPoint)
G4VPhysicalVolume * GetVolume(G4int n) const
G4VPhysicalVolume * GetTopVolume() const
void SetNormalNavigation(G4NormalNavigation *fnormnav)
void SetVerboseLevel(G4int level)
G4double CheckNextStep(const G4ThreeVector &pGlobalPoint, const G4ThreeVector &pDirection, const G4double pCurrentProposedStepLength, G4double &pNewSafety)
G4GLOB_DLL std::ostream G4cerr
virtual G4ThreeVector GetLocalExitNormalAndCheck(const G4ThreeVector &point, G4bool *valid)
G4bool fLastTriedStepComputation
G4VoxelNavigation fvoxelNav
virtual G4VPhysicalVolume * ResetHierarchyAndLocate(const G4ThreeVector &point, const G4ThreeVector &direction, const G4TouchableHistory &h)
virtual G4double ComputeSafety(const G4ThreeVector &globalpoint, const G4double pProposedMaxLength=DBL_MAX, const G4bool keepState=true)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4ThreeVector fExitNormalGlobalFrame
G4RegularNavigation fregularNav
virtual G4bool LevelLocate(G4NavigationHistory &history, const G4VPhysicalVolume *blockedVol, const G4int blockedNum, const G4ThreeVector &globalPoint, const G4ThreeVector *globalDirection, const G4bool pLocatedOnEdge, G4ThreeVector &localPoint)
G4ThreeVector sPreviousSftOrigin
EVolume CharacteriseDaughters(const G4LogicalVolume *pLog) const
virtual G4TouchableHistoryHandle CreateTouchableHistoryHandle() const
G4ParameterisedNavigation fparamNav
G4ThreeVector sLastLocatedPointLocal
G4int GetReplicaNo(G4int n) const
virtual G4double ComputeSafety(const G4ThreeVector &globalpoint, const G4NavigationHistory &history, const G4double pMaxLength=DBL_MAX)
G4double ComputeSafety(const G4ThreeVector &localPoint, const G4NavigationHistory &history, const G4double pProposedMaxLength=DBL_MAX)
G4double ComputeSafety(const G4ThreeVector &localPoint, const G4VPhysicalVolume ¤tPhysical, G4double maxLength=DBL_MAX)
G4bool LevelLocate(G4NavigationHistory &history, const G4VPhysicalVolume *blockedVol, const G4int blockedNum, const G4ThreeVector &globalPoint, const G4ThreeVector *globalDirection, const G4bool pLocatedOnEdge, G4ThreeVector &localPoint)
virtual void SetupHierarchy()
G4double ComputeSafety(const G4ThreeVector &globalPoint, const G4ThreeVector &localPoint, G4NavigationHistory &history, const G4double pProposedMaxLength=DBL_MAX)
G4VPhysicalVolume * fBlockedPhysicalVolume
G4NavigationHistory fHistory
G4ThreeVector fPreviousSftOrigin
virtual void ResetState()
void ResetStackAndState()
G4GLOB_DLL std::ostream G4cout
G4bool sWasLimitedByGeometry
EVolume GetVolumeType(G4int n) const
#define fWasLimitedByGeometry
virtual G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const =0
G4VSolid * GetSolid() const
virtual void ComputeDimensions(G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
G4int MoveUpHistory(G4int num_levels=1)
virtual G4VPhysicalVolume * LocateGlobalPointAndSetup(const G4ThreeVector &point, const G4ThreeVector *direction=0, const G4bool pRelativeSearch=true, const G4bool ignoreDirection=true)
static G4GeometryTolerance * GetInstance()
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)
const G4RotationMatrix * GetRotation() const
G4int GetTopReplicaNo() const
virtual void SetCopyNo(G4int CopyNo)=0
G4AffineTransform GetMotherToDaughterTransform(G4VPhysicalVolume *dVolume, G4int dReplicaNo, EVolume dVolumeType)
virtual G4GeometryType GetEntityType() const =0
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)
EVolume GetTopVolumeType() const
G4ThreeVector ComputeLocalAxis(const G4ThreeVector &pVec) const
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)
G4bool fLocatedOutsideWorld
static constexpr double perThousand
G4double GetSurfaceTolerance() const
G4ThreeVector ComputeLocalPoint(const G4ThreeVector &rGlobPoint) const
virtual void ComputeTransformation(const G4int, G4VPhysicalVolume *) const =0
const G4String & GetName() const
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)
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
G4bool LevelLocate(G4NavigationHistory &history, const G4VPhysicalVolume *blockedVol, const G4int blockedNum, const G4ThreeVector &globalPoint, const G4ThreeVector *globalDirection, const G4bool pLocatedOnEdge, G4ThreeVector &localPoint)
const G4String & GetName() const
virtual G4bool RecheckDistanceToCurrentBoundary(const G4ThreeVector &pGlobalPoint, const G4ThreeVector &pDirection, const G4double CurrentProposedStepLength, G4double *prDistance, G4double *prNewSafety=0) const
virtual G4ThreeVector GetGlobalExitNormal(const G4ThreeVector &point, G4bool *valid)
G4int GetVerboseLevel() const