Changeset 963 for trunk/source/processes/transportation/src
- Timestamp:
- Apr 6, 2009, 12:34:39 PM (15 years ago)
- Location:
- trunk/source/processes/transportation/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/transportation/src/G4CoupledTransportation.cc
r819 r963 25 25 // 26 26 // 27 // $Id: G4CoupledTransportation.cc,v 1.2 4 2007/12/07 16:29:07japost Exp $27 // $Id: G4CoupledTransportation.cc,v 1.27 2008/11/26 13:01:28 japost Exp $ 28 28 // --> Merged with 1.60.4.2.2.3 2007/05/09 09:30:28 japost 29 // GEANT4 tag $Name: $29 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 30 30 // ------------------------------------------------------------ 31 31 // GEANT 4 class implementation … … 86 86 } 87 87 fPathFinder= G4PathFinder::GetInstance(); 88 fpSafetyHelper = transportMgr->GetSafetyHelper(); // New 88 89 89 90 // Following assignment is to fix small memory leak from simple use of 'new' … … 289 290 fPreviousMassSafety = newMassSafety ; 290 291 fPreviousFullSafety = newFullSafety ; 291 // f SafetyHelper->SetCurrentSafety( newFullSafety, startPosition);292 // fpSafetyHelper->SetCurrentSafety( newFullSafety, startPosition); 292 293 293 294 #ifdef G4DEBUG_TRANSPORT … … 397 398 398 399 // Update safety for the end-point, if becomes negative at the end-point. 399 // To-Try: No safety update if at a boundary 400 if( startFullSafety < endpointDistance ) // && !fAnyGeometryLimitedStep ) 400 401 if( (startFullSafety < endpointDistance ) 402 && ( particleCharge != 0.0 ) ) // Only needed to prepare for Mult Scat. 403 // && !fAnyGeometryLimitedStep ) // To-Try: No safety update if at a boundary 401 404 { 402 405 G4double endFullSafety = … … 408 411 // ==> so we use the all-geometry safety as a precaution 409 412 413 fpSafetyHelper->SetCurrentSafety( endFullSafety, fTransportEndPosition); 414 // Pushing safety to Helper avoids recalculation at this point 415 410 416 G4ThreeVector centerPt= G4ThreeVector(0.0, 0.0, 0.0); // Used for return value 411 417 G4double endMassSafety= fPathFinder->ObtainSafety( fNavigatorId, centerPt); … … 415 421 fPreviousFullSafety = endFullSafety; 416 422 fPreviousSftOrigin = fTransportEndPosition ; 417 // fSafetyHelper->SetCurrentSafety( endFullSafety, fTransportEndPosition);418 423 419 424 // The convention (Stepping Manager's) is safety from the start point -
trunk/source/processes/transportation/src/G4NeutronKiller.cc
r819 r963 25 25 // 26 26 // $Id: G4NeutronKiller.cc,v 1.2 2007/06/01 07:53:27 ahoward Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 //--------------------------------------------------------------------------- -
trunk/source/processes/transportation/src/G4NeutronKillerMessenger.cc
r819 r963 25 25 // 26 26 // $Id: G4NeutronKillerMessenger.cc,v 1.2 2007/06/01 07:53:27 ahoward Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 //--------------------------------------------------------------------------- -
trunk/source/processes/transportation/src/G4StepLimiter.cc
r819 r963 26 26 // 27 27 // $Id: G4StepLimiter.cc,v 1.4 2007/06/01 07:53:27 ahoward Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // -------------------------------------------------------------- -
trunk/source/processes/transportation/src/G4Transportation.cc
r819 r963 25 25 // 26 26 // 27 // $Id: G4Transportation.cc,v 1.72.2. 1 2007/12/07 17:18:11japost Exp $28 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $27 // $Id: G4Transportation.cc,v 1.72.2.3 2008/11/21 18:35:15 japost Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // ------------------------------------------------------------ … … 37 37 // geometrical sub-volumes of the detectors. 38 38 // 39 // It is also tasked with part of updating the "safety". 39 // It is also tasked with the key role of proposing the "isotropic safety", 40 // which will be used to update the post-step point's safety. 40 41 // 41 42 // ======================================================================= 42 43 // Modified: 43 // 19 Jan 2006, P.MoraDeFreitas: Fix for suspended tracks (StartTracking) 44 // 11 Aug 2004, M.Asai: Add G4VSensitiveDetector* for updating stepPoint. 45 // 21 June 2003, J.Apostolakis: Calling field manager with 46 // track, to enable it to configure its accuracy 47 // 13 May 2003, J.Apostolakis: Zero field areas now taken into 48 // account correclty in all cases (thanks to W Pokorski). 49 // 29 June 2001, J.Apostolakis, D.Cote-Ahern, P.Gumplinger: 50 // correction for spin tracking 51 // 20 Febr 2001, J.Apostolakis: update for new FieldTrack 52 // 22 Sept 2000, V.Grichine: update of Kinetic Energy 44 // 20 Nov 2008, J.Apostolakis: Push safety to helper - after ComputeSafety 45 // 9 Nov 2007, J.Apostolakis: Flag for short steps, push safety to helper 46 // 19 Jan 2006, P.MoraDeFreitas: Fix for suspended tracks (StartTracking) 47 // 11 Aug 2004, M.Asai: Add G4VSensitiveDetector* for updating stepPoint. 48 // 21 June 2003, J.Apostolakis: Calling field manager with 49 // track, to enable it to configure its accuracy 50 // 13 May 2003, J.Apostolakis: Zero field areas now taken into 51 // account correclty in all cases (thanks to W Pokorski). 52 // 29 June 2001, J.Apostolakis, D.Cote-Ahern, P.Gumplinger: 53 // correction for spin tracking 54 // 20 Febr 2001, J.Apostolakis: update for new FieldTrack 55 // 22 Sept 2000, V.Grichine: update of Kinetic Energy 53 56 // Created: 19 March 1997, J. Apostolakis 54 57 // ======================================================================= … … 58 61 #include "G4ParticleTable.hh" 59 62 #include "G4ChordFinder.hh" 63 #include "G4SafetyHelper.hh" 60 64 #include "G4FieldManagerStore.hh" 61 65 class G4VSensitiveDetector; … … 89 93 fFieldPropagator = transportMgr->GetPropagatorInField() ; 90 94 91 // fpSafetyHelper = fpTransportManager->GetSafetyHelper(); // New95 fpSafetyHelper = transportMgr->GetSafetyHelper(); // New 92 96 93 97 // Cannot determine whether a field exists here, … … 108 112 G4Transportation::~G4Transportation() 109 113 { 110 111 // --- Alternative code to delete 'junk data' in touchable handle112 // ** Corresponds to the case that the constructor has113 // fCurrentTouchableHandle = new G4TouchableHistory();114 // ** Likely incorrect - as at the end of the simulation115 // the handle no longer holds the original 'null' history116 // G4VTouchable* pTouchable= fCurrentTouchableHandle(); // Incorrect117 // delete pTouchable; // Incorrect118 119 114 if( (fVerboseLevel > 0) && (fSumEnergyKilled > 0.0 ) ){ 120 115 G4cout << " G4Transportation: Statistics for looping particles " << G4endl; … … 233 228 fPreviousSftOrigin = startPosition ; 234 229 fPreviousSafety = newSafety ; 235 // f SafetyHelper->SetCurrentSafety( newSafety, startPosition);230 // fpSafetyHelper->SetCurrentSafety( newSafety, startPosition); 236 231 237 232 // The safety at the initial point has been re-calculated: … … 312 307 fPreviousSftOrigin = startPosition ; 313 308 fPreviousSafety = currentSafety ; 314 // f SafetyHelper->SetCurrentSafety( newSafety, startPosition);309 // fpSafetyHelper->SetCurrentSafety( newSafety, startPosition); 315 310 316 311 // Get the End-Position and End-Momentum (Dir-ection) … … 415 410 if( currentSafety < endpointDistance ) 416 411 { 417 G4double endSafety = 412 // if( particleCharge == 0.0 ) 413 // G4cout << " Avoiding call to ComputeSafety : charge = 0.0 " << G4endl; 414 415 if( particleCharge != 0.0 ) { 416 417 G4double endSafety = 418 418 fLinearNavigator->ComputeSafety( fTransportEndPosition) ; 419 420 421 422 // fSafetyHelper->SetCurrentSafety( currentSafety, fTransportEndPosition);423 424 425 426 427 419 currentSafety = endSafety ; 420 fPreviousSftOrigin = fTransportEndPosition ; 421 fPreviousSafety = currentSafety ; 422 fpSafetyHelper->SetCurrentSafety( currentSafety, fTransportEndPosition); 423 424 // Because the Stepping Manager assumes it is from the start point, 425 // add the StepLength 426 // 427 currentSafety += endpointDistance ; 428 428 429 429 #ifdef G4DEBUG_TRANSPORT 430 431 432 433 434 435 430 G4cout.precision(12) ; 431 G4cout << "***G4Transportation::AlongStepGPIL ** " << G4endl ; 432 G4cout << " Called Navigator->ComputeSafety at " << fTransportEndPosition 433 << " and it returned safety= " << endSafety << G4endl ; 434 G4cout << " Adding endpoint distance " << endpointDistance 435 << " to obtain pseudo-safety= " << currentSafety << G4endl ; 436 436 #endif 437 } 437 438 } 438 439 -
trunk/source/processes/transportation/src/G4UserSpecialCuts.cc
r819 r963 26 26 // 27 27 // $Id: G4UserSpecialCuts.cc,v 1.17 2007/06/01 07:53:27 ahoward Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // -------------------------------------------------------------- -
trunk/source/processes/transportation/src/G4VTrackTerminator.cc
r819 r963 26 26 // 27 27 // $Id: G4VTrackTerminator.cc,v 1.7 2007/06/01 07:53:27 ahoward Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // ----------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.