Milestone #14047: Data product review ("phase II")
Provide a uniform recommendation for physic vector data structures in LArSoft data products
LArSoft currently uses a wide number of representations for the same concepts of Euclidean 2D and 3D vectors.
The most popular one,
TVector3 from ROOT, is feature-rich but affected by numerous design flaws.
TLorentzVector also suffers from the same flaws (doubled).
Candidates have already been identified for a recommendation:
The purpose is to identify which is best suited for LArSoft use in data products.
#3 Updated by Gianluca Petrillo over 4 years ago
Today a discussion with Kazuhiro Terao reminded me that a very desirable feature is to be able to use different base types for the representation of the coordinates.
This allows to halve the space of vectors when single precision is enough, which is typically the case for measured momenta.
CHHEP does not support this feature, while ROOT does.
This leaves us only one full-featured candidate.
#7 Updated by Gianluca Petrillo over 3 years ago
- Status changed from Work in progress to Resolved
- % Done changed from 80 to 100
Physics vectors (2D, 3D and 4D) from ROOT GenVector library and matrices from ROOT SMatrix libraries have been adopted in the implementation of
recob::Track and a tracking algorithm1, and in some internals of LArSoft geometry description, with satisfactory results.
These are now offered as the recommended data structures to represent vector and linear algebra quantities.
Hints on the newly recommended structures are in LArSoft wiki page From ROOT vectors (TVector3) to ROOT GenVector.
1 A new version of Kalman fitter by Giuseppe Cerati.