CMS 3D CMS Logo

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 (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=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...
 
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 58 of file CTPPSRPAlignmentCorrectionData.h.

Constructor & Destructor Documentation

◆ CTPPSRPAlignmentCorrectionData() [1/2]

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 20 of file CTPPSRPAlignmentCorrectionData.cc.

33  : sh_x(_sh_x),
34  sh_y(_sh_y),
35  sh_z(_sh_z),
36  sh_x_unc(_sh_x_u),
37  sh_y_unc(_sh_y_u),
38  sh_z_unc(_sh_z_u),
39  rot_x(_rot_x),
40  rot_y(_rot_y),
41  rot_z(_rot_z),
42  rot_x_unc(_rot_x_u),
43  rot_y_unc(_rot_y_u),

◆ CTPPSRPAlignmentCorrectionData() [2/2]

CTPPSRPAlignmentCorrectionData::CTPPSRPAlignmentCorrectionData ( 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 47 of file CTPPSRPAlignmentCorrectionData.cc.

50  : sh_x(_sh_x), sh_y(_sh_y), sh_z(_sh_z), rot_x(_rot_x), rot_y(_rot_y), rot_z(_rot_z) {}

Member Function Documentation

◆ add()

void CTPPSRPAlignmentCorrectionData::add ( const CTPPSRPAlignmentCorrectionData 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 53 of file CTPPSRPAlignmentCorrectionData.cc.

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) {
64  sh_x_unc = sqrt(sh_x_unc * sh_x_unc + a.sh_x_unc * a.sh_x_unc);
65  sh_y_unc = sqrt(sh_y_unc * sh_y_unc + a.sh_y_unc * a.sh_y_unc);
66  sh_z_unc = sqrt(sh_z_unc * sh_z_unc + a.sh_z_unc * a.sh_z_unc);
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) {
76  rot_x_unc = sqrt(rot_x_unc * rot_x_unc + a.rot_x_unc * a.rot_x_unc);
77  rot_y_unc = sqrt(rot_y_unc * rot_y_unc + a.rot_y_unc * a.rot_y_unc);
78  rot_z_unc = sqrt(rot_z_unc * rot_z_unc + a.rot_z_unc * a.rot_z_unc);
79  }
80  }

References a, 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().

◆ getRotationMatrix()

ROOT::Math::Rotation3D CTPPSRPAlignmentCorrectionData::getRotationMatrix ( ) const
inline

◆ getRotX()

double CTPPSRPAlignmentCorrectionData::getRotX ( ) const
inline

Definition at line 118 of file CTPPSRPAlignmentCorrectionData.h.

118 { return rot_y; }

References rot_y.

◆ getRotXUnc()

double CTPPSRPAlignmentCorrectionData::getRotXUnc ( ) const
inline

Definition at line 121 of file CTPPSRPAlignmentCorrectionData.h.

121 { return rot_y_unc; }

References rot_y_unc.

◆ getRotY()

double CTPPSRPAlignmentCorrectionData::getRotY ( ) const
inline

Definition at line 124 of file CTPPSRPAlignmentCorrectionData.h.

124 { return rot_z; }

References rot_z.

◆ getRotYUnc()

double CTPPSRPAlignmentCorrectionData::getRotYUnc ( ) const
inline

Definition at line 127 of file CTPPSRPAlignmentCorrectionData.h.

127 { return rot_z_unc; }

References rot_z_unc.

◆ getRotZ()

double CTPPSRPAlignmentCorrectionData::getRotZ ( ) const
inline

Definition at line 130 of file CTPPSRPAlignmentCorrectionData.h.

130 { return math::XYZVectorD(sh_x, sh_y, sh_z); }

References sh_x, sh_y, and sh_z.

◆ getRotZUnc()

double CTPPSRPAlignmentCorrectionData::getRotZUnc ( ) const
inline

Definition at line 133 of file CTPPSRPAlignmentCorrectionData.h.

◆ getShX()

double CTPPSRPAlignmentCorrectionData::getShX ( ) const
inline

Definition at line 100 of file CTPPSRPAlignmentCorrectionData.h.

100 { return sh_y; }

References sh_y.

◆ getShXUnc()

double CTPPSRPAlignmentCorrectionData::getShXUnc ( ) const
inline

Definition at line 103 of file CTPPSRPAlignmentCorrectionData.h.

103 { return sh_y_unc; }

References sh_y_unc.

◆ getShY()

double CTPPSRPAlignmentCorrectionData::getShY ( ) const
inline

Definition at line 106 of file CTPPSRPAlignmentCorrectionData.h.

106 { return sh_z; }

References sh_z.

◆ getShYUnc()

double CTPPSRPAlignmentCorrectionData::getShYUnc ( ) const
inline

Definition at line 109 of file CTPPSRPAlignmentCorrectionData.h.

109 { return sh_z_unc; }

References sh_z_unc.

◆ getShZ()

double CTPPSRPAlignmentCorrectionData::getShZ ( ) const
inline

Definition at line 112 of file CTPPSRPAlignmentCorrectionData.h.

112 { return rot_x; }

References rot_x.

◆ getShZUnc()

double CTPPSRPAlignmentCorrectionData::getShZUnc ( ) const
inline

Definition at line 115 of file CTPPSRPAlignmentCorrectionData.h.

115 { return rot_x_unc; }

References rot_x_unc.

◆ getTranslation()

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

◆ getTranslationUncertainty()

math::XYZVectorD CTPPSRPAlignmentCorrectionData::getTranslationUncertainty ( ) const
inline

Definition at line 138 of file CTPPSRPAlignmentCorrectionData.h.

◆ serialize()

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

◆ setRotX()

void CTPPSRPAlignmentCorrectionData::setRotX ( const double &  v)
inline

Definition at line 119 of file CTPPSRPAlignmentCorrectionData.h.

119 { rot_y = v; }

References rot_y, and findQualityFiles::v.

◆ setRotXUnc()

void CTPPSRPAlignmentCorrectionData::setRotXUnc ( const double &  v)
inline

Definition at line 122 of file CTPPSRPAlignmentCorrectionData.h.

122 { rot_y_unc = v; }

References rot_y_unc, and findQualityFiles::v.

◆ setRotY()

void CTPPSRPAlignmentCorrectionData::setRotY ( const double &  v)
inline

Definition at line 125 of file CTPPSRPAlignmentCorrectionData.h.

125 { rot_z = v; }

References rot_z, and findQualityFiles::v.

◆ setRotYUnc()

void CTPPSRPAlignmentCorrectionData::setRotYUnc ( const double &  v)
inline

Definition at line 128 of file CTPPSRPAlignmentCorrectionData.h.

128 { rot_z_unc = v; }

References rot_z_unc, and findQualityFiles::v.

◆ setRotZ()

void CTPPSRPAlignmentCorrectionData::setRotZ ( const double &  v)
inline

Definition at line 131 of file CTPPSRPAlignmentCorrectionData.h.

References sh_x_unc, sh_y_unc, and sh_z_unc.

◆ setRotZUnc()

void CTPPSRPAlignmentCorrectionData::setRotZUnc ( const double &  v)
inline

Definition at line 134 of file CTPPSRPAlignmentCorrectionData.h.

134 {

References rot_x, rot_y, and rot_z.

◆ setShX()

void CTPPSRPAlignmentCorrectionData::setShX ( const double &  v)
inline

Definition at line 101 of file CTPPSRPAlignmentCorrectionData.h.

101 { sh_y = v; }

References sh_y, and findQualityFiles::v.

◆ setShXUnc()

void CTPPSRPAlignmentCorrectionData::setShXUnc ( const double &  v)
inline

Definition at line 104 of file CTPPSRPAlignmentCorrectionData.h.

104 { sh_y_unc = v; }

References sh_y_unc, and findQualityFiles::v.

◆ setShY()

void CTPPSRPAlignmentCorrectionData::setShY ( const double &  v)
inline

Definition at line 107 of file CTPPSRPAlignmentCorrectionData.h.

107 { sh_z = v; }

References sh_z, and findQualityFiles::v.

◆ setShYUnc()

void CTPPSRPAlignmentCorrectionData::setShYUnc ( const double &  v)
inline

Definition at line 110 of file CTPPSRPAlignmentCorrectionData.h.

110 { sh_z_unc = v; }

References sh_z_unc, and findQualityFiles::v.

◆ setShZ()

void CTPPSRPAlignmentCorrectionData::setShZ ( const double &  v)
inline

Definition at line 113 of file CTPPSRPAlignmentCorrectionData.h.

113 { rot_x = v; }

References rot_x, and findQualityFiles::v.

◆ setShZUnc()

void CTPPSRPAlignmentCorrectionData::setShZUnc ( const double &  v)
inline

Definition at line 116 of file CTPPSRPAlignmentCorrectionData.h.

116 { rot_x_unc = v; }

References rot_x_unc, and findQualityFiles::v.

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 151 of file CTPPSRPAlignmentCorrectionData.h.

◆ cond::serialization::access

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

Definition at line 151 of file CTPPSRPAlignmentCorrectionData.h.

Member Data Documentation

◆ rot_x

double CTPPSRPAlignmentCorrectionData::rot_x
protected

the three rotation angles in rad

Definition at line 74 of file CTPPSRPAlignmentCorrectionData.h.

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

◆ rot_x_unc

double CTPPSRPAlignmentCorrectionData::rot_x_unc
protected

Definition at line 75 of file CTPPSRPAlignmentCorrectionData.h.

Referenced by add(), getShZUnc(), and setShZUnc().

◆ rot_y

double CTPPSRPAlignmentCorrectionData::rot_y
protected

Definition at line 74 of file CTPPSRPAlignmentCorrectionData.h.

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

◆ rot_y_unc

double CTPPSRPAlignmentCorrectionData::rot_y_unc
protected

Definition at line 75 of file CTPPSRPAlignmentCorrectionData.h.

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

◆ rot_z

double CTPPSRPAlignmentCorrectionData::rot_z
protected

Definition at line 74 of file CTPPSRPAlignmentCorrectionData.h.

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

◆ rot_z_unc

double CTPPSRPAlignmentCorrectionData::rot_z_unc
protected

Definition at line 75 of file CTPPSRPAlignmentCorrectionData.h.

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

◆ sh_x

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

Referenced by add(), and getRotZ().

◆ sh_x_unc

double CTPPSRPAlignmentCorrectionData::sh_x_unc
protected

Definition at line 70 of file CTPPSRPAlignmentCorrectionData.h.

Referenced by add(), and setRotZ().

◆ sh_y

double CTPPSRPAlignmentCorrectionData::sh_y
protected

Definition at line 69 of file CTPPSRPAlignmentCorrectionData.h.

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

◆ sh_y_unc

double CTPPSRPAlignmentCorrectionData::sh_y_unc
protected

Definition at line 70 of file CTPPSRPAlignmentCorrectionData.h.

Referenced by add(), getShXUnc(), setRotZ(), and setShXUnc().

◆ sh_z

double CTPPSRPAlignmentCorrectionData::sh_z
protected

Definition at line 69 of file CTPPSRPAlignmentCorrectionData.h.

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

◆ sh_z_unc

double CTPPSRPAlignmentCorrectionData::sh_z_unc
protected

Definition at line 70 of file CTPPSRPAlignmentCorrectionData.h.

Referenced by add(), getShYUnc(), setRotZ(), and setShYUnc().

CTPPSRPAlignmentCorrectionData::sh_y
double sh_y
Definition: CTPPSRPAlignmentCorrectionData.h:69
CTPPSRPAlignmentCorrectionData::rot_y_unc
double rot_y_unc
Definition: CTPPSRPAlignmentCorrectionData.h:75
CTPPSRPAlignmentCorrectionData::rot_z
double rot_z
Definition: CTPPSRPAlignmentCorrectionData.h:74
findQualityFiles.v
v
Definition: findQualityFiles.py:179
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
CTPPSRPAlignmentCorrectionData::sh_y_unc
double sh_y_unc
Definition: CTPPSRPAlignmentCorrectionData.h:70
CTPPSRPAlignmentCorrectionData::rot_x
double rot_x
Definition: CTPPSRPAlignmentCorrectionData.h:74
math::XYZVectorD
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > XYZVectorD
spatial vector with cartesian internal representation
Definition: Vector3D.h:8
a
double a
Definition: hdecay.h:119
CTPPSRPAlignmentCorrectionData::rot_x_unc
double rot_x_unc
Definition: CTPPSRPAlignmentCorrectionData.h:75
CTPPSRPAlignmentCorrectionData::rot_y
double rot_y
Definition: CTPPSRPAlignmentCorrectionData.h:74
CTPPSRPAlignmentCorrectionData::sh_x_unc
double sh_x_unc
Definition: CTPPSRPAlignmentCorrectionData.h:70
CTPPSRPAlignmentCorrectionData::rot_z_unc
double rot_z_unc
Definition: CTPPSRPAlignmentCorrectionData.h:75
CTPPSRPAlignmentCorrectionData::sh_z
double sh_z
Definition: CTPPSRPAlignmentCorrectionData.h:69
CTPPSRPAlignmentCorrectionData::sh_z_unc
double sh_z_unc
Definition: CTPPSRPAlignmentCorrectionData.h:70
CTPPSRPAlignmentCorrectionData::sh_x
double sh_x
Definition: CTPPSRPAlignmentCorrectionData.h:69