mctools / mcpl

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

Time conversion for PHITS #53

Closed dddijulio closed 4 years ago

dddijulio commented 4 years ago

The PHITS unit for time is ns, and the conversion during phits2ssw should be updated to 1E-6 instead of 1E6

tkittel commented 4 years ago

Thanks! So I guess you meant phits2mcpl. It seems we have a similar, but reverse, issue in mcpl2phits.

So the two lines in question have buggy code but correct comments:

    mcpl_particle->time = p->time * 1.0e6;//nanoseconds (PHITS) to milliseconds (MCPL)
    dumpdata[9] = mcpl_p->time * 1.0e-6;//ms->ns

Which should of course be changed to:

    mcpl_particle->time = p->time * 1.0e-6;//nanoseconds (PHITS) to milliseconds (MCPL)
    dumpdata[9] = mcpl_p->time * 1.0e6;//ms->ns

I'll see if I can find time to fix this and make a new release soonish. In the meantime, it would be great if you can verify that there are no other fixes needed.

dddijulio commented 4 years ago

sorry, I did mean phits2mcpl!

tkittel commented 4 years ago

Fixed in release 1.3.2, closing here :-)