57#define fHistory fpNavigatorState->fHistory
58#define fLastTriedStepComputation fpNavigatorState->fLastTriedStepComputation
59#define fEnteredDaughter fpNavigatorState->fEnteredDaughter
60#define fExitedMother fpNavigatorState->fExitedMother
61#define fWasLimitedByGeometry fpNavigatorState->fWasLimitedByGeometry
62#define fStepEndPoint fpNavigatorState->fStepEndPoint
63#define fLastStepEndPointLocal fpNavigatorState->fLastStepEndPointLocal
64#define fPushed fpNavigatorState->fPushed
65#define fLastTriedStepComputation fpNavigatorState->fLastTriedStepComputation
66#define fEntering fpNavigatorState->fEntering
67#define fExiting fpNavigatorState->fExiting
68#define fBlockedPhysicalVolume fpNavigatorState->fBlockedPhysicalVolume
69#define fBlockedReplicaNo fpNavigatorState->fBlockedReplicaNo
70#define fLastLocatedPointLocal fpNavigatorState->fLastLocatedPointLocal
71#define fLocatedOutsideWorld fpNavigatorState->fLocatedOutsideWorld
72#define fValidExitNormal fpNavigatorState->fValidExitNormal
73#define fExitNormal fpNavigatorState->fExitNormal
74#define fGrandMotherExitNormal fpNavigatorState->fGrandMotherExitNormal
75#define fChangedGrandMotherRefFrame fpNavigatorState->fChangedGrandMotherRefFrame
76#define fExitNormalGlobalFrame fpNavigatorState->fExitNormalGlobalFrame
77#define fCalculatedExitNormal fpNavigatorState->fCalculatedExitNormal
78#define fLastStepWasZero fpNavigatorState->fLastStepWasZero
79#define fLocatedOnEdge fpNavigatorState->fLocatedOnEdge
80#define fNumberZeroSteps fpNavigatorState->fNumberZeroSteps
81#define fPreviousSftOrigin fpNavigatorState->fPreviousSftOrigin
82#define fPreviousSafety fpNavigatorState->fPreviousSafety
101 fTopPhysical(0), fCheck(false),
105 fActionThreshold_NoZeroSteps = 1000;
106 fAbandonThreshold_NoZeroSteps = 2500;
160 const G4bool relativeSearch,
161 const G4bool ignoreDirection )
164 G4bool notKnownContained=
true, noResult;
176 if( considerDirection && pGlobalDirection != 0 )
178 globalDirection=*pGlobalDirection;
185 static int nCalls = 0;
187 G4cout <<
"*** G4ITNavigator2::LocateGlobalPointAndSetup: ***" <<
G4endl;
189 <<
" Globalpoint = " << globalPoint <<
G4endl
190 <<
" RelativeSearch = " << relativeSearch <<
G4endl;
196 G4cout.precision(oldcoutPrec);
202 G4int noLevelsExited=0 ;
203 G4int noLevelsEntered= 0;
205 if ( !relativeSearch )
302 G4Exception(
"G4ITNavigator2::LocateGlobalPointAndSetup()",
304 "Not applicable for external volumes.");
309 localPoint =
fHistory.GetTopTransform().TransformPoint(globalPoint);
310 notKnownContained =
false;
332 while (notKnownContained)
336 targetSolid =
fHistory.GetTopVolume()->GetLogicalVolume()->GetSolid();
337 localPoint =
fHistory.GetTopTransform().TransformPoint(globalPoint);
338 insideCode = targetSolid->
Inside(localPoint);
342 G4String solidResponse =
"-kInside-";
344 solidResponse =
"-kOutside-";
346 solidResponse =
"-kSurface-";
347 G4cout <<
"*** G4ITNavigator2::LocateGlobalPointAndSetup(): ***" <<
G4endl
348 <<
" Invoked Inside() for solid: " << targetSolid->
GetName()
349 <<
". Solid replied: " << solidResponse <<
G4endl
350 <<
" For local point p: " << localPoint <<
G4endl;
375 if( noLevelsExited > 1 )
399 if( (!
fExiting)&&considerDirection )
404 G4bool directionExiting =
false;
406 fHistory.GetTopTransform().TransformAxis(globalDirection);
411 localPoint=
fHistory.GetTopTransform().TransformPoint(globalPoint);
415 directionExiting = normal.
dot(localDirection) > 0.0;
416 isExiting = isExiting || directionExiting;
432 if( noLevelsExited > 1 )
455 notKnownContained=
false;
460 notKnownContained=
false;
480 targetPhysical =
fHistory.GetTopVolume();
481 if (!targetPhysical) {
break; }
539 G4Exception(
"G4ITNavigator2::LocateGlobalPointAndSetup()",
541 "Not applicable for external volumes.");
579#ifdef G4DEBUG_NAVIGATION
583 G4cout <<
"*** G4ITNavigator2::LocateGlobalPointAndSetup() ***" <<
G4endl;
598 if (targetPhysical) { curPhysVol_Name = targetPhysical->
GetName(); }
599 G4cout <<
" Return value = new volume = " << curPhysVol_Name <<
G4endl;
604 G4cout <<
"Upon exiting LocateGlobalPointAndSetup():" <<
G4endl;
607 G4cout.precision(oldcoutPrec);
613 return targetPhysical;
634#ifdef G4DEBUG_NAVIGATION
644#ifdef G4DEBUG_NAVIGATION
647 G4cout <<
"Entering LocateGlobalWithinVolume(): History = " <<
G4endl;
681 G4Exception(
"G4ITNavigator2::LocateGlobalPointWithinVolume()",
683 "Not applicable for replicated volumes.");
686 G4Exception(
"G4ITNavigator2::LocateGlobalPointWithinVolume()",
688 "Not applicable for external volumes.");
713 exceptionDescription <<
"The navigator state is NULL. ";
714 exceptionDescription <<
"Either NewNavigatorStateAndLocate was not called ";
715 exceptionDescription <<
"or the provided navigator state was already NULL.";
717 G4Exception(
"G4ITNavigator::CheckNavigatorStateIsValid",
747 exceptionDescription <<
"No World Volume";
764 exceptionDescription <<
"No World Volume";
784 exceptionDescription <<
"No World Volume";
786 G4Exception(
"G4ITNavigator::NewNavigatorStateAndLocate",
926 const G4double pCurrentProposedStepLength,
953 G4cout <<
"*** G4ITNavigator2::ComputeStep: ***" <<
G4endl;
955 <<
" - Proposed step length = " << pCurrentProposedStepLength
957#ifdef G4DEBUG_NAVIGATION
961 <<
" Globalpoint = " << std::setw(25) << pGlobalpoint <<
G4endl
962 <<
" Direction = " << std::setw(25) << pDirection <<
G4endl;
979 G4double moveLenSq = (newLocalPoint-oldLocalPoint).mag2();
984 ComputeStepLog(pGlobalpoint, moveLenSq);
1002 pCurrentProposedStepLength,
1019 pCurrentProposedStepLength,
1043 if(
fHistory.GetTopVolume()->GetRegularStructureId() == 0 )
1047 "Point is relocated in voxels, while it should be outside!");
1050 pCurrentProposedStepLength,
1065 pCurrentProposedStepLength,
1084 pCurrentProposedStepLength,
1098 pCurrentProposedStepLength,
1110 G4Exception(
"G4ITNavigator2::ComputeStep()",
"GeomNav0001",
1114 G4Exception(
"G4ITNavigator2::ComputeStep()",
"GeomNav0001",
1125 G4bool calculatedExitNormal;
1130 pCurrentProposedStepLength,
1134 calculatedExitNormal,
1171#ifdef G4DEBUG_NAVIGATION
1174 G4cout <<
"G4ITNavigator2::ComputeStep(): another zero step, # "
1176 <<
" at " << pGlobalpoint
1177 <<
" in volume " << motherPhysical->
GetName()
1178 <<
" nav-comp-step calls # " << sNavCScalls
1190 std::ostringstream message;
1191 message <<
"Track stuck or not moving." <<
G4endl
1192 <<
" Track stuck, not moving for "
1194 <<
" in volume -" << motherPhysical->
GetName()
1195 <<
"- at point " << pGlobalpoint <<
G4endl
1196 <<
" direction: " << pDirection <<
"." <<
G4endl
1197 <<
" Potential geometry or navigation problem !"
1199 <<
" Trying pushing it of " << Step <<
" mm ...";
1200 G4Exception(
"G4ITNavigator2::ComputeStep()",
"GeomNav1002",
1201 JustWarning, message,
"Potential overlap in geometry!");
1210 std::ostringstream message;
1211 message <<
"Stuck Track: potential geometry or navigation problem."
1213 <<
" Track stuck, not moving for "
1215 <<
" in volume -" << motherPhysical->
GetName()
1216 <<
"- at point " << pGlobalpoint <<
G4endl
1217 <<
" direction: " << pDirection <<
".";
1219 G4Exception(
"G4ITNavigator2::ComputeStep()",
"GeomNav0003",
1232 + std::min(Step,pCurrentProposedStepLength) * pDirection;
1237#ifdef G4DEBUG_NAVIGATION
1240 G4cout <<
" At G4Nav CompStep End - if(exiting) - fExiting= " <<
fExiting
1301#ifdef G4DEBUG_NAVIGATION
1304 desc <<
"Problem in ComputeStep: Replica Navigation did not provide"
1305 <<
" valid exit Normal. " <<
G4endl;
1306 desc <<
" Do not know how calculate it in this case." <<
G4endl;
1307 desc <<
" Location = " << finalLocalPoint <<
G4endl;
1308 desc <<
" Volume name = " << motherPhysical->
GetName()
1310 G4Exception(
"G4ITNavigator2::ComputeStep()",
"GeomNav0003",
1311 JustWarning, desc,
"Normal not available for exiting.");
1324 fHistory.GetTransform(depth-1).Inverse();
1355 G4cout <<
" Returned step= " << Step;
1357 if( Step == kInfinity )
1359 G4cout <<
" Requested step= " << pCurrentProposedStepLength ;
1377 const G4double pCurrentProposedStepLength,
1391 pCurrentProposedStepLength,
1460 for ( i=1; i<=cdepth; i++ )
1463 switch (
fHistory.GetVolumeType(i) )
1474 replicaNo =
fHistory.GetReplicaNo(i);
1499 ComputeMaterial(replicaNo, current, pTouchable) );
1507 "Not applicable for external volumes.");
1536 if( candidateLogical )
1558 currentSolid= candidateLogical->
GetSolid();
1559 inSideIt = currentSolid->
Inside(daughterPointOwnLocal);
1560 onSurface = (inSideIt ==
kSurface);
1565 safety = (currentSolid->
DistanceToIn(daughterPointOwnLocal));
1568 else if (inSideIt ==
kInside )
1570 safety = (currentSolid->
DistanceToOut(daughterPointOwnLocal));
1577 nextSolidExitNormal =
1582 ExitNormal = -nextSolidExitNormal;
1590 std::ostringstream message;
1591 message <<
"Point not on surface ! " <<
G4endl
1593 << daughterPointOwnLocal <<
G4endl
1594 <<
" Physical volume = "
1596 <<
" Logical volume = "
1598 <<
" Solid = " << currentSolid->
GetName()
1601 << *currentSolid <<
G4endl;
1604 message <<
"Point is Outside. " <<
G4endl
1605 <<
" Safety (from outside) = " << safety <<
G4endl;
1609 message <<
"Point is Inside. " <<
G4endl
1610 <<
" Safety (from inside) = " << safety <<
G4endl;
1612 G4Exception(
"G4ITNavigator2::GetLocalExitNormal()",
"GeomNav1001",
1630 G4Exception(
"G4ITNavigator2::GetLocalExitNormal()",
1632 "Incorrect call to GetLocalSurfaceNormal." );
1642 if( std::fabs(ExitNormal.
mag2()-1.0 ) > CLHEP::perMillion )
1645 desc <<
" Parameters of solid: " << *daughterSolid
1647 G4Exception(
"G4ITNavigator2::GetLocalExitNormal()",
1649 "Surface Normal returned by Solid is not a Unit Vector." );
1667 message <<
"Function called when *NOT* at a Boundary." <<
G4endl;
1668 G4Exception(
"G4ITNavigator2::GetLocalExitNormal()",
1684 G4int enteringReplicaNo,
1688 switch (enteringVolumeType)
1693 G4Exception(
"G4ITNavigator2::GetMotherToDaughterTransform()",
1695 "Method NOT Implemented yet for replica volumes.");
1703 pParam->
ComputeSolid(enteringReplicaNo, pEnteringPhysVol);
1717 G4Exception(
"G4ITNavigator2::GetMotherToDaughterTransform()",
1719 "Not applicable for external volumes.");
1744#ifdef G4DEBUG_NAVIGATION
1752 ExpectedBoundaryPointLocal =
1772 G4bool* pNormalCalculated)
1796 if( std::fabs ( normMag2 - 1.0 ) < perMillion )
1798 *pNormalCalculated =
true;
1805 message <<
" ERROR> Expected normal-global-frame to valid (unit vector) "
1806 <<
" - but |normal| = " << std::sqrt(normMag2)
1807 <<
" - and |normal|^ = " << normMag2
1808 <<
" which differs from 1.0 by " << normMag2 - 1.0 <<
G4endl
1810 message <<
"============================================================"
1814 message <<
" State of Navigator: " <<
G4endl;
1815 message << *
this <<
G4endl;
1817 message <<
"============================================================"
1820 G4Exception(
"G4ITNavigator2::GetGlobalExitNormal()",
1822 "Value obtained from stored global-normal is not a unit vector.");
1839#ifdef G4DEBUG_NAVIGATION
1849 edN <<
" State of Navigator: " <<
G4endl;
1853 G4Exception(
"G4ITNavigator2::GetGlobalExitNormal()",
1855 "LocalExitNormalAndCheck() did not calculate Normal.");
1860 if( validNormal && (std::fabs(localMag2-1.0)) > CLHEP::perMillion )
1864 edN <<
"G4ITNavigator2::GetGlobalExitNormal: "
1865 <<
" Using Local Normal - from call to GetLocalExitNormalAndCheck. "
1867 <<
" Local Exit Normal : " <<
" || = " << std::sqrt(localMag2)
1868 <<
" vec = " << localNormal <<
G4endl
1869 <<
" Global Exit Normal : " <<
" || = " << globalNormal.
mag()
1870 <<
" vec = " << globalNormal <<
G4endl;
1873 G4Exception(
"G4ITNavigator2::GetGlobalExitNormal()",
1875 "Value obtained from new local *solid* is incorrect.");
1876 localNormal = localNormal.
unit();
1882#ifdef G4DEBUG_NAVIGATION
1894 if( diffNorm.
mag2() > perMillion*CLHEP::perMillion)
1897 edDfn <<
"Found difference in normals in case of exiting mother "
1898 <<
"- when Get is called after ComputingStep " <<
G4endl;
1899 edDfn <<
" Magnitude of diff = " << diffNorm.
mag() <<
G4endl;
1902 edDfn <<
" Global Computed from Local = " << globalNormAgn <<
G4endl;
1903 G4Exception(
"G4ITNavigator::GetGlobalExitNormal()",
"GeomNav0003",
1909 return globalNormal;
1913#define G4NEW_SAFETY 1
1931#ifdef G4DEBUG_NAVIGATION
1935 G4cout <<
"*** G4ITNavigator2::ComputeSafety: ***" <<
G4endl
1936 <<
" Called at point: " << pGlobalpoint <<
G4endl;
1940 <<
" - Maximum length = " << pMaxLength <<
G4endl;
1943 G4cout <<
" ----- Upon entering Compute Safety:" <<
G4endl;
1955 if( endpointOnSurface && stayedOnEndpoint )
1957#ifdef G4DEBUG_NAVIGATION
1960 G4cout <<
" G4Navigator::ComputeSafety() finds that point - "
1961 << pGlobalpoint <<
" - is on surface " <<
G4endl;
1991#ifdef G4DEBUG_NAVIGATION
1994 G4cout <<
" G4ITNavigator2::ComputeSafety() relocates-in-volume to point: "
1995 << pGlobalpoint <<
G4endl;
2012 *motherPhysical, pMaxLength);
2013 newSafety= safetyTwo;
2019 newSafety= safetyOldVoxel;
2038 G4Exception(
"G4ITNavigator2::ComputeSafety()",
"GeomNav0001",
2044 "Not applicable for external volumes.");
2069#ifdef G4DEBUG_NAVIGATION
2074 G4cout <<
" Returned value of Safety = " << newSafety <<
G4endl;
2076 G4cout.precision(oldcoutPrec);
2117#ifdef CHECK_ORDER_OF_METHODS
2120 G4Exception(
"G4Navigator::RecheckDistanceToCurrentBoundary()",
2122 "Method must be called after ComputeStep(), before call to LocateMethod.");
2153 locatedDaug = candSolid->
Inside(dgPosition);
2162 true, &validExitNormal, &exitNormal);
2163 daughterStep= - distanceBackOut;
2190 daughterSafety= 0.0;
2199 *prDistance= daughterStep;
2200 if( prNewSafety ) { *prNewSafety= daughterSafety; }
2220 if( ProposedMove >= motherSafety )
2224 true, &validExitNormal, &exitNormal);
2228 motherStep= ProposedMove;
2233 motherSafety= motherSolid->
DistanceToIn(localPosition);
2234 if( ProposedMove >= motherSafety )
2244 if( prNewSafety ) { *prNewSafety= motherSafety; }
2253 *prDistance= std::min( motherStep, daughterStep );
2256 *prNewSafety= std::min( motherSafety, daughterSafety );
2282 G4cout <<
"The current state of G4Navigator is: " <<
G4endl;
2287 <<
" BlockedPhysicalVolume= " ;
2300 G4cout << std::setw(30) <<
" ExitNormal " <<
" "
2301 << std::setw( 5) <<
" Valid " <<
" "
2302 << std::setw( 9) <<
" Exiting " <<
" "
2303 << std::setw( 9) <<
" Entering" <<
" "
2304 << std::setw(15) <<
" Blocked:Volume " <<
" "
2305 << std::setw( 9) <<
" ReplicaNo" <<
" "
2306 << std::setw( 8) <<
" LastStepZero " <<
" "
2310 <<
", " << std::setw(7) <<
fExitNormal.z() <<
" ) "
2312 << std::setw( 9) <<
fExiting <<
" "
2316 G4cout << std::setw(15) <<
"None";
2333 G4cout.precision(oldcoutPrec);
2340void G4ITNavigator2::ComputeStepLog(
const G4ThreeVector& pGlobalpoint,
2363 G4double shiftOrigin = std::sqrt(shiftOriginSafSq);
2366 if( diffShiftSaf > fAccuracyForWarning )
2370 std::ostringstream message, suggestion;
2371 message <<
"Accuracy error or slightly inaccurate position shift."
2373 <<
" The Step's starting point has moved "
2374 << std::sqrt(moveLenSq)/mm <<
" mm " <<
G4endl
2375 <<
" since the last call to a Locate method." <<
G4endl
2376 <<
" This has resulted in moving "
2377 << shiftOrigin/mm <<
" mm "
2378 <<
" from the last point at which the safety "
2379 <<
" was calculated " <<
G4endl
2380 <<
" which is more than the computed safety= "
2382 <<
" This difference is "
2383 << diffShiftSaf/mm <<
" mm." <<
G4endl
2384 <<
" The tolerated accuracy is "
2385 << fAccuracyForException/mm <<
" mm.";
2389 if( ((++warnNow % 100) == 1) )
2392 <<
" This problem can be due to either " <<
G4endl
2393 <<
" - a process that has proposed a displacement"
2394 <<
" larger than the current safety , or" <<
G4endl
2395 <<
" - inaccuracy in the computation of the safety";
2396 suggestion <<
"We suggest that you " <<
G4endl
2397 <<
" - find i) what particle is being tracked, and "
2398 <<
" ii) through what part of your geometry " <<
G4endl
2399 <<
" for example by re-running this event with "
2401 <<
" /tracking/verbose 1 " <<
G4endl
2402 <<
" - check which processes you declare for"
2403 <<
" this particle (and look at non-standard ones)"
2405 <<
" - in case, create a detailed logfile"
2406 <<
" of this event using:" <<
G4endl
2407 <<
" /tracking/verbose 6 ";
2411 message,
G4String(suggestion.str()));
2412 G4cout.precision(oldcoutPrec);
2413 G4cerr.precision(oldcerrPrec);
2415#ifdef G4DEBUG_NAVIGATION
2418 G4cerr <<
"WARNING - G4ITNavigator2::ComputeStep()" <<
G4endl
2419 <<
" The Step's starting point has moved "
2420 << std::sqrt(moveLenSq) <<
"," <<
G4endl
2421 <<
" which has taken it to the limit of"
2422 <<
" the current safety. " <<
G4endl;
2427 if ( shiftOriginSafSq >
sqr(safetyPlus) )
2429 std::ostringstream message;
2430 message <<
"May lead to a crash or unreliable results." <<
G4endl
2431 <<
" Position has shifted considerably without"
2432 <<
" notifying the navigator !" <<
G4endl
2433 <<
" Tolerated safety: " << safetyPlus <<
G4endl
2434 <<
" Computed shift : " << shiftOriginSafSq;
2435 G4Exception(
"G4ITNavigator2::ComputeStep()",
"GeomNav1002",
2452 G4int oldcoutPrec = os.precision(4);
2453 if( n.fVerbose >= 4 )
2455 os <<
"The current state of G4ITNavigator2 is: " <<
G4endl;
2456 os <<
" ValidExitNormal= " << n.fValidExitNormal <<
G4endl
2457 <<
" ExitNormal = " << n.fExitNormal <<
G4endl
2458 <<
" Exiting = " << n.fExiting <<
G4endl
2459 <<
" Entering = " << n.fEntering <<
G4endl
2460 <<
" BlockedPhysicalVolume= " ;
2462 if (n.fBlockedPhysicalVolume==0)
2468 os << n.fBlockedPhysicalVolume->GetName();
2472 <<
" BlockedReplicaNo = " << n.fBlockedReplicaNo <<
G4endl
2473 <<
" LastStepWasZero = " << n.fLastStepWasZero <<
G4endl
2476 if( ( 1 < n.fVerbose) && (n.fVerbose < 4) )
2479 os << std::setw(30) <<
" ExitNormal " <<
" "
2480 << std::setw( 5) <<
" Valid " <<
" "
2481 << std::setw( 9) <<
" Exiting " <<
" "
2482 << std::setw( 9) <<
" Entering" <<
" "
2483 << std::setw(15) <<
" Blocked:Volume " <<
" "
2484 << std::setw( 9) <<
" ReplicaNo" <<
" "
2485 << std::setw( 8) <<
" LastStepZero " <<
" "
2487 os <<
"( " << std::setw(7) << n.fExitNormal.x()
2488 <<
", " << std::setw(7) << n.fExitNormal.y()
2489 <<
", " << std::setw(7) << n.fExitNormal.z() <<
" ) "
2490 << std::setw( 5) << n.fValidExitNormal <<
" "
2491 << std::setw( 9) << n.fExiting <<
" "
2492 << std::setw( 9) << n.fEntering <<
" ";
2494 if ( n.fBlockedPhysicalVolume==0 )
2495 { os << std::setw(15) <<
"None"; }
2497 { os << std::setw(15)<< n.fBlockedPhysicalVolume->GetName(); }
2499 os << std::setw( 9) << n.fBlockedReplicaNo <<
" "
2500 << std::setw( 8) << n.fLastStepWasZero <<
" "
2503 if( n.fVerbose > 2 )
2506 os <<
" Current Localpoint = " << n.fLastLocatedPointLocal <<
G4endl;
2507 os <<
" PreviousSftOrigin = " << n.fPreviousSftOrigin <<
G4endl;
2508 os <<
" PreviousSafety = " << n.fPreviousSafety <<
G4endl;
2510 if( n.fVerbose > 3 || n.fVerbose == 0 )
2512 os <<
"Current History: " <<
G4endl << n.fHistory;
2515 os.precision(oldcoutPrec);
2529 return solid->
Inside(localPoint);
2542 std::vector<std::vector<double> > fExtend;
2560 for(
size_t i = 0 ; i < 3 ; ++i)
const G4double kCarTolerance
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
#define fWasLimitedByGeometry
#define G4DEBUG_NAVIGATION
#define fLastStepEndPointLocal
#define fLocatedOutsideWorld
#define fExitNormalGlobalFrame
#define fBlockedReplicaNo
#define fGrandMotherExitNormal
#define fLastLocatedPointLocal
#define fChangedGrandMotherRefFrame
#define fBlockedPhysicalVolume
#define fCalculatedExitNormal
std::ostream & operator<<(std::ostream &os, const G4ITNavigator2 &n)
#define fPreviousSftOrigin
#define fLastTriedStepComputation
#define CheckNavigatorStateIsValid()
CLHEP::Hep3Vector G4ThreeVector
G4ReferenceCountedHandle< G4TouchableHistory > G4TouchableHistoryHandle
G4GLOB_DLL std::ostream G4cerr
G4GLOB_DLL std::ostream G4cout
double dot(const Hep3Vector &) const
G4double GetSurfaceTolerance() const
static G4GeometryTolerance * GetInstance()
G4ReplicaNavigation freplicaNav
void GetRandomInCurrentVolume(G4ThreeVector &rndmPoint) const
void SetVerboseLevel(G4int level)
virtual G4ThreeVector GetLocalExitNormalAndCheck(const G4ThreeVector &point, G4bool *valid)
G4ThreeVector ComputeLocalPoint(const G4ThreeVector &rGlobPoint) const
virtual G4VPhysicalVolume * LocateGlobalPointAndSetup(const G4ThreeVector &point, const G4ThreeVector *direction=0, const G4bool pRelativeSearch=true, const G4bool ignoreDirection=true)
virtual void ResetState()
void SetNavigatorState(G4ITNavigatorState_Lock2 *)
G4VPhysicalVolume * NewNavigatorStateAndLocate(const G4ThreeVector &p, const G4ThreeVector &direction)
G4TouchableHistory * CreateTouchableHistory() const
G4VoxelNavigation fvoxelNav
virtual G4double ComputeSafety(const G4ThreeVector &globalpoint, const G4double pProposedMaxLength=DBL_MAX, const G4bool keepState=true)
G4NormalNavigation fnormalNav
void CheckNavigatorState() const
G4double CheckNextStep(const G4ThreeVector &pGlobalPoint, const G4ThreeVector &pDirection, const G4double pCurrentProposedStepLength, G4double &pNewSafety)
const G4AffineTransform & GetGlobalToLocalTransform() const
virtual G4TouchableHistoryHandle CreateTouchableHistoryHandle() const
G4AffineTransform GetMotherToDaughterTransform(G4VPhysicalVolume *dVolume, G4int dReplicaNo, EVolume dVolumeType)
virtual void SetupHierarchy()
G4int GetDaughtersRegularStructureId(const G4LogicalVolume *pLog) const
virtual G4VPhysicalVolume * ResetHierarchyAndLocate(const G4ThreeVector &point, const G4ThreeVector &direction, const G4TouchableHistory &h)
virtual G4double ComputeStep(const G4ThreeVector &pGlobalPoint, const G4ThreeVector &pDirection, const G4double pCurrentProposedStepLength, G4double &pNewSafety)
EVolume CharacteriseDaughters(const G4LogicalVolume *pLog) const
const G4AffineTransform GetLocalToGlobalTransform() const
virtual G4ThreeVector GetGlobalExitNormal(const G4ThreeVector &point, G4bool *valid)
G4ITNavigatorState_Lock2 * GetNavigatorState()
G4RegularNavigation fregularNav
G4ParameterisedNavigation fparamNav
G4VoxelSafety * fpVoxelSafety
G4int GetVerboseLevel() const
void ResetStackAndState()
EVolume VolumeType(const G4VPhysicalVolume *pVol) const
G4NavigatorState * fpNavigatorState
G4VPhysicalVolume * fTopPhysical
EInside InsideCurrentVolume(const G4ThreeVector &globalPoint) const
virtual void LocateGlobalPointWithinVolume(const G4ThreeVector &position)
void ResetNavigatorState()
virtual ~G4ITNavigator2()
G4ThreeVector ComputeLocalAxis(const G4ThreeVector &pVec) const
virtual G4ThreeVector GetLocalExitNormal(G4bool *valid)
virtual G4bool RecheckDistanceToCurrentBoundary(const G4ThreeVector &pGlobalPoint, const G4ThreeVector &pDirection, const G4double CurrentProposedStepLength, G4double *prDistance, G4double *prNewSafety=0) const
G4bool EnteredDaughterVolume() const
G4VSolid * GetSolid() const
EVolume CharacteriseDaughters() const
const G4String & GetName() const
void SetSolid(G4VSolid *pSolid)
G4SmartVoxelHeader * GetVoxelHeader() const
void UpdateMaterial(G4Material *pMaterial)
G4double ComputeStep(const G4ThreeVector &localPoint, const G4ThreeVector &localDirection, const G4double currentProposedStepLength, G4double &newSafety, G4NavigationHistory &history, G4bool &validExitNormal, G4ThreeVector &exitNormal, G4bool &exiting, G4bool &entering, G4VPhysicalVolume *(*pBlockedPhysical), G4int &blockedReplicaNo)
G4double ComputeSafety(const G4ThreeVector &globalpoint, const G4NavigationHistory &history, const G4double pMaxLength=DBL_MAX)
G4bool LevelLocate(G4NavigationHistory &history, const G4VPhysicalVolume *blockedVol, const G4int blockedNum, const G4ThreeVector &globalPoint, const G4ThreeVector *globalDirection, const G4bool pLocatedOnEdge, G4ThreeVector &localPoint)
G4double ComputeStep(const G4ThreeVector &globalPoint, const G4ThreeVector &globalDirection, const G4double currentProposedStepLength, G4double &newSafety, G4NavigationHistory &history, G4bool &validExitNormal, G4ThreeVector &exitNormal, G4bool &exiting, G4bool &entering, G4VPhysicalVolume *(*pBlockedPhysical), G4int &blockedReplicaNo)
G4SmartVoxelNode * ParamVoxelLocate(G4SmartVoxelHeader *pHead, const G4ThreeVector &localPoint)
G4bool LevelLocate(G4NavigationHistory &history, const G4VPhysicalVolume *blockedVol, const G4int blockedNum, const G4ThreeVector &globalPoint, const G4ThreeVector *globalDirection, const G4bool pLocatedOnEdge, G4ThreeVector &localPoint)
G4double ComputeSafety(const G4ThreeVector &localPoint, const G4NavigationHistory &history, const G4double pProposedMaxLength=DBL_MAX)
void SetNormalNavigation(G4NormalNavigation *fnormnav)
G4bool LevelLocate(G4NavigationHistory &history, const G4VPhysicalVolume *blockedVol, const G4int blockedNum, const G4ThreeVector &globalPoint, const G4ThreeVector *globalDirection, const G4bool pLocatedOnEdge, G4ThreeVector &localPoint)
G4double ComputeSafety(const G4ThreeVector &localPoint, const G4NavigationHistory &history, const G4double pProposedMaxLength=DBL_MAX)
G4double ComputeStep(const G4ThreeVector &globalPoint, const G4ThreeVector &globalDirection, const G4double currentProposedStepLength, G4double &newSafety, G4NavigationHistory &history, G4bool &validExitNormal, G4ThreeVector &exitNormal, G4bool &exiting, G4bool &entering, G4VPhysicalVolume *(*pBlockedPhysical), G4int &blockedReplicaNo)
G4double ComputeStep(const G4ThreeVector &globalPoint, const G4ThreeVector &globalDirection, const G4ThreeVector &localPoint, const G4ThreeVector &localDirection, const G4double currentProposedStepLength, G4double &newSafety, G4NavigationHistory &history, G4bool &validExitNormal, G4bool &calculatedExitNormal, G4ThreeVector &exitNormal, G4bool &exiting, G4bool &entering, G4VPhysicalVolume *(*pBlockedPhysical), G4int &blockedReplicaNo)
G4double ComputeSafety(const G4ThreeVector &globalPoint, const G4ThreeVector &localPoint, G4NavigationHistory &history, const G4double pProposedMaxLength=DBL_MAX)
void ComputeTransformation(const G4int replicaNo, G4VPhysicalVolume *pVol, G4ThreeVector &point) const
G4bool LevelLocate(G4NavigationHistory &history, const G4VPhysicalVolume *blockedVol, const G4int blockedNum, const G4ThreeVector &globalPoint, const G4ThreeVector *globalDirection, const G4bool pLocatedOnEdge, G4ThreeVector &localPoint)
EInside BackLocate(G4NavigationHistory &history, const G4ThreeVector &globalPoint, G4ThreeVector &localPoint, const G4bool &exiting, G4bool ¬KnownInside) const
const G4NavigationHistory * GetHistory() const
G4int MoveUpHistory(G4int num_levels=1)
virtual G4VSolid * ComputeSolid(const G4int, G4VPhysicalVolume *)
virtual void ComputeTransformation(const G4int, G4VPhysicalVolume *) const =0
virtual G4bool IsNested() const
const G4RotationMatrix * GetRotation() const
const G4ThreeVector GetTranslation() const
virtual G4bool CheckOverlaps(G4int res=1000, G4double tol=0., G4bool verbose=true, G4int errMax=1)
G4LogicalVolume * GetLogicalVolume() const
virtual G4int GetCopyNo() const =0
const G4String & GetName() const
virtual G4int GetRegularStructureId() const =0
virtual G4VPVParameterisation * GetParameterisation() const =0
virtual G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const =0
virtual EInside Inside(const G4ThreeVector &p) const =0
virtual void ComputeDimensions(G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
virtual G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=nullptr, G4ThreeVector *n=nullptr) const =0
virtual G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const =0
virtual G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const =0
virtual G4GeometryType GetEntityType() const =0
virtual G4double ComputeSafety(const G4ThreeVector &globalpoint, const G4NavigationHistory &history, const G4double pMaxLength=DBL_MAX)
virtual G4double ComputeStep(const G4ThreeVector &globalPoint, const G4ThreeVector &globalDirection, const G4double currentProposedStepLength, G4double &newSafety, G4NavigationHistory &history, G4bool &validExitNormal, G4ThreeVector &exitNormal, G4bool &exiting, G4bool &entering, G4VPhysicalVolume *(*pBlockedPhysical), G4int &blockedReplicaNo)
G4SmartVoxelNode * VoxelLocate(G4SmartVoxelHeader *pHead, const G4ThreeVector &localPoint)
virtual G4bool LevelLocate(G4NavigationHistory &history, const G4VPhysicalVolume *blockedVol, const G4int blockedNum, const G4ThreeVector &globalPoint, const G4ThreeVector *globalDirection, const G4bool pLocatedOnEdge, G4ThreeVector &localPoint)
G4double ComputeSafety(const G4ThreeVector &localPoint, const G4VPhysicalVolume ¤tPhysical, G4double maxLength=DBL_MAX)