9#include <top/dbobjects/TOPCalModuleAlignment.h>
10#include <framework/logging/Logger.h>
11#include <Math/RotationX.h>
12#include <Math/RotationY.h>
13#include <Math/RotationZ.h>
14#include <Math/Translation3D.h>
17using namespace ROOT::Math;
27 unsigned module = moduleID - 1;
29 B2ERROR(
"Invalid module number, constant not set (" << ClassName() <<
")");
39 unsigned module = moduleID - 1;
41 B2ERROR(
"Invalid module number, constant not set (" << ClassName() <<
")");
51 unsigned module = moduleID - 1;
53 B2ERROR(
"Invalid module number, constant not set (" << ClassName() <<
")");
63 unsigned module = moduleID - 1;
65 B2ERROR(
"Invalid module number, constant not set (" << ClassName() <<
")");
75 unsigned module = moduleID - 1;
77 B2ERROR(
"Invalid module number, constant not set (" << ClassName() <<
")");
87 unsigned module = moduleID - 1;
89 B2ERROR(
"Invalid module number, constant not set (" << ClassName() <<
")");
99 unsigned module = moduleID - 1;
101 B2ERROR(
"Invalid module number, status not set (" << ClassName() <<
")");
110 unsigned module = moduleID - 1;
112 B2ERROR(
"Invalid module number, status not set (" << ClassName() <<
")");
121 unsigned module = moduleID - 1;
123 B2WARNING(
"Invalid module number, returning 0 (" << ClassName() <<
")");
131 unsigned module = moduleID - 1;
133 B2WARNING(
"Invalid module number, returning 0 (" << ClassName() <<
")");
141 unsigned module = moduleID - 1;
143 B2WARNING(
"Invalid module number, returning 0 (" << ClassName() <<
")");
151 unsigned module = moduleID - 1;
153 B2WARNING(
"Invalid module number, returning 0 (" << ClassName() <<
")");
161 unsigned module = moduleID - 1;
163 B2WARNING(
"Invalid module number, returning 0 (" << ClassName() <<
")");
171 unsigned module = moduleID - 1;
173 B2WARNING(
"Invalid module number, returning 0 (" << ClassName() <<
")");
181 unsigned module = moduleID - 1;
183 B2WARNING(
"Invalid module number, returning 0 (" << ClassName() <<
")");
191 unsigned module = moduleID - 1;
193 B2WARNING(
"Invalid module number, returning 0 (" << ClassName() <<
")");
201 unsigned module = moduleID - 1;
203 B2WARNING(
"Invalid module number, returning 0 (" << ClassName() <<
")");
211 unsigned module = moduleID - 1;
213 B2WARNING(
"Invalid module number, returning 0 (" << ClassName() <<
")");
221 unsigned module = moduleID - 1;
223 B2WARNING(
"Invalid module number, returning 0 (" << ClassName() <<
")");
231 unsigned module = moduleID - 1;
233 B2WARNING(
"Invalid module number, returning 0 (" << ClassName() <<
")");
241 unsigned module = moduleID - 1;
248 unsigned module = moduleID - 1;
255 unsigned module = moduleID - 1;
269 double angularPrecision)
const
272 if (
m_errAlpha[i] > angularPrecision)
return false;
273 if (
m_errBeta[i] > angularPrecision)
return false;
274 if (
m_errGamma[i] > angularPrecision)
return false;
275 if (
m_errX[i] > spatialPrecision)
return false;
276 if (
m_errY[i] > spatialPrecision)
return false;
277 if (
m_errZ[i] > spatialPrecision)
return false;
291 T = Transform3D(Rz * Ry * Rx, t);
301 unsigned module = moduleID - 1;
303 B2ERROR(
"Invalid module number, returning identity transformation (" << ClassName() <<
")");
EStatus m_status[c_numModules]
calibration status
float m_errGamma[c_numModules]
error on gamma
float m_gamma[c_numModules]
rotation angle around the z axis
std::vector< ROOT::Math::Transform3D > m_transforms
cache for transformations (from local to nominal)
float m_y[c_numModules]
displacement along the y axis
float m_errX[c_numModules]
error on the x displacement
@ c_Calibrated
good calibrated value
@ c_Unusable
bad calibrated value
@ c_Default
uncalibrated default value
float m_x[c_numModules]
displacement along the x axis
float m_errBeta[c_numModules]
error on beta
float m_alpha[c_numModules]
rotation angle around the x axis
float m_z[c_numModules]
displacement along the z axis
float m_beta[c_numModules]
rotation angle around the y axis
@ c_numModules
number of modules
float m_errY[c_numModules]
error on the y displacement
float m_errZ[c_numModules]
error on the z displacement
float m_errAlpha[c_numModules]
error on alpha
double getGammaErr(int moduleID) const
Returns the error on gamma on a single module.
bool areAllCalibrated() const
Returns true if all modules are calibrated.
void setGamma(int moduleID, double gamma, double errGamma)
Sets the angle gamma on a single module.
double getX(int moduleID) const
Returns the shift x on a single module.
double getBetaErr(int moduleID) const
Returns the error on beta on a single module.
bool isCalibrated(int moduleID) const
Returns calibration status.
void setX(int moduleID, double x, double errX)
Sets the displacement x on a single module.
const ROOT::Math::Transform3D & getTransformation(int moduleID) const
Returns transformation from local to nominal frame.
void setTransformations() const
Sets the transformation cache.
double getAlpha(int moduleID) const
Gets the angle alpha on a single module.
double getZ(int moduleID) const
Returns the shift z on a single module.
double getAlphaErr(int moduleID) const
Returns the error on alpha on a single module.
void setBeta(int moduleID, double beta, double errBeta)
Sets the angle beta on a single module.
double getBeta(int moduleID) const
Gets the angle beta on a single module.
double getXErr(int moduleID) const
Returns the error on x on a single module.
bool areAllPrecise(double spatialPrecision, double angularPrecision) const
Returns true if calibration precision for all modules is within specified values.
void setUnusable(int moduleID)
Switches calibration status to unusable to flag badly calibrated constant.
bool isDefault(int moduleID) const
Returns calibration status.
bool isUnusable(int moduleID) const
Returns calibration status.
void setCalibrated(int moduleID)
Switches calibration status to calibrated.
void setAlpha(int moduleID, double alpha, double errAlpha)
Sets the angle alpha on a single module.
double getGamma(int moduleID) const
Gets the angle gamma on a single module.
double getZErr(int moduleID) const
Returns the error on z on a single module.
void setZ(int moduleID, double z, double errZ)
Sets the displacement z on a single module.
double getYErr(int moduleID) const
Returns the error on y on a single module.
void setY(int moduleID, double y, double errY)
Sets the displacement y on a single module.
double getY(int moduleID) const
Returns the shift y on a single module.
Abstract base class for different kinds of events.