CbmRoot
Loading...
Searching...
No Matches
cbm::ca::CaUvConverter Class Reference

A class to convert XY coordinates to UV coordinates. More...

#include <CaUvConverter.h>

Public Member Functions

 CaUvConverter (double phiU, double phiV)
 construct from U,V angles
 
 CaUvConverter (double phiU, double dx2, double dxy, double dy2)
 construct from U angle and XY covariance matrix
 
void SetFromUV (double phiU, double phiV)
 construct from U,V angles
 
void SetFromXYCovMatrix (double phiU, double dx2, double dxy, double dy2)
 construct from U angle and XY covariance matrix
 
std::pair< double, double > ConvertXYtoUV (double x, double y) const
 Conversion function (x,y) -> (u,v)
 
std::pair< double, double > ConvertUVtoXY (double u, double v) const
 Conversion function (x,y) -> (u,v)
 
std::tuple< double, double, double > ConvertCovMatrixUVtoXY (double du2, double duv, double dv2) const
 Conversion function (du2, duv, dv2) -> (dx2, dxy, dy2)
 
std::tuple< double, double, double > ConvertCovMatrixXYtoUV (double dx2, double dxy, double dy2) const
 Conversion function (dx2, dxy, dy2) -> (du2, duv, dv2)
 

Private Attributes

double fcosU {cbm::algo::ca::constants::Undef<double>}
 U coordinate in XY.
 
double fsinU {cbm::algo::ca::constants::Undef<double>}
 
double fcosV {cbm::algo::ca::constants::Undef<double>}
 V coordinate in XY.
 
double fsinV {cbm::algo::ca::constants::Undef<double>}
 
double fcosX {cbm::algo::ca::constants::Undef<double>}
 X coordinate in UV.
 
double fsinX {cbm::algo::ca::constants::Undef<double>}
 
double fcosY {cbm::algo::ca::constants::Undef<double>}
 Y coordinate in UV.
 
double fsinY {cbm::algo::ca::constants::Undef<double>}
 

Detailed Description

A class to convert XY coordinates to UV coordinates.

Definition at line 15 of file CaUvConverter.h.

Constructor & Destructor Documentation

◆ CaUvConverter() [1/2]

cbm::ca::CaUvConverter::CaUvConverter ( double phiU,
double phiV )
inline

construct from U,V angles

Definition at line 19 of file CaUvConverter.h.

References SetFromUV().

◆ CaUvConverter() [2/2]

cbm::ca::CaUvConverter::CaUvConverter ( double phiU,
double dx2,
double dxy,
double dy2 )
inline

construct from U angle and XY covariance matrix

Definition at line 22 of file CaUvConverter.h.

References SetFromXYCovMatrix().

Member Function Documentation

◆ ConvertCovMatrixUVtoXY()

std::tuple< double, double, double > cbm::ca::CaUvConverter::ConvertCovMatrixUVtoXY ( double du2,
double duv,
double dv2 ) const
inline

Conversion function (du2, duv, dv2) -> (dx2, dxy, dy2)

Parameters
du2Variance of U-coordinate measurement
duvCovariance of U & V - coordinate measurement
dv2Variance of V-coordinate measurement
Returns
tuple [dx2, dxy, dy2]

Definition at line 53 of file CaUvConverter.h.

References fcosX, fcosY, fsinX, and fsinY.

Referenced by cbm::ca::IdealHitProducerDet< DetID >::Exec().

◆ ConvertCovMatrixXYtoUV()

std::tuple< double, double, double > cbm::ca::CaUvConverter::ConvertCovMatrixXYtoUV ( double dx2,
double dxy,
double dy2 ) const
inline

Conversion function (dx2, dxy, dy2) -> (du2, duv, dv2)

Parameters
dx2Variance of X-coordinate measurement
dxyCovariance of X & Y - coordinate measurement
dy2Variance of Y-coordinate measurement
Returns
tuple [du2, duv, dv2]

Definition at line 65 of file CaUvConverter.h.

References fcosU, fcosV, fsinU, and fsinV.

Referenced by cbm::ca::IdealHitProducerDet< DetID >::Exec(), and SetFromXYCovMatrix().

◆ ConvertUVtoXY()

std::pair< double, double > cbm::ca::CaUvConverter::ConvertUVtoXY ( double u,
double v ) const
inline

Conversion function (x,y) -> (u,v)

Parameters
uU-coordinate
vV-coordinate
Returns
pair [x, y] coordinates

Definition at line 43 of file CaUvConverter.h.

References fcosX, fcosY, fsinX, fsinY, and v.

Referenced by cbm::ca::IdealHitProducerDet< DetID >::Exec().

◆ ConvertXYtoUV()

std::pair< double, double > cbm::ca::CaUvConverter::ConvertXYtoUV ( double x,
double y ) const
inline

Conversion function (x,y) -> (u,v)

Parameters
xX-coordinate
yY-coordinate
Returns
pair [u, v] coordinates

Definition at line 34 of file CaUvConverter.h.

References fcosU, fcosV, fsinU, fsinV, x, and y.

Referenced by cbm::ca::IdealHitProducerDet< DetID >::Exec().

◆ SetFromUV()

void CaUvConverter::SetFromUV ( double phiU,
double phiV )

construct from U,V angles

Definition at line 16 of file CaUvConverter.cxx.

References cos(), fcosU, fcosV, fcosX, fcosY, fsinU, fsinV, fsinX, fsinY, and sin().

Referenced by CaUvConverter(), and SetFromXYCovMatrix().

◆ SetFromXYCovMatrix()

void CaUvConverter::SetFromXYCovMatrix ( double phiU,
double dx2,
double dxy,
double dy2 )

construct from U angle and XY covariance matrix

Definition at line 39 of file CaUvConverter.cxx.

References ConvertCovMatrixXYtoUV(), cos(), SetFromUV(), and sin().

Referenced by CaUvConverter().

Member Data Documentation

◆ fcosU

double cbm::ca::CaUvConverter::fcosU {cbm::algo::ca::constants::Undef<double>}
private

U coordinate in XY.

Definition at line 74 of file CaUvConverter.h.

Referenced by ConvertCovMatrixXYtoUV(), ConvertXYtoUV(), and SetFromUV().

◆ fcosV

double cbm::ca::CaUvConverter::fcosV {cbm::algo::ca::constants::Undef<double>}
private

V coordinate in XY.

Definition at line 77 of file CaUvConverter.h.

Referenced by ConvertCovMatrixXYtoUV(), ConvertXYtoUV(), and SetFromUV().

◆ fcosX

double cbm::ca::CaUvConverter::fcosX {cbm::algo::ca::constants::Undef<double>}
private

X coordinate in UV.

Definition at line 80 of file CaUvConverter.h.

Referenced by ConvertCovMatrixUVtoXY(), ConvertUVtoXY(), and SetFromUV().

◆ fcosY

double cbm::ca::CaUvConverter::fcosY {cbm::algo::ca::constants::Undef<double>}
private

Y coordinate in UV.

Definition at line 83 of file CaUvConverter.h.

Referenced by ConvertCovMatrixUVtoXY(), ConvertUVtoXY(), and SetFromUV().

◆ fsinU

double cbm::ca::CaUvConverter::fsinU {cbm::algo::ca::constants::Undef<double>}
private

Definition at line 75 of file CaUvConverter.h.

Referenced by ConvertCovMatrixXYtoUV(), ConvertXYtoUV(), and SetFromUV().

◆ fsinV

double cbm::ca::CaUvConverter::fsinV {cbm::algo::ca::constants::Undef<double>}
private

Definition at line 78 of file CaUvConverter.h.

Referenced by ConvertCovMatrixXYtoUV(), ConvertXYtoUV(), and SetFromUV().

◆ fsinX

double cbm::ca::CaUvConverter::fsinX {cbm::algo::ca::constants::Undef<double>}
private

Definition at line 81 of file CaUvConverter.h.

Referenced by ConvertCovMatrixUVtoXY(), ConvertUVtoXY(), and SetFromUV().

◆ fsinY

double cbm::ca::CaUvConverter::fsinY {cbm::algo::ca::constants::Undef<double>}
private

Definition at line 84 of file CaUvConverter.h.

Referenced by ConvertCovMatrixUVtoXY(), ConvertUVtoXY(), and SetFromUV().


The documentation for this class was generated from the following files: