Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|

## LHCb Physics Event Model Comments on the MathCore Vector and the Root Linear Algebra Classes | ||||||||

Line: 19 to 19 | ||||||||

There are a few small problems that can be easily fixed: - We found an inconsistency in the behaviour of the typedefs for Vector3Ds and LorentzVectors. If Ione includes MathCore/Vector3D.h in the code, this includes MathCore/Vector3Dfwd.h, so one gets the typedefs XYZVector, XYZVectorF, etc. However, if one includes MathCore/LorentzVector.h, one does not get access to the typedefs as this file does not include MathCore/LorentzVectorfwd.h.
- A XYZTPoint is missing. That would be nice to have for MC truth.
| ||||||||

Deleted: | ||||||||

< < | - The Vec() method in XYZTVector is not const
| |||||||

- There is an Eta() method in the LorentzVector, but no Gamma() and Beta().
## Root Linear Algebra Classes | ||||||||

Line: 30 to 29 | ||||||||

- We would like to be able to get a sub-matrix by reference. This is presently implemented, but the interface of the method is quite strange.
- The linear algebra classes seem not to be compatible with the mathcore classes. There is no way to multiply a matrix and a vector. (?)
| ||||||||

Added: | ||||||||

> > | ## Use case for linear algebra package presented to SEAL/ROOT groupThe minimal algebra package is to be optimised for small (typically < 10) size matrices and vectors. In what follows, is is assumed that the software must be fast and efficient. This use-case has been compiled from communications between Patrick K., Vanya, Matt N., Juan and Lorenzo Moneta.
## Main requirements
- Square matrices up to at least 7x7 dimension
- Row and column vectors up to 7x1
- Matrix inversion with defined failure indication
- Calculation of matrix determinant
- Basic matrix operations: *, +, +=, -, transpose
- Specialisations for the case of symmetric matrices and their operations
- Important: symmetric matrix similarity specialisation: M*S*M^T is faster for symmetric matrices than for standard ones. This is used extensively in the track fit.
- Easy construction of identity and zero matrices
- Assignment without temporaries (generaliseable to = operator?)
- Access to individual elements
- Access to size (rows, columns)
- Access by reference to rows and columns
- Access by reference to matrix sub-blocks (with clear syntax!)
- Diagonal sub-blocks of symmetric matrices returned as symmetric matrices
- Off-diagonal sub-blocks returned as standard matrices
- Easy coupling to MathCore 3D and 4D vectors and points (with compile time dimentionality check?)
- Multiplication operations
- Vectors to matrix columns or rows
- Matrix columns or rows to vectors
## Other requirementsThese are requirements where speed might not be of the escence, since they relate to operations not needed in typical reconstruction algorithms- Evaluation of eigenvalues and eigenvectors
- Decompositions
- Conversion to GSL matrices? This would allow to use the GSL eigenvalues and decompositions for free.
## Open questionsWhich of the operations above should be non-mutating? Should inverse and transpose return a new matrix, or perform the operation on itself?
-- JuanPalacios - 04 Oct 2005 | |||||||

## What do we expect from a Linear Algebra package?First brain dump by PK at the LHCb Software week (slides) summarized by Juan: |

View topic | History: r7 < r6 < r5 < r4 | More topic actions...

Copyright &© 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.

Ideas, requests, problems regarding TWiki? Send feedback

Ideas, requests, problems regarding TWiki? Send feedback