Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request assigns proper space and time coordinates from Pythia decayed particles according to our new definitions: space in fm and time in ys.
I took the liberty to have some optimisations and I changed the unit definitions from
static const
tostatic constepxr
so the scaling factors could be defined asconstexpr
. This trick could be done with constants as well but it was beyond the scope of this fixes and I will defer to a later moment.About the validation tests. I generated tau events, enabling the pythia decay for tau. The taus were generated on protons, with a uniform flux up to 35 GeV.
With a macro (available in $GENIE/contrib/pythia_units) I extracted time of flight and decay length for the taus and I plotted them.
As you can see the length goes up to 18 X 10^12. Being this in fm, this corresponds to a maximum of 1.8 cm which is expected from the typical OPERA experience.
To understand the time unit, I fitted the points.
The slope is about 0.3 fm / x and it is supposed to be the speed of the tau, which is heavily boosted so, close to the speed of light ( about 3 X 10^8 m/s ). Solving for x, that is 10 ^-24 s as expected. So the time is in ys.
Let me know if we need more.