IAP GITLAB

Skip to content
Snippets Groups Projects
Commit d1437a3b authored by ralfulrich's avatar ralfulrich
Browse files

rebase with MR 76

parents 5f34a359 8fb7bfe5
No related branches found
No related tags found
No related merge requests found
......@@ -108,7 +108,6 @@ target_link_libraries (vertical_EAS SuperStupidStack CORSIKAunits
install (TARGETS vertical_EAS DESTINATION share/examples)
CORSIKA_ADD_TEST (vertical_EAS)
add_executable (staticsequence_example staticsequence_example.cc)
target_compile_options(staticsequence_example PRIVATE -g) # do not skip asserts
target_link_libraries (staticsequence_example
......
......@@ -54,7 +54,6 @@ namespace corsika::cascade {
* <code>auto GetTrack(Particle const& p)</auto>,
* with the return type <code>geometry::Trajectory<corsika::geometry::Line>
* </code>
*
* <b>TProcessList</b> must be a ProcessSequence. *
* <b>Stack</b> is the storage object for particle data, i.e. with
* Particle class type <code>Stack::ParticleType</code>
......@@ -221,6 +220,18 @@ namespace corsika::cascade {
setup::StackView secondaries(vParticle);
[[maybe_unused]] auto projectile = secondaries.GetProjectile();
/*
Create SecondaryView object on Stack. The data container
remains untouched and identical, and 'projectil' is identical
to 'vParticle' above this line. However,
projectil.AddSecondaries populate the SecondaryView, which can
then be used afterwards for further processing. Thus: it is
important to use projectle (and not vParticle) for Interaction,
and Decay!
*/
setup::StackView secondaries(vParticle);
[[maybe_unused]] auto projectile = secondaries.GetProjectile();
if (min_distance < distance_max) { // interaction to happen within geometric limit
// check whether decay or interaction limits this step
......
......@@ -118,6 +118,20 @@ namespace corsika::process {
return ret;
}
template <typename TSecondaries>
EProcessReturn DoSecondaries(TSecondaries& vS) {
EProcessReturn ret = EProcessReturn::eOk;
if constexpr (std::is_base_of<SecondariesProcess<T1type>, T1type>::value ||
is_process_sequence<T1>::value) {
ret |= A.DoSecondaries(vS);
}
if constexpr (std::is_base_of<SecondariesProcess<T2type>, T2type>::value ||
is_process_sequence<T2>::value) {
ret |= B.DoSecondaries(vS);
}
return ret;
}
template <typename TParticle, typename TTrack>
corsika::units::si::LengthType MaxStepLength(TParticle& vP, TTrack& vTrack) {
corsika::units::si::LengthType
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment