13 : theAlignable(object),
15 theUserVariables(nullptr),
25 const std::vector<bool>&
sel)
26 : theAlignable(object),
28 theUserVariables(nullptr),
36 : theAlignable(object), theData(data), theUserVariables(nullptr), bValid(
true) {
74 const int ncols = dev.num_col();
75 const int nrows = dev.num_row();
81 for (
int irow = 0; irow < nrows; ++irow) {
83 for (
int icol = 0; icol < ncols; ++icol) {
84 seldev[ir2][icol] = dev[irow][icol];
109 edm::LogError(
"Alignment") <<
"@SUB=AlignmentParameters::hierarchyLevel"
110 <<
"Called for AlignmentParameters without pointer to Alignable";
119 unsigned int maxLevelOfComp = 0;
120 for (
const auto& iAli : comps) {
121 const unsigned int compResult = iAli->alignmentParameters()->hierarchyLevel();
123 if (maxLevelOfComp < compResult)
124 maxLevelOfComp = compResult;
127 return maxLevelOfComp + 1;
141 const std::vector<bool>&
sel)
const {
142 int nRows = m.num_row();
143 int size = sel.size();
147 throw cms::Exception(
"LogicError") <<
"Size mismatch in parameters"
148 <<
" (input symmatrix = " << nRows <<
", selection: " << size <<
")";
151 std::vector<int> rowvec;
152 for (
int i = 0;
i < nRows;
i++)
156 int nSelectedRows = rowvec.size();
158 for (
int i = 0; i < nSelectedRows; i++)
159 for (
int j = 0;
j < nSelectedRows;
j++)
160 result[i][
j] = m[rowvec[i]][rowvec[
j]];
167 int nRows = m.num_row();
168 int size = sel.size();
172 throw cms::Exception(
"LogicError") <<
"Size mismatch in parameters"
173 <<
" (input vector = " << nRows <<
", selection: " << size <<
")";
176 std::vector<int> rowvec;
177 for (
int i = 0;
i < nRows;
i++)
181 int nSelectedRows = rowvec.size();
183 for (
int i = 0; i < nSelectedRows; i++)
184 result[i] = m[(
int)rowvec[
i]];
191 const std::vector<bool>&
sel)
const {
192 int nRows = m.num_row();
193 int size = sel.size();
195 std::vector<int> rowvec;
201 if (nRows != static_cast<int>(rowvec.size()))
202 throw cms::Exception(
"LogicError") <<
"Size mismatch in parameters"
203 <<
" (input symmatrix = " << nRows <<
", selection: " << size <<
")";
207 for (
int i = 0; i < nRows; i++)
208 for (
int j = 0;
j < nRows;
j++)
209 result[rowvec[i]][rowvec[
j]] = m[i][
j];
216 int nRows = m.num_row();
217 int size = sel.size();
219 std::vector<int> rowvec;
225 if (nRows != static_cast<int>(rowvec.size()))
226 throw cms::Exception(
"LogicError") <<
"Size mismatch in parameters"
227 <<
" (input vector = " << nRows <<
", selection: " << size <<
")";
231 for (
int i = 0;
i < nRows;
i++)
232 result[rowvec[
i]] = m[
i];
AlgebraicSymMatrix collapseSymMatrix(const AlgebraicSymMatrix &m, const std::vector< bool > &sel) const
AlgebraicVector selectedParameters(void) const
Get selected parameters.
AlgebraicSymMatrix expandSymMatrix(const AlgebraicSymMatrix &m, const std::vector< bool > &sel) const
const std::vector< bool > & selector(void) const
Get alignment parameter selector vector.
Log< level::Error, false > LogError
const AlgebraicVector & parameters(void) const
Get alignment parameters.
AlignmentUserVariables * userVariables(void) const
Get pointer to user variables.
virtual AlgebraicMatrix derivatives(const TrajectoryStateOnSurface &tsos, const AlignableDetOrUnitPtr &alidet) const =0
Get derivatives of selected parameters.
CLHEP::HepMatrix AlgebraicMatrix
void setValid(bool v)
Set validity flag.
bool firstCompsWithParams(Alignables ¶mComps) const
(Abstract) Base class for alignment algorithm user variables
Alignable * alignable(void) const
Get pointer to corresponding alignable.
AlgebraicSymMatrix selectedCovariance(void) const
Get covariance matrix of selected parameters.
int numSelected(void) const
Get number of selected parameters.
CLHEP::HepVector AlgebraicVector
AlgebraicVector expandVector(const AlgebraicVector &m, const std::vector< bool > &sel) const
void setUserVariables(AlignmentUserVariables *auv)
Set pointer to user variables.
int size(void) const
Get number of parameters.
std::vector< Alignable * > Alignables
AlgebraicVector collapseVector(const AlgebraicVector &m, const std::vector< bool > &sel) const
char data[epos_bytes_allocation]
virtual ~AlignmentParameters()
Destructor.
bool isValid(void) const
Get validity flag.
CLHEP::HepSymMatrix AlgebraicSymMatrix
AlignmentParameters()
Default constructor.
bool bValid
True if parameters are valid.
virtual unsigned int hierarchyLevel() const
const AlgebraicSymMatrix & covariance(void) const
Get parameter covariance matrix.
AlignmentUserVariables * theUserVariables
virtual AlgebraicMatrix selectedDerivatives(const TrajectoryStateOnSurface &tsos, const AlignableDetOrUnitPtr &alidet) const