IAP GITLAB

Skip to content
Snippets Groups Projects
Commit c943eb95 authored by Maximilian Reininghaus's avatar Maximilian Reininghaus :vulcan: Committed by ralfulrich
Browse files

logical and numerical nodes

parent 3a907033
No related branches found
No related tags found
No related merge requests found
...@@ -138,16 +138,24 @@ namespace corsika::cascade { ...@@ -138,16 +138,24 @@ namespace corsika::cascade {
std::cout << "total_inv_lambda=" << total_inv_lambda std::cout << "total_inv_lambda=" << total_inv_lambda
<< ", next_interact=" << next_interact << std::endl; << ", next_interact=" << next_interact << std::endl;
// convert next_step from grammage to length auto const* currentLogicalNode = particle.GetNode();
auto const* currentNode =
fEnvironment.GetUniverse()->GetContainingNode(particle.GetPosition()); auto const* currentNumericalNode =
fEnvironment.GetUniverse()->GetContainingNode(particle.GetPosition());
std::cout << "nodes: " << currentLogicalNode << " " << currentNumericalNode << std::endl;
if (currentNumericalNode != currentLogicalNode) {
throw std::runtime_error("numerical and logical nodes don't match");
}
if (currentNode == &*fEnvironment.GetUniverse()) { if (currentNumericalNode == &*fEnvironment.GetUniverse()) {
throw std::runtime_error("particle entered void universe"); throw std::runtime_error("particle entered void Universe");
} }
// convert next_step from grammage to length
LengthType const distance_interact = LengthType const distance_interact =
currentNode->GetModelProperties().ArclengthFromGrammage(step, next_interact); currentLogicalNode->GetModelProperties().ArclengthFromGrammage(step, next_interact);
// determine the maximum geometric step length // determine the maximum geometric step length
LengthType const distance_max = fProcessSequence.MaxStepLength(particle, step); LengthType const distance_max = fProcessSequence.MaxStepLength(particle, step);
...@@ -182,8 +190,8 @@ namespace corsika::cascade { ...@@ -182,8 +190,8 @@ namespace corsika::cascade {
step.LimitEndTo(min_distance); step.LimitEndTo(min_distance);
// particle.GetNode(); // previous VolumeNode // particle.GetNode(); // previous VolumeNode
particle.SetNode( //~ particle.SetNode(
currentNode); // NOTE @Max : here we need to distinguish: IF particle step is //~ currentLogicalNode); // NOTE @Max : here we need to distinguish: IF particle step is
// limited by tracking (via fTracking.GetTrack()), THEN we need // limited by tracking (via fTracking.GetTrack()), THEN we need
// to check/update VolumeNodes. In all other cases it is // to check/update VolumeNodes. In all other cases it is
// guaranteed that we are still in the same volume // guaranteed that we are still in the same volume
......
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