IAP GITLAB

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

Merge branch 'fix_thinning' into 'master'

Fix thinning

See merge request !491
parents 9725167f fec782a4
No related branches found
No related tags found
1 merge request!491Fix thinning
Pipeline #10186 passed with warnings
......@@ -57,10 +57,10 @@ namespace corsika {
if (w1 <= maxWeightFactor && w2 <= maxWeightFactor) { // apply Hillas thinning
if (uniform_(rng_) <= p1) { // keep 1st with probability p1
particle2.setWeight(0);
particle1.setWeight(w1 * parentWeight);
particle1.setWeight(w1);
} else { // keep 2nd
particle1.setWeight(0);
particle2.setWeight(w2 * parentWeight);
particle2.setWeight(w2);
}
} else { // weight limitation kicks in, do statistical thinning
double const w1prime = std::min(w1, maxWeightFactor);
......
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