The calculations for eta and rapidity are currently inconsistent with respect to maximum values:
-
eta(::XYZT, ) will return a absolute maximum value of 10e10, but this is a magic number that is not documented or exposed anywhere
-
rapidity(::XYZT, ) and rapidity(::PtEtaPhiM, ) do not limit the return value, so if $z == 0$ then the return value is -Inf
Packages very often want to limit absolute rapidity values for numerical stability, e.g., in JetReconstruction.jl we essentially limit rapidity values to 1e5 (which is inherited from FastJet so that our results are all directly comparable).
Therefore I would propose:
- expose the default maximum rapidity though the package, e.g.,
LorentzVectorBase.MaxRap (is there a case for different values for eta and rapidity? or should we consistently allow Inf as a return value?)
- allow an optional value to be passed to
eta and rapidity that would clamp the return value (is it useful to have a flag or a value that allows Inf, in case people want to see this?)
The calculations for
etaandrapidityare currently inconsistent with respect to maximum values:eta(::XYZT, )will return a absolute maximum value of 10e10, but this is a magic number that is not documented or exposed anywhererapidity(::XYZT, )andrapidity(::PtEtaPhiM, )do not limit the return value, so if-InfPackages very often want to limit absolute rapidity values for numerical stability, e.g., in
JetReconstruction.jlwe essentially limit rapidity values to1e5(which is inherited from FastJet so that our results are all directly comparable).Therefore I would propose:
LorentzVectorBase.MaxRap(is there a case for different values foretaandrapidity? or should we consistently allowInfas a return value?)etaandrapiditythat would clamp the return value (is it useful to have a flag or a value that allowsInf, in case people want to see this?)