CORSIKA  @c8_version@
The framework to simulate particle cascades for astroparticle physics
corsika::LinearApproximationIntegrator< TDerived > Class Template Reference

Helper class to integrate 1D density functions. More...

#include <LinearApproximationIntegrator.hpp>

Public Member Functions

GrammageType getIntegrateGrammage (BaseTrajectory const &line) const
 Get the integrated Grammage along line. More...
 
LengthType getArclengthFromGrammage (BaseTrajectory const &line, GrammageType grammage) const
 Get the arclength from Grammage along line. More...
 
LengthType getMaximumLength (BaseTrajectory const &line, double relError) const
 Get the maximum length l to keep uncertainty below

\[ relError \]

. More...

 

Detailed Description

template<typename TDerived>
class corsika::LinearApproximationIntegrator< TDerived >

Helper class to integrate 1D density functions.

Integrated density (grammage) can be calculated along a Trajectory. Also the inverse (arclength) for a specified grammage can be calculated. In addition, also a maximum possible length for a maximum allowed uncertainty can be evaluated.

Template Parameters
TDerivedMust provide the evaluateAt and getFirstDerivative methods.

Definition at line 30 of file LinearApproximationIntegrator.hpp.

Member Function Documentation

◆ getArclengthFromGrammage()

template<typename TDerived >
LengthType corsika::LinearApproximationIntegrator< TDerived >::getArclengthFromGrammage ( BaseTrajectory const &  line,
GrammageType  grammage 
) const

Get the arclength from Grammage along line.

Calculate as

\[ (1 - 0.5 * X * d\varrho/dl / (\varrho_0^2)) * X / \varrho_0 \]

.

Parameters
line
grammage
Returns
LengthType

◆ getIntegrateGrammage()

template<typename TDerived >
GrammageType corsika::LinearApproximationIntegrator< TDerived >::getIntegrateGrammage ( BaseTrajectory const &  line) const

Get the integrated Grammage along line.

Calculated as

\[ X=(\varrho_0 + 0.5* d\varrho/dl \cdot l ) l \]

.

Parameters
line
Returns
GrammageType

◆ getMaximumLength()

template<typename TDerived >
LengthType corsika::LinearApproximationIntegrator< TDerived >::getMaximumLength ( BaseTrajectory const &  line,
double  relError 
) const

Get the maximum length l to keep uncertainty below

\[ relError \]

.

Parameters
line
relError
Returns
LengthType

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