|
CORSIKA8
0.0.0
The framework to simulate particle cascades for astroparticle physics
|
Definition of a static process list/sequenceMore...
#include <ProcessSequence.hpp>

Public Member Functions | |
| ProcessSequence (ProcessSequence const &)=default | |
| ProcessSequence (ProcessSequence &&)=default | |
| ProcessSequence & | operator= (ProcessSequence const &)=default |
| ProcessSequence (TProcess1 in_A, TProcess2 in_B) | |
| Only valid user constructor will create fully initialized object. More... | |
| template<typename TParticle > | |
| ProcessReturn | doBoundaryCrossing (TParticle &particle, typename TParticle::node_type const &from, typename TParticle::node_type const &to) |
| template<typename TParticle , typename TTrack > | |
| ProcessReturn | doContinuous (TParticle &particle, TTrack &vT, ContinuousProcessIndex const limitID) |
| template<typename TSecondaries > | |
| void | doSecondaries (TSecondaries &vS) |
| bool | checkStep () |
| The processes of type StackProcess do have an internal counter, so they can be exectuted only each N steps. More... | |
| template<typename TStack > | |
| void | doStack (TStack &stack) |
| Execute the StackProcess-es in the ProcessSequence. | |
| template<typename TParticle , typename TTrack > | |
| ContinuousProcessStepLength | getMaxStepLength (TParticle &particle, TTrack &vTrack) |
| Calculate the maximum allowed length of the next tracking step, based on all ContinuousProcess-es. More... | |
| template<typename TParticle > | |
| GrammageType | getInteractionLength (TParticle &&particle) |
| template<typename TParticle > | |
| InverseGrammageType | getInverseInteractionLength (TParticle &&particle) |
| template<typename TSecondaryView > | |
| ProcessReturn | selectInteraction (TSecondaryView &view, [[maybe_unused]] InverseGrammageType lambda_inv_select, [[maybe_unused]] InverseGrammageType lambda_inv_sum=InverseGrammageType::zero()) |
| template<typename TParticle > | |
| TimeType | getLifetime (TParticle &particle) |
| template<typename TParticle > | |
| InverseTimeType | getInverseLifetime (TParticle &&particle) |
| template<typename TSecondaryView > | |
| ProcessReturn | selectDecay (TSecondaryView &view, [[maybe_unused]] InverseTimeType decay_inv_select, [[maybe_unused]] InverseTimeType decay_inv_sum=InverseTimeType::zero()) |
Static Public Attributes | |
| static bool const | is_process_sequence = true |
Static Public Attributes inherited from corsika::BaseProcess< ProcessSequence< TProcess1, TProcess2 > > | |
| static bool const | is_process_sequence |
| static bool const | is_switch_process_sequence |
Additional Inherited Members | |
Public Types inherited from corsika::BaseProcess< ProcessSequence< TProcess1, TProcess2 > > | |
| using | process_type = ProcessSequence< TProcess1, TProcess2 > |
| Base processor type for use in other template classes. | |
Protected Member Functions inherited from corsika::BaseProcess< ProcessSequence< TProcess1, TProcess2 > > | |
| ProcessSequence< TProcess1, TProcess2 > & | ref () |
| const ProcessSequence< TProcess1, TProcess2 > & | ref () const |
Protected Attributes inherited from corsika::BaseProcess< ProcessSequence< TProcess1, TProcess2 > > | |
| friend | TDerived |
Definition of a static process list/sequence
A compile time static list of processes. The compiler will generate a new type based on template logic containing all the elements provided by the user.
TProcess1 and TProcess2 must both be derived from BaseProcess, and are both references if possible (lvalue), otherwise (rvalue) they are just classes. This allows us to handle both, rvalue as well as lvalue Processes in the ProcessSequence.
(For your potential interest, the static version of the ProcessSequence and all Process types are based on the CRTP C++ design pattern)
Template parameters:
| TProcess1 | is of type BaseProcess, either a dedicatd process, or a ProcessSequence |
| TProcess2 | is of type BaseProcess, either a dedicatd process, or a ProcessSequence |
| IndexFirstProcess | to count and index each Process in the entire process-chain. The offset is the starting value for this ProcessSequence |
| IndexOfProcess1 | index of TProcess1 (counting of Process) |
| IndexOfProcess2 | index of TProcess2 (counting of Process) |
Definition at line 157 of file ProcessSequence.hpp.
| corsika::ProcessSequence< TProcess1, TProcess2, ProcessIndexOffset, IndexOfProcess1, IndexOfProcess2 >::ProcessSequence | ( | TProcess1 | in_A, |
| TProcess2 | in_B | ||
| ) |
Only valid user constructor will create fully initialized object.
ProcessSequence supports and encourages move semantics. You can use object, l-value references or r-value references to construct sequences.
| in_A | BaseProcess or switch/process list |
| in_B | BaseProcess or switch/process list |
| bool corsika::ProcessSequence< TProcess1, TProcess2, ProcessIndexOffset, IndexOfProcess1, IndexOfProcess2 >::checkStep | ( | ) |
The processes of type StackProcess do have an internal counter, so they can be exectuted only each N steps.
Often these are "maintenacne processes" that do not need to run after each single step of the simulations. In the CheckStep function it is tested if either A_ or B_ are StackProcess and if they are due for execution.
| ContinuousProcessStepLength corsika::ProcessSequence< TProcess1, TProcess2, ProcessIndexOffset, IndexOfProcess1, IndexOfProcess2 >::getMaxStepLength | ( | TParticle & | particle, |
| TTrack & | vTrack | ||
| ) |
Calculate the maximum allowed length of the next tracking step, based on all ContinuousProcess-es.
The maximum allowed step length is the minimum of the allowed track lenght over all ContinuousProcess-es in the ProcessSequence.