33 const std::vector<bool>&
sel) :
111 const int ncols = dev.num_col();
112 const int nrows = dev.num_row();
118 for (
int irow = 0; irow < nrows; ++irow) {
120 for (
int icol = 0; icol <
ncols; ++icol) {
121 seldev[ir2][icol] = dev[irow][icol];
155 edm::LogError(
"Alignment") <<
"@SUB=AlignmentParameters::hierarchyLevel" 156 <<
"Called for AlignmentParameters without pointer to Alignable";
162 if (comps.empty())
return 0;
164 unsigned int maxLevelOfComp = 0;
165 for (
const auto& iAli: comps) {
166 const unsigned int compResult = iAli->alignmentParameters()->hierarchyLevel();
168 if (maxLevelOfComp < compResult) maxLevelOfComp = compResult;
171 return maxLevelOfComp + 1;
178 return theData->parameters().num_row();
199 const std::vector<bool>&
sel )
const 202 int nRows = m.num_row();
203 int size = sel.size();
207 throw cms::Exception(
"LogicError") <<
"Size mismatch in parameters" 208 <<
" (input symmatrix = " << nRows <<
", selection: " << size <<
")";
211 std::vector<int> rowvec;
212 for (
int i=0;
i<nRows;
i++ )
213 if ( sel[
i] ) rowvec.push_back(i);
215 int nSelectedRows = rowvec.size();
217 for (
int i=0; i<nSelectedRows; i++)
218 for (
int j=0; j<nSelectedRows; j++)
219 result[i][j] = m[ rowvec[i] ][ rowvec[j] ];
228 const std::vector<bool>&
sel )
const 231 int nRows = m.num_row();
232 int size = sel.size();
236 throw cms::Exception(
"LogicError") <<
"Size mismatch in parameters" 237 <<
" (input vector = " << nRows <<
", selection: " << size <<
")";
240 std::vector<int> rowvec;
241 for (
int i=0;
i<nRows;
i++ )
242 if ( sel[
i] ) rowvec.push_back(i);
244 int nSelectedRows=rowvec.size();
246 for (
int i=0; i<nSelectedRows; i++ )
247 result[i] = m[ (
int)rowvec[
i] ];
256 const std::vector<bool>&
sel)
const 259 int nRows = m.num_row();
260 int size = sel.size();
262 std::vector<int> rowvec;
264 if ( sel[
i] ) rowvec.push_back(i);
267 if( nRows != static_cast<int>(rowvec.size()) )
268 throw cms::Exception(
"LogicError") <<
"Size mismatch in parameters" 269 <<
" (input symmatrix = " << nRows <<
", selection: " << size <<
")";
273 for (
int i=0; i<nRows; i++ )
274 for (
int j=0; j<nRows; j++)
275 result[ rowvec[i] ][ rowvec[j] ] = m[i][j];
283 const std::vector<bool>&
sel)
const 286 int nRows = m.num_row();
287 int size = sel.size();
289 std::vector<int> rowvec;
291 if (sel[
i]==
true) rowvec.push_back(
i);
294 if( nRows != static_cast<int>(rowvec.size()) )
295 throw cms::Exception(
"LogicError") <<
"Size mismatch in parameters" 296 <<
" (input vector = " << nRows <<
", selection: " << size <<
")";
300 for (
int i=0;
i<nRows;
i++) 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.
const AlgebraicVector & parameters(void) const
Get alignment parameters.
AlignmentUserVariables * userVariables(void) const
Get pointer to user variables.
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 derivatives(const TrajectoryStateOnSurface &tsos, const AlignableDetOrUnitPtr &alidet) const =0
Get derivatives of selected parameters.
virtual AlgebraicMatrix selectedDerivatives(const TrajectoryStateOnSurface &tsos, const AlignableDetOrUnitPtr &alidet) const