Message: Re: G4Transportation is killing track (Q#45!!!) Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: G4Transportation is killing track (Q#45!!!) 

Keywords: electrons, magnetic field, transportation
Forum: Fields: Magnetic and Otherwise
Re: Question G4Transportation is killing track (Q#45!!!) (Ilya)
Date: 02 Mar, 2005
From: John Apostolakis <John Apostolakis>

Dear Ilya,

You have encountered an open issue, and I will explain how you can improve the situation for your setup. If you could provide some information about your field, we may be able to help you avoid it altogether.

The basic problem being addressed by this limit is that of low-energy particles in a strong field that do many turns, and make little progress. The case we wished to solve was that of particles drifting in the middle of a volume that will generally never arrive at a boundary but can soak up a lot of CPU cycles. However for several setups the default parameters we chose also 'catch' other particles.

The situation is:
 - When a track's integration in a field in a single tracking step
take more than a fixed number of integration sub-steps this track
is assumed to be 'looping' or drifting.  It is then killed and its
energy is deposited locally - ie at the end of the step.

If you encounter this at a rate which is not insignificant, it makes sense to revise the parameters or use a different integration method in order to avoid it.

You can set the maximum number of integration sub-steps that can be taken by a particle before it is abandoned as a 'looping particle'. You can do this by messaging G4PropagatorInField, which you can get from the singleton class G4TransportationManager using its method:

Get its pointer as in the User Guide for Application developers, section 4.3.2,

and then call
 G4PropagatorInField*  GetPropagatorInField() const;
to get the common Propagator object.

To change the maximum number of steps looping value, you can use the following method 
of G4PropagatorInField:
  void    SetMaxLoopCount( G4int new_max );
     // A maximum for the number of steps that a (looping) particle can take.

The trigger for this action is located in, which you can find in the directory source/geometry/navigation/src.

  if( do_loop_count >= fMax_loop_count  )
    fParticleIsLooping = true;

    if ( fVerboseLevel > 0 ){
       G4cout << "G4PropagateInField: Killing looping particle " 
              // << " of " << energy  << " energy "
              << " after " << do_loop_count << " field substeps "
              << " totaling " << StepTaken / mm << " mm " ;
       if( pPhysVol )
          G4cout << " in the volume " << pPhysVol->GetName() ; 
         G4cout << " in unknown or null volume. " ; 
       G4cout << G4endl;

In a uniform or almost uniform field, it should also be possible to use a different integrator-stepper to avoid this problem. If you have such a field, please describe it and we can point you to an appropriate alternative stepper.

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 Feedback: Re: G4Transportation is killing track - My field properies   (Ilya - 03 Mar, 2005)
3 Question: Re: G4Transportation is killing track (Q#45!!!)   (Robert Bernstein - 27 May, 2008)
1 None: Re: G4Transportation is killing track (Q#45!!!)   (Tatiana Nikitina - 27 May, 2008)
 Add Message Add Message
to: "Re: G4Transportation is killing track (Q#45!!!)"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews

[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]