1 #ifndef TRACKINGPLANE_H
2 #define TRACKINGPLANE_H
45 const double diryz = std::hypot(planeDir.Y(), planeDir.Z());
48 fCosB = (diryz != 0.0) ? planeDir.Z()/diryz : 1.0;
49 fSinB = (diryz != 0.0) ? -planeDir.Y()/diryz : 0.0;
double cosAlpha() const
Return cached values of trigonometric function for angles defining the plane.
Vector_t const & direction() const
Reference direction orthogonal to the plane.
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).
Struct caching trigonometric function results.
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).
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 w...
ROOT::Math::SMatrix< Double32_t, 5, 5, ROOT::Math::MatRepSym< Double32_t, 5 > > SMatrixSym55
Point_t fPlanePos
Position of a point on the plane.
Rotation_t Global3DToLocal3DRotation() const
Calculate rotation matrices from global (x,y,z) to local (u,v,w) coordinates.
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 nee...
SVector5 Global6DToLocal5DParameters(const SVector6 &par6d) const
Function to convert parameters from global to local coordinates. Local coordinates are on the plane w...
Plane(const Point_t &planePos, const Vector_t &planeDir)
Constructor from reference position on the plane and direction orthogonal to the plane.
ROOT::Math::SMatrix< Double32_t, 5, 6 > SMatrix56
TrigCache fTrigCache
Cached trigonometric function values.
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 w...
ROOT::Math::SVector< Double32_t, 5 > SVector5
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)
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< Coord_t >, ROOT::Math::GlobalCoordinateSystemTag > Vector_t
Type for representation of momenta in 3D space. See recob::tracking::Coord_t for more details on the ...
Vector_t fPlaneDir
Direction vector othogonal to the plane.
static Rotation_t Local3DToGlobal3DRotation(const Vector_t &planeDir)
Calculate rotation matrices from local (u,v,w) to global (x,y,z) coordinates.
Point_t const & position() const
Reference position on the plane.
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 nee...
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 nee...
SVector6 Local5DToGlobal6DParameters(const SVector5 &par5d, bool trackAlongPlaneDir=true) const
Function to convert parameters from local to global coordinates. Local coordinates are on the plane w...
Class defining a plane for tracking. It provides various functionalities to convert track parameters ...
ROOT::Math::Rotation3D Rotation_t
Type for representation of space rotations.
TrigCache(const Vector_t &planeDir)
ROOT::Math::SMatrix< Double32_t, 6, 6, ROOT::Math::MatRepSym< Double32_t, 6 > > SMatrixSym66
static Rotation_t Global3DToLocal3DRotation(const Vector_t &planeDir)
Calculate rotation matrices from global (x,y,z) to local (u,v,w) coordinates.
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 nee...
ROOT::Math::SVector< Double32_t, 6 > SVector6
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)
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< Coord_t >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space. See recob::tracking::Coord_t for more detai...
Rotation_t Local3DToGlobal3DRotation() const
Calculate rotation matrices from local (u,v,w) to global (x,y,z) coordinates.
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).
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)
ROOT::Math::SMatrix< Double32_t, 6, 5 > SMatrix65