Celeritas  0.5.0-56+6b053cd
Public Member Functions | Static Public Member Functions | List of all members
celeritas::FieldPropagator< DriverT, GTV > Class Template Reference

Propagate a charged particle in a field. More...

#include <FieldPropagator.hh>

Public Types

Type aliases
using result_type = Propagation
 

Public Member Functions

CELER_FUNCTION FieldPropagator (DriverT &&driver, ParticleTrackView const &particle, GTV &&geo)
 Construct with shared field parameters and the field driver.
 
CELER_FUNCTION result_type operator() ()
 Propagate a charged particle until it hits a boundary.
 
CELER_FUNCTION result_type operator() (real_type dist)
 Propagate a charged particle in a field. More...
 
CELER_FUNCTION short int max_substeps () const
 Limit on substeps. More...
 
CELER_FUNCTION real_type delta_intersection () const
 Distance close enough to a boundary to mark as being on the boundary. More...
 
CELER_FUNCTION real_type bump_distance () const
 Distance to bump or to consider a "zero" movement.
 
CELER_FUNCTION real_type minimum_substep () const
 Distance to bump or to consider a "zero" movement.
 

Static Public Member Functions

static CELER_CONSTEXPR_FUNCTION bool tracks_can_loop ()
 Whether it's possible to have tracks that are looping.
 

Detailed Description

template<class DriverT, class GTV>
class celeritas::FieldPropagator< DriverT, GTV >

Propagate a charged particle in a field.

For a given initial state (position, momentum), it propagates a charged particle along a curved trajectory up to an interaction length proposed by a chosen physics process for the step, possibly integrating sub-steps by an adaptive step control with a required accuracy of tracking in a field. It updates the final state (position, momentum, boundary) along with the step actually taken. If the final position is outside the current volume, it returns a geometry limited step and the state at the intersection between the curve trajectory and the first volume boundary using an iterative step control method within a tolerance error imposed on the closest distance between two positions by the field stepper and the linear projection to the volume boundary.

Note
This follows similar methods as in Geant4's G4PropagatorInField class.

Member Function Documentation

◆ delta_intersection()

template<class DriverT , class GTV >
CELER_FUNCTION real_type celeritas::FieldPropagator< DriverT, GTV >::delta_intersection
inline

Distance close enough to a boundary to mark as being on the boundary.

TODO: change delta intersection from property in FieldDriverOptions to another FieldPropagatorOptions

◆ max_substeps()

template<class DriverT , class GTV >
CELER_FUNCTION short int celeritas::FieldPropagator< DriverT, GTV >::max_substeps
inline

Limit on substeps.

Maximum number of substeps.

◆ operator()()

template<class DriverT , class GTV >
CELER_FUNCTION auto celeritas::FieldPropagator< DriverT, GTV >::operator() ( real_type  step)
inline

Propagate a charged particle in a field.

It utilises a field driver (based on an adaptive step control to limit the length traveled based on the magnetic field behavior and geometric tolerances) to track a charged particle along a curved trajectory for a given step length within a required accuracy or intersects with a new volume (geometry limited step).

The position of the internal OdeState state_ should be consistent with the geometry geo_'s position, but the geometry's direction will be a series of "trial" directions that are the chords between the start and end points of a curved substep through the field. At the end of the propagation step, the geometry state's direction is updated based on the actual value of the calculated momentum.

Caveats:

  • The physical (geometry track state) position may deviate from the exact curved propagation position up to a driver-based tolerance at every boundary crossing. The momentum will always be conserved, though.
  • In some unusual cases (e.g. a very small caller-requested step, or an unusual accumulation in the driver's substeps) the distance returned may be slightly higher (again, up to a driver-based tolerance) than the physical distance travelled.

The documentation for this class was generated from the following file: