CMS 3D CMS Logo

CTPPSRPAlignmentCorrectionData.h
Go to the documentation of this file.
1 /****************************************************************************
2  *
3  * This is a part of CMS-TOTEM PPS offline software.
4  * Authors:
5  * Jan Kašpar (jan.kaspar@gmail.com)
6  * Helena Malbouisson
7  * Clemencia Mora Herrera
8  *
9  ****************************************************************************/
10 
11 #ifndef CondFormats_CTPPSReadoutObjects_CTPPSRPAlignmentCorrectionData
12 #define CondFormats_CTPPSReadoutObjects_CTPPSRPAlignmentCorrectionData
13 
15 
17 #include <Math/Rotation3D.h>
18 #include <Math/RotationZYX.h>
19 
20 #include <vector>
21 
60 {
61  protected:
64  double sh_x, sh_y, sh_z;
66 
69  double rot_x, rot_y, rot_z;
71 
72  public:
74  CTPPSRPAlignmentCorrectionData(double _sh_x, double _sh_x_u, double _sh_y, double _sh_y_u, double _sh_z, double _sh_z_u,
75  double _rot_x, double _rot_x_u, double _rot_y, double _rot_y_u, double _rot_z, double _rot_z_u);
76 
78  CTPPSRPAlignmentCorrectionData(double _sh_x = 0., double _sh_y = 0., double _sh_z = 0.,
79  double _rot_x = 0., double _rot_y = 0., double rot_z = 0.);
80 
81 
82  inline double getShX() const { return sh_x; }
83  inline void setShX(const double &v) { sh_x = v; }
84 
85  inline double getShXUnc() const { return sh_x_unc; }
86  inline void setShXUnc(const double &v) { sh_x_unc = v; }
87 
88  inline double getShY() const { return sh_y; }
89  inline void setShY(const double &v) { sh_y = v; }
90 
91  inline double getShYUnc() const { return sh_y_unc; }
92  inline void setShYUnc(const double &v) { sh_y_unc = v; }
93 
94  inline double getShZ() const { return sh_z; }
95  inline void setShZ(const double &v) { sh_z = v; }
96 
97  inline double getShZUnc() const { return sh_z_unc; }
98  inline void setShZUnc(const double &v) { sh_z_unc = v; }
99 
100 
101  inline double getRotX() const { return rot_x; }
102  inline void setRotX(const double &v) { rot_x = v; }
103 
104  inline double getRotXUnc() const { return rot_x_unc; }
105  inline void setRotXUnc(const double &v) { rot_x_unc = v; }
106 
107  inline double getRotY() const { return rot_y; }
108  inline void setRotY(const double &v) { rot_y = v; }
109 
110  inline double getRotYUnc() const { return rot_y_unc; }
111  inline void setRotYUnc(const double &v) { rot_y_unc = v; }
112 
113  inline double getRotZ() const { return rot_z; }
114  inline void setRotZ(const double &v) { rot_z = v; }
115 
116  inline double getRotZUnc() const { return rot_z_unc; }
117  inline void setRotZUnc(const double &v) { rot_z_unc = v; }
118 
119 
121  {
122  return math::XYZVectorD(sh_x, sh_y, sh_z);
123  }
124 
126  {
127  return math::XYZVectorD(sh_x_unc, sh_y_unc, sh_z_unc);
128  }
129 
130  ROOT::Math::Rotation3D getRotationMatrix() const
131  {
132  return ROOT::Math::Rotation3D(ROOT::Math::RotationZYX(rot_z, rot_y, rot_x));
133  }
134 
140  void add(const CTPPSRPAlignmentCorrectionData&, bool sumErrors=true, bool addSh=true, bool addRot=true);
141 
143 };
144 
145 std::ostream& operator<<(std::ostream& s, const CTPPSRPAlignmentCorrectionData &corr);
146 
147 #endif
std::ostream & operator<<(std::ostream &s, const CTPPSRPAlignmentCorrectionData &corr)
ROOT::Math::Rotation3D getRotationMatrix() const
math::XYZVectorD getTranslationUncertainty() const
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > XYZVectorD
spatial vector with cartesian internal representation
Definition: Vector3D.h:8
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
JetCorrectorParameters corr
Definition: classes.h:5
#define COND_SERIALIZABLE
Definition: Serializable.h:38
void add(const CTPPSRPAlignmentCorrectionData &, bool sumErrors=true, bool addSh=true, bool addRot=true)
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.