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,
773 G4cout <<
"*** G4Navigator::ComputeStep: ***" <<
G4endl;
775 <<
" - Proposed step length = " << pCurrentProposedStepLength
777 #ifdef G4DEBUG_NAVIGATION
780 G4cout <<
" Called with the arguments: " << G4endl
781 <<
" Globalpoint = " << std::setw(25) << pGlobalpoint << G4endl
782 <<
" Direction = " << std::setw(25) << pDirection <<
G4endl;
799 G4double moveLenSq = (newLocalPoint-oldLocalPoint).mag2();
821 pCurrentProposedStepLength,
838 pCurrentProposedStepLength,
866 "Point is relocated in voxels, while it should be outside!");
869 pCurrentProposedStepLength,
884 pCurrentProposedStepLength,
903 pCurrentProposedStepLength,
917 pCurrentProposedStepLength,
929 G4Exception(
"G4Navigator::ComputeStep()",
"GeomNav0001",
940 G4bool calculatedExitNormal;
945 pCurrentProposedStepLength,
949 calculatedExitNormal,
983 #ifdef G4DEBUG_NAVIGATION
986 G4cout <<
"G4Navigator::ComputeStep(): another 'zero' step, # "
988 <<
", at " << pGlobalpoint
989 <<
", in volume " << motherPhysical->
GetName()
990 <<
", nav-comp-step calls # " << sNavCScalls
991 <<
", Step= " << Step
1003 std::ostringstream message;
1004 message <<
"Track stuck or not moving." <<
G4endl
1005 <<
" Track stuck, not moving for "
1007 <<
" in volume -" << motherPhysical->
GetName()
1008 <<
"- at point " << pGlobalpoint <<
G4endl
1009 <<
" direction: " << pDirection <<
"." <<
G4endl
1010 <<
" Potential geometry or navigation problem !"
1012 <<
" Trying pushing it of " << Step <<
" mm ...";
1013 G4Exception(
"G4Navigator::ComputeStep()",
"GeomNav1002",
1014 JustWarning, message,
"Potential overlap in geometry!");
1023 std::ostringstream message;
1024 message <<
"Stuck Track: potential geometry or navigation problem."
1026 <<
" Track stuck, not moving for "
1028 <<
" in volume -" << motherPhysical->
GetName()
1029 <<
"- at point " << pGlobalpoint <<
G4endl
1030 <<
" direction: " << pDirection <<
".";
1034 G4Exception(
"G4Navigator::ComputeStep()",
"GeomNav0003",
1047 +
std::min(Step,pCurrentProposedStepLength) * pDirection;
1052 #ifdef G4DEBUG_NAVIGATION
1055 G4cout <<
" At G4Nav CompStep End - if(exiting) - fExiting= " <<
fExiting
1116 #ifdef G4DEBUG_NAVIGATION
1119 desc <<
"Problem in ComputeStep: Replica Navigation did not provide"
1120 <<
" valid exit Normal. " <<
G4endl;
1121 desc <<
" Do not know how calculate it in this case." <<
G4endl;
1122 desc <<
" Location = " << finalLocalPoint <<
G4endl;
1123 desc <<
" Volume name = " << motherPhysical->
GetName()
1125 G4Exception(
"G4Navigator::ComputeStep()",
"GeomNav0003",
1126 JustWarning, desc,
"Normal not available for exiting.");
1170 G4cout <<
" Returned step= " << Step;
1174 G4cout <<
" Requested step= " << pCurrentProposedStepLength ;
1192 const G4double pCurrentProposedStepLength,
1203 pCurrentProposedStepLength,
1270 for ( i=1; i<=cdepth; i++ )
1308 ComputeMaterial(replicaNo, current, pTouchable) );
1336 if( candidateLogical )
1358 currentSolid= candidateLogical->
GetSolid();
1359 inSideIt = currentSolid->
Inside(daughterPointOwnLocal);
1360 onSurface = (inSideIt ==
kSurface);
1365 safety = (currentSolid->
DistanceToIn(daughterPointOwnLocal));
1368 else if (inSideIt ==
kInside )
1370 safety = (currentSolid->
DistanceToOut(daughterPointOwnLocal));
1377 nextSolidExitNormal =
1382 ExitNormal = -nextSolidExitNormal;
1390 std::ostringstream message;
1391 message <<
"Point not on surface ! " <<
G4endl
1393 << daughterPointOwnLocal <<
G4endl
1394 <<
" Physical volume = "
1396 <<
" Logical volume = "
1398 <<
" Solid = " << currentSolid->
GetName()
1401 << *currentSolid <<
G4endl;
1404 message <<
"Point is Outside. " << G4endl
1405 <<
" Safety (from outside) = " << safety <<
G4endl;
1409 message <<
"Point is Inside. " << G4endl
1410 <<
" Safety (from inside) = " << safety <<
G4endl;
1412 G4Exception(
"G4Navigator::GetLocalExitNormal()",
"GeomNav1001",
1432 "Incorrect call to GetLocalSurfaceNormal." );
1445 desc <<
" Parameters of solid: " << *daughterSolid
1449 "Surface Normal returned by Solid is not a Unit Vector." );
1467 message <<
"Function called when *NOT* at a Boundary." <<
G4endl;
1468 message <<
"Exit Normal not calculated." <<
G4endl;
1485 G4int enteringReplicaNo,
1488 switch (enteringVolumeType)
1493 G4Exception(
"G4Navigator::GetMotherToDaughterTransform()",
1495 "Method NOT Implemented yet for replica volumes.");
1503 pParam->
ComputeSolid(enteringReplicaNo, pEnteringPhysVol);
1539 #ifdef G4DEBUG_NAVIGATION
1544 G4ThreeVector ExpectedBoundaryPointLocal;
1547 ExpectedBoundaryPointLocal =
1568 G4bool* pNormalCalculated)
1591 G4double normMag2 = globalNormal.mag2();
1592 if( std::fabs ( normMag2 - 1.0 ) <
perMillion )
1594 *pNormalCalculated =
true;
1600 message.precision(10);
1601 message <<
" WARNING> Expected normal-global-frame to be valid, "
1602 <<
" i.e. a unit vector!" <<
G4endl
1603 <<
" - but |normal| = " << std::sqrt(normMag2)
1604 <<
" - and |normal|^2 = " << normMag2 <<
G4endl
1605 <<
" which differs from 1.0 by " << normMag2 - 1.0 <<
G4endl
1607 message <<
"============================================================"
1611 message <<
" State of Navigator: " <<
G4endl;
1612 message << *
this <<
G4endl;
1614 message <<
"============================================================"
1619 "Value obtained from stored global-normal is not a unit vector.");
1636 #ifdef G4DEBUG_NAVIGATION
1646 edN <<
" State of Navigator: " <<
G4endl;
1652 "LocalExitNormalAndCheck() did not calculate Normal.");
1656 G4double localMag2= localNormal.mag2();
1661 edN <<
"G4Navigator::GetGlobalExitNormal: "
1662 <<
" Using Local Normal - from call to GetLocalExitNormalAndCheck. "
1664 <<
" Local Exit Normal : " <<
" || = " << std::sqrt(localMag2)
1665 <<
" vec = " << localNormal <<
G4endl
1666 <<
" Global Exit Normal : " <<
" || = " << globalNormal.mag()
1667 <<
" vec = " << globalNormal <<
G4endl;
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;
1697 edDfn <<
" Normal stored (Global) = " << fExitNormalGlobalFrame
1699 edDfn <<
" Global Computed from Local = " << globalNormAgn <<
G4endl;
1700 G4Exception(
"G4Navigator::GetGlobalExitNormal()",
"GeomNav0003",
1706 return globalNormal;
1710 #define G4NEW_SAFETY 1
1727 #ifdef G4DEBUG_NAVIGATION
1731 G4cout <<
"*** G4Navigator::ComputeSafety: ***" <<
G4endl
1732 <<
" Called at point: " << pGlobalpoint <<
G4endl;
1736 <<
" - Maximum length = " << pMaxLength <<
G4endl;
1739 G4cout <<
" ----- Upon entering Compute Safety:" <<
G4endl;
1749 if( endpointOnSurface && stayedOnEndpoint )
1751 #ifdef G4DEBUG_NAVIGATION
1754 G4cout <<
" G4Navigator::ComputeSafety() finds that point - "
1755 << pGlobalpoint <<
" - is on surface " <<
G4endl;
1780 #ifdef G4DEBUG_NAVIGATION
1783 G4cout <<
" G4Navigator::ComputeSafety() relocates-in-volume to point: "
1784 << pGlobalpoint <<
G4endl;
1801 *motherPhysical, pMaxLength);
1802 newSafety= safetyTwo;
1807 newSafety= safetyOldVoxel;
1826 G4Exception(
"G4Navigator::ComputeSafety()",
"GeomNav0001",
1850 #ifdef G4DEBUG_NAVIGATION
1855 G4cout <<
" Returned value of Safety = " << newSafety <<
G4endl;
1857 G4cout.precision(oldcoutPrec);
1898 #ifdef CHECK_ORDER_OF_METHODS
1901 G4Exception(
"G4Navigator::RecheckDistanceToCurrentBoundary()",
1903 "Method must be called after ComputeStep(), before call to LocateMethod.");
1933 G4ThreeVector dgDirection= nextLevelTrf.TransformAxis(localDirection);
1934 locatedDaug = candSolid->
Inside(dgPosition);
1943 true, &validExitNormal, &exitNormal);
1944 daughterStep= - distanceBackOut;
1971 daughterSafety= 0.0;
1980 *prDistance= daughterStep;
1981 if( prNewSafety ) { *prNewSafety= daughterSafety; }
2001 if( ProposedMove >= motherSafety )
2005 true, &validExitNormal, &exitNormal);
2009 motherStep= ProposedMove;
2014 motherSafety= motherSolid->
DistanceToIn(localPosition);
2015 if( ProposedMove >= motherSafety )
2025 if( prNewSafety ) { *prNewSafety= motherSafety; }
2034 *prDistance=
std::min( motherStep, daughterStep );
2037 *prNewSafety=
std::min( motherSafety, daughterSafety );
2061 G4cout <<
"The current state of G4Navigator is: " <<
G4endl;
2066 <<
" BlockedPhysicalVolume= " ;
2083 G4cout << std::setw(30) <<
" ExitNormal " <<
" "
2084 << std::setw( 5) <<
" Valid " <<
" "
2085 << std::setw( 9) <<
" Exiting " <<
" "
2086 << std::setw( 9) <<
" Entering" <<
" "
2087 << std::setw(15) <<
" Blocked:Volume " <<
" "
2088 << std::setw( 9) <<
" ReplicaNo" <<
" "
2089 << std::setw( 8) <<
" LastStepZero " <<
" "
2093 <<
", " << std::setw(7) <<
fExitNormal.z() <<
" ) "
2095 << std::setw( 9) <<
fExiting <<
" "
2098 G4cout << std::setw(15) <<
"None";
2112 G4cout.precision(oldcoutPrec);
2141 G4double shiftOrigin = std::sqrt(shiftOriginSafSq);
2144 if( diffShiftSaf > fAccuracyForWarning )
2148 std::ostringstream message, suggestion;
2149 message <<
"Accuracy error or slightly inaccurate position shift."
2151 <<
" The Step's starting point has moved "
2152 << std::sqrt(moveLenSq)/
mm <<
" mm " <<
G4endl
2153 <<
" since the last call to a Locate method." <<
G4endl
2154 <<
" This has resulted in moving "
2155 << shiftOrigin/
mm <<
" mm "
2156 <<
" from the last point at which the safety "
2157 <<
" was calculated " <<
G4endl
2158 <<
" which is more than the computed safety= "
2159 << fPreviousSafety/
mm <<
" mm at that point." <<
G4endl
2160 <<
" This difference is "
2161 << diffShiftSaf/
mm <<
" mm." <<
G4endl
2162 <<
" The tolerated accuracy is "
2163 << fAccuracyForException/
mm <<
" mm.";
2167 if( ((++warnNow % 100) == 1) )
2170 <<
" This problem can be due to either " <<
G4endl
2171 <<
" - a process that has proposed a displacement"
2172 <<
" larger than the current safety , or" <<
G4endl
2173 <<
" - inaccuracy in the computation of the safety";
2174 suggestion <<
"We suggest that you " << G4endl
2175 <<
" - find i) what particle is being tracked, and "
2176 <<
" ii) through what part of your geometry " << G4endl
2177 <<
" for example by re-running this event with "
2179 <<
" /tracking/verbose 1 " << G4endl
2180 <<
" - check which processes you declare for"
2181 <<
" this particle (and look at non-standard ones)"
2183 <<
" - in case, create a detailed logfile"
2184 <<
" of this event using:" << G4endl
2185 <<
" /tracking/verbose 6 ";
2189 message,
G4String(suggestion.str()));
2190 G4cout.precision(oldcoutPrec);
2191 G4cerr.precision(oldcerrPrec);
2193 #ifdef G4DEBUG_NAVIGATION
2196 G4cerr <<
"WARNING - G4Navigator::ComputeStep()" <<
G4endl
2197 <<
" The Step's starting point has moved "
2198 << std::sqrt(moveLenSq) <<
"," <<
G4endl
2199 <<
" which has taken it to the limit of"
2200 <<
" the current safety. " <<
G4endl;
2205 if ( shiftOriginSafSq >
sqr(safetyPlus) )
2207 std::ostringstream message;
2208 message <<
"May lead to a crash or unreliable results." <<
G4endl
2209 <<
" Position has shifted considerably without"
2210 <<
" notifying the navigator !" <<
G4endl
2211 <<
" Tolerated safety: " << safetyPlus <<
G4endl
2212 <<
" Computed shift : " << shiftOriginSafSq;
2213 G4Exception(
"G4Navigator::ComputeStep()",
"GeomNav1002",
2230 G4int oldcoutPrec = os.precision(4);
2233 os <<
"The current state of G4Navigator is: " <<
G4endl;
2236 <<
" Exiting = " << n.
fExiting << G4endl
2237 <<
" Entering = " << n.
fEntering << G4endl
2238 <<
" BlockedPhysicalVolume= " ;
2251 os << std::setw(30) <<
" ExitNormal " <<
" "
2252 << std::setw( 5) <<
" Valid " <<
" "
2253 << std::setw( 9) <<
" Exiting " <<
" "
2254 << std::setw( 9) <<
" Entering" <<
" "
2255 << std::setw(15) <<
" Blocked:Volume " <<
" "
2256 << std::setw( 9) <<
" ReplicaNo" <<
" "
2257 << std::setw( 8) <<
" LastStepZero " <<
" "
2261 <<
", " << std::setw(7) << n.
fExitNormal.z() <<
" ) "
2263 << std::setw( 9) << n.
fExiting <<
" "
2266 { os << std::setw(15) <<
"None"; }
2285 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