Ignore:
Timestamp:
Dec 22, 2010, 3:52:27 PM (13 years ago)
Author:
garnier
Message:

geant4 tag 9.4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/geometry/navigation/src/G4MultiNavigator.cc

    r921 r1347  
    2525//
    2626//
    27 // $Id: G4MultiNavigator.cc,v 1.8 2008/10/24 14:00:03 gcosmo Exp $
     27// $Id: G4MultiNavigator.cc,v 1.11 2010/09/06 09:49:15 gcosmo Exp $
    2828// GEANT4 tag $ Name:  $
    2929//
     
    4848//
    4949G4MultiNavigator::G4MultiNavigator()
    50   : G4Navigator()
     50  : G4Navigator(), fLastMassWorld(0)
    5151{
    5252  fNoActiveNavigators= 0;
    53   G4ThreeVector Big3Vector( DBL_MAX, DBL_MAX, DBL_MAX );
     53  G4ThreeVector Big3Vector( kInfinity, kInfinity, kInfinity );
    5454  fLastLocatedPosition = Big3Vector;
    5555  fSafetyLocation  = Big3Vector;
     
    5858  fMinSafety_PreStepPt=  -1.0;
    5959  fMinSafety_atSafLocation= -1.0;
    60   fMinSafety= -DBL_MAX
    61   fMinStep=   -DBL_MAX
    62 
    63   for(register int num=0; num<= fMaxNav; ++num )
     60  fMinSafety= -kInfinity
     61  fTrueMinStep= fMinStep= -kInfinity
     62
     63  for(register int num=0; num< fMaxNav; ++num )
    6464  {
    6565    fpNavigator[num] =  0;   
    6666    fLimitTruth[num] = false;
    6767    fLimitedStep[num] = kUndefLimited;
    68     fCurrentStepSize[num] = -1.0;
     68    fCurrentStepSize[num] = fNewSafety[num] = -1.0;
    6969    fLocatedVolume[num] = 0;
    7070  }
     
    9494{
    9595  G4double safety= 0.0, step=0.0;
    96   G4double minSafety= DBL_MAX, minStep= DBL_MAX;
     96  G4double minSafety= kInfinity, minStep= kInfinity;
    9797
    9898#ifdef G4DEBUG_NAVIGATION
     
    115115  for( register int num=0; num< fNoActiveNavigators; ++pNavigatorIter,++num )
    116116  {
    117      safety= DBL_MAX;
     117     safety= kInfinity;
    118118
    119119     step= (*pNavigatorIter)->ComputeStep( initialPosition,
     
    189189                                   ELimited &limitedStep)
    190190{
    191   G4int navigatorNo=-1;
    192 
    193   if( navigatorId <= fNoActiveNavigators )
    194   {
    195      navigatorNo= navigatorId;
    196   }
    197   else
     191  if( navigatorId > fNoActiveNavigators )
    198192  {
    199193     G4cerr << "ERROR - G4MultiNavigator::ObtainFinalStep()"
     
    206200
    207201  // Prepare the information to return
    208   pNewSafety  = fNewSafety[ navigatorNo ];
    209   limitedStep = fLimitedStep[ navigatorNo ];
     202  //
     203  pNewSafety  = fNewSafety[ navigatorId ];
     204  limitedStep = fLimitedStep[ navigatorId ];
    210205  minStep= fMinStep;
    211206
    212   // if( (minStep==kInfinity) || (fVerbose > 1) ){
    213 #ifdef G4DEBUG_NAVIGATION
    214   if( fVerbose > 1 ){
    215      G4cout << " G4MultiNavigator::ComputeStep returns " << fCurrentStepSize[ navigatorNo ]
    216             << " for Navigator " << navigatorNo << " Limited step = " << limitedStep
     207#ifdef G4DEBUG_NAVIGATION
     208  if( fVerbose > 1 )
     209  {
     210     G4cout << " G4MultiNavigator::ComputeStep returns "
     211            << fCurrentStepSize[ navigatorId ]
     212            << " for Navigator " << navigatorId
     213            << " Limited step = " << limitedStep
    217214            << " Safety(mm) = " << pNewSafety / mm << G4endl;
    218215  }
    219216#endif
    220217
    221   return fCurrentStepSize[ navigatorNo ];
     218  return fCurrentStepSize[ navigatorId ];
    222219}
    223220
     
    428425    // Recompute safety for the relevant point
    429426
    430     G4double minSafety = DBL_MAX, safety = DBL_MAX;
     427    G4double minSafety = kInfinity, safety = kInfinity;
    431428 
    432429    std::vector<G4Navigator*>::iterator pNavigatorIter;
Note: See TracChangeset for help on using the changeset viewer.