31 <<
"in BeamSpotAlignmentParameters(): " <<
parameters.num_row() <<
" instead of " <<
N_PARAM <<
" parameters.";
43 <<
"in BeamSpotAlignmentParameters(): " <<
parameters.num_row() <<
" instead of " <<
N_PARAM <<
" parameters.";
83 throw cms::Exception(
"MisMatch") <<
"BeamSpotAlignmentParameters::derivatives: The hit alignable must " 85 <<
"aligned one, i.e. these parameters make only sense for " 86 "AlignableBeamSpot.\n";
96 int ncols = dev.num_col();
97 int nrows = dev.num_row();
103 for (
int irow = 0; irow < nrows; ++irow) {
105 for (
int icol = 0; icol <
ncols; ++icol)
106 seldev[ir2][icol] = dev[irow][icol];
117 for (
int i = 0;
i < 2; ++
i)
130 double angleY = std::atan(
dxdz);
131 double angleX = -std::atan(
dydz);
150 throw cms::Exception(
"BadParameters") <<
"BeamSpotAlignmentParameters::apply: parameters without alignable";
181 m_GlobalParameters[0] = dg.
x();
182 m_GlobalParameters[1] = dg.
y();
187 double dxdz = gv.
x() / gv.
z();
188 double dydz = gv.
x() / gv.
z();
190 m_GlobalParameters[2] =
dxdz;
191 m_GlobalParameters[3] =
dydz;
193 return m_GlobalParameters;
198 std::cout <<
"Contents of BeamSpotAlignmentParameters:" 199 <<
"\nParameters: " <<
theData->parameters() <<
"\nCovariance: " <<
theData->covariance() << std::endl;
214 displacement[0] = shifts.
x();
215 displacement[1] = shifts.
y();
216 displacement[2] = lv.x() / lv.z();
217 displacement[3] = lv.y() / lv.z();
align::GlobalPoints toGlobal(const align::LocalPoints &) const
Return in global coord given a set of local points.
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
Alignable * alignable(void) const
Get pointer to corresponding alignable.
static AlgebraicVector displacementFromAlignable(const Alignable *ali)
Sin< T >::type sin(const T &t)
AlgebraicVector translation(void) const
Get translation parameters.
const AlgebraicVector & parameters(void) const
Get alignment parameters.
virtual void move(const GlobalVector &displacement)=0
Movement with respect to the global reference frame.
int numSelected(void) const
Get number of selected parameters.
AlgebraicVector expandVector(const AlgebraicVector &m, const std::vector< bool > &sel) const
BeamSpotAlignmentParameters(Alignable *alignable, bool calcMis)
AlgebraicSymMatrix expandSymMatrix(const AlgebraicSymMatrix &m, const std::vector< bool > &sel) const
~BeamSpotAlignmentParameters() override
Destructor.
CLHEP::HepMatrix AlgebraicMatrix
void rectify(RotationType &)
Correct a rotation matrix for rounding errors.
void setValid(bool v)
Set validity flag.
Cos< T >::type cos(const T &t)
AlignmentUserVariables * userVariables(void) const
Get pointer to user variables.
void print(void) const
print parameters to screen
EulerAngles toAngles(const RotationType &)
Convert rotation matrix to angles about x-, y-, z-axes (frame rotation).
int type() const override
tell type (AlignmentParametersFactory::ParametersType - but no circular dependency) ...
bool isValid(void) const
Get validity flag.
const BasicVectorType & basicVector() const
AlgebraicMatrix derivatives(const TrajectoryStateOnSurface &tsos, const AlignableDetOrUnitPtr &) const override
Get all derivatives.
CLHEP::HepVector AlgebraicVector
AlgebraicVector EulerAngles
void setUserVariables(AlignmentUserVariables *auv)
Set pointer to user variables.
virtual void rotateInGlobalFrame(const RotationType &rotation)=0
BeamSpotAlignmentParameters * clone(const AlgebraicVector ¶meters, const AlgebraicSymMatrix &covMatrix) const override
Clone all parameters (for update of parameters)
AlgebraicVector globalParameters(void) const
calculate and return parameters in global frame
const GlobalVector & displacement() const
Return change of the global position since the creation of the object.
const std::vector< bool > & selector(void) const
Get alignment parameter selector vector.
AlgebraicVector rotation(void) const
Get rotation parameters.
RotationType toMatrix(const EulerAngles &)
Convert rotation angles about x-, y-, z-axes to matrix.
CLHEP::HepSymMatrix AlgebraicSymMatrix
static unsigned int const shift
const RotationType & globalRotation() const
Return the global orientation of the object.
AlgebraicMatrix selectedDerivatives(const TrajectoryStateOnSurface &tsos, const AlignableDetOrUnitPtr &) const override
Get selected derivatives.
void apply() override
apply parameters to alignable
BeamSpotAlignmentParameters * cloneFromSelected(const AlgebraicVector ¶meters, const AlgebraicSymMatrix &covMatrix) const override
Clone selected parameters (for update of parameters)
const RotationType & rotation() const
Return change of orientation since the creation of the object.