34 if (parameters.num_row() !=
N_PARAM) {
35 throw cms::Exception(
"BadParameters") <<
"in RigidBodyAlignmentParameters(): " 36 << parameters.num_row() <<
" instead of " <<
N_PARAM 48 if (parameters.num_row() !=
N_PARAM) {
49 throw cms::Exception(
"BadParameters") <<
"in RigidBodyAlignmentParameters(): " 50 << parameters.num_row() <<
" instead of " <<
N_PARAM 108 int ncols = dev.num_col();
109 int nrows = dev.num_row();
115 for (
int irow=0; irow<nrows; ++irow ) {
117 for (
int icol=0; icol<
ncols; ++icol ) seldev[ir2][icol] = dev[irow][icol];
130 for (
int i=0;
i<3;++
i ) shift[
i]=
theData->parameters()[
i];
140 for (
int i=0;
i<3;++
i) rot[
i] =
theData->parameters()[
i+3];
151 <<
"RigidBodyAlignmentParameters::apply: parameters without alignable";
187 m_GlobalParameters[0] = dg.
x();
188 m_GlobalParameters[1] = dg.
y();
189 m_GlobalParameters[2] = dg.
z();
193 m_GlobalParameters[3]=eulerglob(1);
194 m_GlobalParameters[4]=eulerglob(2);
195 m_GlobalParameters[5]=eulerglob(3);
197 return m_GlobalParameters;
205 std::cout <<
"Contents of RigidBodyAlignmentParameters:" 206 <<
"\nParameters: " <<
theData->parameters()
207 <<
"\nCovariance: " <<
theData->covariance() << std::endl;
224 displacement[0] = shifts.
x();
225 displacement[1] = shifts.
y();
226 displacement[2] = shifts.
z();
227 displacement[3] =
angles(1);
228 displacement[4] =
angles(2);
229 displacement[5] =
angles(3);
virtual RigidBodyAlignmentParameters * clone(const AlgebraicVector ¶meters, const AlgebraicSymMatrix &covMatrix) const
Clone all parameters (for update of parameters)
static AlgebraicVector displacementFromAlignable(const Alignable *ali)
const GlobalVector & displacement() const
Return change of the global position since the creation of the object.
virtual AlgebraicMatrix selectedDerivatives(const TrajectoryStateOnSurface &tsos, const AlignableDetOrUnitPtr &) const
Get selected derivatives.
const RotationType & globalRotation() const
Return the global orientation of the object.
AlgebraicSymMatrix expandSymMatrix(const AlgebraicSymMatrix &m, const std::vector< bool > &sel) const
virtual void move(const GlobalVector &displacement)=0
Movement with respect to the global reference frame.
const std::vector< bool > & selector(void) const
Get alignment parameter selector vector.
virtual AlgebraicMatrix derivatives(const TrajectoryStateOnSurface &tsos, const AlignableDetOrUnitPtr &) const
Get all derivatives.
virtual void apply()
apply parameters to alignable
const AlgebraicVector & parameters(void) const
Get alignment parameters.
AlignmentUserVariables * userVariables(void) const
Get pointer to user variables.
const RotationType & rotation() const
Return change of orientation since the creation of the object.
align::RotationType toLocal(const align::RotationType &) const
Return in local frame a rotation given in global frame.
CLHEP::HepMatrix AlgebraicMatrix
void rectify(RotationType &)
Correct a rotation matrix for rounding errors.
void setValid(bool v)
Set validity flag.
EulerAngles toAngles(const RotationType &)
Convert rotation matrix to angles about x-, y-, z-axes (frame rotation).
Alignable * alignable(void) const
Get pointer to corresponding alignable.
AlgebraicMatrix frameToFrameDerivative(const Alignable *object, const Alignable *composedObject) const
virtual int type() const
tell type (AlignmentParametersFactory::ParametersType - but no circular dependency) ...
void print(void) const
print parameters to screen
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
int numSelected(void) const
Get number of selected parameters.
CLHEP::HepVector AlgebraicVector
AlgebraicVector EulerAngles
AlgebraicVector expandVector(const AlgebraicVector &m, const std::vector< bool > &sel) const
void setUserVariables(AlignmentUserVariables *auv)
Set pointer to user variables.
virtual void rotateInGlobalFrame(const RotationType &rotation)=0
AlgebraicVector translation(void) const
Get translation parameters.
bool isValid(void) const
Get validity flag.
TkRotation transposed() const
align::GlobalPoints toGlobal(const align::LocalPoints &) const
Return in global coord given a set of local points.
RotationType toMatrix(const EulerAngles &)
Convert rotation angles about x-, y-, z-axes to matrix.
CLHEP::HepSymMatrix AlgebraicSymMatrix
static unsigned int const shift
virtual RigidBodyAlignmentParameters * cloneFromSelected(const AlgebraicVector ¶meters, const AlgebraicSymMatrix &covMatrix) const
Clone selected parameters (for update of parameters)
AlgebraicVector rotation(void) const
Get rotation parameters.
AlgebraicVector globalParameters(void) const
calculate and return parameters in global frame
const BasicVectorType & basicVector() const
RigidBodyAlignmentParameters(Alignable *alignable, bool calcMis)