Class defining a plane for tracking. It provides various functionalities to convert track parameters and covariance matrices from global to local coordinates. More...
#include <TrackingPlane.h>
Classes | |
struct | TrigCache |
Struct caching trigonometric function results. More... | |
Public Member Functions | |
Plane (const Point_t &planePos, const Vector_t &planeDir) | |
Constructor from reference position on the plane and direction orthogonal to the plane. More... | |
Point_t const & | position () const |
Reference position on the plane. More... | |
Vector_t const & | direction () const |
Reference direction orthogonal to the plane. More... | |
SMatrixSym66 | Local5DToGlobal6DCovariance (SMatrixSym55 cov5d, bool hasMomentum, const Vector_t &trackMomOrDir) const |
Translate track covariance from local to global coordinates. The track momentum (or direction) is needed to compute the jacobian. Local coordinates are on the plane orthogonal to planeDir (it may be the same direction as the momentum, but the function is generic). More... | |
SMatrixSym55 | Global6DToLocal5DCovariance (SMatrixSym66 cov6d, bool hasMomentum, const Vector_t &trackMomOrDir) const |
Translate track covariance from global to local coordinates. The track momentum (or direction) is needed to compute the jacobian. Local coordinates are on the plane orthogonal to planeDir (it may be the same direction as the momentum, but the function is generic). Warning: some information may be lost in degenerate cases, e.g. the unceratinty along z position when converting to a x-y plane (fixed z) More... | |
SVector5 | Global6DToLocal5DParameters (const SVector6 &par6d) const |
Function to convert parameters from global to local coordinates. Local coordinates are on the plane with origin at planePos and orthogonal to planeDir. It is responsibility of the user to make sure the global position lies on the plane. More... | |
SVector5 | Global6DToLocal5DParameters (const SVector6 &par6d, const Point_t &planePos, const Vector_t &planeDir, const TrigCache &trigCache) const |
SVector6 | Local5DToGlobal6DParameters (const SVector5 &par5d, bool trackAlongPlaneDir=true) const |
Function to convert parameters from local to global coordinates. Local coordinates are on the plane with origin at planePos and orthogonal to planeDir. trackAlongPlaneDir is as given by trackDir.Dot(planeDir)>0. More... | |
SVector6 | Local5DToGlobal6DParameters (const SVector5 &par5d, const Point_t &planePos, const Vector_t &planeDir, const TrigCache &trigCache, bool trackAlongPlaneDir=true) const |
SMatrix65 | Local5DToGlobal6DJacobian (bool hasMomentum, const Vector_t &trackMomOrDir) const |
Compute the jacobian to translate track covariance from local to global coordinates. The track momentum (or direction) is needed to compute the jacobian. Local coordinates are on the plane orthogonal to planeDir (it may be the same direction as the momentum, but the function is generic). More... | |
SMatrix65 | Local5DToGlobal6DJacobian (bool hasMomentum, const Vector_t &trackMomOrDir, const Vector_t &planeDir, const TrigCache &trigCache) const |
SMatrix56 | Global6DToLocal5DJacobian (bool hasMomentum, const Vector_t &trackMomOrDir) const |
Compute the jacobian to translate track covariance from global to local coordinates. The track momentum (or direction) is needed to compute the jacobian. Local coordinates are on the plane orthogonal to planeDir (it may be the same direction as the momentum, but the function is generic). Warning: some information may be lost in degenerate cases, e.g. the unceratinty along z position when converting to a x-y plane (fixed z) More... | |
SMatrix56 | Global6DToLocal5DJacobian (bool hasMomentum, const Vector_t &trackMomOrDir, const Vector_t &planeDir, const TrigCache &trigCache) const |
Rotation_t | Global3DToLocal3DRotation () const |
Calculate rotation matrices from global (x,y,z) to local (u,v,w) coordinates. More... | |
Rotation_t | Global3DToLocal3DRotation (const Vector_t &planeDir, const TrigCache &trigCache) const |
Rotation_t | Local3DToGlobal3DRotation () const |
Calculate rotation matrices from local (u,v,w) to global (x,y,z) coordinates. More... | |
Rotation_t | Local3DToGlobal3DRotation (const Vector_t &planeDir, const TrigCache &trigCache) const |
double | cosAlpha () const |
Return cached values of trigonometric function for angles defining the plane. More... | |
double | sinAlpha () const |
double | cosBeta () const |
double | sinBeta () const |
Static Public Member Functions | |
static SVector5 | Global6DToLocal5DParameters (const SVector6 &par6d, const Point_t &planePos, const Vector_t &planeDir) |
Function to convert parameters from global to local coordinates. Local coordinates are on the plane with origin at planePos and orthogonal to planeDir. It is responsibility of the user to make sure the global position lies on the plane. More... | |
static SVector6 | Local5DToGlobal6DParameters (const SVector5 &par5d, const Point_t &planePos, const Vector_t &planeDir, bool trackAlongPlaneDir=true) |
Function to convert parameters from local to global coordinates. Local coordinates are on the plane with origin at planePos and orthogonal to planeDir. trackAlongPlaneDir is as given by trackDir.Dot(planeDir)>0. More... | |
static SMatrix65 | Local5DToGlobal6DJacobian (bool hasMomentum, const Vector_t &trackMomOrDir, const Vector_t &planeDir) |
Compute the jacobian to translate track covariance from local to global coordinates. The track momentum (or direction) is needed to compute the jacobian. Local coordinates are on the plane orthogonal to planeDir (it may be the same direction as the momentum, but the function is generic). More... | |
static SMatrix65 | Local5DToGlobal6DJacobian (bool hasMomentum, const SVector6 &par6d, const Vector_t &planeDir) |
Compute the jacobian to translate track covariance from local to global coordinates. The track momentum (or direction) is needed to compute the jacobian. Local coordinates are on the plane orthogonal to planeDir (it may be the same direction as the momentum, but the function is generic). More... | |
static SMatrix56 | Global6DToLocal5DJacobian (bool hasMomentum, const Vector_t &trackMomOrDir, const Vector_t &planeDir) |
Compute the jacobian to translate track covariance from global to local coordinates. The track momentum (or direction) is needed to compute the jacobian. Local coordinates are on the plane orthogonal to planeDir (it may be the same direction as the momentum, but the function is generic). Warning: some information may be lost in degenerate cases, e.g. the unceratinty along z position when converting to a x-y plane (fixed z) More... | |
static SMatrix56 | Global6DToLocal5DJacobian (bool hasMomentum, const SVector6 &par6d, const Vector_t &planeDir) |
Compute the jacobian to translate track covariance from global to local coordinates. The track momentum (or direction) is needed to compute the jacobian. Local coordinates are on the plane orthogonal to planeDir (it may be the same direction as the momentum, but the function is generic). Warning: some information may be lost in degenerate cases, e.g. the unceratinty along z position when converting to a x-y plane (fixed z) More... | |
static SMatrixSym66 | Local5DToGlobal6DCovariance (SMatrixSym55 cov5d, bool hasMomentum, const Vector_t &trackMomOrDir, const Vector_t &planeDir) |
Translate track covariance from local to global coordinates. The track momentum (or direction) is needed to compute the jacobian. Local coordinates are on the plane orthogonal to planeDir (it may be the same direction as the momentum, but the function is generic). More... | |
static SMatrixSym55 | Global6DToLocal5DCovariance (SMatrixSym66 cov6d, bool hasMomentum, const Vector_t &trackMomOrDir, const Vector_t &planeDir) |
Translate track covariance from global to local coordinates. The track momentum (or direction) is needed to compute the jacobian. Local coordinates are on the plane orthogonal to planeDir (it may be the same direction as the momentum, but the function is generic). Warning: some information may be lost in degenerate cases, e.g. the unceratinty along z position when converting to a x-y plane (fixed z) More... | |
static Rotation_t | Global3DToLocal3DRotation (const Vector_t &planeDir) |
Calculate rotation matrices from global (x,y,z) to local (u,v,w) coordinates. More... | |
static Rotation_t | Local3DToGlobal3DRotation (const Vector_t &planeDir) |
Calculate rotation matrices from local (u,v,w) to global (x,y,z) coordinates. More... | |
Private Attributes | |
Point_t | fPlanePos |
Position of a point on the plane. More... | |
Vector_t | fPlaneDir |
Direction vector othogonal to the plane. More... | |
TrigCache | fTrigCache |
Cached trigonometric function values. More... | |
Class defining a plane for tracking. It provides various functionalities to convert track parameters and covariance matrices from global to local coordinates.
The plane is constructed from a point in global coordinates, and a direction unit vector orthogonal to the plane. For instance, they may refer to the position and direction of a trajectory at a given point, or to the center of a wire and the direction orthogonal to both the wire and drift directions.
The plane and parameters are defined along the lines of trkf::SurfXYZPlane, but with a different notation for the angles which are now called alpha and beta to avoid confusion with theta and phi in global spherical coordinates: (alpha, beta) correspond to (alpha := Rotation angle about y'-axis (projected Lorentz angle) = atan2(nx, hypot(ny, nz)), beta := Rotation angle about x-axis (wire angle) = atan2(-ny, nz)) The 3D local positions are defined in terms of the unit vectors u,v,w where w is along the normal direction to the plane, u is perpendicular to w and coplanar to the global x axis and with position sign along the positive sign of x, v forms a right handed orthonormal basis with u and w. The 5D track parameters are u,v,du/dw,dv/dw,1/p: u,v are the local positions, du, dv, and dw are the local directions, and 1/p is the inverse of the track momentum. The global 6D coordinates are formed by the track position and momentum (or direction) at a given point.
The discussion above refers to a detector with drift direction along the x axis; this class will have to be extended for a detector with a different drift direction.
Definition at line 37 of file TrackingPlane.h.
Constructor from reference position on the plane and direction orthogonal to the plane.
Definition at line 61 of file TrackingPlane.h.
|
inline |
Return cached values of trigonometric function for angles defining the plane.
Definition at line 120 of file TrackingPlane.h.
|
inline |
Definition at line 122 of file TrackingPlane.h.
|
inline |
Reference direction orthogonal to the plane.
Definition at line 70 of file TrackingPlane.h.
|
inline |
Calculate rotation matrices from global (x,y,z) to local (u,v,w) coordinates.
Definition at line 108 of file TrackingPlane.h.
Rotation_t recob::tracking::Plane::Global3DToLocal3DRotation | ( | const Vector_t & | planeDir, |
const TrigCache & | trigCache | ||
) | const |
Definition at line 159 of file TrackingPlane.cxx.
|
inlinestatic |
Calculate rotation matrices from global (x,y,z) to local (u,v,w) coordinates.
Definition at line 159 of file TrackingPlane.h.
|
inline |
Translate track covariance from global to local coordinates. The track momentum (or direction) is needed to compute the jacobian. Local coordinates are on the plane orthogonal to planeDir (it may be the same direction as the momentum, but the function is generic). Warning: some information may be lost in degenerate cases, e.g. the unceratinty along z position when converting to a x-y plane (fixed z)
Definition at line 102 of file TrackingPlane.h.
|
inlinestatic |
Translate track covariance from global to local coordinates. The track momentum (or direction) is needed to compute the jacobian. Local coordinates are on the plane orthogonal to planeDir (it may be the same direction as the momentum, but the function is generic). Warning: some information may be lost in degenerate cases, e.g. the unceratinty along z position when converting to a x-y plane (fixed z)
Definition at line 155 of file TrackingPlane.h.
|
inline |
Compute the jacobian to translate track covariance from global to local coordinates. The track momentum (or direction) is needed to compute the jacobian. Local coordinates are on the plane orthogonal to planeDir (it may be the same direction as the momentum, but the function is generic). Warning: some information may be lost in degenerate cases, e.g. the unceratinty along z position when converting to a x-y plane (fixed z)
Definition at line 92 of file TrackingPlane.h.
SMatrix56 recob::tracking::Plane::Global6DToLocal5DJacobian | ( | bool | hasMomentum, |
const Vector_t & | trackMomOrDir, | ||
const Vector_t & | planeDir, | ||
const TrigCache & | trigCache | ||
) | const |
Definition at line 112 of file TrackingPlane.cxx.
|
inlinestatic |
Compute the jacobian to translate track covariance from global to local coordinates. The track momentum (or direction) is needed to compute the jacobian. Local coordinates are on the plane orthogonal to planeDir (it may be the same direction as the momentum, but the function is generic). Warning: some information may be lost in degenerate cases, e.g. the unceratinty along z position when converting to a x-y plane (fixed z)
Definition at line 143 of file TrackingPlane.h.
|
inlinestatic |
Compute the jacobian to translate track covariance from global to local coordinates. The track momentum (or direction) is needed to compute the jacobian. Local coordinates are on the plane orthogonal to planeDir (it may be the same direction as the momentum, but the function is generic). Warning: some information may be lost in degenerate cases, e.g. the unceratinty along z position when converting to a x-y plane (fixed z)
Definition at line 147 of file TrackingPlane.h.
Function to convert parameters from global to local coordinates. Local coordinates are on the plane with origin at planePos and orthogonal to planeDir. It is responsibility of the user to make sure the global position lies on the plane.
Definition at line 74 of file TrackingPlane.h.
SVector5 recob::tracking::Plane::Global6DToLocal5DParameters | ( | const SVector6 & | par6d, |
const Point_t & | planePos, | ||
const Vector_t & | planeDir, | ||
const TrigCache & | trigCache | ||
) | const |
Definition at line 37 of file TrackingPlane.cxx.
|
inlinestatic |
Function to convert parameters from global to local coordinates. Local coordinates are on the plane with origin at planePos and orthogonal to planeDir. It is responsibility of the user to make sure the global position lies on the plane.
Definition at line 127 of file TrackingPlane.h.
|
inline |
Calculate rotation matrices from local (u,v,w) to global (x,y,z) coordinates.
Definition at line 114 of file TrackingPlane.h.
Rotation_t recob::tracking::Plane::Local3DToGlobal3DRotation | ( | const Vector_t & | planeDir, |
const TrigCache & | trigCache | ||
) | const |
Definition at line 171 of file TrackingPlane.cxx.
|
inlinestatic |
Calculate rotation matrices from local (u,v,w) to global (x,y,z) coordinates.
Definition at line 163 of file TrackingPlane.h.
|
inline |
Translate track covariance from local to global coordinates. The track momentum (or direction) is needed to compute the jacobian. Local coordinates are on the plane orthogonal to planeDir (it may be the same direction as the momentum, but the function is generic).
Definition at line 97 of file TrackingPlane.h.
|
inlinestatic |
Translate track covariance from local to global coordinates. The track momentum (or direction) is needed to compute the jacobian. Local coordinates are on the plane orthogonal to planeDir (it may be the same direction as the momentum, but the function is generic).
Definition at line 151 of file TrackingPlane.h.
|
inline |
Compute the jacobian to translate track covariance from local to global coordinates. The track momentum (or direction) is needed to compute the jacobian. Local coordinates are on the plane orthogonal to planeDir (it may be the same direction as the momentum, but the function is generic).
Definition at line 86 of file TrackingPlane.h.
SMatrix65 recob::tracking::Plane::Local5DToGlobal6DJacobian | ( | bool | hasMomentum, |
const Vector_t & | trackMomOrDir, | ||
const Vector_t & | planeDir, | ||
const TrigCache & | trigCache | ||
) | const |
Definition at line 55 of file TrackingPlane.cxx.
|
inlinestatic |
Compute the jacobian to translate track covariance from local to global coordinates. The track momentum (or direction) is needed to compute the jacobian. Local coordinates are on the plane orthogonal to planeDir (it may be the same direction as the momentum, but the function is generic).
Definition at line 135 of file TrackingPlane.h.
|
inlinestatic |
Compute the jacobian to translate track covariance from local to global coordinates. The track momentum (or direction) is needed to compute the jacobian. Local coordinates are on the plane orthogonal to planeDir (it may be the same direction as the momentum, but the function is generic).
Definition at line 139 of file TrackingPlane.h.
|
inline |
Function to convert parameters from local to global coordinates. Local coordinates are on the plane with origin at planePos and orthogonal to planeDir. trackAlongPlaneDir is as given by trackDir.Dot(planeDir)>0.
Definition at line 80 of file TrackingPlane.h.
SVector6 recob::tracking::Plane::Local5DToGlobal6DParameters | ( | const SVector5 & | par5d, |
const Point_t & | planePos, | ||
const Vector_t & | planeDir, | ||
const TrigCache & | trigCache, | ||
bool | trackAlongPlaneDir = true |
||
) | const |
Definition at line 21 of file TrackingPlane.cxx.
|
inlinestatic |
Function to convert parameters from local to global coordinates. Local coordinates are on the plane with origin at planePos and orthogonal to planeDir. trackAlongPlaneDir is as given by trackDir.Dot(planeDir)>0.
Definition at line 131 of file TrackingPlane.h.
|
inline |
Reference position on the plane.
Definition at line 66 of file TrackingPlane.h.
|
inline |
Definition at line 121 of file TrackingPlane.h.
|
inline |
Definition at line 123 of file TrackingPlane.h.
|
private |
Direction vector othogonal to the plane.
Definition at line 169 of file TrackingPlane.h.
|
private |
Position of a point on the plane.
Definition at line 168 of file TrackingPlane.h.
|
private |
Cached trigonometric function values.
Definition at line 170 of file TrackingPlane.h.