Changeset 1315 for trunk/source/geometry/navigation
- Timestamp:
- Jun 18, 2010, 11:42:07 AM (15 years ago)
- Location:
- trunk/source/geometry/navigation
- Files:
-
- 2 edited
-
History (modified) (2 diffs)
-
src/G4PropagatorInField.cc (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/geometry/navigation/History
r1228 r1315 1 $Id: History,v 1.13 8 2009/12/11 05:48:53 japostExp $1 $Id: History,v 1.139 2010/03/08 13:57:48 gcosmo Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 17 17 * Reverse chronological order (last date on top), please * 18 18 ---------------------------------------------------------- 19 Dec 11th, 2009 - J.Apostolakis (geomnav-V09-02-11) 20 ------------------------------ 21 - G4PropagatorInField 22 * Implementation field by Region 23 - with extra checking of logical volume 24 25 Nov 30th, 2009 - J.Apostolakis (geomnav-V09-02-10) 26 ------------------------------ 27 - G4VIntersectionLocator 28 * Fix problem in ReEstimateEndPoint() behaviour for very small steps. 29 30 * Corrected constructor to ensure that it initialises all data members. 31 * Labelled the methods (in header) to make noticable those that 32 must changed at every step. 33 ( attributes: ChordFinder, EpsilonStep, Navigator ) 19 20 March 8th, 2010 - G.Cosmo (geomnav-V09-03-00) 21 ------------------------- 22 - Avoid unnecessary creation of string for debug purposes in G4PropagatorInField. 23 Courtesy of P.Elmer (CMS). 24 - Some printout formatting... 25 26 December 11th, 2009 - J.Apostolakis (geomnav-V09-02-11) 27 ----------------------------------- 28 - Implemented field by region in G4PropagatorInField, with extra checking of 29 logical volume. 30 31 November 30th, 2009 - J.Apostolakis (geomnav-V09-02-10) 32 ----------------------------------- 33 - Fixes in G4VIntersectionLocator: 34 * Fixed problem in ReEstimateEndPoint() behaviour for very small steps. 35 * Corrected constructor to ensure that it initialises all data members. 36 * Labelled the methods (in header) to make noticable those that must change 37 at every step (attributes: 'ChordFinder', 'EpsilonStep', 'Navigator'). 34 38 35 39 Nov 23rd, 2009 - J.Apostolakis 36 40 ------------------------------ 37 - Fixed G4PropagatorInField.cc: 38 * Revise condition for flagging ZeroStep to avoid fake triggering. 39 Small proposed steps (from Physics) could trigger the previous 40 simple condition for Tiny/Zero Problem steps. 41 [ This was first commited on branch geomnav-V09-02-08_branch 42 and tagged geomnav-V09-02-80 ] 43 44 Nov 12th, 2009 - J.Apostolakis (geomnav-V09-02-09) 45 ------------------------------ 46 - G4PropagatorInField: cleanup of minor methods: 47 Added new method RefreshIntersectionLocator to update the state of 48 Use this method to synchronise with IntersectionLocator. 49 Deleted long obsolete methods: SetAccuraciesWithDeltaOneStep 50 SetDeltaIntersection, SetDeltaOneStep 51 Revised implementation to avoid using the older methods 52 GetDeltaIntersection GetDeltaOneStep 53 54 Nov 12th, 2009 - J.Apostolakis (geomnav-V09-02-08) 55 ------------------------------ 41 - Fixes in G4PropagatorInField.cc: 42 * Revised condition for flagging ZeroStep to avoid fake triggering. Small 43 proposed steps (from Physics) could trigger the previous simple condition 44 for Tiny/Zero Problem steps. 45 46 November 12th, 2009 - J.Apostolakis (geomnav-V09-02-09) 47 ----------------------------------- 48 - Cleanup of minor methods in G4PropagatorInField: 49 * Added new method RefreshIntersectionLocator() to update the state of locator. 50 It is used to synchronise with G4IntersectionLocator. 51 * Deleted long obsolete methods: SetAccuraciesWithDeltaOneStep(), 52 SetDeltaIntersection() and SetDeltaOneStep(). 53 * Revised implementation to avoid using the older methods GetDeltaIntersection() 54 and GetDeltaOneStep(). 55 56 November 12th, 2009 - J.Apostolakis (geomnav-V09-02-08) 57 ----------------------------------- 56 58 - Refined G4PropagatorInField.cc: 57 59 * Changed parameters for treating consecutive tiny/zero steps: 58 60 - the value of default decrease factor to 0.25 (from 0.1), 59 - the value is not used when the step size falls below a certain threshold .s60 This threshold is changed. It is expressed as a multiple of fZeroStepThreshold 61 instead of kCarTolerance. The reasons are:62 * the threshold were meant to refer to the ZeroStepThreshold (it was kCarTolerance) 63 * the values were now much larger than this ZeroStepThreshold.64 - The value given to the decrease factor after the first such thresholds is changed to 0.3565 instead of 0.25, 0.5.61 - the value is not used when the step size falls below a certain thresholds 62 This threshold is changed. It is expressed as a multiple of fZeroStepThreshold 63 instead of kCarTolerance. This, since the thresholds were meant to refer to 64 the ZeroStepThreshold (it was kCarTolerance), and the values were now much 65 larger than 'ZeroStepThreshold'. 66 - The value given to the decrease factor after the first such thresholds is 67 changed to 0.35 instead of 0.25, 0.5. 66 68 * Improved printing of Diagnostic message. 67 69 68 Nov 3rd, 2009 - J.Apostolakis (geomnav-V09-02-07)69 ------------------------------ 70 November 3rd, 2009 - J.Apostolakis (geomnav-V09-02-07) 71 ---------------------------------- 70 72 - Refined G4PropagatorInField.cc: 71 * Added new member fZeroStepThreshold, to enable tuning of threshold for Tiny/Zero steps. 73 * Added new member fZeroStepThreshold, to enable tuning of threshold for 74 Tiny/Zero steps. 72 75 * Changed default value from 0.5 * kCarTolerance 73 to max (100,000 * kCarTolerance, 0.1 * micron ) 74 * This is first revision to address problem seen at boundary of volumes (Reports of Atlas) . 76 to max (100,000 * kCarTolerance, 0.1 * micron ) 77 * This is first revision to address problem seen at boundary of volumes 78 (Reports of ATLAS). 75 79 76 80 June 2nd, 2009 - J.Apostolakis (geomnav-V09-02-06) -
trunk/source/geometry/navigation/src/G4PropagatorInField.cc
r1228 r1315 36 36 // 17.03.97 John Apostolakis, renaming new set functions being added 37 37 // 38 // $Id: G4PropagatorInField.cc,v 1.5 0 2009/12/10 08:41:54 japostExp $38 // $Id: G4PropagatorInField.cc,v 1.51 2010/03/08 13:57:34 gcosmo Exp $ 39 39 // GEANT4 tag $ Name: $ 40 40 // --------------------------------------------------------------------------- … … 129 129 G4double& currentSafety, // IN/OUT 130 130 G4VPhysicalVolume* pPhysVol) 131 { 132 const G4String MethodName("G4PropagatorInField::ComputeStep"); 133 131 { 134 132 // If CurrentProposedStepLength is too small for finding Chords 135 133 // then return with no action (for now - TODO: some action) … … 238 236 239 237 #ifdef G4DEBUG_FIELD 240 G4cout << MethodName << ": "241 << " Decreasing step - "238 G4cout << " G4PropagatorInField::ComputeStep(): " << G4endl 239 << " Decreasing step - " 242 240 << " decreaseFactor= " << std::setw(8) << decreaseFactor 243 241 << " stepTrial = " << std::setw(18) << stepTrial << " " … … 248 246 if( stepTrial == 0.0 ) // Change to make it < 0.1 * kCarTolerance ?? 249 247 { 250 G4cout << " G4PropagatorInField::ComputeStep "251 << " Particle abandoned due to lack of progress in field."248 G4cout << " G4PropagatorInField::ComputeStep(): " << G4endl 249 << " Particle abandoned due to lack of progress in field." 252 250 << G4endl 253 << " Properties : " << pFieldTrack << " "251 << " Properties : " << pFieldTrack << " " 254 252 << G4endl; 255 G4cerr << " G4PropagatorInField::ComputeStep "256 << " ERROR : attempting a zero step= " << stepTrial << G4endl257 << " while attempting to progress after " << fNoZeroStep258 << " trial steps. Will abandon step." << G4endl;253 G4cerr << " G4PropagatorInField::ComputeStep() - ERROR " << G4endl 254 << " Attempting a zero step = " << stepTrial << G4endl 255 << " while attempting to progress after " << fNoZeroStep 256 << " trial steps. Will abandon step." << G4endl; 259 257 fParticleIsLooping= true; 260 258 return 0; // = stepTrial; … … 351 349 if( (fVerboseLevel > 1) && (do_loop_count > fMax_loop_count-10 )) { 352 350 if( do_loop_count == fMax_loop_count-9 ){ 353 G4cout << " G4PropagatorInField::ComputeStep "354 << " Difficult track - taking many sub steps." << G4endl;351 G4cout << " G4PropagatorInField::ComputeStep(): " << G4endl 352 << " Difficult track - taking many sub steps." << G4endl; 355 353 } 356 354 printStatus( SubStepStartState, CurrentState, CurrentProposedStepLength, … … 369 367 fParticleIsLooping = true; 370 368 371 if ( fVerboseLevel > 0 ){ 372 G4cout << "G4PropagateInField: Killing looping particle " 369 if ( fVerboseLevel > 0 ) 370 { 371 G4cout << " G4PropagateInField::ComputeStep(): " << G4endl 372 << " Killing looping particle " 373 373 // << " of " << energy << " energy " 374 374 << " after " << do_loop_count << " field substeps " 375 375 << " totaling " << StepTaken / mm << " mm " ; 376 376 if( pPhysVol ) 377 G4cout << " in thevolume " << pPhysVol->GetName() ;377 G4cout << " in volume " << pPhysVol->GetName() ; 378 378 else 379 379 G4cout << " in unknown or null volume. " ; … … 401 401 - End_PointAndTangent.GetCurveLength()) > 3.e-4 * TruePathLength ) 402 402 { 403 G4cerr << " ERROR - G4PropagatorInField::ComputeStep():" << G4endl404 << " Curve length mis-match, is advancement wrong ? " << G4endl;405 G4cerr << " The curve length of the endpoint should be: "403 G4cerr << " G4PropagatorInField::ComputeStep() - ERROR" << G4endl 404 << " Curve length mis-match, is advancement wrong ? " << G4endl; 405 G4cerr << " The curve length of the endpoint should be: " 406 406 << OriginalState.GetCurveLength() + TruePathLength << G4endl 407 << " and it is instead: "407 << " and it is instead: " 408 408 << End_PointAndTangent.GetCurveLength() << "." << G4endl 409 << " A difference of: "409 << " A difference of: " 410 410 << OriginalState.GetCurveLength() + TruePathLength 411 411 - End_PointAndTangent.GetCurveLength() << G4endl; 412 G4cerr << " Original state= " << OriginalState << G4endl413 << " Proposed state= " << End_PointAndTangent << G4endl;414 G4Exception("G4PropagatorInField::ComputeStep()", "IncorrectProposedEndPoint",415 FatalException,412 G4cerr << " Original state = " << OriginalState << G4endl 413 << " Proposed state = " << End_PointAndTangent << G4endl; 414 G4Exception("G4PropagatorInField::ComputeStep()", 415 "IncorrectProposedEndPoint", FatalException, 416 416 "Curve length mis-match between original state and proposed endpoint of propagation."); 417 417 } … … 434 434 } 435 435 436 if( fNoZeroStep > fAbandonThreshold_NoZeroSteps ) { 436 if( fNoZeroStep > fAbandonThreshold_NoZeroSteps ) 437 { 437 438 fParticleIsLooping = true; 438 G4cout << " WARNING - G4PropagatorInField::ComputeStep():" << G4endl439 << " Zero progress for " << fNoZeroStep << " attempted steps."439 G4cout << " G4PropagatorInField::ComputeStep() - WARNING" << G4endl 440 << " Zero progress for " << fNoZeroStep << " attempted steps." 440 441 << G4endl; 441 G4cout << "Proposed Step is "<<CurrentProposedStepLength <<" but Step Taken is "<< fFull_CurveLen_of_LastAttempt <<G4endl; 442 G4cout << "For Particle with Charge ="<<fCharge 443 << " Momentum="<< fInitialMomentumModulus<<" Mass="<< fMass<<G4endl; 442 G4cout << " Proposed Step is " << CurrentProposedStepLength 443 << " but Step Taken is "<< fFull_CurveLen_of_LastAttempt << G4endl; 444 G4cout << " For Particle with Charge = " << fCharge 445 << " Momentum = "<< fInitialMomentumModulus 446 << " Mass = " << fMass << G4endl; 444 447 if( pPhysVol ) 445 G4cout << " in thevolume " << pPhysVol->GetName() ;448 G4cout << " in volume " << pPhysVol->GetName() ; 446 449 else 447 450 G4cout << " in unknown or null volume. " ; 448 451 G4cout << G4endl; 449 452 if ( fVerboseLevel > 2 ) 450 G4cout << " Particle that is stuckwill be killed." << G4endl;453 G4cout << " Particle is stuck; it will be killed." << G4endl; 451 454 fNoZeroStep = 0; 452 455 } … … 558 561 559 562 G4cout << "Step taken was " << step_len 560 << " out of PhysicalStep = " << requestStep << G4endl;563 << " out of PhysicalStep = " << requestStep << G4endl; 561 564 G4cout << "Final safety is: " << safety << G4endl; 562 565 … … 579 582 { 580 583 #if 0 581 G4cout << " PiF: NoZeroStep = " << fNoZeroStep582 << " CurrentProposedStepLength = " << CurrentProposedStepLength583 << " Full_curvelen_last =" << fFull_CurveLen_of_LastAttempt584 << " last proposed step-length = " << fLast_ProposedStepLength584 G4cout << " PiF: NoZeroStep = " << fNoZeroStep 585 << " CurrentProposedStepLength = " << CurrentProposedStepLength 586 << " Full_curvelen_last =" << fFull_CurveLen_of_LastAttempt 587 << " last proposed step-length = " << fLast_ProposedStepLength 585 588 << " decrease factor = " << decreaseFactor 586 589 << " step trial = " << stepTrial … … 698 701 // 699 702 G4MagInt_Driver* integrDriver= GetChordFinder()->GetIntegrationDriver(); 700 integrDriver->SetVerboseLevel( fVerboseLevel - 2 ); 703 integrDriver->SetVerboseLevel( fVerboseLevel - 2 ); 701 704 G4cout << "Set Driver verbosity to " << fVerboseLevel - 2 << G4endl; 702 705
Note:
See TracChangeset
for help on using the changeset viewer.
