17 #include <corsika/framework/process/BoundaryCrossingProcess.hpp> 18 #include <corsika/framework/process/ContinuousProcess.hpp> 19 #include <corsika/framework/process/ContinuousProcessIndex.hpp> 20 #include <corsika/framework/process/ContinuousProcessStepLength.hpp> 21 #include <corsika/framework/process/DecayProcess.hpp> 22 #include <corsika/framework/process/InteractionProcess.hpp> 24 #include <corsika/framework/process/SecondariesProcess.hpp> 25 #include <corsika/framework/process/StackProcess.hpp> 26 #include <corsika/framework/process/NullModel.hpp> 35 template <
typename TProcess,
int N>
38 typename
std::enable_if_t<is_process_v<std::decay_t<TProcess>> &&
39 std::decay_t<TProcess>::is_process_sequence>> {
40 static unsigned int constexpr count =
41 N + std::decay_t<TProcess>::getNumberOfProcesses();
150 template <
typename TProcess1,
typename TProcess2 =
NullModel,
151 int ProcessIndexOffset = 0,
155 int IndexOfProcess2 =
159 using process1_type =
typename std::decay_t<TProcess1>;
160 using process2_type =
typename std::decay_t<TProcess2>;
170 static bool const is_process_sequence =
true;
184 template <
typename TParticle>
186 typename TParticle::node_type
const& from,
187 typename TParticle::node_type
const& to);
189 template <
typename TParticle,
typename TTrack>
193 template <
typename TSecondaries>
194 void doSecondaries(TSecondaries& vS);
209 template <
typename TStack>
210 void doStack(TStack& stack);
223 template <
typename TParticle,
typename TTrack>
226 template <
typename TParticle>
227 GrammageType getInteractionLength(TParticle&& particle) {
228 return 1. / getInverseInteractionLength(particle);
231 template <
typename TParticle>
234 template <
typename TSecondaryView>
240 template <
typename TParticle>
241 TimeType getLifetime(TParticle& particle) {
242 return 1. / getInverseLifetime(particle);
245 template <
typename TParticle>
249 template <
typename TSecondaryView>
251 TSecondaryView& view, [[maybe_unused]]
InverseTimeType decay_inv_select,
259 #ifdef CORSIKA_UNIT_TESTING 260 TProcess1 getProcess1()
const {
return A_; }
261 TProcess2 getProcess2()
const {
return B_; }
268 static unsigned int constexpr numberOfProcesses_ = IndexOfProcess1;
300 template <
typename... TProcesses,
typename TProcess1>
302 make_sequence(TProcess1&& vA, TProcesses&&... vBs) {
304 decltype(make_sequence(std::declval<TProcesses>()...))>(
305 vA, make_sequence(std::forward<TProcesses>(vBs)...));
321 template <
typename TProcess1,
typename TProcess2>
338 template <
typename TProcess>
345 #include <corsika/detail/framework/process/ProcessSequence.inl> traits class to count any type of Process, general version
Import and extend the phys::units package.
Definition of a static process list/sequence
Each process in C8 must derive from BaseProcess.
static unsigned int constexpr getNumberOfProcesses()
static counter to uniquely index (count) all ContinuousProcess in switch sequence.
To index individual processes (continuous processes) inside a ProcessSequence.
class "quantity" is the heart of the library.
The cascade namespace assembles all objects needed to simulate full particles cascades.
Process that does nothing.
static constexpr quantity zero()
We need a "zero" of each type – for comparisons, to initialize running totals, etc.
ProcessReturn
since in a process sequence many status updates can accumulate for a single particle, this enum should define only bit-flags that can be accumulated easily with "|="
To store step length in LengthType and unique index in ProcessSequence of shortest step ContinuousPro...