CORSIKA  @c8_version@
The framework to simulate particle cascades for astroparticle physics
corsika::LeapFrogTrajectory Class Reference

The LeapFrogTrajectory stores information on one leap-frog step. More...

#include <LeapFrogTrajectory.hpp>

Inheritance diagram for corsika::LeapFrogTrajectory:

Public Member Functions

 LeapFrogTrajectory (LeapFrogTrajectory const &)=default
 
 LeapFrogTrajectory (LeapFrogTrajectory &&)=default
 
LeapFrogTrajectoryoperator= (LeapFrogTrajectory const &)=delete
 
 LeapFrogTrajectory (Point const &pos, VelocityVector const &initialVelocity, MagneticFieldVector const &Bfield, decltype(1/(tesla *second)) const k, TimeType const timeStep)
 
Line getLine () const
 
Point getPosition (double const u) const
 
VelocityVector getVelocity (double const u) const
 
DirectionVector getDirection (double const u) const
 
TimeType getDuration (double const u=1) const
 ! duration along potentially bend trajectory
 
template<typename Particle >
TimeType getTime (Particle const &particle, double const u) const
 ! time at the start (u=0) or at the end (u=1) of the track of a particle
 
LengthType getLength (double const u=1) const
 ! total length along potentially bend trajectory
 
void setLength (LengthType const limit)
 ! set new duration along potentially bend trajectory.
 
void setDuration (TimeType const limit)
 ! set new duration along potentially bend trajectory.
 

Detailed Description

The LeapFrogTrajectory stores information on one leap-frog step.

The leap-frog algorithm uses two half-steps and is used in magnetic field tracking. The LeapFrogTrajectory will solve the leap-frog algorithm equation for a given constant \(k\) that has to be specified during construction (essentially fixing the magnetic field). Thus, different steps (length) can be dynamically generated here. The velocity vector will correctly point into the direction as calculated by the algorithm for any steplength, or intermediate position.

One complete leap-frog step is

\begin{eqnarray*} \vec{x}(t_{i+0.5}) &=& \vec{x}(t_{i}) + \vec{v(t_{i})} * \Delta t / 2 \\ \vec{v}(t_{i+1}) &=& \vec{v}(t_{i}) + \vec{v}(t_{i})\times\vec{B}(x_{i}, t_{i}) * \Delta t \\ \vec{x}(t_{i+1}) &=& \vec{x}(t_{i+0.5}) + \vec{v}(t_{i+1}) * \Delta t /2 \\ \end{eqnarray*}

The volocity update has the characteristics \(|\vec{v}(t_{i+1})|>1\), thus final velocities are renormalised. The full leap-frog steplength is thus

\[ L = |\vec{v}(t_{i+1})| \cdot \Delta t / 2 + |\vec{v}(t_{i+1})| \cdot \Delta t / 2 \]

Definition at line 45 of file LeapFrogTrajectory.hpp.


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