Ignore:
Timestamp:
Jan 8, 2010, 11:56:51 AM (14 years ago)
Author:
garnier
Message:

update geant4.9.3 tag

Location:
trunk/source/geometry/navigation/src
Files:
22 edited

Legend:

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

    r921 r1228  
    2525//
    2626// $Id: G4AuxiliaryNavServices.cc,v 1.3 2006/06/29 18:36:32 gunter Exp $
    27 // GEANT4 tag $Name: geant4-09-02-cand-01 $
     27// GEANT4 tag $Name: geant4-09-03 $
    2828//
    2929// --------------------------------------------------------------------
  • trunk/source/geometry/navigation/src/G4BrentLocator.cc

    r1058 r1228  
    2525//
    2626// $Id: G4BrentLocator.cc,v 1.8 2009/05/15 12:55:48 tnikitin Exp $
    27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
     27// GEANT4 tag $Name: geant4-09-03 $
    2828//
    2929// Class G4BrentLocator implementation
  • trunk/source/geometry/navigation/src/G4DrawVoxels.cc

    r1058 r1228  
    2626//
    2727// $Id: G4DrawVoxels.cc,v 1.4 2006/06/29 18:36:34 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
     28// GEANT4 tag $Name: geant4-09-03 $
    2929//
    3030//
  • trunk/source/geometry/navigation/src/G4ErrorPropagationNavigator.cc

    r921 r1228  
    2626//
    2727// $Id: G4ErrorPropagationNavigator.cc,v 1.2 2008/10/24 14:00:03 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-02-cand-01 $
     28// GEANT4 tag $Name: geant4-09-03 $
    2929//
    3030//
  • trunk/source/geometry/navigation/src/G4GeomTestErrorList.cc

    r921 r1228  
    2626//
    2727// $Id: G4GeomTestErrorList.cc,v 1.3 2006/06/29 18:36:36 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-02-cand-01 $
     28// GEANT4 tag $Name: geant4-09-03 $
    2929//
    3030// --------------------------------------------------------------------
  • trunk/source/geometry/navigation/src/G4GeomTestOverlapList.cc

    r921 r1228  
    2626//
    2727// $Id: G4GeomTestOverlapList.cc,v 1.3 2006/06/29 18:36:39 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-02-cand-01 $
     28// GEANT4 tag $Name: geant4-09-03 $
    2929//
    3030// --------------------------------------------------------------------
  • trunk/source/geometry/navigation/src/G4GeomTestOvershootList.cc

    r921 r1228  
    2626//
    2727// $Id: G4GeomTestOvershootList.cc,v 1.3 2006/06/29 18:36:41 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-02-cand-01 $
     28// GEANT4 tag $Name: geant4-09-03 $
    2929//
    3030// --------------------------------------------------------------------
  • trunk/source/geometry/navigation/src/G4GeomTestPoint.cc

    r921 r1228  
    2626//
    2727// $Id: G4GeomTestPoint.cc,v 1.3 2006/06/29 18:36:44 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-02-cand-01 $
     28// GEANT4 tag $Name: geant4-09-03 $
    2929//
    3030// --------------------------------------------------------------------
  • trunk/source/geometry/navigation/src/G4GeomTestSegment.cc

    r921 r1228  
    2626//
    2727// $Id: G4GeomTestSegment.cc,v 1.11 2007/11/16 09:39:14 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-02-cand-01 $
     28// GEANT4 tag $Name: geant4-09-03 $
    2929//
    3030// --------------------------------------------------------------------
  • trunk/source/geometry/navigation/src/G4GeomTestStreamLogger.cc

    r921 r1228  
    2626//
    2727// $Id: G4GeomTestStreamLogger.cc,v 1.3 2006/06/29 18:36:49 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-02-cand-01 $
     28// GEANT4 tag $Name: geant4-09-03 $
    2929//
    3030// --------------------------------------------------------------------
  • trunk/source/geometry/navigation/src/G4GeomTestVolPoint.cc

    r921 r1228  
    2626//
    2727// $Id: G4GeomTestVolPoint.cc,v 1.3 2006/06/29 18:36:52 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-02-cand-01 $
     28// GEANT4 tag $Name: geant4-09-03 $
    2929//
    3030// --------------------------------------------------------------------
  • trunk/source/geometry/navigation/src/G4GeomTestVolume.cc

    r921 r1228  
    2626//
    2727// $Id: G4GeomTestVolume.cc,v 1.6 2007/11/16 09:39:14 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-02-cand-01 $
     28// GEANT4 tag $Name: geant4-09-03 $
    2929//
    3030// --------------------------------------------------------------------
  • trunk/source/geometry/navigation/src/G4GeometryMessenger.cc

    r921 r1228  
    2626//
    2727// $Id: G4GeometryMessenger.cc,v 1.5 2006/06/29 18:36:57 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-02-cand-01 $
     28// GEANT4 tag $Name: geant4-09-03 $
    2929//
    3030// --------------------------------------------------------------------
  • trunk/source/geometry/navigation/src/G4MultiLevelLocator.cc

    r1058 r1228  
    2525//
    2626// $Id: G4MultiLevelLocator.cc,v 1.5 2008/12/11 10:01:02 tnikitin Exp $
    27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
     27// GEANT4 tag $Name: geant4-09-03 $
    2828//
    2929// Class G4MultiLevelLocator implementation
  • trunk/source/geometry/navigation/src/G4NormalNavigation.cc

    r921 r1228  
    2626//
    2727// $Id: G4NormalNavigation.cc,v 1.9 2007/05/11 13:43:59 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-02-cand-01 $
     28// GEANT4 tag $Name: geant4-09-03 $
    2929//
    3030//
  • trunk/source/geometry/navigation/src/G4ParameterisedNavigation.cc

    r921 r1228  
    2626//
    2727// $Id: G4ParameterisedNavigation.cc,v 1.12 2007/11/09 16:06:02 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-02-cand-01 $
     28// GEANT4 tag $Name: geant4-09-03 $
    2929//
    3030//
  • trunk/source/geometry/navigation/src/G4PropagatorInField.cc

    r1058 r1228  
    3636// 17.03.97 John Apostolakis,   renaming new set functions being added
    3737//
     38// $Id: G4PropagatorInField.cc,v 1.50 2009/12/10 08:41:54 japost Exp $
     39// GEANT4 tag $ Name:  $
    3840// ---------------------------------------------------------------------------
    3941
     
    6971    fUseSafetyForOptimisation(true),   // (false) is less sensitive to incorrect safety
    7072    fSetFieldMgr(false),
     73    fZeroStepThreshold( 0.0 ),
    7174    fpTrajectoryFilter( 0 )
    7275{
     
    8386  fPreviousSafety= 0.0;
    8487  kCarTolerance = G4GeometryTolerance::GetInstance()->GetSurfaceTolerance();
     88  fZeroStepThreshold= std::max( 1.0e5 * kCarTolerance, 1.0e-1 * micrometer ) ;
     89#ifdef G4DEBUG_FIELD
     90  G4cout << " PiF: Zero Step Threshold set to " << fZeroStepThreshold / millimeter
     91         << " mm." << G4endl;
     92  G4cout << " PiF:   Value of kCarTolerance = " << kCarTolerance / millimeter
     93         << " mm. " << G4endl;
     94#endif
    8595
    8696  // Definding Intersection Locator and his parameters
     
    92102    fAllocatedLocator=false;
    93103  }
     104  RefreshIntersectionLocator();  //  Copy all relevant parameters
     105}
     106
     107G4PropagatorInField::~G4PropagatorInField()
     108{
     109  if(fAllocatedLocator)delete  fIntersectionLocator;
     110}
     111
     112// Update the IntersectionLocator with current parameters
     113void
     114G4PropagatorInField::RefreshIntersectionLocator()
     115{
    94116  fIntersectionLocator->SetEpsilonStepFor(fEpsilonStep);
    95   fIntersectionLocator->SetDeltaIntersectionFor(GetDeltaIntersection());
     117  fIntersectionLocator->SetDeltaIntersectionFor(fCurrentFieldMgr->GetDeltaIntersection());
    96118  fIntersectionLocator->SetChordFinderFor(GetChordFinder());
    97119  fIntersectionLocator->SetSafetyParametersFor( fUseSafetyForOptimisation);
    98120}
    99 
    100 G4PropagatorInField::~G4PropagatorInField()
    101 {
    102   if(fAllocatedLocator)delete  fIntersectionLocator;
    103 }
    104 
    105121///////////////////////////////////////////////////////////////////////////
    106122//
     
    114130                G4VPhysicalVolume* pPhysVol)
    115131{
    116  
     132  const G4String MethodName("G4PropagatorInField::ComputeStep");
     133   
    117134  // If CurrentProposedStepLength is too small for finding Chords
    118135  // then return with no action (for now - TODO: some action)
     
    152169  GetChordFinder()->SetChargeMomentumMass(fCharge, fInitialMomentumModulus, fMass);
    153170
    154  // Values for Intersection Locator has to be updated on each call
    155  // because the CurrentFieldManager changes
    156     fIntersectionLocator->SetChordFinderFor(GetChordFinder());
    157     fIntersectionLocator->SetSafetyParametersFor( fUseSafetyForOptimisation);
    158     fIntersectionLocator->SetEpsilonStepFor(fEpsilonStep);
    159     fIntersectionLocator->SetDeltaIntersectionFor(GetDeltaIntersection());
     171 // Values for Intersection Locator has to be updated on each call for the
     172 // case that CurrentFieldManager has changed from the one of previous step
     173  RefreshIntersectionLocator();
    160174
    161175  G4FieldTrack  CurrentState(pFieldTrack);
     
    177191                                           fLargestAcceptableStep );
    178192  }
    179   epsilon = GetDeltaOneStep() / CurrentProposedStepLength;
     193  epsilon = fCurrentFieldMgr->GetDeltaOneStep() / CurrentProposedStepLength;
    180194  // G4double raw_epsilon= epsilon;
    181195  G4double epsilonMin= fCurrentFieldMgr->GetMinimumEpsilonStep();
     
    200214    G4double decreaseFactor = 0.9; // Unused default
    201215    if(   (fNoZeroStep < fSevereActionThreshold_NoZeroSteps)
    202        && (stepTrial > 1000.0*kCarTolerance) )
     216       && (stepTrial > 100.0*fZeroStepThreshold) )
    203217    {
    204       // Ensure quicker convergence
     218      // Attempt quick convergence
    205219      //
    206       decreaseFactor= 0.1;
     220      decreaseFactor= 0.25;
    207221    }
    208222    else
     
    212226      // Careful decreases to cope with tolerance are required.
    213227      //
    214       if( stepTrial > 1000.0*kCarTolerance )
    215         decreaseFactor = 0.25;     // Try slow decreases
    216       else if( stepTrial > 100.0*kCarTolerance )
    217         decreaseFactor= 0.5;       // Try slower decreases
    218       else if( stepTrial > 10.0*kCarTolerance )
     228      if( stepTrial > 100.0*fZeroStepThreshold )
     229        decreaseFactor = 0.35;     // Try decreasing slower
     230      else if( stepTrial > 100.0*fZeroStepThreshold )
     231        decreaseFactor= 0.5;       // Try yet slower decreases
     232      else if( stepTrial > 10.0*fZeroStepThreshold )
    219233        decreaseFactor= 0.75;      // Try even slower decreases
    220234      else
     
    224238
    225239#ifdef G4DEBUG_FIELD
     240     G4cout << MethodName << ": "
     241            << " Decreasing step -  "
     242            << " decreaseFactor= " << std::setw(8) << decreaseFactor
     243            << " stepTrial = "     << std::setw(18) << stepTrial << " "
     244            << " fZeroStepThreshold = " << fZeroStepThreshold << G4endl;
    226245     PrintStepLengthDiagnostic(CurrentProposedStepLength, decreaseFactor,
    227246                               stepTrial, pFieldTrack);
    228247#endif
    229      if( stepTrial == 0.0 )
     248     if( stepTrial == 0.0 )  //  Change to make it < 0.1 * kCarTolerance ??
    230249     {
    231250       G4cout << " G4PropagatorInField::ComputeStep "
     
    403422  // and only take corrective action when they occur.
    404423  //
    405   if( TruePathLength < 0.5*kCarTolerance )
     424  if( ( (TruePathLength < fZeroStepThreshold)
     425        && ( TruePathLength+kCarTolerance < CurrentProposedStepLength  )
     426        )
     427      || ( TruePathLength < 0.5*kCarTolerance )
     428    )
     429  {
    406430    fNoZeroStep++;
    407   else
     431  }
     432  else{
    408433    fNoZeroStep = 0;
     434  }
    409435
    410436  if( fNoZeroStep > fAbandonThreshold_NoZeroSteps ) {
     
    552578                    const G4FieldTrack& )
    553579{
     580#if 0
    554581  G4cout << " PiF: NoZeroStep= " << fNoZeroStep
    555582         << " CurrentProposedStepLength= " << CurrentProposedStepLength
    556583         << " Full_curvelen_last=" << fFull_CurveLen_of_LastAttempt
    557584         << " last proposed step-length= " << fLast_ProposedStepLength
    558          << " decreate factor = " << decreaseFactor
     585         << " decrease factor = " << decreaseFactor
    559586         << " step trial = " << stepTrial
    560587         << G4endl;
     588#endif
     589  int  iprec= G4cout.precision(8);
     590  G4cout << " " << std::setw(12) << " PiF: NoZeroStep "
     591         << " " << std::setw(20) << " CurrentProposed len "
     592         << " " << std::setw(18) << " Full_curvelen_last"
     593         << " " << std::setw(18) << " last proposed len "
     594         << " " << std::setw(18) << " decrease factor   "
     595         << " " << std::setw(15) << " step trial  "
     596         << G4endl;
     597
     598  G4cout << " " << std::setw(10) << fNoZeroStep << "  "
     599         << " " << std::setw(20) << CurrentProposedStepLength
     600         << " " << std::setw(18) << fFull_CurveLen_of_LastAttempt
     601         << " " << std::setw(18) << fLast_ProposedStepLength
     602         << " " << std::setw(18) << decreaseFactor
     603         << " " << std::setw(15) << stepTrial
     604         << G4endl;
     605  G4cout.precision( iprec );
     606
    561607}
    562608
     
    617663  if( pCurrentPhysicalVolume)
    618664  {
    619      G4FieldManager *newFieldMgr = 0;
    620      newFieldMgr= pCurrentPhysicalVolume->GetLogicalVolume()->GetFieldManager();
    621      if ( newFieldMgr )
    622         currentFieldMgr = newFieldMgr;
     665     G4FieldManager *pRegionFieldMgr= 0, *localFieldMgr = 0;
     666     G4LogicalVolume* pLogicalVol= pCurrentPhysicalVolume->GetLogicalVolume();
     667
     668     if( pLogicalVol ) {
     669        // Value for Region, if any, Overrides
     670        G4Region*  pRegion= pLogicalVol->GetRegion();
     671        if( pRegion ) {
     672           pRegionFieldMgr= pRegion->GetFieldManager();
     673           if( pRegionFieldMgr )
     674             currentFieldMgr= pRegionFieldMgr;
     675        }
     676
     677        // 'Local' Value from logical volume, if any, Overrides
     678        localFieldMgr= pLogicalVol->GetFieldManager();
     679        if ( localFieldMgr )
     680           currentFieldMgr = localFieldMgr;
     681     }
    623682  }
    624683  fCurrentFieldMgr= currentFieldMgr;
  • trunk/source/geometry/navigation/src/G4ReplicaNavigation.cc

    r921 r1228  
    2626//
    2727// $Id: G4ReplicaNavigation.cc,v 1.19 2008/04/28 15:39:55 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-02-cand-01 $
     28// GEANT4 tag $Name: geant4-09-03 $
    2929//
    3030//
  • trunk/source/geometry/navigation/src/G4SimpleLocator.cc

    r1058 r1228  
    2525//
    2626// $Id: G4SimpleLocator.cc,v 1.5 2008/12/11 10:27:58 tnikitin Exp $
    27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
     27// GEANT4 tag $Name: geant4-09-03 $
    2828//
    2929// Class G4SimpleLocator implementation
  • trunk/source/geometry/navigation/src/G4TransportationManager.cc

    r921 r1228  
    2626//
    2727// $Id: G4TransportationManager.cc,v 1.15 2007/04/12 11:51:48 vnivanch Exp $
    28 // GEANT4 tag $Name: geant4-09-02-cand-01 $
     28// GEANT4 tag $Name: geant4-09-03 $
    2929//
    3030//
  • trunk/source/geometry/navigation/src/G4VIntersectionLocator.cc

    r1058 r1228  
    2424// ********************************************************************
    2525//
    26 // $Id: G4VIntersectionLocator.cc,v 1.5 2009/05/15 12:58:23 tnikitin Exp $
    27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
     26// $Id: G4VIntersectionLocator.cc,v 1.7 2009/11/27 15:21:59 japost Exp $
     27// GEANT4 tag $Name: geant4-09-03 $
    2828//
    2929// Class G4VIntersectionLocator implementation
     
    4343// Constructor
    4444//
    45 G4VIntersectionLocator:: G4VIntersectionLocator(G4Navigator *theNavigator)
     45G4VIntersectionLocator:: G4VIntersectionLocator(G4Navigator *theNavigator):
     46  fUseNormalCorrection(false),
     47  fiNavigator( theNavigator ),
     48  fiChordFinder( 0 ),            // Not set - overridden at each step
     49  fiEpsilonStep( -1.0 ),         // Out of range - overridden at each step
     50  fiDeltaIntersection( -1.0 ),   // Out of range - overridden at each step
     51  fiUseSafety(false)             // Default - overridden at each step
    4652{
    4753  kCarTolerance = G4GeometryTolerance::GetInstance()->GetSurfaceTolerance();
    48   fiNavigator = theNavigator;
    4954  fVerboseLevel = 0;
    50   fUseNormalCorrection = false;
    5155  fHelpingNavigator = new G4Navigator();
    5256}     
     
    191195     if (std::abs(advanceLength)<kCarTolerance)
    192196     {
    193        advanceLength=(EstimatedEndStateB.GetPosition()
    194                      -newEndPoint.GetPosition()).mag();
     197       goodAdvance=true;
    195198     }
     199     else{
    196200     goodAdvance=
    197201       integrDriver->AccurateAdvance(newEndPoint, advanceLength,
    198202                                     GetEpsilonStepFor());
     203     }
    199204  }
    200205  while( !goodAdvance && (++itrial < no_trials) );
  • trunk/source/geometry/navigation/src/G4VoxelNavigation.cc

    r921 r1228  
    2626//
    2727// $Id: G4VoxelNavigation.cc,v 1.9 2008/11/14 18:26:35 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-02-cand-01 $
     28// GEANT4 tag $Name: geant4-09-03 $
    2929//
    3030//
Note: See TracChangeset for help on using the changeset viewer.