Flattop distribution: particles in tail have wrong cutoff
For a flattop distribution the particles in the tail are calculated as follows (https://gitlab.psi.ch/OPAL/src/blob/master/src/Distribution/Distribution.cpp#L2660) introduced in 9c51f84b:
while (!allow) {
t = gsl_ran_gaussian_tail(randGen_m, 0, sigmaTFall_m);
if (t <= sigmaTRise_m * cutoffR_m[2]) {
t = -t + sigmaTFall_m * cutoffR_m[2];
allow = true;
}
}
For the cutoff sigmaTRise_m
is used instead of sigmaTFall_m
, it should read:
if (t <= sigmaTFall_m * cutoffR_m[2]) {