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;
186 G4cout <<
"*** G4ITNavigator2::LocateGlobalPointAndSetup: ***" <<
G4endl;
188 <<
" Globalpoint = " << globalPoint <<
G4endl
189 <<
" RelativeSearch = " << relativeSearch <<
G4endl;
195 G4cout.precision(oldcoutPrec);
199 G4int noLevelsExited=0 ;
201 if ( !relativeSearch )
296 G4Exception(
"G4ITNavigator2::LocateGlobalPointAndSetup()",
298 "Not applicable for external volumes.");
303 localPoint =
fHistory.GetTopTransform().TransformPoint(globalPoint);
304 notKnownContained =
false;
326 while (notKnownContained)
330 targetSolid =
fHistory.GetTopVolume()->GetLogicalVolume()->GetSolid();
331 localPoint =
fHistory.GetTopTransform().TransformPoint(globalPoint);
332 insideCode = targetSolid->
Inside(localPoint);
336 G4String solidResponse =
"-kInside-";
338 solidResponse =
"-kOutside-";
340 solidResponse =
"-kSurface-";
341 G4cout <<
"*** G4ITNavigator2::LocateGlobalPointAndSetup(): ***" <<
G4endl
342 <<
" Invoked Inside() for solid: " << targetSolid->
GetName()
343 <<
". Solid replied: " << solidResponse <<
G4endl
344 <<
" For local point p: " << localPoint <<
G4endl;
369 if( noLevelsExited > 1 )
393 if( (!
fExiting)&&considerDirection )
398 G4bool directionExiting =
false;
400 fHistory.GetTopTransform().TransformAxis(globalDirection);
405 localPoint=
fHistory.GetTopTransform().TransformPoint(globalPoint);
409 directionExiting = normal.
dot(localDirection) > 0.0;
410 isExiting = isExiting || directionExiting;
426 if( noLevelsExited > 1 )
449 notKnownContained=
false;
454 notKnownContained=
false;
474 targetPhysical =
fHistory.GetTopVolume();
475 if (!targetPhysical) {
break; }
533 G4Exception(
"G4ITNavigator2::LocateGlobalPointAndSetup()",
535 "Not applicable for external volumes.");
571#ifdef G4DEBUG_NAVIGATION
575 G4cout <<
"*** G4ITNavigator2::LocateGlobalPointAndSetup() ***" <<
G4endl;
590 if (targetPhysical) { curPhysVol_Name = targetPhysical->
GetName(); }
591 G4cout <<
" Return value = new volume = " << curPhysVol_Name <<
G4endl;
596 G4cout <<
"Upon exiting LocateGlobalPointAndSetup():" <<
G4endl;
599 G4cout.precision(oldcoutPrec);
605 return targetPhysical;
626#ifdef G4DEBUG_NAVIGATION
636#ifdef G4DEBUG_NAVIGATION
639 G4cout <<
"Entering LocateGlobalWithinVolume(): History = " <<
G4endl;
673 G4Exception(
"G4ITNavigator2::LocateGlobalPointWithinVolume()",
675 "Not applicable for replicated volumes.");
678 G4Exception(
"G4ITNavigator2::LocateGlobalPointWithinVolume()",
680 "Not applicable for external volumes.");
705 exceptionDescription <<
"The navigator state is NULL. ";
706 exceptionDescription <<
"Either NewNavigatorStateAndLocate was not called ";
707 exceptionDescription <<
"or the provided navigator state was already NULL.";
709 G4Exception(
"G4ITNavigator::CheckNavigatorStateIsValid",
739 exceptionDescription <<
"No World Volume";
756 exceptionDescription <<
"No World Volume";
776 exceptionDescription <<
"No World Volume";
778 G4Exception(
"G4ITNavigator::NewNavigatorStateAndLocate",
918 const G4double pCurrentProposedStepLength,
942 G4cout <<
"*** G4ITNavigator2::ComputeStep: ***" <<
G4endl;
944 <<
" - Proposed step length = " << pCurrentProposedStepLength
946#ifdef G4DEBUG_NAVIGATION
950 <<
" Globalpoint = " << std::setw(25) << pGlobalpoint <<
G4endl
951 <<
" Direction = " << std::setw(25) << pDirection <<
G4endl;
968 G4double moveLenSq = (newLocalPoint-oldLocalPoint).mag2();
973 ComputeStepLog(pGlobalpoint, moveLenSq);
991 pCurrentProposedStepLength,
1008 pCurrentProposedStepLength,
1032 if(
fHistory.GetTopVolume()->GetRegularStructureId() == 0 )
1036 "Point is relocated in voxels, while it should be outside!");
1039 pCurrentProposedStepLength,
1054 pCurrentProposedStepLength,
1073 pCurrentProposedStepLength,
1087 pCurrentProposedStepLength,
1099 G4Exception(
"G4ITNavigator2::ComputeStep()",
"GeomNav0001",
1103 G4Exception(
"G4ITNavigator2::ComputeStep()",
"GeomNav0001",
1114 G4bool calculatedExitNormal;
1119 pCurrentProposedStepLength,
1123 calculatedExitNormal,
1160#ifdef G4DEBUG_NAVIGATION
1163 G4cout <<
"G4ITNavigator2::ComputeStep(): another zero step, # "
1165 <<
" at " << pGlobalpoint
1166 <<
" in volume " << motherPhysical->
GetName()
1178 std::ostringstream message;
1179 message <<
"Track stuck or not moving." <<
G4endl
1180 <<
" Track stuck, not moving for "
1182 <<
" in volume -" << motherPhysical->
GetName()
1183 <<
"- at point " << pGlobalpoint <<
G4endl
1184 <<
" direction: " << pDirection <<
"." <<
G4endl
1185 <<
" Potential geometry or navigation problem !"
1187 <<
" Trying pushing it of " << Step <<
" mm ...";
1188 G4Exception(
"G4ITNavigator2::ComputeStep()",
"GeomNav1002",
1189 JustWarning, message,
"Potential overlap in geometry!");
1198 std::ostringstream message;
1199 message <<
"Stuck Track: potential geometry or navigation problem."
1201 <<
" Track stuck, not moving for "
1203 <<
" in volume -" << motherPhysical->
GetName()
1204 <<
"- at point " << pGlobalpoint <<
G4endl
1205 <<
" direction: " << pDirection <<
".";
1207 G4Exception(
"G4ITNavigator2::ComputeStep()",
"GeomNav0003",
1220 + std::min(Step,pCurrentProposedStepLength) * pDirection;
1225#ifdef G4DEBUG_NAVIGATION
1228 G4cout <<
" At G4Nav CompStep End - if(exiting) - fExiting= " <<
fExiting
1289#ifdef G4DEBUG_NAVIGATION
1292 desc <<
"Problem in ComputeStep: Replica Navigation did not provide"
1293 <<
" valid exit Normal. " <<
G4endl;
1294 desc <<
" Do not know how calculate it in this case." <<
G4endl;
1295 desc <<
" Location = " << finalLocalPoint <<
G4endl;
1296 desc <<
" Volume name = " << motherPhysical->
GetName()
1298 G4Exception(
"G4ITNavigator2::ComputeStep()",
"GeomNav0003",
1299 JustWarning, desc,
"Normal not available for exiting.");
1312 fHistory.GetTransform(depth-1).Inverse();
1343 G4cout <<
" Returned step= " << Step;
1345 if( Step == kInfinity )
1347 G4cout <<
" Requested step= " << pCurrentProposedStepLength ;
1365 const G4double pCurrentProposedStepLength,
1379 pCurrentProposedStepLength,
1448 for ( i=1; i<=cdepth; i++ )
1451 switch (
fHistory.GetVolumeType(i) )
1462 replicaNo =
fHistory.GetReplicaNo(i);
1487 ComputeMaterial(replicaNo, current, pTouchable) );
1495 "Not applicable for external volumes.");
1524 if( candidateLogical )
1546 currentSolid= candidateLogical->
GetSolid();
1547 inSideIt = currentSolid->
Inside(daughterPointOwnLocal);
1548 onSurface = (inSideIt ==
kSurface);
1553 safety = (currentSolid->
DistanceToIn(daughterPointOwnLocal));
1556 else if (inSideIt ==
kInside )
1558 safety = (currentSolid->
DistanceToOut(daughterPointOwnLocal));
1565 nextSolidExitNormal =
1570 ExitNormal = -nextSolidExitNormal;
1578 std::ostringstream message;
1579 message <<
"Point not on surface ! " <<
G4endl
1581 << daughterPointOwnLocal <<
G4endl
1582 <<
" Physical volume = "
1584 <<
" Logical volume = "
1586 <<
" Solid = " << currentSolid->
GetName()
1589 << *currentSolid <<
G4endl;
1592 message <<
"Point is Outside. " <<
G4endl
1593 <<
" Safety (from outside) = " << safety <<
G4endl;
1597 message <<
"Point is Inside. " <<
G4endl
1598 <<
" Safety (from inside) = " << safety <<
G4endl;
1600 G4Exception(
"G4ITNavigator2::GetLocalExitNormal()",
"GeomNav1001",
1618 G4Exception(
"G4ITNavigator2::GetLocalExitNormal()",
1620 "Incorrect call to GetLocalSurfaceNormal." );
1630 if( std::fabs(ExitNormal.
mag2()-1.0 ) > CLHEP::perMillion )
1633 desc <<
" Parameters of solid: " << *daughterSolid
1635 G4Exception(
"G4ITNavigator2::GetLocalExitNormal()",
1637 "Surface Normal returned by Solid is not a Unit Vector." );
1655 message <<
"Function called when *NOT* at a Boundary." <<
G4endl;
1656 G4Exception(
"G4ITNavigator2::GetLocalExitNormal()",
1672 G4int enteringReplicaNo,
1676 switch (enteringVolumeType)
1681 G4Exception(
"G4ITNavigator2::GetMotherToDaughterTransform()",
1683 "Method NOT Implemented yet for replica volumes.");
1691 pParam->
ComputeSolid(enteringReplicaNo, pEnteringPhysVol);
1705 G4Exception(
"G4ITNavigator2::GetMotherToDaughterTransform()",
1707 "Not applicable for external volumes.");
1732#ifdef G4DEBUG_NAVIGATION
1740 ExpectedBoundaryPointLocal =
1760 G4bool* pNormalCalculated)
1784 if( std::fabs ( normMag2 - 1.0 ) < perMillion )
1786 *pNormalCalculated =
true;
1793 message <<
" ERROR> Expected normal-global-frame to valid (unit vector) "
1794 <<
" - but |normal| = " << std::sqrt(normMag2)
1795 <<
" - and |normal|^ = " << normMag2
1796 <<
" which differs from 1.0 by " << normMag2 - 1.0 <<
G4endl
1798 message <<
"============================================================"
1802 message <<
" State of Navigator: " <<
G4endl;
1803 message << *
this <<
G4endl;
1805 message <<
"============================================================"
1808 G4Exception(
"G4ITNavigator2::GetGlobalExitNormal()",
1810 "Value obtained from stored global-normal is not a unit vector.");
1827#ifdef G4DEBUG_NAVIGATION
1837 edN <<
" State of Navigator: " <<
G4endl;
1841 G4Exception(
"G4ITNavigator2::GetGlobalExitNormal()",
1843 "LocalExitNormalAndCheck() did not calculate Normal.");
1848 if( validNormal && (std::fabs(localMag2-1.0)) > CLHEP::perMillion )
1852 edN <<
"G4ITNavigator2::GetGlobalExitNormal: "
1853 <<
" Using Local Normal - from call to GetLocalExitNormalAndCheck. "
1855 <<
" Local Exit Normal : " <<
" || = " << std::sqrt(localMag2)
1856 <<
" vec = " << localNormal <<
G4endl
1857 <<
" Global Exit Normal : " <<
" || = " << globalNormal.
mag()
1858 <<
" vec = " << globalNormal <<
G4endl;
1861 G4Exception(
"G4ITNavigator2::GetGlobalExitNormal()",
1863 "Value obtained from new local *solid* is incorrect.");
1864 localNormal = localNormal.
unit();
1870#ifdef G4DEBUG_NAVIGATION
1882 if( diffNorm.
mag2() > perMillion*CLHEP::perMillion)
1885 edDfn <<
"Found difference in normals in case of exiting mother "
1886 <<
"- when Get is called after ComputingStep " <<
G4endl;
1887 edDfn <<
" Magnitude of diff = " << diffNorm.
mag() <<
G4endl;
1890 edDfn <<
" Global Computed from Local = " << globalNormAgn <<
G4endl;
1891 G4Exception(
"G4ITNavigator::GetGlobalExitNormal()",
"GeomNav0003",
1897 return globalNormal;
1901#define G4NEW_SAFETY 1
1919#ifdef G4DEBUG_NAVIGATION
1923 G4cout <<
"*** G4ITNavigator2::ComputeSafety: ***" <<
G4endl
1924 <<
" Called at point: " << pGlobalpoint <<
G4endl;
1928 <<
" - Maximum length = " << pMaxLength <<
G4endl;
1931 G4cout <<
" ----- Upon entering Compute Safety:" <<
G4endl;
1943 if( endpointOnSurface && stayedOnEndpoint )
1945#ifdef G4DEBUG_NAVIGATION
1948 G4cout <<
" G4Navigator::ComputeSafety() finds that point - "
1949 << pGlobalpoint <<
" - is on surface " <<
G4endl;
1979#ifdef G4DEBUG_NAVIGATION
1982 G4cout <<
" G4ITNavigator2::ComputeSafety() relocates-in-volume to point: "
1983 << pGlobalpoint <<
G4endl;
2000 *motherPhysical, pMaxLength);
2001 newSafety= safetyTwo;
2007 newSafety= safetyOldVoxel;
2026 G4Exception(
"G4ITNavigator2::ComputeSafety()",
"GeomNav0001",
2032 "Not applicable for external volumes.");
2057#ifdef G4DEBUG_NAVIGATION
2062 G4cout <<
" Returned value of Safety = " << newSafety <<
G4endl;
2064 G4cout.precision(oldcoutPrec);
2105#ifdef CHECK_ORDER_OF_METHODS
2108 G4Exception(
"G4Navigator::RecheckDistanceToCurrentBoundary()",
2110 "Method must be called after ComputeStep(), before call to LocateMethod.");
2141 locatedDaug = candSolid->
Inside(dgPosition);
2150 true, &validExitNormal, &exitNormal);
2151 daughterStep= - distanceBackOut;
2178 daughterSafety= 0.0;
2187 *prDistance= daughterStep;
2188 if( prNewSafety ) { *prNewSafety= daughterSafety; }
2208 if( ProposedMove >= motherSafety )
2212 true, &validExitNormal, &exitNormal);
2216 motherStep= ProposedMove;
2221 motherSafety= motherSolid->
DistanceToIn(localPosition);
2222 if( ProposedMove >= motherSafety )
2232 if( prNewSafety ) { *prNewSafety= motherSafety; }
2241 *prDistance= std::min( motherStep, daughterStep );
2244 *prNewSafety= std::min( motherSafety, daughterSafety );
2270 G4cout <<
"The current state of G4Navigator is: " <<
G4endl;
2275 <<
" BlockedPhysicalVolume= " ;
2288 G4cout << std::setw(30) <<
" ExitNormal " <<
" "
2289 << std::setw( 5) <<
" Valid " <<
" "
2290 << std::setw( 9) <<
" Exiting " <<
" "
2291 << std::setw( 9) <<
" Entering" <<
" "
2292 << std::setw(15) <<
" Blocked:Volume " <<
" "
2293 << std::setw( 9) <<
" ReplicaNo" <<
" "
2294 << std::setw( 8) <<
" LastStepZero " <<
" "
2298 <<
", " << std::setw(7) <<
fExitNormal.z() <<
" ) "
2300 << std::setw( 9) <<
fExiting <<
" "
2304 G4cout << std::setw(15) <<
"None";
2321 G4cout.precision(oldcoutPrec);
2328void G4ITNavigator2::ComputeStepLog(
const G4ThreeVector& pGlobalpoint,
2351 G4double shiftOrigin = std::sqrt(shiftOriginSafSq);
2354 if( diffShiftSaf > fAccuracyForWarning )
2358 std::ostringstream message, suggestion;
2359 message <<
"Accuracy error or slightly inaccurate position shift."
2361 <<
" The Step's starting point has moved "
2362 << std::sqrt(moveLenSq)/mm <<
" mm " <<
G4endl
2363 <<
" since the last call to a Locate method." <<
G4endl
2364 <<
" This has resulted in moving "
2365 << shiftOrigin/mm <<
" mm "
2366 <<
" from the last point at which the safety "
2367 <<
" was calculated " <<
G4endl
2368 <<
" which is more than the computed safety= "
2370 <<
" This difference is "
2371 << diffShiftSaf/mm <<
" mm." <<
G4endl
2372 <<
" The tolerated accuracy is "
2373 << fAccuracyForException/mm <<
" mm.";
2377 if( ((++warnNow % 100) == 1) )
2380 <<
" This problem can be due to either " <<
G4endl
2381 <<
" - a process that has proposed a displacement"
2382 <<
" larger than the current safety , or" <<
G4endl
2383 <<
" - inaccuracy in the computation of the safety";
2384 suggestion <<
"We suggest that you " <<
G4endl
2385 <<
" - find i) what particle is being tracked, and "
2386 <<
" ii) through what part of your geometry " <<
G4endl
2387 <<
" for example by re-running this event with "
2389 <<
" /tracking/verbose 1 " <<
G4endl
2390 <<
" - check which processes you declare for"
2391 <<
" this particle (and look at non-standard ones)"
2393 <<
" - in case, create a detailed logfile"
2394 <<
" of this event using:" <<
G4endl
2395 <<
" /tracking/verbose 6 ";
2399 message,
G4String(suggestion.str()));
2400 G4cout.precision(oldcoutPrec);
2401 G4cerr.precision(oldcerrPrec);
2403#ifdef G4DEBUG_NAVIGATION
2406 G4cerr <<
"WARNING - G4ITNavigator2::ComputeStep()" <<
G4endl
2407 <<
" The Step's starting point has moved "
2408 << std::sqrt(moveLenSq) <<
"," <<
G4endl
2409 <<
" which has taken it to the limit of"
2410 <<
" the current safety. " <<
G4endl;
2415 if ( shiftOriginSafSq >
sqr(safetyPlus) )
2417 std::ostringstream message;
2418 message <<
"May lead to a crash or unreliable results." <<
G4endl
2419 <<
" Position has shifted considerably without"
2420 <<
" notifying the navigator !" <<
G4endl
2421 <<
" Tolerated safety: " << safetyPlus <<
G4endl
2422 <<
" Computed shift : " << shiftOriginSafSq;
2423 G4Exception(
"G4ITNavigator2::ComputeStep()",
"GeomNav1002",
2440 G4long oldcoutPrec = os.precision(4);
2441 if( n.fVerbose >= 4 )
2443 os <<
"The current state of G4ITNavigator2 is: " <<
G4endl;
2444 os <<
" ValidExitNormal= " << n.fValidExitNormal <<
G4endl
2445 <<
" ExitNormal = " << n.fExitNormal <<
G4endl
2446 <<
" Exiting = " << n.fExiting <<
G4endl
2447 <<
" Entering = " << n.fEntering <<
G4endl
2448 <<
" BlockedPhysicalVolume= " ;
2450 if (n.fBlockedPhysicalVolume==0)
2456 os << n.fBlockedPhysicalVolume->GetName();
2460 <<
" BlockedReplicaNo = " << n.fBlockedReplicaNo <<
G4endl
2461 <<
" LastStepWasZero = " << n.fLastStepWasZero <<
G4endl
2464 if( ( 1 < n.fVerbose) && (n.fVerbose < 4) )
2467 os << std::setw(30) <<
" ExitNormal " <<
" "
2468 << std::setw( 5) <<
" Valid " <<
" "
2469 << std::setw( 9) <<
" Exiting " <<
" "
2470 << std::setw( 9) <<
" Entering" <<
" "
2471 << std::setw(15) <<
" Blocked:Volume " <<
" "
2472 << std::setw( 9) <<
" ReplicaNo" <<
" "
2473 << std::setw( 8) <<
" LastStepZero " <<
" "
2475 os <<
"( " << std::setw(7) << n.fExitNormal.x()
2476 <<
", " << std::setw(7) << n.fExitNormal.y()
2477 <<
", " << std::setw(7) << n.fExitNormal.z() <<
" ) "
2478 << std::setw( 5) << n.fValidExitNormal <<
" "
2479 << std::setw( 9) << n.fExiting <<
" "
2480 << std::setw( 9) << n.fEntering <<
" ";
2482 if ( n.fBlockedPhysicalVolume==0 )
2483 { os << std::setw(15) <<
"None"; }
2485 { os << std::setw(15)<< n.fBlockedPhysicalVolume->GetName(); }
2487 os << std::setw( 9) << n.fBlockedReplicaNo <<
" "
2488 << std::setw( 8) << n.fLastStepWasZero <<
" "
2491 if( n.fVerbose > 2 )
2494 os <<
" Current Localpoint = " << n.fLastLocatedPointLocal <<
G4endl;
2495 os <<
" PreviousSftOrigin = " << n.fPreviousSftOrigin <<
G4endl;
2496 os <<
" PreviousSafety = " << n.fPreviousSafety <<
G4endl;
2498 if( n.fVerbose > 3 || n.fVerbose == 0 )
2500 os <<
"Current History: " <<
G4endl << n.fHistory;
2503 os.precision(oldcoutPrec);
2517 return solid->
Inside(localPoint);
2530 std::vector<std::vector<G4double> > fExtend;
2548 for(
G4int 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)