54 fTopPhysical(0), fCheck(false),
fPushed(false), fWarnPush(true)
124 const G4bool relativeSearch,
125 const G4bool ignoreDirection )
127 G4bool notKnownContained=
true, noResult;
139 if( considerDirection && pGlobalDirection != 0 )
141 globalDirection=*pGlobalDirection;
148 G4cout <<
"*** G4Navigator::LocateGlobalPointAndSetup: ***" <<
G4endl;
149 G4cout <<
" Called with arguments: " << G4endl
150 <<
" Globalpoint = " << globalPoint << G4endl
151 <<
" RelativeSearch = " << relativeSearch <<
G4endl;
157 G4cout.precision(oldcoutPrec);
161 G4int noLevelsExited=0 ;
162 G4int noLevelsEntered= 0;
164 if ( !relativeSearch )
264 notKnownContained =
false;
286 while (notKnownContained)
292 insideCode = targetSolid->
Inside(localPoint);
296 G4String solidResponse =
"-kInside-";
298 solidResponse =
"-kOutside-";
300 solidResponse =
"-kSurface-";
301 G4cout <<
"*** G4Navigator::LocateGlobalPointAndSetup(): ***" <<
G4endl
302 <<
" Invoked Inside() for solid: " << targetSolid->
GetName()
303 <<
". Solid replied: " << solidResponse <<
G4endl
304 <<
" For local point p: " << localPoint <<
G4endl;
329 if( noLevelsExited > 1 )
353 if( (!
fExiting)&&considerDirection )
358 G4bool directionExiting =
false;
369 directionExiting = normal.dot(localDirection) > 0.0;
370 isExiting = isExiting || directionExiting;
386 if( noLevelsExited > 1 )
409 notKnownContained=
false;
414 notKnownContained=
false;
435 if (!targetPhysical) {
break; }
528 #ifdef G4DEBUG_NAVIGATION
532 G4cout <<
"*** G4Navigator::LocateGlobalPointAndSetup() ***" <<
G4endl;
547 if (targetPhysical) { curPhysVol_Name = targetPhysical->
GetName(); }
548 G4cout <<
" Return value = new volume = " << curPhysVol_Name <<
G4endl;
553 G4cout <<
"Upon exiting LocateGlobalPointAndSetup():" <<
G4endl;
556 G4cout.precision(oldcoutPrec);
562 return targetPhysical;
581 #ifdef G4DEBUG_NAVIGATION
591 #ifdef G4DEBUG_NAVIGATION
594 G4cout <<
"Entering LocateGlobalWithinVolume(): History = " <<
G4endl;
628 G4Exception(
"G4Navigator::LocateGlobalPointWithinVolume()",
630 "Not applicable for replicated volumes.");
746 const G4double pCurrentProposedStepLength,
772 G4cout <<
"*** G4Navigator::ComputeStep: ***" <<
G4endl;
774 <<
" - Proposed step length = " << pCurrentProposedStepLength
776 #ifdef G4DEBUG_NAVIGATION
779 G4cout <<
" Called with the arguments: " << G4endl
780 <<
" Globalpoint = " << std::setw(25) << pGlobalpoint << G4endl
781 <<
" Direction = " << std::setw(25) << pDirection <<
G4endl;
798 G4double moveLenSq = (newLocalPoint-oldLocalPoint).mag2();
820 pCurrentProposedStepLength,
837 pCurrentProposedStepLength,
865 "Point is relocated in voxels, while it should be outside!");
868 pCurrentProposedStepLength,
883 pCurrentProposedStepLength,
902 pCurrentProposedStepLength,
916 pCurrentProposedStepLength,
928 G4Exception(
"G4Navigator::ComputeStep()",
"GeomNav0001",
939 G4bool calculatedExitNormal;
944 pCurrentProposedStepLength,
948 calculatedExitNormal,
982 #ifdef G4DEBUG_NAVIGATION
985 G4cout <<
"G4Navigator::ComputeStep(): another zero step, # "
987 <<
" at " << pGlobalpoint
988 <<
" in volume " << motherPhysical->
GetName()
989 <<
" nav-comp-step calls # " << sNavCScalls
1001 std::ostringstream message;
1002 message <<
"Track stuck or not moving." <<
G4endl
1003 <<
" Track stuck, not moving for "
1005 <<
" in volume -" << motherPhysical->
GetName()
1006 <<
"- at point " << pGlobalpoint <<
G4endl
1007 <<
" direction: " << pDirection <<
"." <<
G4endl
1008 <<
" Potential geometry or navigation problem !"
1010 <<
" Trying pushing it of " << Step <<
" mm ...";
1011 G4Exception(
"G4Navigator::ComputeStep()",
"GeomNav1002",
1012 JustWarning, message,
"Potential overlap in geometry!");
1021 std::ostringstream message;
1022 message <<
"Stuck Track: potential geometry or navigation problem."
1024 <<
" Track stuck, not moving for "
1026 <<
" in volume -" << motherPhysical->
GetName()
1027 <<
"- at point " << pGlobalpoint <<
G4endl
1028 <<
" direction: " << pDirection <<
".";
1030 G4Exception(
"G4Navigator::ComputeStep()",
"GeomNav0003",
1043 +
std::min(Step,pCurrentProposedStepLength) * pDirection;
1048 #ifdef G4DEBUG_NAVIGATION
1051 G4cout <<
" At G4Nav CompStep End - if(exiting) - fExiting= " <<
fExiting
1112 #ifdef G4DEBUG_NAVIGATION
1115 desc <<
"Problem in ComputeStep: Replica Navigation did not provide"
1116 <<
" valid exit Normal. " <<
G4endl;
1117 desc <<
" Do not know how calculate it in this case." <<
G4endl;
1118 desc <<
" Location = " << finalLocalPoint <<
G4endl;
1119 desc <<
" Volume name = " << motherPhysical->
GetName()
1121 G4Exception(
"G4Navigator::ComputeStep()",
"GeomNav0003",
1122 JustWarning, desc,
"Normal not available for exiting.");
1166 G4cout <<
" Returned step= " << Step;
1170 G4cout <<
" Requested step= " << pCurrentProposedStepLength ;
1188 const G4double pCurrentProposedStepLength,
1199 pCurrentProposedStepLength,
1266 for ( i=1; i<=cdepth; i++ )
1304 ComputeMaterial(replicaNo, current, pTouchable) );
1332 if( candidateLogical )
1354 currentSolid= candidateLogical->
GetSolid();
1355 inSideIt = currentSolid->
Inside(daughterPointOwnLocal);
1356 onSurface = (inSideIt ==
kSurface);
1361 safety = (currentSolid->
DistanceToIn(daughterPointOwnLocal));
1364 else if (inSideIt ==
kInside )
1366 safety = (currentSolid->
DistanceToOut(daughterPointOwnLocal));
1373 nextSolidExitNormal =
1378 ExitNormal = -nextSolidExitNormal;
1386 std::ostringstream message;
1387 message <<
"Point not on surface ! " <<
G4endl
1389 << daughterPointOwnLocal <<
G4endl
1390 <<
" Physical volume = "
1392 <<
" Logical volume = "
1394 <<
" Solid = " << currentSolid->
GetName()
1397 << *currentSolid <<
G4endl;
1400 message <<
"Point is Outside. " << G4endl
1401 <<
" Safety (from outside) = " << safety <<
G4endl;
1405 message <<
"Point is Inside. " << G4endl
1406 <<
" Safety (from inside) = " << safety <<
G4endl;
1408 G4Exception(
"G4Navigator::GetLocalExitNormal()",
"GeomNav1001",
1428 "Incorrect call to GetLocalSurfaceNormal." );
1441 desc <<
" Parameters of solid: " << *daughterSolid
1445 "Surface Normal returned by Solid is not a Unit Vector." );
1463 message <<
"Function called when *NOT* at a Boundary." <<
G4endl;
1464 message <<
"Exit Normal not calculated." <<
G4endl;
1481 G4int enteringReplicaNo,
1484 switch (enteringVolumeType)
1489 G4Exception(
"G4Navigator::GetMotherToDaughterTransform()",
1491 "Method NOT Implemented yet for replica volumes.");
1499 pParam->
ComputeSolid(enteringReplicaNo, pEnteringPhysVol);
1535 #ifdef G4DEBUG_NAVIGATION
1540 G4ThreeVector ExpectedBoundaryPointLocal;
1543 ExpectedBoundaryPointLocal =
1564 G4bool* pNormalCalculated)
1587 G4double normMag2 = globalNormal.mag2();
1588 if( std::fabs ( normMag2 - 1.0 ) <
perMillion )
1590 *pNormalCalculated =
true;
1596 message.precision(10);
1597 message <<
" WARNING> Expected normal-global-frame to be valid, "
1598 <<
" i.e. a unit vector!" <<
G4endl
1599 <<
" - but |normal| = " << std::sqrt(normMag2)
1600 <<
" - and |normal|^2 = " << normMag2 <<
G4endl
1601 <<
" which differs from 1.0 by " << normMag2 - 1.0 <<
G4endl
1603 message <<
"============================================================"
1607 message <<
" State of Navigator: " <<
G4endl;
1608 message << *
this <<
G4endl;
1610 message <<
"============================================================"
1615 "Value obtained from stored global-normal is not a unit vector.");
1632 #ifdef G4DEBUG_NAVIGATION
1642 edN <<
" State of Navigator: " <<
G4endl;
1648 "LocalExitNormalAndCheck() did not calculate Normal.");
1652 G4double localMag2= localNormal.mag2();
1657 edN <<
"G4Navigator::GetGlobalExitNormal: "
1658 <<
" Using Local Normal - from call to GetLocalExitNormalAndCheck. "
1660 <<
" Local Exit Normal : " <<
" || = " << std::sqrt(localMag2)
1661 <<
" vec = " << localNormal <<
G4endl
1662 <<
" Global Exit Normal : " <<
" || = " << globalNormal.mag()
1663 <<
" vec = " << globalNormal <<
G4endl;
1668 "Value obtained from new local *solid* is incorrect.");
1669 localNormal = localNormal.unit();
1675 #ifdef G4DEBUG_NAVIGATION
1690 edDfn <<
"Found difference in normals in case of exiting mother "
1691 <<
"- when Get is called after ComputingStep " <<
G4endl;
1692 edDfn <<
" Magnitude of diff = " << diffNorm.mag() <<
G4endl;
1693 edDfn <<
" Normal stored (Global) = " << fExitNormalGlobalFrame
1695 edDfn <<
" Global Computed from Local = " << globalNormAgn <<
G4endl;
1696 G4Exception(
"G4Navigator::GetGlobalExitNormal()",
"GeomNav0003",
1702 return globalNormal;
1706 #define G4NEW_SAFETY 1
1723 #ifdef G4DEBUG_NAVIGATION
1727 G4cout <<
"*** G4Navigator::ComputeSafety: ***" <<
G4endl
1728 <<
" Called at point: " << pGlobalpoint <<
G4endl;
1732 <<
" - Maximum length = " << pMaxLength <<
G4endl;
1735 G4cout <<
" ----- Upon entering Compute Safety:" <<
G4endl;
1745 if( endpointOnSurface && stayedOnEndpoint )
1747 #ifdef G4DEBUG_NAVIGATION
1750 G4cout <<
" G4Navigator::ComputeSafety() finds that point - "
1751 << pGlobalpoint <<
" - is on surface " <<
G4endl;
1776 #ifdef G4DEBUG_NAVIGATION
1779 G4cout <<
" G4Navigator::ComputeSafety() relocates-in-volume to point: "
1780 << pGlobalpoint <<
G4endl;
1797 *motherPhysical, pMaxLength);
1798 newSafety= safetyTwo;
1803 newSafety= safetyOldVoxel;
1822 G4Exception(
"G4Navigator::ComputeSafety()",
"GeomNav0001",
1846 #ifdef G4DEBUG_NAVIGATION
1851 G4cout <<
" Returned value of Safety = " << newSafety <<
G4endl;
1853 G4cout.precision(oldcoutPrec);
1894 #ifdef CHECK_ORDER_OF_METHODS
1897 G4Exception(
"G4Navigator::RecheckDistanceToCurrentBoundary()",
1899 "Method must be called after ComputeStep(), before call to LocateMethod.");
1929 G4ThreeVector dgDirection= nextLevelTrf.TransformAxis(localDirection);
1930 locatedDaug = candSolid->
Inside(dgPosition);
1939 true, &validExitNormal, &exitNormal);
1940 daughterStep= - distanceBackOut;
1967 daughterSafety= 0.0;
1976 *prDistance= daughterStep;
1977 if( prNewSafety ) { *prNewSafety= daughterSafety; }
1997 if( ProposedMove >= motherSafety )
2001 true, &validExitNormal, &exitNormal);
2005 motherStep= ProposedMove;
2010 motherSafety= motherSolid->
DistanceToIn(localPosition);
2011 if( ProposedMove >= motherSafety )
2021 if( prNewSafety ) { *prNewSafety= motherSafety; }
2030 *prDistance=
std::min( motherStep, daughterStep );
2033 *prNewSafety=
std::min( motherSafety, daughterSafety );
2057 G4cout <<
"The current state of G4Navigator is: " <<
G4endl;
2062 <<
" BlockedPhysicalVolume= " ;
2075 G4cout << std::setw(30) <<
" ExitNormal " <<
" "
2076 << std::setw( 5) <<
" Valid " <<
" "
2077 << std::setw( 9) <<
" Exiting " <<
" "
2078 << std::setw( 9) <<
" Entering" <<
" "
2079 << std::setw(15) <<
" Blocked:Volume " <<
" "
2080 << std::setw( 9) <<
" ReplicaNo" <<
" "
2081 << std::setw( 8) <<
" LastStepZero " <<
" "
2085 <<
", " << std::setw(7) <<
fExitNormal.z() <<
" ) "
2087 << std::setw( 9) <<
fExiting <<
" "
2090 G4cout << std::setw(15) <<
"None";
2104 G4cout.precision(oldcoutPrec);
2133 G4double shiftOrigin = std::sqrt(shiftOriginSafSq);
2136 if( diffShiftSaf > fAccuracyForWarning )
2140 std::ostringstream message, suggestion;
2141 message <<
"Accuracy error or slightly inaccurate position shift."
2143 <<
" The Step's starting point has moved "
2144 << std::sqrt(moveLenSq)/
mm <<
" mm " <<
G4endl
2145 <<
" since the last call to a Locate method." <<
G4endl
2146 <<
" This has resulted in moving "
2147 << shiftOrigin/
mm <<
" mm "
2148 <<
" from the last point at which the safety "
2149 <<
" was calculated " <<
G4endl
2150 <<
" which is more than the computed safety= "
2151 << fPreviousSafety/
mm <<
" mm at that point." <<
G4endl
2152 <<
" This difference is "
2153 << diffShiftSaf/
mm <<
" mm." <<
G4endl
2154 <<
" The tolerated accuracy is "
2155 << fAccuracyForException/
mm <<
" mm.";
2159 if( ((++warnNow % 100) == 1) )
2162 <<
" This problem can be due to either " <<
G4endl
2163 <<
" - a process that has proposed a displacement"
2164 <<
" larger than the current safety , or" <<
G4endl
2165 <<
" - inaccuracy in the computation of the safety";
2166 suggestion <<
"We suggest that you " << G4endl
2167 <<
" - find i) what particle is being tracked, and "
2168 <<
" ii) through what part of your geometry " << G4endl
2169 <<
" for example by re-running this event with "
2171 <<
" /tracking/verbose 1 " << G4endl
2172 <<
" - check which processes you declare for"
2173 <<
" this particle (and look at non-standard ones)"
2175 <<
" - in case, create a detailed logfile"
2176 <<
" of this event using:" << G4endl
2177 <<
" /tracking/verbose 6 ";
2181 message,
G4String(suggestion.str()));
2182 G4cout.precision(oldcoutPrec);
2183 G4cerr.precision(oldcerrPrec);
2185 #ifdef G4DEBUG_NAVIGATION
2188 G4cerr <<
"WARNING - G4Navigator::ComputeStep()" <<
G4endl
2189 <<
" The Step's starting point has moved "
2190 << std::sqrt(moveLenSq) <<
"," <<
G4endl
2191 <<
" which has taken it to the limit of"
2192 <<
" the current safety. " <<
G4endl;
2197 if ( shiftOriginSafSq >
sqr(safetyPlus) )
2199 std::ostringstream message;
2200 message <<
"May lead to a crash or unreliable results." <<
G4endl
2201 <<
" Position has shifted considerably without"
2202 <<
" notifying the navigator !" <<
G4endl
2203 <<
" Tolerated safety: " << safetyPlus <<
G4endl
2204 <<
" Computed shift : " << shiftOriginSafSq;
2205 G4Exception(
"G4Navigator::ComputeStep()",
"GeomNav1002",
2222 G4int oldcoutPrec = os.precision(4);
2225 os <<
"The current state of G4Navigator is: " <<
G4endl;
2228 <<
" Exiting = " << n.
fExiting << G4endl
2229 <<
" Entering = " << n.
fEntering << G4endl
2230 <<
" BlockedPhysicalVolume= " ;
2243 os << std::setw(30) <<
" ExitNormal " <<
" "
2244 << std::setw( 5) <<
" Valid " <<
" "
2245 << std::setw( 9) <<
" Exiting " <<
" "
2246 << std::setw( 9) <<
" Entering" <<
" "
2247 << std::setw(15) <<
" Blocked:Volume " <<
" "
2248 << std::setw( 9) <<
" ReplicaNo" <<
" "
2249 << std::setw( 8) <<
" LastStepZero " <<
" "
2253 <<
", " << std::setw(7) << n.
fExitNormal.z() <<
" ) "
2255 << std::setw( 9) << n.
fExiting <<
" "
2258 { os << std::setw(15) <<
"None"; }
2277 os.precision(oldcoutPrec);
G4ReplicaNavigation freplicaNav
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
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)
const G4ThreeVector & GetTranslation() const
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)
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)
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)
static const double perMillion
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
const G4RotationMatrix * GetRotation() const
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)
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)
G4VSolid * GetSolid() const
void ComputeStepLog(const G4ThreeVector &pGlobalpoint, G4double moveLenSq) const
G4GLOB_DLL std::ostream G4cerr
G4bool sLocatedOutsideWorld