Changeset 1058 for trunk/source/geometry/navigation
- Timestamp:
- May 29, 2009, 3:55:14 PM (17 years ago)
- Location:
- trunk/source/geometry/navigation
- Files:
-
- 14 edited
-
History (modified) (2 diffs)
-
include/G4DrawVoxels.hh (modified) (1 diff)
-
include/G4Navigator.hh (modified) (2 diffs)
-
include/G4PhantomParameterisation.hh (modified) (2 diffs)
-
src/G4BrentLocator.cc (modified) (18 diffs)
-
src/G4DrawVoxels.cc (modified) (1 diff)
-
src/G4MultiLevelLocator.cc (modified) (13 diffs)
-
src/G4Navigator.cc (modified) (2 diffs)
-
src/G4PathFinder.cc (modified) (2 diffs)
-
src/G4PhantomParameterisation.cc (modified) (3 diffs)
-
src/G4PropagatorInField.cc (modified) (2 diffs)
-
src/G4RegularNavigation.cc (modified) (6 diffs)
-
src/G4SimpleLocator.cc (modified) (12 diffs)
-
src/G4VIntersectionLocator.cc (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/geometry/navigation/History
r921 r1058 1 $Id: History,v 1.1 25 2008/11/14 18:26:53gcosmo Exp $1 $Id: History,v 1.132 2009/05/20 08:27:26 gcosmo Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 17 17 * Reverse chronological order (last date on top), please * 18 18 ---------------------------------------------------------- 19 20 May 20th, 2009 - P.Arce (geomnav-V09-02-05) 21 ----------------------- 22 - Added method BuildContainerSolid() taking a solid as argument to 23 G4PhantomParameterisation. Added protection to GetMaterialIndex() 24 for zero index. 25 26 May 18th, 2009 - T.Nikitina (geomnav-V09-02-04) 27 --------------------------- 28 - Enhanced algorithm for 'FB_intersects' in order to speedup BrentLocator. 29 - Fix in the usage of the geometrical tolerance in G4VIntersectionLocator 30 in method AdjustementOfFoundIntersection(). 31 32 May 13th, 2009 - J.Apostolakis (geomnav-V09-02-03) 33 ------------------------------ 34 - Fix in G4PathFinder: A geometry is at a boundary if its step is within 35 tolerance of the minimum step for any geometry. 36 37 May 5th, 2009 - T.Nikitina (geomnav-V09-02-02) 38 -------------------------- 39 - Fix in G4Navigator::ComputeStep() for the computation of rotation of the 40 'LocalExitNormal' in cases when DistanceToOut() returns non-valid normal 41 for optical photons in rotated solids. Addresses problem report #1059. 42 43 February 26th, 2009 - T.Nikitina (geomnav-V09-02-01) 44 -------------------------------- 45 - Fixed problem in G4BrentLocator::EstimateIntersectionPoint() responsible 46 for rare cases of negative steps. 47 48 January 27th, 2009 - G.Cosmo (geomnav-V09-02-00) 49 ---------------------------- 50 - Added G4RegularNavigationHelper class, used by G4RegularNavigation for 51 counting the number of step lengths in each voxel of the regular structure 52 (by P.Arce). 53 - Some code cleanup... 54 55 December 11th, 2008 - T.Nikitina (geomnav-V09-01-10) 56 -------------------------------- 57 - Reinstated G4MultiLevelLocator as the default locator to allow for proper 58 tuning of parameters in propagation in field and avoid CPU penalty currently 59 induced by default parameters. 60 - Corrected text in exceptions in locators classes. 19 61 20 62 November 14th, 2008 - T.Nikitina, J.Apostolakis (geomnav-V09-01-09) -
trunk/source/geometry/navigation/include/G4DrawVoxels.hh
r921 r1058 26 26 // 27 27 // $Id: G4DrawVoxels.hh,v 1.3 2006/06/29 18:35:36 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 2-cand-01 $28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/navigation/include/G4Navigator.hh
r921 r1058 25 25 // 26 26 // 27 // $Id: G4Navigator.hh,v 1.2 7 2008/10/24 14:00:03gcosmo Exp $28 // GEANT4 tag $Name: geant4-09-0 2-cand-01 $27 // $Id: G4Navigator.hh,v 1.28 2009/01/27 09:32:14 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // … … 38 38 // reference system. The navigator maintains a transformation history and 39 39 // other information to optimise the tracking time performance. 40 // 40 41 41 // History: 42 42 // - Created. Paul Kent, Jul 95/96 -
trunk/source/geometry/navigation/include/G4PhantomParameterisation.hh
r921 r1058 25 25 // 26 26 // 27 // $Id: G4PhantomParameterisation.hh,v 1. 4 2008/01/22 15:02:36 gcosmoExp $28 // GEANT4 tag $Name: geant4-09-0 2-cand-01 $27 // $Id: G4PhantomParameterisation.hh,v 1.5 2009/05/19 18:27:03 arce Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // … … 113 113 114 114 void BuildContainerSolid( G4VPhysicalVolume *pPhysicalVol ); 115 void BuildContainerSolid( G4VSolid *pMotherSolid ); 115 116 // Save as container solid the parent of the voxels. Check that the 116 117 // voxels fill it completely. -
trunk/source/geometry/navigation/src/G4BrentLocator.cc
r985 r1058 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BrentLocator.cc,v 1. 4 2008/11/14 18:26:35 gcosmoExp $27 // GEANT4 tag $Name: geant4-09-0 2-cand-01 $26 // $Id: G4BrentLocator.cc,v 1.8 2009/05/15 12:55:48 tnikitin Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // Class G4BrentLocator implementation … … 154 154 static G4int trigger_substepno_print= warn_substeps - 20 ; 155 155 156 // Counter for restarting Bintermed 157 // 158 G4int restartB = 0; 159 156 160 //-------------------------------------------------------------------------- 157 161 // Algorithm for the case if progress in founding intersection is too slow. … … 164 168 //-------------------------------------------------------------------------- 165 169 166 const G4int param_substeps= 100; // Test value for the maximum number170 const G4int param_substeps=50; // Test value for the maximum number 167 171 // of substeps 168 172 const G4double fraction_done=0.3; … … 183 187 if( (TrialPoint - StartPosition).mag() < tolerance * mm ) 184 188 { 185 G4cerr << "WARNING - G4 PropagatorInField::LocateIntersectionPoint()"189 G4cerr << "WARNING - G4BrentLocator::EstimateIntersectionPoint()" 186 190 << G4endl 187 191 << " Intermediate F point is on top of starting point A." 188 192 << G4endl; 189 G4Exception("G4 PropagatorInField::LocateIntersectionPoint()",193 G4Exception("G4BrentLocator::EstimateIntersectionPoint()", 190 194 "IntersectionPointIsAtStart", JustWarning, 191 195 "Intersection point F is exactly at start point A." ); … … 241 245 CurrentB_PointVelocity.GetCurveLength() * (1.0 + tolerance) ) 242 246 { 243 G4cerr << "ERROR - G4 PropagatorInField::LocateIntersectionPoint()"247 G4cerr << "ERROR - G4BrentLocator::EstimateIntersectionPoint()" 244 248 << G4endl 245 249 << " Intermediate F point is more advanced than" 246 250 << " endpoint B." << G4endl; 247 G4Exception("G4 PropagatorInField::LocateIntersectionPoint()",251 G4Exception("G4BrentLocator::EstimateIntersectionPoint()", 248 252 "IntermediatePointConfusion", FatalException, 249 253 "Intermediate F point is past end B point" ); … … 371 375 // E <- H 372 376 // 373 CurrentA_PointVelocity =ApproxIntersecPointV;377 G4FieldTrack InterMed=ApproxIntersecPointV; 374 378 ApproxIntersecPointV = GetChordFinderFor()->ApproxCurvePointS( 375 379 CurrentA_PointVelocity,CurrentB_PointVelocity, 376 CurrentA_PointVelocity,CurrentE_Point,Point_A,PointH,380 InterMed,CurrentE_Point,CurrentF_Point,PointH, 377 381 false,GetEpsilonStepFor()); 382 CurrentA_PointVelocity = InterMed; 378 383 CurrentE_Point = PointH; 379 384 } … … 419 424 CurrentB_PointVelocity = CurveEndPointVelocity; 420 425 SubStart_PointVelocity = CurrentA_PointVelocity; 426 ApproxIntersecPointV = GetChordFinderFor() 427 ->ApproxCurvePointV( CurrentA_PointVelocity, 428 CurrentB_PointVelocity, 429 CurrentE_Point, 430 GetEpsilonStepFor()); 431 421 432 restoredFullEndpoint = true; 433 restartB++; // counter 422 434 } 423 435 else … … 428 440 CurrentB_PointVelocity = *ptrInterMedFT[depth]; 429 441 SubStart_PointVelocity = CurrentA_PointVelocity; 442 ApproxIntersecPointV = GetChordFinderFor() 443 ->ApproxCurvePointV( CurrentA_PointVelocity, 444 CurrentB_PointVelocity, 445 CurrentE_Point, 446 GetEpsilonStepFor()); 430 447 restoredFullEndpoint = true; 448 restartB++; // counter 431 449 } 432 450 } … … 467 485 if( curveDist < 0.0 ) 468 486 { 469 G4cerr << "ERROR - G4 PropagatorInField::LocateIntersectionPoint()"487 G4cerr << "ERROR - G4BrentLocator::EstimateIntersectionPoint()" 470 488 << G4endl 471 489 << " Error in advancing propagation." << G4endl; … … 488 506 } 489 507 G4cerr.precision(20); 490 G4cerr << " Point A (Curve start) is " << CurveStartPointVelocity 491 << G4endl; 492 G4cerr << " Point B (Curve end) is " << CurveEndPointVelocity 493 << G4endl; 494 G4cerr << " Point A (Current start) is " << CurrentA_PointVelocity 495 << G4endl; 496 G4cerr << " Point B (Current end) is " << CurrentB_PointVelocity 497 << G4endl; 498 G4cerr << " Point S (Sub start) is " << SubStart_PointVelocity 499 << G4endl; 500 G4cerr << " Point E (Trial Point) is " << CurrentE_Point 501 << G4endl; 502 G4cerr << " Point F (Intersection) is " << ApproxIntersecPointV 508 G4cerr << " Point A (Curve start) is " << CurveStartPointVelocity 509 << G4endl; 510 G4cerr << " Point B (Curve end) is " << CurveEndPointVelocity 511 << G4endl; 512 G4cerr << " Point A (Current start) is " << CurrentA_PointVelocity 513 << G4endl; 514 G4cerr << " Point B (Current end) is " << CurrentB_PointVelocity 515 << G4endl; 516 G4cerr << " Point S (Sub start) is " << SubStart_PointVelocity 517 << G4endl; 518 G4cerr << " Point E (Trial Point) is " << CurrentE_Point 519 << G4endl; 520 G4cerr << " Old Point F(Intersection) is " << CurrentF_Point 521 << G4endl; 522 G4cerr << " New Point F(Intersection) is " << ApproxIntersecPointV 503 523 << G4endl; 504 524 G4cerr << " LocateIntersection parameters are : Substep no= " … … 506 526 G4cerr << " Substep depth no= "<< substep_no_p << " Depth= " 507 527 << depth << G4endl; 508 509 G4Exception("G4PropagatorInField::LocateIntersectionPoint()", 528 G4cerr << " Restarted no= "<< restartB << " Epsilon= " 529 << GetEpsilonStepFor() <<" DeltaInters= " 530 << GetDeltaIntersectionFor() << G4endl; 531 532 G4Exception("G4BrentLocator::EstimateIntersectionPoint()", 510 533 "FatalError", FatalException, 511 534 "Error in advancing propagation."); … … 524 547 { 525 548 G4cout << "Difficulty in converging in " 526 << "G4 PropagatorInField::LocateIntersectionPoint():"549 << "G4BrentLocator::EstimateIntersectionPoint()" 527 550 << G4endl 528 551 << " Substep no = " << substep_no << G4endl; … … 679 702 && !found_approximate_intersection ) 680 703 { 681 G4cerr << "WARNING - G4 PropagatorInField::LocateIntersectionPoint()"704 G4cerr << "WARNING - G4BrentLocator::EstimateIntersectionPoint()" 682 705 << G4endl 683 706 << " Convergence is requiring too many substeps: " … … 686 709 G4cerr << " Information on start & current step follows in cout." 687 710 << G4endl; 688 G4cout << "WARNING - G4 PropagatorInField::LocateIntersectionPoint()"711 G4cout << "WARNING - G4BrentLocator::EstimateIntersectionPoint()" 689 712 << G4endl 690 713 << " Convergence is requiring too many substeps: " … … 708 731 G4double done_len = CurrentA_PointVelocity.GetCurveLength(); 709 732 G4double full_len = CurveEndPointVelocity.GetCurveLength(); 710 G4cout << "ERROR - G4 PropagatorInField::LocateIntersectionPoint()"733 G4cout << "ERROR - G4BrentLocator::EstimateIntersectionPoint()" 711 734 << G4endl 712 735 << " Undertaken only length: " << done_len … … 714 737 G4cout << " Remaining length = " << full_len - done_len << G4endl; 715 738 716 G4Exception("G4 PropagatorInField::LocateIntersectionPoint()",739 G4Exception("G4BrentLocator::EstimateIntersectionPoint()", 717 740 "UnableToLocateIntersection", FatalException, 718 741 "Too many substeps while trying to locate intersection."); … … 721 744 { 722 745 G4int oldprc= G4cout.precision( 10 ); 723 G4cout << "WARNING - G4 PropagatorInField::LocateIntersectionPoint()"746 G4cout << "WARNING - G4BrentLocator::EstimateIntersectionPoint()" 724 747 << G4endl 725 748 << " Undertaken length: " … … 728 751 << " Warning level = " << warn_substeps 729 752 << " and maximum substeps = " << max_substeps << G4endl; 730 G4Exception("G4 PropagatorInField::LocateIntersectionPoint()",753 G4Exception("G4BrentLocator::EstimateIntersectionPoint()", 731 754 "DifficultyToLocateIntersection", JustWarning, 732 755 "Many substeps while trying to locate intersection."); -
trunk/source/geometry/navigation/src/G4DrawVoxels.cc
r921 r1058 26 26 // 27 27 // $Id: G4DrawVoxels.cc,v 1.4 2006/06/29 18:36:34 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 2-cand-01 $28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/navigation/src/G4MultiLevelLocator.cc
r985 r1058 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4MultiLevelLocator.cc,v 1. 4 2008/11/14 18:26:35 gcosmoExp $27 // GEANT4 tag $Name: geant4-09-0 2-cand-01 $28 // 29 // Class G4 BrentLocator implementation26 // $Id: G4MultiLevelLocator.cc,v 1.5 2008/12/11 10:01:02 tnikitin Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 // 29 // Class G4MultiLevelLocator implementation 30 30 // 31 31 // 27.10.08 - Tatiana Nikitina. … … 160 160 if( (TrialPoint - StartPosition).mag() < tolerance * mm ) 161 161 { 162 G4cerr << "WARNING - G4 PropagatorInField::LocateIntersectionPoint()"162 G4cerr << "WARNING - G4MultiLevelLocator::EstimateIntersectionPoint()" 163 163 << G4endl 164 164 << " Intermediate F point is on top of starting point A." 165 165 << G4endl; 166 G4Exception("G4 PropagatorInField::LocateIntersectionPoint()",166 G4Exception("G4MultiLevelLocator::EstimateIntersectionPoint()", 167 167 "IntersectionPointIsAtStart", JustWarning, 168 168 "Intersection point F is exactly at start point A." ); … … 216 216 CurrentB_PointVelocity.GetCurveLength() * (1.0 + tolerance) ) 217 217 { 218 G4cerr << "ERROR - G4 PropagatorInField::LocateIntersectionPoint()"218 G4cerr << "ERROR - G4MultiLevelLocator::EstimateIntersectionPoint()" 219 219 << G4endl 220 220 << " Intermediate F point is more advanced than" 221 221 << " endpoint B." << G4endl; 222 G4Exception("G4 PropagatorInField::LocateIntersectionPoint()",222 G4Exception("G4multiLevelLocator::EstimateIntersectionPoint()", 223 223 "IntermediatePointConfusion", FatalException, 224 224 "Intermediate F point is past end B point" ); … … 435 435 if( curveDist < 0.0 ) 436 436 { 437 G4cerr << "ERROR - G4 PropagatorInField::LocateIntersectionPoint()"437 G4cerr << "ERROR - G4MultiLevelLocator::EstimateIntersectionPoint()" 438 438 << G4endl 439 439 << " Error in advancing propagation." << G4endl; … … 475 475 << depth << G4endl; 476 476 477 G4Exception("G4 PropagatorInField::LocateIntersectionPoint()",477 G4Exception("G4MultiLevelLocator::EstimateIntersectionPoint()", 478 478 "FatalError", FatalException, 479 479 "Error in advancing propagation."); … … 491 491 { 492 492 G4cout << "Difficulty in converging in " 493 << "G4 PropagatorInField::LocateIntersectionPoint():"493 << "G4MultiLevelLocator::EstimateIntersectionPoint():" 494 494 << G4endl 495 495 << " Substep no = " << substep_no << G4endl; … … 643 643 && !found_approximate_intersection ) 644 644 { 645 G4cerr << "WARNING - G4 PropagatorInField::LocateIntersectionPoint()"645 G4cerr << "WARNING - G4MultiLevelLocator::EstimateIntersectionPoint()" 646 646 << G4endl 647 647 << " Convergence is requiring too many substeps: " … … 650 650 G4cerr << " Information on start & current step follows in cout." 651 651 << G4endl; 652 G4cout << "WARNING - G4 PropagatorInField::LocateIntersectionPoint()"652 G4cout << "WARNING - G4MultiLevelLocator::EstimateIntersectionPoint()" 653 653 << G4endl 654 654 << " Convergence is requiring too many substeps: " … … 680 680 IntersectedOrRecalculatedFT = CurrentA_PointVelocity; 681 681 682 G4cout << "WARNING - G4 PropagatorInField::LocateIntersectionPoint()"682 G4cout << "WARNING - G4MultiLevelLocator::EstimateIntersectionPoint()" 683 683 << G4endl 684 684 << " Did not convergence after " << substep_no … … 694 694 G4double done_len = CurrentA_PointVelocity.GetCurveLength(); 695 695 G4double full_len = CurveEndPointVelocity.GetCurveLength(); 696 G4cout << "ERROR - G4 PropagatorInField::LocateIntersectionPoint()"696 G4cout << "ERROR - G4MultiLevelLocator::EstimateIntersectionPoint()" 697 697 << G4endl 698 698 << " Undertaken only length: " << done_len … … 700 700 G4cout << " Remaining length = " << full_len - done_len << G4endl; 701 701 702 G4Exception("G4 PropagatorInField::LocateIntersectionPoint()",702 G4Exception("G4MultiLevelLocator::EstimateIntersectionPoint()", 703 703 "UnableToLocateIntersection", FatalException, 704 704 "Too many substeps while trying to locate intersection."); … … 707 707 { 708 708 G4int oldprc= G4cout.precision( 10 ); 709 G4cout << "WARNING - G4 PropagatorInField::LocateIntersectionPoint()"709 G4cout << "WARNING - G4MultiLevelLocator::EstimateIntersectionPoint()" 710 710 << G4endl 711 711 << " Undertaken length: " … … 714 714 << " Warning level = " << warn_substeps 715 715 << " and maximum substeps = " << max_substeps << G4endl; 716 G4Exception("G4 PropagatorInField::LocateIntersectionPoint()",716 G4Exception("G4MultiLevelLocator::EstimateIntersectionPoint()", 717 717 "DifficultyToLocateIntersection", JustWarning, 718 718 "Many substeps while trying to locate intersection."); -
trunk/source/geometry/navigation/src/G4Navigator.cc
r921 r1058 25 25 // 26 26 // 27 // $Id: G4Navigator.cc,v 1.3 8 2008/10/24 14:00:03 gcosmoExp $27 // $Id: G4Navigator.cc,v 1.39 2009/05/08 06:47:32 tnikitin Exp $ 28 28 // GEANT4 tag $ Name: $ 29 29 // … … 1018 1018 if( mRot ) 1019 1019 { 1020 fGrandMotherExitNormal *= (*mRot) ;1020 fGrandMotherExitNormal *= (*mRot).inverse(); 1021 1021 } 1022 1022 } -
trunk/source/geometry/navigation/src/G4PathFinder.cc
r921 r1058 25 25 // 26 26 // 27 // $Id: G4PathFinder.cc,v 1.6 1 2008/11/13 12:59:26 gcosmoExp $27 // $Id: G4PathFinder.cc,v 1.62 2009/05/13 23:20:54 japost Exp $ 28 28 // GEANT4 tag $ Name: $ 29 29 // … … 1052 1052 G4double step= fCurrentStepSize[num]; 1053 1053 1054 limitedStep = ( step == fMinStep ) && ( step != kInfinity); 1055 1054 limitedStep = ( std::fabs(step - fMinStep) < kCarTolerance ) 1055 && ( step != kInfinity); 1056 1056 1057 fLimitTruth[ num ] = limitedStep; 1057 1058 if( limitedStep ) -
trunk/source/geometry/navigation/src/G4PhantomParameterisation.cc
r831 r1058 25 25 // 26 26 // 27 // $Id: G4PhantomParameterisation.cc,v 1. 4 2008/01/22 15:02:36gcosmo Exp $27 // $Id: G4PhantomParameterisation.cc,v 1.6 2009/05/20 08:27:10 gcosmo Exp $ 28 28 // GEANT4 tag $ Name:$ 29 29 // … … 77 77 } 78 78 79 //------------------------------------------------------------------ 80 void G4PhantomParameterisation:: 81 BuildContainerSolid( G4VSolid *pMotherSolid ) 82 { 83 fContainerSolid = pMotherSolid; 84 fContainerWallX = fNoVoxelX * fVoxelHalfX; 85 fContainerWallY = fNoVoxelY * fVoxelHalfY; 86 fContainerWallZ = fNoVoxelZ * fVoxelHalfZ; 87 88 // CheckVoxelsFillContainer(); 89 } 90 79 91 80 92 //------------------------------------------------------------------ … … 134 146 CheckCopyNo( copyNo ); 135 147 148 if( !fMaterialIndices ) { return 0; } 136 149 return *(fMaterialIndices+copyNo); 137 150 } -
trunk/source/geometry/navigation/src/G4PropagatorInField.cc
r921 r1058 48 48 #include "G4VCurvedTrajectoryFilter.hh" 49 49 #include "G4ChordFinder.hh" 50 #include "G4 BrentLocator.hh"50 #include "G4MultiLevelLocator.hh" 51 51 52 52 /////////////////////////////////////////////////////////////////////////// … … 86 86 // Definding Intersection Locator and his parameters 87 87 if(vLocator==0){ 88 fIntersectionLocator= new G4 BrentLocator(theNavigator);88 fIntersectionLocator= new G4MultiLevelLocator(theNavigator); 89 89 fAllocatedLocator=true; 90 90 }else{ -
trunk/source/geometry/navigation/src/G4RegularNavigation.cc
r831 r1058 25 25 // 26 26 // 27 // $Id: G4RegularNavigation.cc,v 1. 7 2007/12/10 16:30:01 gunterExp $27 // $Id: G4RegularNavigation.cc,v 1.9 2009/01/27 09:31:29 gcosmo Exp $ 28 28 // GEANT4 tag $ Name:$ 29 29 // … … 41 41 #include "G4Navigator.hh" 42 42 #include "G4GeometryTolerance.hh" 43 #include "G4RegularNavigationHelper.hh" 43 44 44 45 //------------------------------------------------------------------ … … 134 135 G4VPhysicalVolume* pCurrentPhysical) 135 136 { 137 G4RegularNavigationHelper::ClearStepLengths(); 138 136 139 G4PhantomParameterisation *param = 137 140 (G4PhantomParameterisation*)(pCurrentPhysical->GetParameterisation()); 138 141 139 if( !param->SkipEqualMaterials() ) { 142 if( !param->SkipEqualMaterials() ) 143 { 140 144 return fnormalNav->ComputeStep(localPoint, 141 localDirection,142 currentProposedStepLength,143 newSafety,144 history,145 validExitNormal,146 exitNormal,147 exiting,148 entering,149 pBlockedPhysical,150 blockedReplicaNo);145 localDirection, 146 currentProposedStepLength, 147 newSafety, 148 history, 149 validExitNormal, 150 exitNormal, 151 exiting, 152 entering, 153 pBlockedPhysical, 154 blockedReplicaNo); 151 155 } 152 156 … … 198 202 { 199 203 newStep = voxelBox->DistanceToOut( localPoint, localDirection ); 204 200 205 if( (bFirstStep) && (newStep < currentProposedStepLength) ) 201 206 { … … 214 219 return currentProposedStepLength; 215 220 } 221 if(totalNewStep > currentProposedStepLength) 222 { 223 G4RegularNavigationHelper:: 224 AddStepLength(copyNo, newStep-totalNewStep+currentProposedStepLength); 225 return currentProposedStepLength; 226 } 227 else 228 { 229 G4RegularNavigationHelper::AddStepLength( copyNo, newStep ); 230 } 231 216 232 217 233 // Move container point until wall of voxel … … 229 245 G4ThreeVector voxelTranslation = param->GetTranslation( copyNo ); 230 246 247 // G4cout << " copyNo " << copyNo << " = " << pCurrentPhysical->GetCopyNo() << G4endl; 231 248 // Move local point until wall of voxel and then put it in the new voxel 232 249 // local coordinates -
trunk/source/geometry/navigation/src/G4SimpleLocator.cc
r985 r1058 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4SimpleLocator.cc,v 1. 4 2008/11/14 18:26:35 gcosmoExp $27 // GEANT4 tag $Name: geant4-09-0 2-cand-01 $26 // $Id: G4SimpleLocator.cc,v 1.5 2008/12/11 10:27:58 tnikitin Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // Class G4SimpleLocator implementation … … 121 121 if( (TrialPoint - StartPosition).mag() < tolerance * mm ) 122 122 { 123 G4cerr << "WARNING - G4 PropagatorInField::LocateIntersectionPoint()"123 G4cerr << "WARNING - G4SimpleLocator::EstimateIntersectionPoint()" 124 124 << G4endl 125 125 << " Intermediate F point is on top of starting point A." 126 126 << G4endl; 127 G4Exception("G4 PropagatorInField::LocateIntersectionPoint()",127 G4Exception("G4SimpleLocator::EstimateIntersectionPoint()", 128 128 "IntersectionPointIsAtStart", JustWarning, 129 129 "Intersection point F is exactly at start point A." ); … … 150 150 CurrentB_PointVelocity.GetCurveLength() * (1.0 + tolerance) ) 151 151 { 152 G4cerr << "ERROR - G4 PropagatorInField::LocateIntersectionPoint()"152 G4cerr << "ERROR - G4SimpleLocator::EstimateIntersectionPoint()" 153 153 << G4endl 154 154 << " Intermediate F point is more advanced than" 155 155 << " endpoint B." << G4endl; 156 G4Exception("G4 PropagatorInField::LocateIntersectionPoint()",156 G4Exception("G4SimpleLocator::EstimateIntersectionPoint()", 157 157 "IntermediatePointConfusion", FatalException, 158 158 "Intermediate F point is past end B point" ); … … 338 338 if( curveDist < 0.0 ) 339 339 { 340 G4cerr << "ERROR - G4 PropagatorInField::LocateIntersectionPoint()"340 G4cerr << "ERROR - G4SimpleLocator::EstimateIntersectionPoint()" 341 341 << G4endl 342 342 << " Error in advancing propagation." << G4endl; … … 374 374 << substep_no << G4endl; 375 375 376 G4Exception("G4 PropagatorInField::LocateIntersectionPoint()",376 G4Exception("G4SimpleLocator::EstimateIntersectionPoint()", 377 377 "FatalError", FatalException, 378 378 "Error in advancing propagation."); … … 391 391 { 392 392 G4cout << "Difficulty in converging in " 393 << "G4 PropagatorInField::LocateIntersectionPoint():"393 << "G4SimpleLocator::EstimateIntersectionPoint():" 394 394 << G4endl 395 395 << " Substep no = " << substep_no << G4endl; … … 426 426 && !found_approximate_intersection ) 427 427 { 428 G4cerr << "WARNING - G4 PropagatorInField::LocateIntersectionPoint()"428 G4cerr << "WARNING - G4SimpleLocator::EstimateIntersectionPoint()" 429 429 << G4endl 430 430 << " Convergence is requiring too many substeps: " … … 433 433 G4cerr << " Information on start & current step follows in cout." 434 434 << G4endl; 435 G4cout << "WARNING - G4 PropagatorInField::LocateIntersectionPoint()"435 G4cout << "WARNING - G4SimpleLocator::EstimateIntersectionPoint()" 436 436 << G4endl 437 437 << " Convergence is requiring too many substeps: " … … 455 455 G4double done_len = CurrentA_PointVelocity.GetCurveLength(); 456 456 G4double full_len = CurveEndPointVelocity.GetCurveLength(); 457 G4cout << "ERROR - G4 PropagatorInField::LocateIntersectionPoint()"457 G4cout << "ERROR - G4SimpleLocator::EstimateIntersectionPoint()" 458 458 << G4endl 459 459 << " Undertaken only length: " << done_len … … 461 461 G4cout << " Remaining length = " << full_len - done_len << G4endl; 462 462 463 G4Exception("G4 PropagatorInField::LocateIntersectionPoint()",463 G4Exception("G4SimpleLocator::EstimateIntersectionPoint()", 464 464 "UnableToLocateIntersection", FatalException, 465 465 "Too many substeps while trying to locate intersection."); … … 468 468 { 469 469 G4int oldprc= G4cout.precision( 10 ); 470 G4cout << "WARNING - G4 PropagatorInField::LocateIntersectionPoint()"470 G4cout << "WARNING - G4SimpleLocator::EstimateIntersectionPoint()" 471 471 << G4endl 472 472 << " Undertaken length: " … … 475 475 << " Warning level = " << warn_substeps 476 476 << " and maximum substeps = " << max_substeps << G4endl; 477 G4Exception("G4 PropagatorInField::LocateIntersectionPoint()",477 G4Exception("G4SimpleLocator::EstimateIntersectionPoint()", 478 478 "DifficultyToLocateIntersection", JustWarning, 479 479 "Many substeps while trying to locate intersection."); -
trunk/source/geometry/navigation/src/G4VIntersectionLocator.cc
r985 r1058 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VIntersectionLocator.cc,v 1. 4 2008/11/14 18:26:35 gcosmoExp $27 // GEANT4 tag $Name: geant4-09-0 2-cand-01 $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 $ 28 28 // 29 29 // Class G4VIntersectionLocator implementation … … 342 342 // 343 343 G4double n_d_m = Normal.dot(MomentumDir); 344 if ( std::abs(n_d_m) <kCarTolerance )344 if ( std::abs(n_d_m)>kCarTolerance ) 345 345 { 346 346 if ( fVerboseLevel>1 )
Note:
See TracChangeset
for help on using the changeset viewer.
