File indexing completed on 2024-04-06 12:02:28
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef CondFormats_PPSObjects_CTPPSRPAlignmentCorrectionData
0012 #define CondFormats_PPSObjects_CTPPSRPAlignmentCorrectionData
0013
0014 #include "CondFormats/Serialization/interface/Serializable.h"
0015
0016 #include "DataFormats/Math/interface/Vector3D.h"
0017 #include <Math/Rotation3D.h>
0018 #include <Math/RotationZYX.h>
0019
0020 #include <vector>
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059 class CTPPSRPAlignmentCorrectionData {
0060 protected:
0061
0062
0063 double sh_x, sh_y, sh_z;
0064 double sh_x_unc, sh_y_unc, sh_z_unc;
0065
0066
0067
0068 double rot_x, rot_y, rot_z;
0069 double rot_x_unc, rot_y_unc, rot_z_unc;
0070
0071 public:
0072 CTPPSRPAlignmentCorrectionData()
0073 : sh_x(0.),
0074 sh_y(0.),
0075 sh_z(0.),
0076 sh_x_unc(0.),
0077 sh_y_unc(0.),
0078 sh_z_unc(0.),
0079 rot_x(0.),
0080 rot_y(0.),
0081 rot_z(0.),
0082 rot_x_unc(0.),
0083 rot_y_unc(0.),
0084 rot_z_unc(0.) {}
0085
0086
0087 CTPPSRPAlignmentCorrectionData(double _sh_x,
0088 double _sh_x_u,
0089 double _sh_y,
0090 double _sh_y_u,
0091 double _sh_z,
0092 double _sh_z_u,
0093 double _rot_x,
0094 double _rot_x_u,
0095 double _rot_y,
0096 double _rot_y_u,
0097 double _rot_z,
0098 double _rot_z_u);
0099
0100
0101 CTPPSRPAlignmentCorrectionData(double _sh_x, double _sh_y, double _sh_z, double _rot_x, double _rot_y, double rot_z);
0102
0103 inline double getShX() const { return sh_x; }
0104 inline void setShX(const double &v) { sh_x = v; }
0105
0106 inline double getShXUnc() const { return sh_x_unc; }
0107 inline void setShXUnc(const double &v) { sh_x_unc = v; }
0108
0109 inline double getShY() const { return sh_y; }
0110 inline void setShY(const double &v) { sh_y = v; }
0111
0112 inline double getShYUnc() const { return sh_y_unc; }
0113 inline void setShYUnc(const double &v) { sh_y_unc = v; }
0114
0115 inline double getShZ() const { return sh_z; }
0116 inline void setShZ(const double &v) { sh_z = v; }
0117
0118 inline double getShZUnc() const { return sh_z_unc; }
0119 inline void setShZUnc(const double &v) { sh_z_unc = v; }
0120
0121 inline double getRotX() const { return rot_x; }
0122 inline void setRotX(const double &v) { rot_x = v; }
0123
0124 inline double getRotXUnc() const { return rot_x_unc; }
0125 inline void setRotXUnc(const double &v) { rot_x_unc = v; }
0126
0127 inline double getRotY() const { return rot_y; }
0128 inline void setRotY(const double &v) { rot_y = v; }
0129
0130 inline double getRotYUnc() const { return rot_y_unc; }
0131 inline void setRotYUnc(const double &v) { rot_y_unc = v; }
0132
0133 inline double getRotZ() const { return rot_z; }
0134 inline void setRotZ(const double &v) { rot_z = v; }
0135
0136 inline double getRotZUnc() const { return rot_z_unc; }
0137 inline void setRotZUnc(const double &v) { rot_z_unc = v; }
0138
0139 math::XYZVectorD getTranslation() const { return math::XYZVectorD(sh_x, sh_y, sh_z); }
0140
0141 math::XYZVectorD getTranslationUncertainty() const { return math::XYZVectorD(sh_x_unc, sh_y_unc, sh_z_unc); }
0142
0143 ROOT::Math::Rotation3D getRotationMatrix() const {
0144 return ROOT::Math::Rotation3D(ROOT::Math::RotationZYX(rot_z, rot_y, rot_x));
0145 }
0146
0147
0148
0149
0150 void add(const CTPPSRPAlignmentCorrectionData &, bool sumErrors = true, bool addSh = true, bool addRot = true);
0151
0152 COND_SERIALIZABLE;
0153 };
0154
0155 std::ostream &operator<<(std::ostream &s, const CTPPSRPAlignmentCorrectionData &corr);
0156
0157 #endif