- Timestamp:
- Jun 18, 2010, 11:42:07 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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. 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.