Ignore:
Timestamp:
Apr 6, 2009, 12:34:39 PM (15 years ago)
Author:
garnier
Message:

update processes

Location:
trunk/source/processes/transportation/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/transportation/src/G4CoupledTransportation.cc

    r819 r963  
    2525//
    2626//
    27 // $Id: G4CoupledTransportation.cc,v 1.24 2007/12/07 16:29:07 japost Exp $
     27// $Id: G4CoupledTransportation.cc,v 1.27 2008/11/26 13:01:28 japost Exp $
    2828// --> 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 $
    3030// ------------------------------------------------------------
    3131//  GEANT 4 class implementation
     
    8686  }
    8787  fPathFinder=  G4PathFinder::GetInstance();
     88  fpSafetyHelper = transportMgr->GetSafetyHelper();  // New
    8889
    8990  // Following assignment is to fix small memory leak from simple use of 'new'
     
    289290      fPreviousMassSafety = newMassSafety ;         
    290291      fPreviousFullSafety = newFullSafety ;
    291       // fSafetyHelper->SetCurrentSafety( newFullSafety, startPosition);
     292      // fpSafetyHelper->SetCurrentSafety( newFullSafety, startPosition);
    292293
    293294#ifdef G4DEBUG_TRANSPORT
     
    397398
    398399  // 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
    401404  {
    402405      G4double endFullSafety =
     
    408411        //   ==> so we use the all-geometry safety as a precaution
    409412
     413      fpSafetyHelper->SetCurrentSafety( endFullSafety, fTransportEndPosition);
     414        // Pushing safety to Helper avoids recalculation at this point
     415
    410416      G4ThreeVector centerPt= G4ThreeVector(0.0, 0.0, 0.0);  // Used for return value
    411417      G4double endMassSafety= fPathFinder->ObtainSafety( fNavigatorId, centerPt);
     
    415421      fPreviousFullSafety = endFullSafety;
    416422      fPreviousSftOrigin = fTransportEndPosition ;
    417       // fSafetyHelper->SetCurrentSafety( endFullSafety, fTransportEndPosition);
    418423
    419424      // The convention (Stepping Manager's) is safety from the start point
  • trunk/source/processes/transportation/src/G4NeutronKiller.cc

    r819 r963  
    2525//
    2626// $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 $
    2828//
    2929//---------------------------------------------------------------------------
  • trunk/source/processes/transportation/src/G4NeutronKillerMessenger.cc

    r819 r963  
    2525//
    2626// $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 $
    2828//
    2929//---------------------------------------------------------------------------
  • trunk/source/processes/transportation/src/G4StepLimiter.cc

    r819 r963  
    2626//
    2727// $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 $
    2929//
    3030// --------------------------------------------------------------
  • trunk/source/processes/transportation/src/G4Transportation.cc

    r819 r963  
    2525//
    2626//
    27 // $Id: G4Transportation.cc,v 1.72.2.1 2007/12/07 17:18:11 japost Exp $
    28 // GEANT4 tag $Name: geant4-09-01-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 $
    2929//
    3030// ------------------------------------------------------------
     
    3737// geometrical sub-volumes of the detectors.
    3838//
    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.
    4041//
    4142// =======================================================================
    4243// 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
    5356// Created:  19 March 1997, J. Apostolakis
    5457// =======================================================================
     
    5861#include "G4ParticleTable.hh"
    5962#include "G4ChordFinder.hh"
     63#include "G4SafetyHelper.hh"
    6064#include "G4FieldManagerStore.hh"
    6165class G4VSensitiveDetector;
     
    8993  fFieldPropagator = transportMgr->GetPropagatorInField() ;
    9094
    91   // fpSafetyHelper = fpTransportManager->GetSafetyHelper();  // New
     95  fpSafetyHelper =   transportMgr->GetSafetyHelper();  // New
    9296
    9397  // Cannot determine whether a field exists here,
     
    108112G4Transportation::~G4Transportation()
    109113{
    110 
    111   // --- Alternative code to delete 'junk data' in touchable handle
    112   //  ** Corresponds to the case that the constructor has
    113   //       fCurrentTouchableHandle = new G4TouchableHistory();
    114   //  ** Likely incorrect - as at the end of the simulation
    115   //     the handle no longer holds the original 'null' history
    116   // G4VTouchable*  pTouchable= fCurrentTouchableHandle();  //  Incorrect
    117   // delete  pTouchable;  // Incorrect
    118 
    119114  if( (fVerboseLevel > 0) && (fSumEnergyKilled > 0.0 ) ){
    120115    G4cout << " G4Transportation: Statistics for looping particles " << G4endl;
     
    233228       fPreviousSftOrigin = startPosition ;
    234229       fPreviousSafety    = newSafety ;
    235        // fSafetyHelper->SetCurrentSafety( newSafety, startPosition);
     230       // fpSafetyHelper->SetCurrentSafety( newSafety, startPosition);
    236231
    237232       // The safety at the initial point has been re-calculated:
     
    312307     fPreviousSftOrigin = startPosition ;
    313308     fPreviousSafety    = currentSafety ;         
    314      // fSafetyHelper->SetCurrentSafety( newSafety, startPosition);
     309     // fpSafetyHelper->SetCurrentSafety( newSafety, startPosition);
    315310       
    316311     // Get the End-Position and End-Momentum (Dir-ection)
     
    415410  if( currentSafety < endpointDistance )
    416411  {
    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 =
    418418               fLinearNavigator->ComputeSafety( fTransportEndPosition) ;
    419       currentSafety      = endSafety ;
    420       fPreviousSftOrigin = fTransportEndPosition ;
    421       fPreviousSafety    = currentSafety ;
    422       // fSafetyHelper->SetCurrentSafety( currentSafety, fTransportEndPosition);
    423 
    424       // Because the Stepping Manager assumes it is from the start point,
    425       //  add the StepLength
    426       //
    427       currentSafety     += endpointDistance ;
     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 ;
    428428
    429429#ifdef G4DEBUG_TRANSPORT
    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 ;
     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 ;
    436436#endif
     437      }
    437438  }           
    438439
  • trunk/source/processes/transportation/src/G4UserSpecialCuts.cc

    r819 r963  
    2626//
    2727// $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 $
    2929//
    3030// --------------------------------------------------------------
  • trunk/source/processes/transportation/src/G4VTrackTerminator.cc

    r819 r963  
    2626//
    2727// $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 $
    2929//
    3030// ----------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.