Ignore:
Timestamp:
Sep 10, 2008, 5:40:37 PM (16 years ago)
Author:
garnier
Message:

geant4.8.2 beta

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

Legend:

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

    r831 r850  
    2525//
    2626// $Id: G4AuxiliaryNavServices.cc,v 1.3 2006/06/29 18:36:32 gunter Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: HEAD $
    2828//
    2929// --------------------------------------------------------------------
  • trunk/source/geometry/navigation/src/G4DrawVoxels.cc

    r831 r850  
    2626//
    2727// $Id: G4DrawVoxels.cc,v 1.4 2006/06/29 18:36:34 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: HEAD $
    2929//
    3030//
  • trunk/source/geometry/navigation/src/G4ErrorPropagationNavigator.cc

    r831 r850  
    2626//
    2727// $Id: G4ErrorPropagationNavigator.cc,v 1.1 2007/05/16 12:49:18 gcosmo Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: HEAD $
    2929//
    3030//
  • trunk/source/geometry/navigation/src/G4GeomTestErrorList.cc

    r831 r850  
    2626//
    2727// $Id: G4GeomTestErrorList.cc,v 1.3 2006/06/29 18:36:36 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: HEAD $
    2929//
    3030// --------------------------------------------------------------------
  • trunk/source/geometry/navigation/src/G4GeomTestOverlapList.cc

    r831 r850  
    2626//
    2727// $Id: G4GeomTestOverlapList.cc,v 1.3 2006/06/29 18:36:39 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: HEAD $
    2929//
    3030// --------------------------------------------------------------------
  • trunk/source/geometry/navigation/src/G4GeomTestOvershootList.cc

    r831 r850  
    2626//
    2727// $Id: G4GeomTestOvershootList.cc,v 1.3 2006/06/29 18:36:41 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: HEAD $
    2929//
    3030// --------------------------------------------------------------------
  • trunk/source/geometry/navigation/src/G4GeomTestPoint.cc

    r831 r850  
    2626//
    2727// $Id: G4GeomTestPoint.cc,v 1.3 2006/06/29 18:36:44 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: HEAD $
    2929//
    3030// --------------------------------------------------------------------
  • trunk/source/geometry/navigation/src/G4GeomTestSegment.cc

    r831 r850  
    2626//
    2727// $Id: G4GeomTestSegment.cc,v 1.11 2007/11/16 09:39:14 gcosmo Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: HEAD $
    2929//
    3030// --------------------------------------------------------------------
  • trunk/source/geometry/navigation/src/G4GeomTestStreamLogger.cc

    r831 r850  
    2626//
    2727// $Id: G4GeomTestStreamLogger.cc,v 1.3 2006/06/29 18:36:49 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: HEAD $
    2929//
    3030// --------------------------------------------------------------------
  • trunk/source/geometry/navigation/src/G4GeomTestVolPoint.cc

    r831 r850  
    2626//
    2727// $Id: G4GeomTestVolPoint.cc,v 1.3 2006/06/29 18:36:52 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: HEAD $
    2929//
    3030// --------------------------------------------------------------------
  • trunk/source/geometry/navigation/src/G4GeomTestVolume.cc

    r831 r850  
    2626//
    2727// $Id: G4GeomTestVolume.cc,v 1.6 2007/11/16 09:39:14 gcosmo Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: HEAD $
    2929//
    3030// --------------------------------------------------------------------
  • trunk/source/geometry/navigation/src/G4GeometryMessenger.cc

    r831 r850  
    2626//
    2727// $Id: G4GeometryMessenger.cc,v 1.5 2006/06/29 18:36:57 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: HEAD $
    2929//
    3030// --------------------------------------------------------------------
  • trunk/source/geometry/navigation/src/G4NormalNavigation.cc

    r831 r850  
    2626//
    2727// $Id: G4NormalNavigation.cc,v 1.9 2007/05/11 13:43:59 gcosmo Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: HEAD $
    2929//
    3030//
  • trunk/source/geometry/navigation/src/G4ParameterisedNavigation.cc

    r831 r850  
    2626//
    2727// $Id: G4ParameterisedNavigation.cc,v 1.12 2007/11/09 16:06:02 gcosmo Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: HEAD $
    2929//
    3030//
  • trunk/source/geometry/navigation/src/G4PathFinder.cc

    r831 r850  
    2525//
    2626//
    27 // $Id: G4PathFinder.cc,v 1.58.2.1 2008/04/29 15:37:16 gcosmo Exp $
     27// $Id: G4PathFinder.cc,v 1.59 2008/04/29 15:32:54 gcosmo Exp $
    2828// GEANT4 tag $ Name:  $
    2929//
  • trunk/source/geometry/navigation/src/G4PropagatorInField.cc

    r831 r850  
    2525//
    2626//
    27 // $Id: G4PropagatorInField.cc,v 1.42 2008/01/24 08:54:01 gcosmo Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: G4PropagatorInField.cc,v 1.43 2008/05/28 09:12:23 tnikitin Exp $
     28// GEANT4 tag $Name: HEAD $
    2929//
    3030//
     
    8383  fPreviousSafety= 0.0;
    8484  kCarTolerance = G4GeometryTolerance::GetInstance()->GetSurfaceTolerance();
    85 
     85  //
     86  fUseBrentLocator=true;
    8687  // In case of too slow progress in finding Intersection Point
    8788  // intermediates Points on the Track must be stored.
    8889  // Initialise the array of Pointers [max_depth+1] to do this 
    89  
    9090  G4ThreeVector zeroV(0.0,0.0,0.0);
    9191  for (G4int idepth=0; idepth<max_depth+1; idepth++ )
     
    9393    ptrInterMedFT[ idepth ] = new G4FieldTrack( zeroV, zeroV, 0., 0., 0., 0.);
    9494  }
     95  // Counter for Maximum Number Of Trial before Intersection Found
     96    maxNumberOfStepsForIntersection=0;
     97 // Counter for Number Of Calls to ReIntegrationEndPoint Method
     98    maxNumberOfCallsToReIntegration=0;
     99    maxNumberOfCallsToReIntegration_depth=0;
    95100}
    96101
     
    100105  {
    101106    delete ptrInterMedFT[idepth];
     107  }
     108  if(fVerboseLevel>0){
     109  G4cout<<"G4PropagatorInField::Location with Max Number of Steps="
     110       << maxNumberOfStepsForIntersection<<G4endl;
     111  G4cout<<"G4PropagatorInField::ReIntegrateEndPoint was called "<<
     112    maxNumberOfCallsToReIntegration<<" times and for depth algorithm "<<
     113    maxNumberOfCallsToReIntegration_depth<<" times"<<G4endl;
    102114  }
    103115}
     
    114126                G4VPhysicalVolume* pPhysVol)
    115127{
     128 
    116129  // If CurrentProposedStepLength is too small for finding Chords
    117130  // then return with no action (for now - TODO: some action)
     
    150163
    151164  GetChordFinder()->SetChargeMomentumMass(fCharge, fInitialMomentumModulus, fMass); 
    152 
     165 
    153166  G4FieldTrack  CurrentState(pFieldTrack);
    154167  G4FieldTrack  OriginalState = CurrentState;
     
    291304                                  InterSectionPointE, IntersectPointVelct_G,
    292305                                  recalculatedEndPt);
    293        //G4cout<<"In Locate"<<recalculatedEndPt<<"  and V"<<IntersectPointVelct_G.GetPosition()<<G4endl;
     306       // G4cout<<"In Locate"<<recalculatedEndPt<<"  and V"<<IntersectPointVelct_G.GetPosition()<<G4endl;
    294307       intersects = intersects && found_intersection;
    295308       if( found_intersection ) {       
     
    405418            << " Zero progress for "  << fNoZeroStep << " attempted steps."
    406419            << G4endl;
     420     G4cout << "Proposed Step is "<<CurrentProposedStepLength <<" but Step Taken is "<< fFull_CurveLen_of_LastAttempt <<G4endl;
     421     G4cout << "For Particle with Charge ="<<fCharge
     422            << " Momentum="<< fInitialMomentumModulus<<" Mass="<< fMass<<G4endl;
     423       if( pPhysVol )
     424          G4cout << " in the volume " << pPhysVol->GetName() ;
     425       else
     426         G4cout << " in unknown or null volume. " ;
     427       G4cout << G4endl;
    407428     if ( fVerboseLevel > 2 )
    408429       G4cout << " Particle that is stuck will be killed." << G4endl;
    409430     fNoZeroStep = 0;
    410431  }
    411   //  G4cout << "G4PropagatorInField returns " << TruePathLength << G4endl;
     432 
    412433  return TruePathLength;
    413434}
     
    463484  G4FieldTrack ApproxIntersecPointV(CurveEndPointVelocity); // FT-Def-Construct
    464485  G4double    NewSafety= -0.0;
    465 
     486 
    466487  G4bool final_section= true;  // Shows whether current section is last
    467488                               // (i.e. B=full end)
    468489  G4bool first_section=true;
    469490  recalculatedEndPoint= false;
    470 
     491 
    471492  G4bool restoredFullEndpoint= false;
    472493
     
    482503  static G4int max_no_seen= -1;
    483504  static G4int trigger_substepno_print= warn_substeps - 20 ;
    484 
     505 
    485506  //-------------------------------------------------------------------------- 
    486507  //  Algoritm for the case if progress in founding intersection is too slow.
     
    492513  //  until 'max_depth'.
    493514  //--------------------------------------------------------------------------
    494 
    495   const G4int param_substeps=10; // Test value for the maximum number
    496                                  // of substeps
     515  G4double count_did_len=0.;
     516  G4double count_all_len=0;
     517  G4int param_substeps=100;//Test value for the maximum number of substeps
     518  if(!fUseBrentLocator)  param_substeps=10;// Reduced value for the maximum number
     519
    497520  const G4double fraction_done=0.3;
    498521
     
    549572      // (the closest if possible)
    550573      //
    551       ApproxIntersecPointV = GetChordFinder()
     574      if((!fUseBrentLocator)||(substep_no_p==0)){
     575       ApproxIntersecPointV = GetChordFinder()
    552576                             ->ApproxCurvePointV( CurrentA_PointVelocity,
    553577                                                  CurrentB_PointVelocity,
     
    555579                                                  fEpsilonStep );
    556580      //  The above method is the key & most intuitive part ...
    557 
     581      }
    558582#ifdef G4DEBUG_FIELD
    559583      if( ApproxIntersecPointV.GetCurveLength() >
     
    571595
    572596      G4ThreeVector CurrentF_Point= ApproxIntersecPointV.GetPosition();
    573 
     597      if(substep_no> maxNumberOfStepsForIntersection)maxNumberOfStepsForIntersection=substep_no; 
    574598      // First check whether EF is small - then F is a good approx. point
    575599      // Calculate the length and direction of the chord AF
     
    580604      {
    581605        found_approximate_intersection = true;
    582 
    583606        // Create the "point" return value
    584607        //
     
    609632        if( Intersects_AF )
    610633        {
     634          if(fUseBrentLocator){
     635           
     636            G4FieldTrack EndPoint=ApproxIntersecPointV;
     637            ApproxIntersecPointV= GetChordFinder()->ApproxCurvePointS(
     638                   CurrentA_PointVelocity,CurrentB_PointVelocity,
     639                   CurrentE_Point,CurrentF_Point,PointG,true,fEpsilonStep);
     640            CurrentB_PointVelocity =  EndPoint;
     641            CurrentE_Point = PointG;
     642          // By moving point B, must take care if current
     643          // AF has no intersection to try current FB!!
     644          //
     645          final_section= false;
     646
     647          }
     648          else{
    611649          // G is our new Candidate for the intersection point.
    612650          // It replaces  "E" and we will repeat the test to see if
     
    617655          CurrentB_PointVelocity = ApproxIntersecPointV;
    618656          CurrentE_Point = PointG; 
    619 
     657     
    620658          // By moving point B, must take care if current
    621659          // AF has no intersection to try current FB!!
    622660          //
    623661          final_section= false;
    624 
     662          }
    625663#ifdef G4VERBOSE
    626664          if( fVerboseLevel > 3 )
     
    651689                                                 PointH );
    652690          if( Intersects_FB )
    653           {
     691          {
     692            if(fUseBrentLocator){
     693               CurrentA_PointVelocity = ApproxIntersecPointV;
     694               ApproxIntersecPointV= GetChordFinder()->ApproxCurvePointS(
     695                   CurrentA_PointVelocity,CurrentB_PointVelocity,
     696                   CurrentE_Point,Point_A,PointH,false,fEpsilonStep);
     697               CurrentE_Point = PointH;
     698           }
     699           else{
     700 
    654701            // There is an intersection of FB with a volume boundary
    655702            // H <- First Intersection of Chord FB
     
    666713            CurrentA_PointVelocity = ApproxIntersecPointV;
    667714            CurrentE_Point = PointH;
     715           }
    668716          }
    669717          else  // not Intersects_FB
     
    719767        curveDist = CurrentB_PointVelocity.GetCurveLength()
    720768                    - CurrentA_PointVelocity.GetCurveLength();
    721 
    722         // Change this condition for very strict parameters of propagation
    723         //
    724         if( curveDist*curveDist*(1+2* fEpsilonStep ) < linDistSq )
     769         if( curveDist*curveDist*(1+2*fEpsilonStep ) < linDistSq )
    725770        {
    726771          // Re-integrate to obtain a new B
     
    733778          G4FieldTrack oldPointVelB = CurrentB_PointVelocity;
    734779          CurrentB_PointVelocity = newEndPointFT;
    735 
     780          maxNumberOfCallsToReIntegration= maxNumberOfCallsToReIntegration+1;
     781          #ifdef G4DEBUG_FIELD
     782          G4cout<<"G4PIF::Call ReIntEnd1 linD="<<std::sqrt(linDistSq)<<" curve="<<curveDist<<" n="<<substep_no<<G4endl;
     783          G4cout<<"G4PIF::Call ReIntEnd2 IntersectAF="<< Intersects_AF<<" final_section="<<final_section<<G4endl;
     784          #endif
    736785          if( (final_section)&&(Second_half)&&(depth==0) ) // real final section
    737786          {
     
    740789              // So that we can return it, if it is the endpoint!
    741790          }
     791         
    742792        }
     793   
    743794        if( curveDist < 0.0 )
    744795        {
     
    757808                 << "The final curve point is not further along"
    758809                 << " than the original!" << G4endl;
    759 
    760810          if( recalculatedEndPoint )
    761811          {
     
    782832          G4cerr << "        Substep depth no= "<< substep_no_p  << " Depth= "
    783833                 << depth << G4endl;
    784 
     834          G4cerr << "        did_len= "<< count_did_len  << " all_len= "
     835                 << count_all_len << G4endl;
    785836          G4Exception("G4PropagatorInField::LocateIntersectionPoint()",
    786837                      "FatalError", FatalException,
    787838                      "Error in advancing propagation.");
    788839        }
    789 
     840       
    790841        if(restoredFullEndpoint)
    791842        {
     
    832883      G4double all_len = std::abs( CurrentB_PointVelocity.GetCurveLength()
    833884                       - SubStart_PointVelocity.GetCurveLength());
    834    
     885      count_did_len=did_len;
     886      count_all_len=all_len;   
    835887      G4double stepLengthAB;
    836888      G4ThreeVector PointGe;
     
    890942        CurrentA_PointVelocity = *ptrInterMedFT[depth];
    891943        CurrentB_PointVelocity = *ptrInterMedFT[depth-1];
     944        // Ensure that the new endpoints are not further apart in space
     945        // than on the curve due to different errors in the integration
     946        //
     947        G4double linDistSq, curveDist;
     948        linDistSq = ( CurrentB_PointVelocity.GetPosition()
     949                    - CurrentA_PointVelocity.GetPosition() ).mag2();
     950        curveDist = CurrentB_PointVelocity.GetCurveLength()
     951                    - CurrentA_PointVelocity.GetCurveLength();
     952        if( curveDist*curveDist*(1+2*fEpsilonStep ) < linDistSq )
     953        {
     954          // Re-integrate to obtain a new B
     955          //
     956          G4FieldTrack newEndPointFT=
     957                  ReEstimateEndpoint( CurrentA_PointVelocity,
     958                                      CurrentB_PointVelocity,
     959                                      linDistSq,    // to avoid recalculation
     960                                      curveDist );
     961          G4FieldTrack oldPointVelB = CurrentB_PointVelocity;
     962          CurrentB_PointVelocity = newEndPointFT;
     963          maxNumberOfCallsToReIntegration_depth= maxNumberOfCallsToReIntegration_depth+1;
     964        }
     965
    892966        G4ThreeVector Point_A    = CurrentA_PointVelocity.GetPosition();
    893967        G4ThreeVector SubE_point = CurrentB_PointVelocity.GetPosition();   
  • trunk/source/geometry/navigation/src/G4ReplicaNavigation.cc

    r831 r850  
    2525//
    2626//
    27 // $Id: G4ReplicaNavigation.cc,v 1.17.2.2 2008/04/28 16:05:41 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     27// $Id: G4ReplicaNavigation.cc,v 1.19 2008/04/28 15:39:55 gcosmo Exp $
     28// GEANT4 tag $Name: HEAD $
    2929//
    3030//
  • trunk/source/geometry/navigation/src/G4TransportationManager.cc

    r831 r850  
    2626//
    2727// $Id: G4TransportationManager.cc,v 1.15 2007/04/12 11:51:48 vnivanch Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: HEAD $
    2929//
    3030//
  • trunk/source/geometry/navigation/src/G4VoxelNavigation.cc

    r831 r850  
    2626//
    2727// $Id: G4VoxelNavigation.cc,v 1.7 2007/05/11 13:43:59 gcosmo Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: HEAD $
    2929//
    3030//
Note: See TracChangeset for help on using the changeset viewer.