CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Attributes | Private Member Functions | Friends
CTPPSRPAlignmentCorrectionData 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 <CTPPSRPAlignmentCorrectionData.h>

Public Member Functions

void add (const CTPPSRPAlignmentCorrectionData &, bool sumErrors=true, bool addSh=true, bool addRot=true)
 
 CTPPSRPAlignmentCorrectionData ()
 
 CTPPSRPAlignmentCorrectionData (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...
 
 CTPPSRPAlignmentCorrectionData (double _sh_x, double _sh_y, double _sh_z, double _rot_x, double _rot_y, double rot_z)
 no uncertainty constructor, shifts in mm, rotation in rad More...
 
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
 
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
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 

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 59 of file CTPPSRPAlignmentCorrectionData.h.

Constructor & Destructor Documentation

CTPPSRPAlignmentCorrectionData::CTPPSRPAlignmentCorrectionData ( )
inline
CTPPSRPAlignmentCorrectionData::CTPPSRPAlignmentCorrectionData ( 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

Definition at line 21 of file CTPPSRPAlignmentCorrectionData.cc.

CTPPSRPAlignmentCorrectionData::CTPPSRPAlignmentCorrectionData ( double  _sh_x,
double  _sh_y,
double  _sh_z,
double  _rot_x,
double  _rot_y,
double  rot_z 
)

Member Function Documentation

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

merges (cumulates) alignements

Parameters
sumErrorsif true, uncertainties are summed in quadrature, otherwise the uncertainties of this are not changed With the add... switches one can control which corrections are added.

Definition at line 54 of file CTPPSRPAlignmentCorrectionData.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 CTPPSRPAlignmentCorrectionsData::getFullSensorCorrection(), counter.Counter::register(), SequenceTypes.Task::remove(), and SequenceTypes.Task::replace().

57  {
58  if (addSh) {
59  sh_x += a.sh_x;
60  sh_y += a.sh_y;
61  sh_z += a.sh_z;
62 
63  if (sumErrors) {
67  }
68  }
69 
70  if (addRot) {
71  rot_x += a.rot_x;
72  rot_y += a.rot_y;
73  rot_z += a.rot_z;
74 
75  if (sumErrors) {
79  }
80  }
81 }
T sqrt(T t)
Definition: SSEVec.h:19
ROOT::Math::Rotation3D CTPPSRPAlignmentCorrectionData::getRotationMatrix ( ) const
inline
double CTPPSRPAlignmentCorrectionData::getRotX ( ) const
inline
double CTPPSRPAlignmentCorrectionData::getRotXUnc ( ) const
inline
double CTPPSRPAlignmentCorrectionData::getRotY ( ) const
inline
double CTPPSRPAlignmentCorrectionData::getRotYUnc ( ) const
inline
double CTPPSRPAlignmentCorrectionData::getRotZ ( ) const
inline
double CTPPSRPAlignmentCorrectionData::getRotZUnc ( ) const
inline
double CTPPSRPAlignmentCorrectionData::getShX ( ) const
inline
double CTPPSRPAlignmentCorrectionData::getShXUnc ( ) const
inline
double CTPPSRPAlignmentCorrectionData::getShY ( ) const
inline
double CTPPSRPAlignmentCorrectionData::getShYUnc ( ) const
inline
double CTPPSRPAlignmentCorrectionData::getShZ ( ) const
inline
double CTPPSRPAlignmentCorrectionData::getShZUnc ( ) const
inline
math::XYZVectorD CTPPSRPAlignmentCorrectionData::getTranslation ( ) const
inline

Definition at line 139 of file CTPPSRPAlignmentCorrectionData.h.

References sh_x, sh_y, and sh_z.

Referenced by DetGeomDesc::applyAlignment(), and RPDisplacementGenerator::RPDisplacementGenerator().

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

Definition at line 141 of file CTPPSRPAlignmentCorrectionData.h.

References sh_x_unc, sh_y_unc, and sh_z_unc.

ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > XYZVectorD
spatial vector with cartesian internal representation
Definition: Vector3D.h:8
template<class Archive >
void CTPPSRPAlignmentCorrectionData::serialize ( Archive &  ar,
const unsigned int  version 
)
private
void CTPPSRPAlignmentCorrectionData::setRotX ( const double &  v)
inline
void CTPPSRPAlignmentCorrectionData::setRotXUnc ( const double &  v)
inline
void CTPPSRPAlignmentCorrectionData::setRotY ( const double &  v)
inline
void CTPPSRPAlignmentCorrectionData::setRotYUnc ( const double &  v)
inline
void CTPPSRPAlignmentCorrectionData::setRotZ ( const double &  v)
inline
void CTPPSRPAlignmentCorrectionData::setRotZUnc ( const double &  v)
inline
void CTPPSRPAlignmentCorrectionData::setShX ( const double &  v)
inline
void CTPPSRPAlignmentCorrectionData::setShXUnc ( const double &  v)
inline
void CTPPSRPAlignmentCorrectionData::setShY ( const double &  v)
inline
void CTPPSRPAlignmentCorrectionData::setShYUnc ( const double &  v)
inline
void CTPPSRPAlignmentCorrectionData::setShZ ( const double &  v)
inline
void CTPPSRPAlignmentCorrectionData::setShZUnc ( const double &  v)
inline

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 152 of file CTPPSRPAlignmentCorrectionData.h.

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 152 of file CTPPSRPAlignmentCorrectionData.h.

Member Data Documentation

double CTPPSRPAlignmentCorrectionData::rot_x
protected

the three rotation angles in rad

Definition at line 68 of file CTPPSRPAlignmentCorrectionData.h.

Referenced by add(), getRotationMatrix(), getRotX(), and setRotX().

double CTPPSRPAlignmentCorrectionData::rot_x_unc
protected

Definition at line 69 of file CTPPSRPAlignmentCorrectionData.h.

Referenced by add(), getRotXUnc(), and setRotXUnc().

double CTPPSRPAlignmentCorrectionData::rot_y
protected

Definition at line 68 of file CTPPSRPAlignmentCorrectionData.h.

Referenced by add(), getRotationMatrix(), getRotY(), and setRotY().

double CTPPSRPAlignmentCorrectionData::rot_y_unc
protected

Definition at line 69 of file CTPPSRPAlignmentCorrectionData.h.

Referenced by add(), getRotYUnc(), and setRotYUnc().

double CTPPSRPAlignmentCorrectionData::rot_z
protected

Definition at line 68 of file CTPPSRPAlignmentCorrectionData.h.

Referenced by add(), getRotationMatrix(), getRotZ(), and setRotZ().

double CTPPSRPAlignmentCorrectionData::rot_z_unc
protected

Definition at line 69 of file CTPPSRPAlignmentCorrectionData.h.

Referenced by add(), getRotZUnc(), and setRotZUnc().

double CTPPSRPAlignmentCorrectionData::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 63 of file CTPPSRPAlignmentCorrectionData.h.

Referenced by add(), getShX(), getTranslation(), and setShX().

double CTPPSRPAlignmentCorrectionData::sh_x_unc
protected
double CTPPSRPAlignmentCorrectionData::sh_y
protected

Definition at line 63 of file CTPPSRPAlignmentCorrectionData.h.

Referenced by add(), getShY(), getTranslation(), and setShY().

double CTPPSRPAlignmentCorrectionData::sh_y_unc
protected
double CTPPSRPAlignmentCorrectionData::sh_z
protected

Definition at line 63 of file CTPPSRPAlignmentCorrectionData.h.

Referenced by add(), getShZ(), getTranslation(), and setShZ().

double CTPPSRPAlignmentCorrectionData::sh_z_unc
protected