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

This class allows selecting/using different InteractionProcesses at runtime without recompiling the process sequence. More...

#include <DynamicInteractionProcess.hpp>

Inheritance diagram for corsika::DynamicInteractionProcess< TStack >:

Public Types

using stack_view_type = typename TStack::stack_view_type
 

Public Member Functions

template<typename TInteractionProcess >
 DynamicInteractionProcess (std::shared_ptr< TInteractionProcess > obj)
 Create new DynamicInteractionProcess. More...
 
void doInteraction (stack_view_type &view, Code projectileId, Code targetId, FourMomentum const &projectileP4, FourMomentum const &targetP4)
 forwards arguments to doInteraction() of wrapped instance
 
CrossSectionType getCrossSection (Code projectileId, Code targetId, FourMomentum const &projectileP4, FourMomentum const &targetP4) const
 forwards arguments to getCrossSection() of wrapped instance
 

Detailed Description

template<typename TStack>
class corsika::DynamicInteractionProcess< TStack >

This class allows selecting/using different InteractionProcesses at runtime without recompiling the process sequence.

The implementation is based on the "type-erasure" technique.

Template Parameters
TStackthe stack type; has to match the one used by Cascade together with the ProcessSequence containing the DynamicInteractionProcess.

Definition at line 31 of file DynamicInteractionProcess.hpp.

Constructor & Destructor Documentation

◆ DynamicInteractionProcess()

template<typename TStack >
template<typename TInteractionProcess >
corsika::DynamicInteractionProcess< TStack >::DynamicInteractionProcess ( std::shared_ptr< TInteractionProcess >  obj)
inline

Create new DynamicInteractionProcess.

Calls to this instance will be forwared to the process referred to by obj. The newly created DynamicInteractionProcess shares ownership of the underlying process, so that you do not need to worry about it going out of scope.

Definition at line 45 of file DynamicInteractionProcess.hpp.


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