64    G4cout << 
" G4Navigator parameters: Action Threshold (No Zero Steps) = " 
   66           << 
"  Abandon Threshold (No Zero Steps) = " 
   79#ifdef ALTERNATIVE_VOXEL_NAV 
   92#ifdef ALTERNATIVE_VOXEL_NAV   
  134                                        const G4bool relativeSearch,
 
  135                                        const G4bool ignoreDirection )
 
  137  G4bool notKnownContained = 
true, noResult;
 
  149  if( considerDirection && pGlobalDirection != 
nullptr )
 
  151    globalDirection=*pGlobalDirection;
 
  158    G4cout << 
"*** G4Navigator::LocateGlobalPointAndSetup: ***" << 
G4endl; 
 
  160           << 
"        Globalpoint = " << globalPoint << 
G4endl 
  161           << 
"        RelativeSearch = " << relativeSearch  << 
G4endl;
 
  167    G4cout.precision(oldcoutPrec);
 
  171  G4int noLevelsExited = 0;
 
  172  G4int noLevelsEntered = 0;
 
  174  if ( !relativeSearch )
 
  271              G4Exception(
"G4Navigator::LocateGlobalPointAndSetup()",
 
  273                          "Extra levels not applicable for external volumes.");
 
  279          notKnownContained = 
false;
 
  301  while (notKnownContained)  
 
  308      insideCode = targetSolid->
Inside(localPoint);
 
  312        G4String solidResponse = 
"-kInside-";
 
  314          solidResponse = 
"-kOutside-";
 
  316          solidResponse = 
"-kSurface-";
 
  317        G4cout << 
"*** G4Navigator::LocateGlobalPointAndSetup(): ***" << 
G4endl 
  318               << 
"    Invoked Inside() for solid: " << targetSolid->
GetName()
 
  319               << 
". Solid replied: " << solidResponse << 
G4endl 
  320               << 
"    For local point p: " << localPoint << 
G4endl;
 
  355        if( noLevelsExited > 1 )
 
  379        if( (!
fExiting) && considerDirection )
 
  384          G4bool directionExiting = 
false;
 
  395            directionExiting = 
normal.dot(localDirection) > 0.0;
 
  396            isExiting = isExiting || directionExiting;
 
  412            if( noLevelsExited > 1 )
 
  435          notKnownContained = 
false;
 
  440        notKnownContained = 
false;
 
  461    if (!targetPhysical) { 
break; }
 
  563#ifdef G4DEBUG_NAVIGATION 
  567         G4cout << 
"*** G4Navigator::LocateGlobalPointAndSetup() ***" << 
G4endl;
 
  582    if (targetPhysical)  { curPhysVol_Name = targetPhysical->
GetName(); }
 
  583    G4cout << 
"    Return value = new volume = " << curPhysVol_Name << 
G4endl;
 
  588      G4cout << 
"Upon exiting LocateGlobalPointAndSetup():" << 
G4endl;
 
  591    G4cout.precision(oldcoutPrec);
 
  597  return targetPhysical;
 
  616#ifdef G4DEBUG_NAVIGATION 
  772                                   const G4double pCurrentProposedStepLength,
 
  798    G4cout << 
"*** G4Navigator::ComputeStep: ***" << 
G4endl; 
 
  800           << 
" - Proposed step length = " << pCurrentProposedStepLength
 
  802#ifdef G4DEBUG_NAVIGATION 
  806             << 
"  Globalpoint = " << std::setw(25) << pGlobalpoint << 
G4endl 
  807             << 
"  Direction   = " << std::setw(25) << pDirection << 
G4endl;
 
  824    G4double moveLenSq = (newLocalPoint-oldLocalPoint).mag2();
 
  826    if ( moveLenSq >= 
fSqTol )
 
  846                                       pCurrentProposedStepLength,
 
  863                                          pCurrentProposedStepLength,
 
  891                "Point is relocated in voxels, while it should be outside!");
 
  894                                            pCurrentProposedStepLength,
 
  909                                                     pCurrentProposedStepLength,
 
  928                                       pCurrentProposedStepLength,
 
  942                                         pCurrentProposedStepLength,
 
  954        G4Exception(
"G4Navigator::ComputeStep()", 
"GeomNav0001",
 
  960                                          pCurrentProposedStepLength,
 
  978    G4bool calculatedExitNormal;
 
  983                                   pCurrentProposedStepLength,
 
  987                                   calculatedExitNormal,
 
 1023    G4bool actAndReport = 
false;
 
 1029#ifdef G4DEBUG_NAVIGATION 
 1033    if ( act || inform )
 
 1035      if( act && !abandon )
 
 1043      if( actAndReport || abandon || inform )
 
 1045        std::ostringstream message;
 
 1047        message.precision(16);      
 
 1048        message << 
"Stuck Track: potential geometry or navigation problem." 
 1050        message << 
"  Track stuck, not moving for "  
 1052                << 
"  Current  phys volume: '" << motherPhysical->
GetName()
 
 1054                << 
"   - at position : " << pGlobalpoint << 
G4endl 
 1055                << 
"     in direction: " << pDirection   << 
G4endl 
 1056                << 
"    (local position: " << newLocalPoint << 
")" << 
G4endl 
 1057                << 
"    (local direction: " << localDirection << 
")." << 
G4endl 
 1058                << 
"  Previous phys volume: '" 
 1061        if( actAndReport || abandon )
 
 1063           message << 
"  Likely geometry overlap - else navigation problem !" 
 1072          message << 
" Track *abandoned* due to excessive number of Zero steps." 
 1074          G4Exception(
"G4Navigator::ComputeStep()", 
"GeomNav0003",
 
 1082             message << 
"   *** Trying to get *unstuck* using a push" 
 1083                     << 
" - expanding step to " << Step << 
" (mm) ..." 
 1084                     << 
"       Potential overlap in geometry !" << 
G4endl;
 
 1085             G4Exception(
"G4Navigator::ComputeStep()", 
"GeomNav1002",
 
 1089#ifdef G4DEBUG_NAVIGATION       
 1094               message << 
", nav-comp-step calls # " << sNavCScalls
 
 1095                       << 
", Step= " << Step << 
G4endl;
 
 1114                + 
std::min(Step,pCurrentProposedStepLength) * pDirection;
 
 1119#ifdef G4DEBUG_NAVIGATION 
 1122      G4cout << 
" At G4Nav CompStep End - if(exiting) - fExiting= " << 
fExiting 
 1147                                    + localDirection*Step;
 
 1183#ifdef G4DEBUG_NAVIGATION 
 1186        desc << 
"Problem in ComputeStep:  Replica Navigation did not provide" 
 1187             << 
" valid exit Normal. " << 
G4endl;
 
 1188        desc << 
" Do not know how calculate it in this case." << 
G4endl;
 
 1189        desc << 
"  Location    = " << finalLocalPoint << 
G4endl;
 
 1190        desc << 
"  Volume name = " << motherPhysical->
GetName()
 
 1192        G4Exception(
"G4Navigator::ComputeStep()", 
"GeomNav0003",
 
 1193                    JustWarning, desc, 
"Normal not available for exiting.");
 
 1235    G4cout << 
"  Returned step= " << Step;
 
 1239       G4cout << 
" Requested step= " << pCurrentProposedStepLength ;
 
 1257                                     const G4double pCurrentProposedStepLength,
 
 1268                       pCurrentProposedStepLength, 
 
 1336  for ( 
auto i=1; i<=cdepth; ++i )
 
 1375          ComputeMaterial(replicaNo, current, pTouchable) );
 
 1404      if( candidateLogical ) 
 
 1426          currentSolid = candidateLogical->
GetSolid(); 
 
 1427          inSideIt = currentSolid->
Inside(daughterPointOwnLocal); 
 
 1428          onSurface = (inSideIt == 
kSurface); 
 
 1433              safety = (currentSolid->
DistanceToIn(daughterPointOwnLocal)); 
 
 1436            else if (inSideIt == 
kInside )
 
 1438              safety = (currentSolid->
DistanceToOut(daughterPointOwnLocal)); 
 
 1445            nextSolidExitNormal =
 
 1452            ExitNormal = MotherToDaughterTransform
 
 1461              std::ostringstream message;
 
 1462              message << 
"Point not on surface ! " << 
G4endl 
 1464                      << daughterPointOwnLocal << 
G4endl  
 1465                      << 
"  Physical volume = " 
 1467                      << 
"  Logical volume  = " 
 1469                      << 
"  Solid           = " << currentSolid->
GetName() 
 
 1472                      << *currentSolid << 
G4endl;
 
 1475                message << 
"Point is Outside. " << 
G4endl 
 1476                        << 
"  Safety (from outside) = " << safety << 
G4endl;
 
 1480                message << 
"Point is Inside. " << 
G4endl 
 1481                        << 
"  Safety (from inside) = " << safety << 
G4endl;
 
 1483              G4Exception(
"G4Navigator::GetLocalExitNormal()", 
"GeomNav1001",
 
 1503                  "Incorrect call to GetLocalSurfaceNormal." );
 
 1516        desc << 
" Parameters of solid: " << *daughterSolid
 
 1520                    "Surface Normal returned by Solid is not a Unit Vector." );
 
 1538        message << 
"Function called when *NOT* at a Boundary." << 
G4endl;
 
 1539        message << 
"Exit Normal not calculated." << 
G4endl;
 
 1556                                           G4int enteringReplicaNo,
 
 1559  switch (enteringVolumeType)
 
 1564      G4Exception(
"G4Navigator::GetMotherToDaughterTransform()",
 
 1566                  "Method NOT Implemented yet for replica volumes.");
 
 1574          pParam->
ComputeSolid(enteringReplicaNo, pEnteringPhysVol);
 
 1614#ifdef G4DEBUG_NAVIGATION 
 1622    ExpectedBoundaryPointLocal =
 
 1643                                       G4bool*        pNormalCalculated)
 
 1665       *pNormalCalculated = 
true; 
 
 1671       message.precision(10); 
 
 1672       message << 
" WARNING> Expected normal-global-frame to be valid, " 
 1673               << 
" i.e. a unit vector!" << 
G4endl 
 1674               << 
"  - but |normal|   = "  << std::sqrt(normMag2)
 
 1675               << 
"  - and |normal|^2 = "  << normMag2 << 
G4endl 
 1676               << 
" which differs from 1.0 by " << normMag2 - 1.0 << 
G4endl 
 1678               << 
" Global point: " << IntersectPointGlobal << 
G4endl 
 1689       message << 
"============================================================" 
 1693       message << 
"   State of Navigator: " << 
G4endl;
 
 1694       message << *
this << 
G4endl;
 
 1696       message << 
"============================================================" 
 1701              "Value obtained from stored global-normal is not a unit vector.");
 
 1717#ifdef G4DEBUG_NAVIGATION 
 1718    usingStored = 
false;
 
 1727      edN << 
"   State of Navigator: " << 
G4endl;
 
 1733                  "LocalExitNormalAndCheck() did not calculate Normal.");
 
 1742       edN << 
"G4Navigator::GetGlobalExitNormal: " 
 1743           << 
"  Using Local Normal - from call to GetLocalExitNormalAndCheck. " 
 1745           << 
"  Local  Exit Normal : " << 
" || = " << std::sqrt(localMag2) 
 
 1746           << 
" vec = " << localNormal << 
G4endl 
 1747           << 
"  Global Exit Normal : " << 
" || = " << globalNormal.
mag() 
 
 1748           << 
" vec = " << globalNormal << 
G4endl 
 1749           << 
"  Global point: " << IntersectPointGlobal << 
G4endl;
 
 1763                   "Value obtained from new local *solid* is incorrect.");
 
 1764       localNormal = localNormal.
unit(); 
 
 1770#ifdef G4DEBUG_NAVIGATION 
 1785      edDfn << 
"Found difference in normals in case of exiting mother " 
 1786            << 
"- when Get is called after ComputingStep " << 
G4endl;
 
 1787      edDfn << 
"  Magnitude of diff =      " << diffNorm.
mag() << 
G4endl;
 
 1790      edDfn << 
"  Global Computed from Local = " << globalNormAgn << 
G4endl;
 
 1791      G4Exception(
"G4Navigator::GetGlobalExitNormal()", 
"GeomNav0003",
 
 1801  return globalNormal;
 
 1819#ifdef G4DEBUG_NAVIGATION 
 1823    G4cout << 
"*** G4Navigator::ComputeSafety: ***" << 
G4endl 
 1824           << 
"    Called at point: " << pGlobalpoint << 
G4endl;
 
 1828           << 
" - Maximum length = " << pMaxLength << 
G4endl; 
 
 1831       G4cout << 
"    ----- Upon entering Compute Safety:" << 
G4endl;
 
 1841  if( endpointOnSurface && stayedOnEndpoint )
 
 1843#ifdef G4DEBUG_NAVIGATION 
 1846      G4cout << 
"    G4Navigator::ComputeSafety() finds that point - " 
 1847             << pGlobalpoint << 
" - is on surface " << 
G4endl;
 
 1871#ifdef G4DEBUG_NAVIGATION 
 1874      G4cout << 
"  G4Navigator::ComputeSafety() relocates-in-volume to point: " 
 1875             << pGlobalpoint << 
G4endl;
 
 1891                                             *motherPhysical, pMaxLength);
 
 1910          G4Exception(
"G4Navigator::ComputeSafety()", 
"GeomNav0001",
 
 1938#ifdef G4DEBUG_NAVIGATION 
 1943    G4cout << 
"    Returned value of Safety = " << newSafety << 
G4endl;
 
 1945  G4cout.precision(oldcoutPrec);
 
 1969    G4cout << 
"The current state of G4Navigator is: " << 
G4endl;
 
 1974           << 
"  BlockedPhysicalVolume= " ;
 
 1991    G4cout << std::setw(30) << 
" ExitNormal "  << 
" " 
 1992           << std::setw( 5) << 
" Valid "       << 
" "      
 1993           << std::setw( 9) << 
" Exiting "     << 
" "       
 1994           << std::setw( 9) << 
" Entering"     << 
" "  
 1995           << std::setw(15) << 
" Blocked:Volume "  << 
" "    
 1996           << std::setw( 9) << 
" ReplicaNo"        << 
" "   
 1997           << std::setw( 8) << 
" LastStepZero  "   << 
" "    
 2003           << std::setw( 9)  << 
fExiting          << 
" " 
 2006    { 
G4cout << std::setw(15) << 
"None"; }
 
 2020  G4cout.precision(oldcoutPrec);
 
 2049    G4double shiftOrigin = std::sqrt(shiftOriginSafSq);
 
 2052    if( diffShiftSaf > fAccuracyForWarning )
 
 2056      std::ostringstream message, suggestion;
 
 2057      message << 
"Accuracy error or slightly inaccurate position shift." 
 2059              << 
"     The Step's starting point has moved "  
 2060              << std::sqrt(moveLenSq)/
mm << 
" mm " << 
G4endl 
 2061              << 
"     since the last call to a Locate method." << 
G4endl 
 2062              << 
"     This has resulted in moving "  
 2063              << shiftOrigin/
mm << 
" mm "  
 2064              << 
" from the last point at which the safety "  
 2065              << 
"     was calculated " << 
G4endl 
 2066              << 
"     which is more than the computed safety= "  
 2068              << 
"     This difference is "  
 2069              << diffShiftSaf/
mm << 
" mm." << 
G4endl 
 2070              << 
"     The tolerated accuracy is " 
 2071              << fAccuracyForException/
mm << 
" mm.";
 
 2075      if( ((++warnNow % 100) == 1) )
 
 2078               << 
"  This problem can be due to either " << 
G4endl 
 2079               << 
"    - a process that has proposed a displacement" 
 2080               << 
" larger than the current safety , or" << 
G4endl 
 2081               << 
"    - inaccuracy in the computation of the safety";
 
 2082        suggestion << 
"We suggest that you " << 
G4endl 
 2083                   << 
"   - find i) what particle is being tracked, and " 
 2084                   << 
" ii) through what part of your geometry " << 
G4endl 
 2085                   << 
"      for example by re-running this event with " 
 2087                   << 
"         /tracking/verbose 1 "  << 
G4endl 
 2088                   << 
"    - check which processes you declare for" 
 2089                   << 
" this particle (and look at non-standard ones)" 
 2091                   << 
"   - in case, create a detailed logfile" 
 2092                   << 
" of this event using:" << 
G4endl 
 2093                   << 
"         /tracking/verbose 6 ";
 
 2097                  message, 
G4String(suggestion.str()));
 
 2098      G4cout.precision(oldcoutPrec);
 
 2099      G4cerr.precision(oldcerrPrec);
 
 2101#ifdef G4DEBUG_NAVIGATION 
 2104      G4cerr << 
"WARNING - G4Navigator::ComputeStep()" << 
G4endl 
 2105             << 
"          The Step's starting point has moved " 
 2106             << std::sqrt(moveLenSq) << 
"," << 
G4endl 
 2107             << 
"          which has taken it to the limit of" 
 2108             << 
" the current safety. " << 
G4endl;
 
 2113  if ( shiftOriginSafSq > 
sqr(safetyPlus) )
 
 2115    std::ostringstream message;
 
 2116    message << 
"May lead to a crash or unreliable results." << 
G4endl 
 2117            << 
"        Position has shifted considerably without" 
 2118            << 
" notifying the navigator !" << 
G4endl 
 2119            << 
"        Tolerated safety: " << safetyPlus << 
G4endl 
 2120            << 
"        Computed shift  : " << shiftOriginSafSq;
 
 2121    G4Exception(
"G4Navigator::ComputeStep()", 
"GeomNav1002",
 
 2134  G4bool foundOverlap = 
false;
 
 2135  G4int  nPoints = 300000,  ntrials = 9, numOverlaps = 5;
 
 2137  while ( ntrials-- > 0 && !foundOverlap )
 
 2141       G4cout << 
" ** Running overlap checks in volume " 
 2143              << 
" with length = " << trialLength << 
G4endl;
 
 2148    if ( trialLength <= 1.0e-5 ) { numOverlaps= 1;}
 
 2150  return foundOverlap;
 
 2165  G4int oldcoutPrec = os.precision(4);
 
 2166  if( 
n.fVerbose >= 4 )
 
 2168    os << 
"The current state of G4Navigator is: " << 
G4endl;
 
 2169    os << 
"  ValidExitNormal= " << 
n.fValidExitNormal << 
G4endl 
 2170    << 
"  ExitNormal     = " << 
n.fExitNormal      << 
G4endl 
 2171    << 
"  Exiting        = " << 
n.fExiting         << 
G4endl 
 2172    << 
"  Entering       = " << 
n.fEntering        << 
G4endl 
 2173    << 
"  BlockedPhysicalVolume= " ;
 
 2174    if (
n.fBlockedPhysicalVolume==0)
 
 2177      os << 
n.fBlockedPhysicalVolume->GetName();
 
 2179    << 
"  BlockedReplicaNo     = " <<  
n.fBlockedReplicaNo       << 
G4endl 
 2180    << 
"  LastStepWasZero      = " <<   
n.fLastStepWasZero       << 
G4endl 
 2183  if( ( 1 < 
n.fVerbose) && (
n.fVerbose < 4) )
 
 2186    os << std::setw(30) << 
" ExitNormal "  << 
" " 
 2187    << std::setw( 5) << 
" Valid "       << 
" " 
 2188    << std::setw( 9) << 
" Exiting "     << 
" " 
 2189    << std::setw( 9) << 
" Entering"     << 
" " 
 2190    << std::setw(15) << 
" Blocked:Volume "  << 
" " 
 2191    << std::setw( 9) << 
" ReplicaNo"        << 
" " 
 2192    << std::setw( 8) << 
" LastStepZero  "   << 
" " 
 2194    os << 
"( " << std::setw(7) << 
n.fExitNormal.x()
 
 2195    << 
", " << std::setw(7) << 
n.fExitNormal.y()
 
 2196    << 
", " << std::setw(7) << 
n.fExitNormal.z() << 
" ) " 
 2197    << std::setw( 5)  << 
n.fValidExitNormal  << 
" " 
 2198    << std::setw( 9)  << 
n.fExiting          << 
" " 
 2199    << std::setw( 9)  << 
n.fEntering         << 
" ";
 
 2200    if ( 
n.fBlockedPhysicalVolume==0 )
 
 2201      { os << std::setw(15) << 
"None"; }
 
 2203      { os << std::setw(15)<< 
n.fBlockedPhysicalVolume->GetName(); }
 
 2204    os << std::setw( 9)  << 
n.fBlockedReplicaNo  << 
" " 
 2205    << std::setw( 8)  << 
n.fLastStepWasZero   << 
" " 
 2208  if( 
n.fVerbose > 2 )
 
 2211    os << 
" Current Localpoint = " << 
n.fLastLocatedPointLocal << 
G4endl;
 
 2212    os << 
" PreviousSftOrigin  = " << 
n.fPreviousSftOrigin << 
G4endl;
 
 2213    os << 
" PreviousSafety     = " << 
n.fPreviousSafety << 
G4endl;
 
 2215  if( 
n.fVerbose > 3 || 
n.fVerbose == 0 )
 
 2217    os << 
"Current History: " << 
G4endl << 
n.fHistory;
 
 2220  os.precision(oldcoutPrec);
 
 2224#ifdef ALTERNATIVE_VOXEL_NAV 
 2242  G4bool zeroStep = ( lastStep == 0.0 );
 
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
#define G4DEBUG_NAVIGATION
static const G4double kToleranceNormalCheck
static constexpr double mm
static constexpr double perThousand
CLHEP::Hep3Vector G4ThreeVector
G4ReferenceCountedHandle< G4TouchableHistory > G4TouchableHistoryHandle
G4GLOB_DLL std::ostream G4cerr
G4GLOB_DLL std::ostream G4cout
G4double GetSurfaceTolerance() const
static G4GeometryTolerance * GetInstance()
G4VSolid * GetSolid() const
const G4String & GetName() const
void SetSolid(G4VSolid *pSolid)
G4SmartVoxelHeader * GetVoxelHeader() const
void UpdateMaterial(G4Material *pMaterial)
EVolume GetTopVolumeType() const
void NewLevel(G4VPhysicalVolume *pNewMother, EVolume vType=kNormal, G4int nReplica=-1)
G4int GetReplicaNo(G4int n) const
const G4AffineTransform & GetTopTransform() const
G4int GetTopReplicaNo() const
G4VPhysicalVolume * GetVolume(G4int n) const
G4VPhysicalVolume * GetTopVolume() const
EVolume GetVolumeType(G4int n) const
const G4AffineTransform & GetTransform(G4int n) const
void SetVerboseLevel(G4int level)
virtual void SetupHierarchy()
G4TouchableHistory * CreateTouchableHistory() const
G4ThreeVector fStepEndPoint
G4int GetVerboseLevel() const
virtual void ResetState()
virtual G4double ComputeSafety(const G4ThreeVector &globalpoint, const G4double pProposedMaxLength=DBL_MAX, const G4bool keepState=true)
EVolume VolumeType(const G4VPhysicalVolume *pVol) const
G4bool fLastTriedStepComputation
G4ParameterisedNavigation fparamNav
G4VExternalNavigation * fpExternalNav
virtual void LocateGlobalPointWithinVolume(const G4ThreeVector &position)
G4ReplicaNavigation freplicaNav
G4int fActionThreshold_NoZeroSteps
G4VoxelSafety * fpVoxelSafety
G4ThreeVector fLastStepEndPointLocal
G4bool fWasLimitedByGeometry
G4VoxelNavigation & GetVoxelNavigator()
void ComputeStepLog(const G4ThreeVector &pGlobalpoint, G4double moveLenSq) const
G4bool CheckOverlapsIterative(G4VPhysicalVolume *vol)
EVolume CharacteriseDaughters(const G4LogicalVolume *pLog) const
virtual G4ThreeVector GetGlobalExitNormal(const G4ThreeVector &point, G4bool *valid)
G4ThreeVector ComputeLocalPoint(const G4ThreeVector &rGlobPoint) const
G4ThreeVector fExitNormalGlobalFrame
void SetVoxelNavigation(G4VoxelNavigation *voxelNav)
virtual G4TouchableHistoryHandle CreateTouchableHistoryHandle() const
G4RegularNavigation fregularNav
G4ThreeVector ComputeLocalAxis(const G4ThreeVector &pVec) const
virtual G4ThreeVector GetLocalExitNormalAndCheck(const G4ThreeVector &point, G4bool *valid)
G4int fAbandonThreshold_NoZeroSteps
virtual G4ThreeVector GetLocalExitNormal(G4bool *valid)
void InformLastStep(G4double lastStep, G4bool entersDaughtVol, G4bool exitsMotherVol)
virtual G4double ComputeStep(const G4ThreeVector &pGlobalPoint, const G4ThreeVector &pDirection, const G4double pCurrentProposedStepLength, G4double &pNewSafety)
G4ThreeVector fLastLocatedPointLocal
virtual G4VPhysicalVolume * LocateGlobalPointAndSetup(const G4ThreeVector &point, const G4ThreeVector *direction=nullptr, const G4bool pRelativeSearch=true, const G4bool ignoreDirection=true)
G4VPhysicalVolume * fLastMotherPhys
G4NormalNavigation fnormalNav
G4AffineTransform GetMotherToDaughterTransform(G4VPhysicalVolume *dVolume, G4int dReplicaNo, EVolume dVolumeType)
void ResetStackAndState()
G4bool fLocatedOutsideWorld
G4bool EnteredDaughterVolume() const
G4double CheckNextStep(const G4ThreeVector &pGlobalPoint, const G4ThreeVector &pDirection, const G4double pCurrentProposedStepLength, G4double &pNewSafety)
virtual G4VPhysicalVolume * ResetHierarchyAndLocate(const G4ThreeVector &point, const G4ThreeVector &direction, const G4TouchableHistory &h)
G4VPhysicalVolume * fBlockedPhysicalVolume
G4int GetDaughtersRegularStructureId(const G4LogicalVolume *pLv) const
G4bool fCalculatedExitNormal
G4ThreeVector fExitNormal
G4ThreeVector fGrandMotherExitNormal
G4NavigationHistory fHistory
struct G4Navigator::G4SaveNavigatorState fSaveState
const G4AffineTransform & GetGlobalToLocalTransform() const
G4ThreeVector fPreviousSftOrigin
G4VoxelNavigation * fpvoxelNav
G4bool fChangedGrandMotherRefFrame
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 void RelocateWithinVolume(G4VPhysicalVolume *motherPhysical, const G4ThreeVector &localPoint)
virtual 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)=0
virtual G4double ComputeSafety(const G4ThreeVector &globalpoint, const G4NavigationHistory &history, const G4double pMaxLength=DBL_MAX)=0
virtual EInside Inside(const G4VSolid *solid, const G4ThreeVector &position, const G4ThreeVector &direction)
virtual G4bool LevelLocate(G4NavigationHistory &history, const G4VPhysicalVolume *blockedVol, const G4int blockedNum, const G4ThreeVector &globalPoint, const G4ThreeVector *globalDirection, const G4bool pLocatedOnEdge, G4ThreeVector &localPoint)=0
virtual G4VSolid * ComputeSolid(const G4int, G4VPhysicalVolume *)
virtual void ComputeTransformation(const G4int, G4VPhysicalVolume *) const =0
virtual G4bool IsNested() const
const G4RotationMatrix * GetRotation() const
virtual void SetCopyNo(G4int CopyNo)=0
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 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 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)
std::ostream & operator<<(std::ostream &, const BasicVector3D< float > &)
static const G4double kInfinity
static constexpr double perThousand
static double normal(HepRandomEngine *eptr)
static constexpr double centimeter
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
G4ThreeVector sLastLocatedPointLocal
G4ThreeVector sPreviousSftOrigin
G4ThreeVector sExitNormal
G4bool sLocatedOutsideWorld
G4VPhysicalVolume * spBlockedPhysicalVolume
G4bool sWasLimitedByGeometry