Common matrix/vector classes used by tracking code

Complete: 5

This page describes matrix and vector classes commonly used in the tracking code.

GlobalPoint, GlobalVector, LocalPoint and LocalVector

These are described in the Workbook.

AlgebraicSymMatrix55 and AlgebraicVector55 etc.

The AlgebraicSymMatrix55 and AlgebraicVector55 are based on ROOT's SMatrix and SVector classes. (There is also a non-symmetric matrix called AlgebraicMatrix55). They are of dimensions 5. Objects of other dimensions also exist with similar names. They are documented on the ROOT web pages.

Warning: Classes AlgebraicVector and AlgebraicSymMatrix (N.B. no number in the name) also exist, but are completely different. They are based on CLHEP/Matrix/SymMatrix.h ! (But are not used anymore).

(All these aliases are defined in http://cmslxr.fnal.gov/lxr/source/DataFormats/CLHEP/interface/Migration.h).

Examples of use:

To create a unit matrix do:
  AlgebraicSymMatrix55 unitMat = AlgebraicMatrixID();
To change a matrix do:
  AlgebraicSymMatrix55 test = ...
  test(3,5) = 1.0;
To invert a matrix, do:
  int ifail = 0;
  AlgebraicSymMatrix55 testInv = test.Inverse(ifail);
To multiply matrices/vectors do:
  AlgebraicVector5 v = ...;
  AlgebraicSymMatrix55 C = ...;
  AlgebraicMatrix55 D = unitMat + C*test;

Review status

Reviewer/Editor and Date (copy from screen) Comments
IanTomalin - 25 June 2008 created page

Responsible: IanTomalin
Last reviewed by: Most recent reviewer

-- IanTomalin - 26 Jun 2008

Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r1 - 2008-06-26 - IanTomalin
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    CMSPublic All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 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