diff --git a/Framework/Cascade/Cascade.h b/Framework/Cascade/Cascade.h index 2d5088ed343530c945f9f16fbd124440088063e3..f47266e9e5012c35849dfa13f34c82071a0bebf6 100644 --- a/Framework/Cascade/Cascade.h +++ b/Framework/Cascade/Cascade.h @@ -230,14 +230,15 @@ namespace corsika::cascade { auto const assertion = [&] { auto const* numericalNodeAfterStep = - fEnvironment.GetUniverse()->GetContainingNode(particle.GetPosition()); + fEnvironment.GetUniverse()->GetContainingNode(particle.GetPosition()); return numericalNodeAfterStep == currentLogicalNode; }; assert(assertion()); // numerical and logical nodes don't match - } else { // boundary crossing + } else { // boundary crossing, step is limited by volume boundary std::cout << "boundary crossing! next node = " << nextVol << std::endl; particle.SetNode(nextVol); + // DoBoundary may delete the particle (or not) fProcessSequence.DoBoundaryCrossing(particle, *currentLogicalNode, *nextVol); } } diff --git a/Framework/StackInterface/Stack.h b/Framework/StackInterface/Stack.h index 9d259e1c282b278ab9bcec4f37a337685e29d641..8deb9d5107196bef57b5d47766c1cc38e3e7abbc 100644 --- a/Framework/StackInterface/Stack.h +++ b/Framework/StackInterface/Stack.h @@ -33,8 +33,8 @@ namespace corsika::stack { <b>Important:</b> ParticleInterface must inherit from ParticleBase ! */ - template <typename> //, bool> - class ParticleInterface; // forward decl + template <typename> + class ParticleInterface; /** The Stack class provides (and connects) the main particle data storage machinery. @@ -98,8 +98,8 @@ namespace corsika::stack { typedef StackDataType StackImpl; ///< this is the type of the user-provided data structure - template <typename SI> //, bool IsBase> - using PIType = ParticleInterface<SI>; //, IsBase>; + template <typename SI> + using PIType = ParticleInterface<SI>; /** * Via the StackIteratorInterface and ConstStackIteratorInterface @@ -209,7 +209,6 @@ namespace corsika::stack { } if (p.GetIndex() < GetSize() - 1) fData.Copy(GetSize() - 1, p.GetIndex()); DeleteLast(); - // p.SetInvalid(); } /** * delete this particle