35 if (parameters.num_row() !=
N_PARAM) {
36 throw cms::Exception(
"BadParameters") <<
"in BeamSpotAlignmentParameters(): "
37 << parameters.num_row() <<
" instead of " <<
N_PARAM
49 if (parameters.num_row() !=
N_PARAM) {
50 throw cms::Exception(
"BadParameters") <<
"in BeamSpotAlignmentParameters(): "
51 << parameters.num_row() <<
" instead of " <<
N_PARAM
114 int ncols = dev.num_col();
115 int nrows = dev.num_row();
121 for (
int irow=0; irow<nrows; ++irow ) {
123 for (
int icol=0; icol<ncols; ++icol ) seldev[ir2][icol] = dev[irow][icol];
135 for (
int i=0;
i<2;++
i ) shift[
i] =
theData->parameters()[
i];
146 double dxdz =
theData->parameters()[2];
147 double dydz =
theData->parameters()[3];
148 double angleY = std::atan(dxdz);
149 double angleX = -std::atan(dydz);
174 <<
"BeamSpotAlignmentParameters::apply: parameters without alignable";
182 alignable->
move( gv );
209 m_GlobalParameters[0] = dg.
x();
210 m_GlobalParameters[1] = dg.
y();
215 double dxdz = gv.
x()/gv.
z();
216 double dydz = gv.
x()/gv.
z();
218 m_GlobalParameters[2] = dxdz;
219 m_GlobalParameters[3] = dydz;
221 return m_GlobalParameters;
228 std::cout <<
"Contents of BeamSpotAlignmentParameters:"
229 <<
"\nParameters: " <<
theData->parameters()
230 <<
"\nCovariance: " <<
theData->covariance() << std::endl;
247 displacement[0] = shifts.
x();
248 displacement[1] = shifts.
y();
249 displacement[2] = lv.x()/lv.z();
250 displacement[3] = lv.y()/lv.z();
virtual AlgebraicMatrix derivatives(const TrajectoryStateOnSurface &tsos, const AlignableDetOrUnitPtr &) const
Get all derivatives.
static AlgebraicVector displacementFromAlignable(const Alignable *ali)
Sin< T >::type sin(const T &t)
const GlobalVector & displacement() const
Return change of the global position since the creation of the object.
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.
virtual AlgebraicMatrix selectedDerivatives(const TrajectoryStateOnSurface &tsos, const AlignableDetOrUnitPtr &) const
Get selected derivatives.
const std::vector< bool > & selector(void) const
Get alignment parameter selector vector.
BeamSpotAlignmentParameters(Alignable *alignable, bool calcMis)
virtual ~BeamSpotAlignmentParameters()
Destructor.
AlignmentUserVariables * userVariables(void) const
Get pointer to user variables.
virtual BeamSpotAlignmentParameters * cloneFromSelected(const AlgebraicVector ¶meters, const AlgebraicSymMatrix &covMatrix) const
Clone selected parameters (for update of parameters)
const RotationType & rotation() const
Return change of orientation since the creation of the object.
virtual void apply()
apply parameters to alignable
virtual BeamSpotAlignmentParameters * clone(const AlgebraicVector ¶meters, const AlgebraicSymMatrix &covMatrix) const
Clone all parameters (for update of parameters)
CLHEP::HepMatrix AlgebraicMatrix
void rectify(RotationType &)
Correct a rotation matrix for rounding errors.
void setValid(bool v)
Set validity flag.
AlgebraicVector globalParameters(void) const
calculate and return parameters in global frame
Cos< T >::type cos(const T &t)
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
Return the derivative DeltaFrame(object)/DeltaFrame(composedobject)
AlgebraicVector rotation(void) const
Get rotation parameters.
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
virtual int type() const
tell type (AlignmentParametersFactory::ParametersType - but no circular dependency) ...
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
void print(void) const
print parameters to screen
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
const BasicVectorType & basicVector() const
AlgebraicVector translation(void) const
Get translation parameters.