Skip to content

Maximum rapidity values are inconsistent and obscure #40

@graeme-a-stewart

Description

@graeme-a-stewart

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?)

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions