58 #define fHistory fpNavigatorState->fHistory 
   59 #define fLastTriedStepComputation fpNavigatorState->fLastTriedStepComputation 
   60 #define fEnteredDaughter fpNavigatorState->fEnteredDaughter 
   61 #define fExitedMother fpNavigatorState->fExitedMother 
   62 #define fWasLimitedByGeometry fpNavigatorState->fWasLimitedByGeometry 
   63 #define fStepEndPoint fpNavigatorState->fStepEndPoint 
   64 #define fLastStepEndPointLocal fpNavigatorState->fLastStepEndPointLocal 
   65 #define fPushed fpNavigatorState->fPushed 
   66 #define fLastTriedStepComputation fpNavigatorState->fLastTriedStepComputation 
   67 #define fEntering fpNavigatorState->fEntering 
   68 #define fExiting fpNavigatorState->fExiting 
   69 #define fBlockedPhysicalVolume fpNavigatorState->fBlockedPhysicalVolume 
   70 #define fBlockedReplicaNo fpNavigatorState->fBlockedReplicaNo 
   71 #define fLastLocatedPointLocal fpNavigatorState->fLastLocatedPointLocal 
   72 #define fLocatedOutsideWorld fpNavigatorState->fLocatedOutsideWorld 
   73 #define fValidExitNormal fpNavigatorState->fValidExitNormal 
   74 #define fExitNormal fpNavigatorState->fExitNormal 
   75 #define fGrandMotherExitNormal fpNavigatorState->fGrandMotherExitNormal 
   76 #define fChangedGrandMotherRefFrame fpNavigatorState->fChangedGrandMotherRefFrame 
   77 #define fExitNormalGlobalFrame fpNavigatorState->fExitNormalGlobalFrame 
   78 #define fCalculatedExitNormal fpNavigatorState->fCalculatedExitNormal 
   79 #define fLastStepWasZero fpNavigatorState->fLastStepWasZero 
   80 #define fLocatedOnEdge fpNavigatorState->fLocatedOnEdge 
   81 #define fNumberZeroSteps fpNavigatorState->fNumberZeroSteps 
   82 #define fPreviousSftOrigin fpNavigatorState->fPreviousSftOrigin 
   83 #define fPreviousSafety fpNavigatorState->fPreviousSafety 
  102     fTopPhysical(0), fCheck(false), 
 
  161                                         const G4bool relativeSearch,
 
  162                                         const G4bool ignoreDirection )
 
  165   G4bool notKnownContained=
true, noResult;
 
  177   if( considerDirection && pGlobalDirection != 0 )
 
  179     globalDirection=*pGlobalDirection;
 
  186     static int nCalls = 0;
 
  188     G4cout << 
"*** G4ITNavigator2::LocateGlobalPointAndSetup: ***" << 
G4endl;
 
  189     G4cout << 
"    Called with arguments: " << G4endl
 
  190            << 
"    Globalpoint = " << globalPoint << G4endl
 
  191            << 
"    RelativeSearch = " << relativeSearch  << 
G4endl;
 
  197     G4cout.precision(oldcoutPrec);
 
  203   G4int noLevelsExited=0 ;
 
  204   G4int noLevelsEntered= 0;
 
  206   if ( !relativeSearch )
 
  305           localPoint = 
fHistory.GetTopTransform().TransformPoint(globalPoint);
 
  306           notKnownContained = 
false;
 
  328   while (notKnownContained)
 
  332       targetSolid = 
fHistory.GetTopVolume()->GetLogicalVolume()->GetSolid();
 
  333       localPoint = 
fHistory.GetTopTransform().TransformPoint(globalPoint);
 
  334       insideCode = targetSolid->
Inside(localPoint);
 
  338          G4String solidResponse = 
"-kInside-";
 
  340            solidResponse = 
"-kOutside-";
 
  342            solidResponse = 
"-kSurface-";
 
  343          G4cout << 
"*** G4ITNavigator2::LocateGlobalPointAndSetup(): ***" << 
G4endl 
  344                 << 
"    Invoked Inside() for solid: " << targetSolid->
GetName()
 
  345                 << 
". Solid replied: " << solidResponse << 
G4endl 
  346                 << 
"    For local point p: " << localPoint << 
G4endl;
 
  371         if( noLevelsExited > 1 )
 
  395         if( (!
fExiting)&&considerDirection )
 
  400           G4bool directionExiting = 
false;
 
  402               fHistory.GetTopTransform().TransformAxis(globalDirection);
 
  407           localPoint= 
fHistory.GetTopTransform().TransformPoint(globalPoint);
 
  411             directionExiting = normal.dot(localDirection) > 0.0;
 
  412             isExiting = isExiting || directionExiting;
 
  428             if( noLevelsExited > 1 )
 
  451           notKnownContained=
false;
 
  456         notKnownContained=
false;
 
  476     targetPhysical = 
fHistory.GetTopVolume();
 
  477     if (!targetPhysical) { 
break; }
 
  570 #ifdef G4DEBUG_NAVIGATION 
  574          G4cout << 
"*** G4ITNavigator2::LocateGlobalPointAndSetup() ***" << 
G4endl;
 
  589     if (targetPhysical)  { curPhysVol_Name = targetPhysical->
GetName(); }
 
  590     G4cout << 
"    Return value = new volume = " << curPhysVol_Name << 
G4endl;
 
  595       G4cout << 
"Upon exiting LocateGlobalPointAndSetup():" << 
G4endl;
 
  598     G4cout.precision(oldcoutPrec);
 
  604   return targetPhysical;
 
  625 #ifdef G4DEBUG_NAVIGATION 
  635 #ifdef G4DEBUG_NAVIGATION 
  638      G4cout << 
"Entering LocateGlobalWithinVolume(): History = " << 
G4endl;
 
  672          G4Exception(
"G4ITNavigator2::LocateGlobalPointWithinVolume()",
 
  674                      "Not applicable for replicated volumes.");
 
  699         exceptionDescription << 
"The navigator state is NULL. ";
 
  700         exceptionDescription << 
"Either NewNavigatorStateAndLocate was not called ";
 
  701         exceptionDescription << 
"or the provided navigator state was already NULL.";
 
  703         G4Exception(
"G4ITNavigator::CheckNavigatorStateIsValid",
 
  733         exceptionDescription << 
"No World Volume";
 
  750         exceptionDescription << 
"No World Volume";
 
  770         exceptionDescription << 
"No World Volume";
 
  772         G4Exception(
"G4ITNavigator::NewNavigatorStateAndLocate",
 
  912                                    const G4double pCurrentProposedStepLength,
 
  939     G4cout << 
"*** G4ITNavigator2::ComputeStep: ***" << 
G4endl;
 
  941            << 
" - Proposed step length = " << pCurrentProposedStepLength
 
  943 #ifdef G4DEBUG_NAVIGATION 
  946       G4cout << 
"  Called with the arguments: " << G4endl
 
  947              << 
"  Globalpoint = " << std::setw(25) << pGlobalpoint << G4endl
 
  948              << 
"  Direction   = " << std::setw(25) << pDirection << 
G4endl;
 
  965     G4double moveLenSq = (newLocalPoint-oldLocalPoint).mag2();
 
  987                                        pCurrentProposedStepLength,
 
 1004                                           pCurrentProposedStepLength,
 
 1028             if(
fHistory.GetTopVolume()->GetRegularStructureId() == 0 )
 
 1032                 "Point is relocated in voxels, while it should be outside!");
 
 1035                                             pCurrentProposedStepLength,
 
 1050                                                      pCurrentProposedStepLength,
 
 1069                                        pCurrentProposedStepLength,
 
 1083                                          pCurrentProposedStepLength,
 
 1095         G4Exception(
"G4ITNavigator2::ComputeStep()", 
"GeomNav0001",
 
 1106     G4bool calculatedExitNormal;
 
 1111                                    pCurrentProposedStepLength,
 
 1115                                    calculatedExitNormal,
 
 1152 #ifdef G4DEBUG_NAVIGATION 
 1155        G4cout << 
"G4ITNavigator2::ComputeStep(): another zero step, # " 
 1157               << 
" at " << pGlobalpoint
 
 1158               << 
" in volume " << motherPhysical->
GetName()
 
 1159               << 
" nav-comp-step calls # " << sNavCScalls
 
 1171          std::ostringstream message;
 
 1172          message << 
"Track stuck or not moving." << 
G4endl 
 1173                  << 
"          Track stuck, not moving for "  
 1175                  << 
"          in volume -" << motherPhysical->
GetName()
 
 1176                  << 
"- at point " << pGlobalpoint << 
G4endl 
 1177                  << 
"          direction: " << pDirection << 
"." << 
G4endl 
 1178                  << 
"          Potential geometry or navigation problem !" 
 1180                  << 
"          Trying pushing it of " << Step << 
" mm ...";
 
 1181          G4Exception(
"G4ITNavigator2::ComputeStep()", 
"GeomNav1002",
 
 1182                      JustWarning, message, 
"Potential overlap in geometry!");
 
 1191       std::ostringstream message;
 
 1192       message << 
"Stuck Track: potential geometry or navigation problem." 
 1194               << 
"        Track stuck, not moving for "  
 1196               << 
"        in volume -" << motherPhysical->
GetName()
 
 1197               << 
"- at point " << pGlobalpoint << 
G4endl 
 1198               << 
"        direction: " << pDirection << 
".";
 
 1200       G4Exception(
"G4ITNavigator2::ComputeStep()", 
"GeomNav0003",
 
 1213                 + 
std::min(Step,pCurrentProposedStepLength) * pDirection;
 
 1218 #ifdef G4DEBUG_NAVIGATION 
 1221       G4cout << 
" At G4Nav CompStep End - if(exiting) - fExiting= " << 
fExiting  
 1282 #ifdef G4DEBUG_NAVIGATION 
 1285         desc << 
"Problem in ComputeStep:  Replica Navigation did not provide" 
 1286              << 
" valid exit Normal. " << 
G4endl;
 
 1287         desc << 
" Do not know how calculate it in this case." << 
G4endl;
 
 1288         desc << 
"  Location    = " << finalLocalPoint << 
G4endl;
 
 1289         desc << 
"  Volume name = " << motherPhysical->
GetName()
 
 1291         G4Exception(
"G4ITNavigator2::ComputeStep()", 
"GeomNav0003",
 
 1292                     JustWarning, desc, 
"Normal not available for exiting.");
 
 1305           fHistory.GetTransform(depth-1).Inverse();
 
 1336     G4cout << 
"  Returned step= " << Step;
 
 1340        G4cout << 
" Requested step= " << pCurrentProposedStepLength ;
 
 1358                                         const G4double pCurrentProposedStepLength,
 
 1372                        pCurrentProposedStepLength, 
 
 1441   for ( i=1; i<=cdepth; i++ )
 
 1444     switch ( 
fHistory.GetVolumeType(i) )
 
 1454         replicaNo = 
fHistory.GetReplicaNo(i);
 
 1479           ComputeMaterial(replicaNo, current, pTouchable) );
 
 1508       if( candidateLogical ) 
 
 1530           currentSolid= candidateLogical->
GetSolid(); 
 
 1531           inSideIt  =  currentSolid->
Inside(daughterPointOwnLocal); 
 
 1532           onSurface =  (inSideIt == 
kSurface); 
 
 1537               safety = (currentSolid->
DistanceToIn(daughterPointOwnLocal)); 
 
 1540             else if (inSideIt == 
kInside )
 
 1542               safety = (currentSolid->
DistanceToOut(daughterPointOwnLocal)); 
 
 1549             nextSolidExitNormal =
 
 1554             ExitNormal = -nextSolidExitNormal;
 
 1562               std::ostringstream message;
 
 1563               message << 
"Point not on surface ! " << 
G4endl 
 1565                       << daughterPointOwnLocal << 
G4endl  
 1566                       << 
"  Physical volume = " 
 1568                       << 
"  Logical volume  = " 
 1570                       << 
"  Solid           = " << currentSolid->
GetName() 
 
 1573                       << *currentSolid << 
G4endl;
 
 1576                 message << 
"Point is Outside. " << G4endl
 
 1577                         << 
"  Safety (from outside) = " << safety << 
G4endl;
 
 1581                 message << 
"Point is Inside. " << G4endl
 
 1582                         << 
"  Safety (from inside) = " << safety << 
G4endl;
 
 1584               G4Exception(
"G4ITNavigator2::GetLocalExitNormal()", 
"GeomNav1001",
 
 1602       G4Exception(
"G4ITNavigator2::GetLocalExitNormal()",
 
 1604                   "Incorrect call to GetLocalSurfaceNormal." );
 
 1617         desc << 
" Parameters of solid: " << *daughterSolid
 
 1619         G4Exception(
"G4ITNavigator2::GetLocalExitNormal()",
 
 1621                     "Surface Normal returned by Solid is not a Unit Vector." );
 
 1639         message << 
"Function called when *NOT* at a Boundary." << 
G4endl;
 
 1640         G4Exception(
"G4ITNavigator2::GetLocalExitNormal()",
 
 1656                                            G4int   enteringReplicaNo,
 
 1660   switch (enteringVolumeType)
 
 1665       G4Exception(
"G4ITNavigator2::GetMotherToDaughterTransform()",
 
 1667                   "Method NOT Implemented yet for replica volumes.");
 
 1675           pParam->
ComputeSolid(enteringReplicaNo, pEnteringPhysVol);
 
 1711 #ifdef G4DEBUG_NAVIGATION 
 1716     G4ThreeVector ExpectedBoundaryPointLocal;
 
 1719     ExpectedBoundaryPointLocal =
 
 1739                                        G4bool*        pNormalCalculated)
 
 1762     G4double  normMag2 = globalNormal.mag2(); 
 
 1763     if( std::fabs ( normMag2 - 1.0 ) < 
perMillion )  
 
 1765        *pNormalCalculated = 
true; 
 
 1772        message << 
" ERROR> Expected normal-global-frame to valid (unit vector) " 
 1773                << 
"  - but |normal| = "  << std::sqrt(normMag2)
 
 1774                << 
"  - and |normal|^ = "  << normMag2
 
 1775                << 
" which differs from 1.0 by " << normMag2 - 1.0 << 
G4endl 
 1777        message << 
"============================================================" 
 1781        message << 
"   State of Navigator: " << 
G4endl;
 
 1782        message << *
this << 
G4endl;
 
 1784        message << 
"============================================================" 
 1787        G4Exception(
"G4ITNavigator2::GetGlobalExitNormal()",
 
 1789               "Value obtained from stored global-normal is not a unit vector.");
 
 1806 #ifdef G4DEBUG_NAVIGATION 
 1816       edN << 
"   State of Navigator: " << 
G4endl;
 
 1820       G4Exception(
"G4ITNavigator2::GetGlobalExitNormal()",
 
 1822                   "LocalExitNormalAndCheck() did not calculate Normal.");
 
 1826      G4double localMag2= localNormal.mag2();
 
 1831        edN << 
"G4ITNavigator2::GetGlobalExitNormal: " 
 1832            << 
"  Using Local Normal - from call to GetLocalExitNormalAndCheck. " 
 1834            << 
"  Local  Exit Normal : " << 
" || = " << std::sqrt(localMag2) 
 
 1835            << 
" vec = " << localNormal << 
G4endl 
 1836            << 
"  Global Exit Normal : " << 
" || = " << globalNormal.mag() 
 
 1837            << 
" vec = " << globalNormal << 
G4endl;
 
 1840        G4Exception(
"G4ITNavigator2::GetGlobalExitNormal()",
 
 1842                    "Value obtained from new local *solid* is incorrect.");
 
 1843        localNormal = localNormal.unit(); 
 
 1849 #ifdef G4DEBUG_NAVIGATION 
 1864       edDfn << 
"Found difference in normals in case of exiting mother " 
 1865             << 
"- when Get is called after ComputingStep " << 
G4endl;
 
 1866       edDfn << 
"  Magnitude of diff =      " << diffNorm.mag() << 
G4endl;
 
 1867       edDfn << 
"  Normal stored (Global)     = " << fExitNormalGlobalFrame
 
 1869       edDfn << 
"  Global Computed from Local = " << globalNormAgn << 
G4endl;
 
 1870       G4Exception(
"G4ITNavigator::GetGlobalExitNormal()", 
"GeomNav0003",
 
 1876   return globalNormal;
 
 1880 #define  G4NEW_SAFETY  1 
 1898 #ifdef G4DEBUG_NAVIGATION 
 1902     G4cout << 
"*** G4ITNavigator2::ComputeSafety: ***" << 
G4endl 
 1903            << 
"    Called at point: " << pGlobalpoint << 
G4endl;
 
 1907            << 
" - Maximum length = " << pMaxLength << 
G4endl; 
 
 1910        G4cout << 
"    ----- Upon entering Compute Safety:" << 
G4endl;
 
 1922   if( endpointOnSurface && stayedOnEndpoint )
 
 1924 #ifdef G4DEBUG_NAVIGATION 
 1927         G4cout << 
"    G4Navigator::ComputeSafety() finds that point - " 
 1928         << pGlobalpoint << 
" - is on surface " << 
G4endl;
 
 1958 #ifdef G4DEBUG_NAVIGATION 
 1961       G4cout << 
"  G4ITNavigator2::ComputeSafety() relocates-in-volume to point: " 
 1962              << pGlobalpoint << 
G4endl;
 
 1979                                            *motherPhysical, pMaxLength);
 
 1980             newSafety= safetyTwo;   
 
 1985             newSafety= safetyOldVoxel;
 
 2004           G4Exception(
"G4ITNavigator2::ComputeSafety()", 
"GeomNav0001",
 
 2030 #ifdef G4DEBUG_NAVIGATION 
 2035     G4cout << 
"    Returned value of Safety = " << newSafety << 
G4endl;
 
 2037   G4cout.precision(oldcoutPrec);
 
 2078 #ifdef CHECK_ORDER_OF_METHODS 
 2081      G4Exception(
"G4Navigator::RecheckDistanceToCurrentBoundary()",
 
 2083      "Method must be called after ComputeStep(), before call to LocateMethod.");
 
 2113      G4ThreeVector dgDirection= nextLevelTrf.TransformAxis(localDirection);
 
 2114      locatedDaug = candSolid->
Inside(dgPosition);
 
 2123                                    true, &validExitNormal, &exitNormal);
 
 2124         daughterStep= - distanceBackOut;
 
 2151            daughterSafety= 0.0; 
 
 2160         *prDistance= daughterStep;
 
 2161         if( prNewSafety )  { *prNewSafety= daughterSafety; }
 
 2181         if( ProposedMove >= motherSafety )
 
 2185                              true, &validExitNormal, &exitNormal);
 
 2189            motherStep= ProposedMove;
 
 2194         motherSafety= motherSolid->
DistanceToIn(localPosition);
 
 2195         if( ProposedMove >= motherSafety )
 
 2205         if( prNewSafety )  { *prNewSafety= motherSafety; }
 
 2214   *prDistance=  
std::min( motherStep, daughterStep ); 
 
 2217      *prNewSafety= 
std::min( motherSafety, daughterSafety );
 
 2243     G4cout << 
"The current state of G4Navigator is: " << 
G4endl;
 
 2248            << 
"  BlockedPhysicalVolume= " ;
 
 2261     G4cout << std::setw(30) << 
" ExitNormal "  << 
" " 
 2262            << std::setw( 5) << 
" Valid "       << 
" "      
 2263            << std::setw( 9) << 
" Exiting "     << 
" "       
 2264            << std::setw( 9) << 
" Entering"     << 
" "  
 2265            << std::setw(15) << 
" Blocked:Volume "  << 
" "    
 2266            << std::setw( 9) << 
" ReplicaNo"        << 
" "   
 2267            << std::setw( 8) << 
" LastStepZero  "   << 
" "    
 2271            << 
", " << std::setw(7) << 
fExitNormal.z() << 
" ) " 
 2273            << std::setw( 9)  << 
fExiting          << 
" " 
 2276       G4cout << std::setw(15) << 
"None";
 
 2290   G4cout.precision(oldcoutPrec);
 
 2320     G4double shiftOrigin = std::sqrt(shiftOriginSafSq);
 
 2323     if( diffShiftSaf > fAccuracyForWarning )
 
 2327       std::ostringstream message, suggestion;
 
 2328       message << 
"Accuracy error or slightly inaccurate position shift." 
 2330               << 
"     The Step's starting point has moved "  
 2331               << std::sqrt(moveLenSq)/
mm << 
" mm " << 
G4endl 
 2332               << 
"     since the last call to a Locate method." << 
G4endl 
 2333               << 
"     This has resulted in moving "  
 2334               << shiftOrigin/
mm << 
" mm "  
 2335               << 
" from the last point at which the safety "  
 2336               << 
"     was calculated " << 
G4endl 
 2337               << 
"     which is more than the computed safety= "  
 2338               << fPreviousSafety/
mm << 
" mm  at that point." << 
G4endl 
 2339               << 
"     This difference is "  
 2340               << diffShiftSaf/
mm << 
" mm." << 
G4endl 
 2341               << 
"     The tolerated accuracy is " 
 2342               << fAccuracyForException/
mm << 
" mm.";
 
 2346       if( ((++warnNow % 100) == 1) )
 
 2349                << 
"  This problem can be due to either " << 
G4endl 
 2350                << 
"    - a process that has proposed a displacement" 
 2351                << 
" larger than the current safety , or" << 
G4endl 
 2352                << 
"    - inaccuracy in the computation of the safety";
 
 2353         suggestion << 
"We suggest that you " << G4endl
 
 2354                    << 
"   - find i) what particle is being tracked, and " 
 2355                    << 
" ii) through what part of your geometry " << G4endl
 
 2356                    << 
"      for example by re-running this event with " 
 2358                    << 
"         /tracking/verbose 1 "  << G4endl
 
 2359                    << 
"    - check which processes you declare for" 
 2360                    << 
" this particle (and look at non-standard ones)" 
 2362                    << 
"   - in case, create a detailed logfile" 
 2363                    << 
" of this event using:" << G4endl
 
 2364                    << 
"         /tracking/verbose 6 ";
 
 2368                   message, 
G4String(suggestion.str()));
 
 2369       G4cout.precision(oldcoutPrec);
 
 2370       G4cerr.precision(oldcerrPrec);
 
 2372 #ifdef G4DEBUG_NAVIGATION 
 2375       G4cerr << 
"WARNING - G4ITNavigator2::ComputeStep()" << 
G4endl 
 2376              << 
"          The Step's starting point has moved " 
 2377              << std::sqrt(moveLenSq) << 
"," << 
G4endl 
 2378              << 
"          which has taken it to the limit of" 
 2379              << 
" the current safety. " << 
G4endl;
 
 2384   if ( shiftOriginSafSq > 
sqr(safetyPlus) )
 
 2386     std::ostringstream message;
 
 2387     message << 
"May lead to a crash or unreliable results." << 
G4endl 
 2388             << 
"        Position has shifted considerably without" 
 2389             << 
" notifying the navigator !" << 
G4endl 
 2390             << 
"        Tolerated safety: " << safetyPlus << 
G4endl 
 2391             << 
"        Computed shift  : " << shiftOriginSafSq;
 
 2392     G4Exception(
"G4ITNavigator2::ComputeStep()", 
"GeomNav1002",
 
 2409   G4int oldcoutPrec = os.precision(4);
 
 2412     os << 
"The current state of G4ITNavigator2 is: " << 
G4endl;
 
 2413     os << 
"  ValidExitNormal= " << n.fValidExitNormal << G4endl
 
 2414     << 
"  ExitNormal     = " << n.fExitNormal      << G4endl
 
 2415     << 
"  Exiting        = " << n.fExiting         << G4endl
 
 2416     << 
"  Entering       = " << n.fEntering        << G4endl
 
 2417     << 
"  BlockedPhysicalVolume= " ;
 
 2418     if (n.fBlockedPhysicalVolume==0)
 
 2421       os << n.fBlockedPhysicalVolume->GetName();
 
 2423     << 
"  BlockedReplicaNo     = " <<  n.fBlockedReplicaNo       << G4endl
 
 2424     << 
"  LastStepWasZero      = " <<   n.fLastStepWasZero       << G4endl
 
 2430     os << std::setw(30) << 
" ExitNormal "  << 
" " 
 2431     << std::setw( 5) << 
" Valid "       << 
" " 
 2432     << std::setw( 9) << 
" Exiting "     << 
" " 
 2433     << std::setw( 9) << 
" Entering"     << 
" " 
 2434     << std::setw(15) << 
" Blocked:Volume "  << 
" " 
 2435     << std::setw( 9) << 
" ReplicaNo"        << 
" " 
 2436     << std::setw( 8) << 
" LastStepZero  "   << 
" " 
 2438     os << 
"( " << std::setw(7) << n.fExitNormal.x()
 
 2439     << 
", " << std::setw(7) << n.fExitNormal.y()
 
 2440     << 
", " << std::setw(7) << n.fExitNormal.z() << 
" ) " 
 2441     << std::setw( 5)  << n.fValidExitNormal  << 
" " 
 2442     << std::setw( 9)  << n.fExiting          << 
" " 
 2443     << std::setw( 9)  << n.fEntering         << 
" ";
 
 2444     if ( n.fBlockedPhysicalVolume==0 )
 
 2445       { os << std::setw(15) << 
"None"; }
 
 2447       { os << std::setw(15)<< n.fBlockedPhysicalVolume->GetName(); }
 
 2448     os << std::setw( 9)  << n.fBlockedReplicaNo  << 
" " 
 2449     << std::setw( 8)  << n.fLastStepWasZero   << 
" " 
 2455     os << 
" Current Localpoint = " << n.fLastLocatedPointLocal << 
G4endl;
 
 2456     os << 
" PreviousSftOrigin  = " << n.fPreviousSftOrigin << 
G4endl;
 
 2457     os << 
" PreviousSafety     = " << n.fPreviousSafety << 
G4endl;
 
 2461     os << 
"Current History: " << 
G4endl << n.fHistory;
 
 2464   os.precision(oldcoutPrec);
 
 2478   return solid->Inside(localPoint);
 
 2491   std::vector<std::vector<double> > fExtend;
 
 2509     for(
size_t i = 0 ; i < 3 ; ++i)
 
#define fBlockedPhysicalVolume
 
G4SmartVoxelHeader * GetVoxelHeader() const 
 
virtual G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const =0
 
G4ITNavigatorState_Lock2 * GetNavigatorState()
 
virtual G4bool LevelLocate(G4NavigationHistory &history, const G4VPhysicalVolume *blockedVol, const G4int blockedNum, const G4ThreeVector &globalPoint, const G4ThreeVector *globalDirection, const G4bool pLocatedOnEdge, G4ThreeVector &localPoint)
 
#define fLastStepEndPointLocal
 
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 
 
virtual G4double ComputeStep(const G4ThreeVector &pGlobalPoint, const G4ThreeVector &pDirection, const G4double pCurrentProposedStepLength, G4double &pNewSafety)
 
virtual void SetupHierarchy()
 
std::ostringstream G4ExceptionDescription
 
void UpdateMaterial(G4Material *pMaterial)
 
CLHEP::Hep3Vector G4ThreeVector
 
CLHEP::HepRotation G4RotationMatrix
 
virtual void ComputeDimensions(G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
 
virtual G4VSolid * ComputeSolid(const G4int, G4VPhysicalVolume *)
 
void CheckNavigatorState() const 
 
G4VoxelSafety * fpVoxelSafety
 
G4double GetSurfaceTolerance() const 
 
void ResetNavigatorState()
 
void ResetStackAndState()
 
std::ostream & operator<<(std::ostream &os, const G4ITNavigator2 &n)
 
G4double ComputeSafety(const G4ThreeVector &localPoint, const G4VPhysicalVolume ¤tPhysical, G4double maxLength=DBL_MAX)
 
G4TouchableHistory * CreateTouchableHistory() const 
 
G4VPhysicalVolume * fTopPhysical
 
G4double CheckNextStep(const G4ThreeVector &pGlobalPoint, const G4ThreeVector &pDirection, const G4double pCurrentProposedStepLength, G4double &pNewSafety)
 
#define fLastTriedStepComputation
 
void SetSolid(G4VSolid *pSolid)
 
G4NavigatorState * fpNavigatorState
 
G4SmartVoxelNode * ParamVoxelLocate(G4SmartVoxelHeader *pHead, const G4ThreeVector &localPoint)
 
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)
 
virtual G4GeometryType GetEntityType() const =0
 
#define fWasLimitedByGeometry
 
G4VPhysicalVolume * NewNavigatorStateAndLocate(const G4ThreeVector &p, const G4ThreeVector &direction)
 
#define fExitNormalGlobalFrame
 
virtual ~G4ITNavigator2()
 
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 
 
G4int fAbandonThreshold_NoZeroSteps
 
G4double ComputeSafety(const G4ThreeVector &globalpoint, const G4NavigationHistory &history, const G4double pMaxLength=DBL_MAX)
 
static double normal(HepRandomEngine *eptr)
 
G4ThreeVector ComputeLocalAxis(const G4ThreeVector &pVec) const 
 
void SetNormalNavigation(G4NormalNavigation *fnormnav)
 
void GetRandomInCurrentVolume(G4ThreeVector &rndmPoint) const 
 
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
 
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)
 
virtual void LocateGlobalPointWithinVolume(const G4ThreeVector &position)
 
virtual G4int GetRegularStructureId() const =0
 
virtual G4VPhysicalVolume * LocateGlobalPointAndSetup(const G4ThreeVector &point, const G4ThreeVector *direction=0, const G4bool pRelativeSearch=true, const G4bool ignoreDirection=true)
 
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
 
#define fChangedGrandMotherRefFrame
 
G4RegularNavigation fregularNav
 
G4NormalNavigation fnormalNav
 
G4bool LevelLocate(G4NavigationHistory &history, const G4VPhysicalVolume *blockedVol, const G4int blockedNum, const G4ThreeVector &globalPoint, const G4ThreeVector *globalDirection, const G4bool pLocatedOnEdge, G4ThreeVector &localPoint)
 
EVolume CharacteriseDaughters() const 
 
virtual G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const =0
 
#define fCalculatedExitNormal
 
EVolume VolumeType(const G4VPhysicalVolume *pVol) const 
 
G4ReplicaNavigation freplicaNav
 
#define G4DEBUG_NAVIGATION
 
virtual G4ThreeVector GetGlobalExitNormal(const G4ThreeVector &point, G4bool *valid)
 
#define CheckNavigatorStateIsValid()
 
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
 
G4ParameterisedNavigation fparamNav
 
virtual G4bool RecheckDistanceToCurrentBoundary(const G4ThreeVector &pGlobalPoint, const G4ThreeVector &pDirection, const G4double CurrentProposedStepLength, G4double *prDistance, G4double *prNewSafety=0) const 
 
#define fGrandMotherExitNormal
 
static const double perMillion
 
#define fBlockedReplicaNo
 
EInside InsideCurrentVolume(const G4ThreeVector &globalPoint) const 
 
G4int fActionThreshold_NoZeroSteps
 
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)
 
G4LogicalVolume * GetLogicalVolume() const 
 
G4ThreeVector ComputeLocalPoint(const G4ThreeVector &rGlobPoint) const 
 
G4VoxelNavigation fvoxelNav
 
#define fPreviousSftOrigin
 
T max(const T t1, const T t2)
brief Return the largest of the two arguments 
 
virtual G4ThreeVector GetLocalExitNormal(G4bool *valid)
 
virtual void ComputeTransformation(const G4int, G4VPhysicalVolume *) const =0
 
void SetNavigatorState(G4ITNavigatorState_Lock2 *)
 
virtual G4int GetCopyNo() const =0
 
void ComputeStepLog(const G4ThreeVector &pGlobalpoint, G4double moveLenSq) const 
 
const G4AffineTransform & GetGlobalToLocalTransform() const 
 
G4int GetDaughtersRegularStructureId(const G4LogicalVolume *pLog) const 
 
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)
 
virtual G4double ComputeSafety(const G4ThreeVector &globalpoint, const G4double pProposedMaxLength=DBL_MAX, const G4bool keepState=true)
 
G4int GetVerboseLevel() const 
 
G4bool EnteredDaughterVolume() const 
 
G4double ComputeSafety(const G4ThreeVector &localPoint, const G4NavigationHistory &history, const G4double pProposedMaxLength=DBL_MAX)
 
#define fLocatedOutsideWorld
 
virtual G4ThreeVector GetLocalExitNormalAndCheck(const G4ThreeVector &point, G4bool *valid)
 
const G4NavigationHistory * GetHistory() const 
 
virtual void ResetState()
 
G4int MoveUpHistory(G4int num_levels=1)
 
const G4String & GetName() const 
 
virtual G4VPhysicalVolume * ResetHierarchyAndLocate(const G4ThreeVector &point, const G4ThreeVector &direction, const G4TouchableHistory &h)
 
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)
 
#define fLastLocatedPointLocal
 
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 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)
 
void SetVerboseLevel(G4int level)
 
EInside BackLocate(G4NavigationHistory &history, const G4ThreeVector &globalPoint, G4ThreeVector &localPoint, const G4bool &exiting, G4bool ¬KnownInside) const 
 
const G4AffineTransform GetLocalToGlobalTransform() const 
 
virtual G4bool CheckOverlaps(G4int res=1000, G4double tol=0., G4bool verbose=true, G4int errMax=1)
 
static G4GeometryTolerance * GetInstance()
 
G4VSolid * GetSolid() const 
 
virtual G4TouchableHistoryHandle CreateTouchableHistoryHandle() const 
 
G4GLOB_DLL std::ostream G4cerr
 
EVolume CharacteriseDaughters(const G4LogicalVolume *pLog) const 
 
G4AffineTransform GetMotherToDaughterTransform(G4VPhysicalVolume *dVolume, G4int dReplicaNo, EVolume dVolumeType)