CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes
RPAlignmentCorrectionData Class Reference

Alignment correction for an element of the CT-PPS detector. Within the geometry description, every sensor (more generally every element) is given its translation and rotation. These two quantities shall be understood in local-to-global coordinate transform. That is, if r_l is a point in local coordinate system and x_g in global, then it holds. More...

#include <RPAlignmentCorrectionData.h>

Public Member Functions

void add (const RPAlignmentCorrectionData &, bool sumErrors=true, bool addSh=true, bool addRot=true)
 
ROOT::Math::Rotation3D getRotationMatrix () const
 
double getRotX () const
 
double getRotXUnc () const
 
double getRotY () const
 
double getRotYUnc () const
 
double getRotZ () const
 
double getRotZUnc () const
 
double getShX () const
 
double getShXUnc () const
 
double getShY () const
 
double getShYUnc () const
 
double getShZ () const
 
double getShZUnc () const
 
math::XYZVectorD getTranslation () const
 
math::XYZVectorD getTranslationUncertainty () const
 
 RPAlignmentCorrectionData (double _sh_x, double _sh_x_u, double _sh_y, double _sh_y_u, double _sh_z, double _sh_z_u, double _rot_x, double _rot_x_u, double _rot_y, double _rot_y_u, double _rot_z, double _rot_z_u)
 full constructor, shifts in mm, rotations in rad More...
 
 RPAlignmentCorrectionData (double _sh_x=0., double _sh_y=0., double _sh_z=0., double _rot_x=0., double _rot_y=0., double rot_z=0.)
 no uncertainty constructor, shifts in mm, rotation in rad More...
 
void setRotX (const double &v)
 
void setRotXUnc (const double &v)
 
void setRotY (const double &v)
 
void setRotYUnc (const double &v)
 
void setRotZ (const double &v)
 
void setRotZUnc (const double &v)
 
void setShX (const double &v)
 
void setShXUnc (const double &v)
 
void setShY (const double &v)
 
void setShYUnc (const double &v)
 
void setShZ (const double &v)
 
void setShZUnc (const double &v)
 

Protected Attributes

double rot_x
 
double rot_x_unc
 
double rot_y
 
double rot_y_unc
 
double rot_z
 
double rot_z_unc
 
double sh_x
 
double sh_x_unc
 
double sh_y
 
double sh_y_unc
 
double sh_z
 
double sh_z_unc
 

Detailed Description

Alignment correction for an element of the CT-PPS detector. Within the geometry description, every sensor (more generally every element) is given its translation and rotation. These two quantities shall be understood in local-to-global coordinate transform. That is, if r_l is a point in local coordinate system and x_g in global, then it holds.

   x_g = rotation * x_l + translation

This class presents an alignment correction to the translation and rotation. It follows these formulae:

   translation_final = translation_correction + translation_original
   rotation_final = rotation_correction * rotation_original

Alignment corrections can be added, following this prescription:

   translation_final = translation_added + translation_original
   rotation_final = rotation_added * rotation_original

NB: As follows from the above definitions, all translations are in the global space. This means that the rotations do not act on them.

Besides the values of rotations and translations, this class contains also uncertainties for these paramaters (the _unc data memebers).

The rotation is parameterized by 3 rotation parameters, the matrix is obtained by calling ROOT::Math::RotationZYX(r_z, r_y, r_x), which corresponds to:

     | 1     0        0    |   | cos r_y  0  +sin r_y |   | cos r_z  -sin r_z  0 |
 R = | 0 cos r_x  -sin r_x | * |    0     1     0     | * | sin r_z  cos r_z   0 |
     | 0 sin r_x  cos r_x  |   |-sin r_y  0  cos r_y  |   |    0        0      1 |

Definition at line 55 of file RPAlignmentCorrectionData.h.

Constructor & Destructor Documentation

RPAlignmentCorrectionData::RPAlignmentCorrectionData ( double  _sh_x,
double  _sh_x_u,
double  _sh_y,
double  _sh_y_u,
double  _sh_z,
double  _sh_z_u,
double  _rot_x,
double  _rot_x_u,
double  _rot_y,
double  _rot_y_u,
double  _rot_z,
double  _rot_z_u 
)
RPAlignmentCorrectionData::RPAlignmentCorrectionData ( double  _sh_x = 0.,
double  _sh_y = 0.,
double  _sh_z = 0.,
double  _rot_x = 0.,
double  _rot_y = 0.,
double  rot_z = 0. 
)

no uncertainty constructor, shifts in mm, rotation in rad

Definition at line 30 of file RPAlignmentCorrectionData.cc.

Member Function Documentation

void RPAlignmentCorrectionData::add ( const RPAlignmentCorrectionData a,
bool  sumErrors = true,
bool  addSh = true,
bool  addRot = true 
)

merges (cumulates) alignements match between x, y and read-out shifts is not checked

Parameters
sumErrorsif it is true, old and new alignment uncertainties are summed (in quadrature) if it is false, the uncertainties of the parameter (i.e. not the object) will be used With the add... switches one can control which corrections are added.

Definition at line 39 of file RPAlignmentCorrectionData.cc.

References rot_x, rot_x_unc, rot_y, rot_y_unc, rot_z, rot_z_unc, sh_x, sh_x_unc, sh_y, sh_y_unc, sh_z, sh_z_unc, and mathSSE::sqrt().

Referenced by RPAlignmentCorrectionsData::getFullSensorCorrection(), getRotationMatrix(), counter.Counter::register(), SequenceTypes.Task::remove(), and SequenceTypes.Task::replace().

40 {
41  if (addSh)
42  {
43  sh_x += a.sh_x;
44  sh_y += a.sh_y;
45  sh_z += a.sh_z;
46 
47  if (sumErrors)
48  {
52  }
53  }
54 
55  if (addRot)
56  {
57  rot_x += a.rot_x;
58  rot_y += a.rot_y;
59  rot_z += a.rot_z;
60 
61  if (sumErrors)
62  {
66  }
67  }
68 }
T sqrt(T t)
Definition: SSEVec.h:18
ROOT::Math::Rotation3D RPAlignmentCorrectionData::getRotationMatrix ( ) const
inline

Definition at line 126 of file RPAlignmentCorrectionData.h.

References add(), corr, operator<<(), and alignCSCRings::s.

Referenced by DetGeomDesc::applyAlignment().

127  {
128  return ROOT::Math::Rotation3D(ROOT::Math::RotationZYX(rot_z, rot_y, rot_x));
129  }
double RPAlignmentCorrectionData::getRotX ( ) const
inline

Definition at line 97 of file RPAlignmentCorrectionData.h.

References rot_x.

Referenced by operator<<(), and RPAlignmentCorrectionsMethods::writeXML().

double RPAlignmentCorrectionData::getRotXUnc ( ) const
inline

Definition at line 100 of file RPAlignmentCorrectionData.h.

References rot_x_unc.

Referenced by operator<<(), and RPAlignmentCorrectionsMethods::writeXML().

double RPAlignmentCorrectionData::getRotY ( ) const
inline

Definition at line 103 of file RPAlignmentCorrectionData.h.

References rot_y.

Referenced by operator<<(), and RPAlignmentCorrectionsMethods::writeXML().

double RPAlignmentCorrectionData::getRotYUnc ( ) const
inline

Definition at line 106 of file RPAlignmentCorrectionData.h.

References rot_y_unc.

Referenced by operator<<(), and RPAlignmentCorrectionsMethods::writeXML().

double RPAlignmentCorrectionData::getRotZ ( ) const
inline

Definition at line 109 of file RPAlignmentCorrectionData.h.

References rot_z.

Referenced by operator<<(), and RPAlignmentCorrectionsMethods::writeXML().

double RPAlignmentCorrectionData::getRotZUnc ( ) const
inline

Definition at line 112 of file RPAlignmentCorrectionData.h.

References rot_z_unc.

Referenced by operator<<(), and RPAlignmentCorrectionsMethods::writeXML().

double RPAlignmentCorrectionData::getShX ( ) const
inline

Definition at line 78 of file RPAlignmentCorrectionData.h.

References sh_x.

Referenced by operator<<(), and RPAlignmentCorrectionsMethods::writeXML().

double RPAlignmentCorrectionData::getShXUnc ( ) const
inline

Definition at line 81 of file RPAlignmentCorrectionData.h.

References sh_x_unc.

Referenced by operator<<(), and RPAlignmentCorrectionsMethods::writeXML().

double RPAlignmentCorrectionData::getShY ( ) const
inline

Definition at line 84 of file RPAlignmentCorrectionData.h.

References sh_y.

Referenced by operator<<(), and RPAlignmentCorrectionsMethods::writeXML().

double RPAlignmentCorrectionData::getShYUnc ( ) const
inline

Definition at line 87 of file RPAlignmentCorrectionData.h.

References sh_y_unc.

Referenced by operator<<(), and RPAlignmentCorrectionsMethods::writeXML().

double RPAlignmentCorrectionData::getShZ ( ) const
inline

Definition at line 90 of file RPAlignmentCorrectionData.h.

References sh_z.

Referenced by operator<<(), and RPAlignmentCorrectionsMethods::writeXML().

double RPAlignmentCorrectionData::getShZUnc ( ) const
inline

Definition at line 93 of file RPAlignmentCorrectionData.h.

References sh_z_unc.

Referenced by operator<<(), and RPAlignmentCorrectionsMethods::writeXML().

math::XYZVectorD RPAlignmentCorrectionData::getTranslation ( ) const
inline

Definition at line 116 of file RPAlignmentCorrectionData.h.

Referenced by DetGeomDesc::applyAlignment().

117  {
118  return math::XYZVectorD(sh_x, sh_y, sh_z);
119  }
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > XYZVectorD
spatial vector with cartesian internal representation
Definition: Vector3D.h:8
math::XYZVectorD RPAlignmentCorrectionData::getTranslationUncertainty ( ) const
inline

Definition at line 121 of file RPAlignmentCorrectionData.h.

122  {
124  }
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > XYZVectorD
spatial vector with cartesian internal representation
Definition: Vector3D.h:8
void RPAlignmentCorrectionData::setRotX ( const double &  v)
inline
void RPAlignmentCorrectionData::setRotXUnc ( const double &  v)
inline
void RPAlignmentCorrectionData::setRotY ( const double &  v)
inline
void RPAlignmentCorrectionData::setRotYUnc ( const double &  v)
inline
void RPAlignmentCorrectionData::setRotZ ( const double &  v)
inline
void RPAlignmentCorrectionData::setRotZUnc ( const double &  v)
inline
void RPAlignmentCorrectionData::setShX ( const double &  v)
inline
void RPAlignmentCorrectionData::setShXUnc ( const double &  v)
inline
void RPAlignmentCorrectionData::setShY ( const double &  v)
inline
void RPAlignmentCorrectionData::setShYUnc ( const double &  v)
inline
void RPAlignmentCorrectionData::setShZ ( const double &  v)
inline
void RPAlignmentCorrectionData::setShZUnc ( const double &  v)
inline

Member Data Documentation

double RPAlignmentCorrectionData::rot_x
protected

the three rotation angles in rad

Definition at line 65 of file RPAlignmentCorrectionData.h.

Referenced by add(), and getRotX().

double RPAlignmentCorrectionData::rot_x_unc
protected

Definition at line 66 of file RPAlignmentCorrectionData.h.

Referenced by add(), and getRotXUnc().

double RPAlignmentCorrectionData::rot_y
protected

Definition at line 65 of file RPAlignmentCorrectionData.h.

Referenced by add(), and getRotY().

double RPAlignmentCorrectionData::rot_y_unc
protected

Definition at line 66 of file RPAlignmentCorrectionData.h.

Referenced by add(), and getRotYUnc().

double RPAlignmentCorrectionData::rot_z
protected

Definition at line 65 of file RPAlignmentCorrectionData.h.

Referenced by add(), and getRotZ().

double RPAlignmentCorrectionData::rot_z_unc
protected

Definition at line 66 of file RPAlignmentCorrectionData.h.

Referenced by add(), and getRotZUnc().

double RPAlignmentCorrectionData::sh_x
protected

shift in mm; in global XYZ frame, which is not affected by (alignment) rotations! "_unc" denotes the shift uncertainties

Definition at line 60 of file RPAlignmentCorrectionData.h.

Referenced by add(), and getShX().

double RPAlignmentCorrectionData::sh_x_unc
protected

Definition at line 61 of file RPAlignmentCorrectionData.h.

Referenced by add(), and getShXUnc().

double RPAlignmentCorrectionData::sh_y
protected

Definition at line 60 of file RPAlignmentCorrectionData.h.

Referenced by add(), and getShY().

double RPAlignmentCorrectionData::sh_y_unc
protected

Definition at line 61 of file RPAlignmentCorrectionData.h.

Referenced by add(), and getShYUnc().

double RPAlignmentCorrectionData::sh_z
protected

Definition at line 60 of file RPAlignmentCorrectionData.h.

Referenced by add(), and getShZ().

double RPAlignmentCorrectionData::sh_z_unc
protected

Definition at line 61 of file RPAlignmentCorrectionData.h.

Referenced by add(), and getShZUnc().