|
|
| 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) |
| | List of all BoundaryProcess. More...
|
| |
|
template<typename TParticle > |
| ProcessReturn | doContinuous (Step< TParticle > &step, ContinuousProcessIndex const limitID) |
| |
| template<typename TSecondaries > |
| void | doSecondaries (TSecondaries &vS) |
| | Process all secondaries in TSecondaries. More...
|
| |
| 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 TStack > |
| void | doCascadeEquations (TStack &stack) |
| | Execute the CascadeEquationsProcess-es in the ProcessSequence.
|
| |
|
void | initCascadeEquations () |
| | Init the CascadeEquationsProcess-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 > |
| CrossSectionType | getCrossSection (TParticle const &projectile, Code const targetId, FourMomentum const &targetP4) const |
| | Calculates the cross section of a projectile with a target. More...
|
| |
|
template<typename TParticle > |
| TimeType | getLifetime (TParticle &particle) |
| |
| template<typename TSecondaryView , typename TRNG > |
| ProcessReturn | selectInteraction (TSecondaryView &&view, FourMomentum const &projectileP4, NuclearComposition const &composition, TRNG &&rng, CrossSectionType const cx_select, CrossSectionType cx_sum=CrossSectionType::zero()) |
| | Selects one concrete InteractionProcess and samples a target nucleus from the material. More...
|
| |
|
template<typename TParticle > |
| InverseTimeType | getInverseLifetime (TParticle &&particle) |
| |
|
template<typename TSecondaryView > |
| ProcessReturn | selectDecay (TSecondaryView &&view, InverseTimeType decay_inv_select, InverseTimeType decay_inv_sum=InverseTimeType::zero()) |
| |
template<typename TProcess1, typename TProcess2 = NullModel, int ProcessIndexOffset = 0, int IndexOfProcess1 = corsika::count_processes< TProcess1, corsika::count_processes<TProcess2, ProcessIndexOffset>::count>::count, int IndexOfProcess2 = corsika::count_processes<TProcess2, ProcessIndexOffset>::count>
class corsika::ProcessSequence< TProcess1, TProcess2, ProcessIndexOffset, IndexOfProcess1, IndexOfProcess2 >
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:
- 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 163 of file ProcessSequence.hpp.
template<typename TProcess1, typename TProcess2 = NullModel, int ProcessIndexOffset = 0, int IndexOfProcess1 = corsika::count_processes< TProcess1, corsika::count_processes<TProcess2, ProcessIndexOffset>::count>::count, int IndexOfProcess2 = corsika::count_processes<TProcess2, ProcessIndexOffset>::count>
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.
- Parameters
-
template<typename TProcess1, typename TProcess2 = NullModel, int ProcessIndexOffset = 0, int IndexOfProcess1 = corsika::count_processes< TProcess1, corsika::count_processes<TProcess2, ProcessIndexOffset>::count>::count, int IndexOfProcess2 = corsika::count_processes<TProcess2, ProcessIndexOffset>::count>
| 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.
template<typename TProcess1, typename TProcess2 = NullModel, int ProcessIndexOffset = 0, int IndexOfProcess1 = corsika::count_processes< TProcess1, corsika::count_processes<TProcess2, ProcessIndexOffset>::count>::count, int IndexOfProcess2 = corsika::count_processes<TProcess2, ProcessIndexOffset>::count>
template<typename TParticle >
| ProcessReturn corsika::ProcessSequence< TProcess1, TProcess2, ProcessIndexOffset, IndexOfProcess1, IndexOfProcess2 >::doBoundaryCrossing |
( |
TParticle & |
particle, |
|
|
typename TParticle::node_type const & |
from, |
|
|
typename TParticle::node_type const & |
to |
|
) |
| |
List of all BoundaryProcess.
- Template Parameters
-
- Parameters
-
| particle | The particle. |
| from | Volume the particle is exiting. |
| to | Volume the particle is entering. |
- Returns
- ProcessReturn
template<typename TProcess1, typename TProcess2 = NullModel, int ProcessIndexOffset = 0, int IndexOfProcess1 = corsika::count_processes< TProcess1, corsika::count_processes<TProcess2, ProcessIndexOffset>::count>::count, int IndexOfProcess2 = corsika::count_processes<TProcess2, ProcessIndexOffset>::count>
template<typename TSecondaries >
| void corsika::ProcessSequence< TProcess1, TProcess2, ProcessIndexOffset, IndexOfProcess1, IndexOfProcess2 >::doSecondaries |
( |
TSecondaries & |
vS | ) |
|
Process all secondaries in TSecondaries.
The seondaries produced by other processes and accessible via TSecondaries are processed by all SecondariesProcesse via a call here.
- Template Parameters
-
- Parameters
-
template<typename TProcess1, typename TProcess2 = NullModel, int ProcessIndexOffset = 0, int IndexOfProcess1 = corsika::count_processes< TProcess1, corsika::count_processes<TProcess2, ProcessIndexOffset>::count>::count, int IndexOfProcess2 = corsika::count_processes<TProcess2, ProcessIndexOffset>::count>
template<typename TParticle >
Calculates the cross section of a projectile with a target.
- Template Parameters
-
- Parameters
-
| projectile | |
| targetId | |
| targetP4 | |
- Returns
- CrossSectionType
template<typename TProcess1, typename TProcess2 = NullModel, int ProcessIndexOffset = 0, int IndexOfProcess1 = corsika::count_processes< TProcess1, corsika::count_processes<TProcess2, ProcessIndexOffset>::count>::count, int IndexOfProcess2 = corsika::count_processes<TProcess2, ProcessIndexOffset>::count>
template<typename TParticle , typename TTrack >
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.
- Template Parameters
-
| TParticle | particle type. |
| TTrack | the trajectory type. |
- Parameters
-
| particle | The particle data object. |
| track | The track data object. |
- Returns
- ContinuousProcessStepLength which contains the step length itself in LengthType, and a unique identifier of the related ContinuousProcess.
template<typename TProcess1, typename TProcess2 = NullModel, int ProcessIndexOffset = 0, int IndexOfProcess1 = corsika::count_processes< TProcess1, corsika::count_processes<TProcess2, ProcessIndexOffset>::count>::count, int IndexOfProcess2 = corsika::count_processes<TProcess2, ProcessIndexOffset>::count>
template<typename TSecondaryView , typename TRNG >
Selects one concrete InteractionProcess and samples a target nucleus from the material.
The selectInteraction method statically loops over all active InteractionProcess and calculates the material-weighted cross section for all of them. In an iterative way those cross sections are summed up. The random number cx_select, uniformely drawn from the cross section before energy losses, is used to discriminate the selected sub-process here. If the cross section after the step smaller than it was before, there is a non-zero probability that the particle survives and no interaction takes place. This method becomes imprecise when cross section rise with falling energies.
If a sub-process was selected, the target nucleus is selected from the material (weighted with cross section). The interaction is then executed.
- Template Parameters
-
| TSecondaryView | Object type as storage for new secondary particles. |
| TRNG | Object type to produce random numbers. |
- Parameters
-
| view | Object to store new secondary particles. |
| projectileP4 | The four momentum of the projectile. |
| composition | The environment/material composition. |
| rng | Random number object. |
| cx_select | Drawn random numer, uniform between [0, cx_initial] |
| cx_sum | For interal use, to sum up cross section contributions. |
- Returns
- ProcessReturn