mctools / mcpl

Monte Carlo Particle Lists
https://mctools.github.io/mcpl/
Other
29 stars 13 forks source link

MCPL_input dir_smear bug #42

Closed tkittel closed 5 years ago

tkittel commented 5 years ago

Browsing through the new mcstas instrument for BEER, I stumble upon:

/* Read neutrons from an mcpl file. 
Due to a bug in MCPL_input, keep dir_smear > 0*/
COMPONENT src = MCPL_input(filename=input, polarisationuse=0, verbose=0, Emin=Emin, Emax=Emax, repeat_count=repetition, E_smear=0, pos_smear=0.0001, dir_smear=0.001)
AT( 0,0,0) RELATIVE PREVIOUS

To be checked and fixed at some point (likely only affecting users smearing)

willend commented 5 years ago

Oh, seem to have overlooked that remark - in fact there is no bug, I have accepted a patch from Jan right here that fixes this:

https://github.com/McStasMcXtrace/McCode/commit/028b03fa5c8eb0d25ec96b7f9bed3098d07a9022

(and indeed only in case one repeats the stats / smears, which is entirely a McStas thing)

willend commented 5 years ago
tkittel commented 5 years ago

Great :-)