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";
160 std::vector<Alignable*> comps;
162 if (comps.empty())
return 0;
164 unsigned int maxLevelOfComp = 0;
165 for (std::vector<Alignable*>::const_iterator iAli = comps.begin(), iAliEnd = comps.end();
166 iAli != iAliEnd; ++iAli) {
167 const unsigned int compResult = (*iAli)->alignmentParameters()->hierarchyLevel();
169 if (maxLevelOfComp < compResult) maxLevelOfComp = compResult;
172 return maxLevelOfComp + 1;
179 return theData->parameters().num_row();
200 const std::vector<bool>&
sel )
const 203 int nRows = m.num_row();
204 int size = sel.size();
208 throw cms::Exception(
"LogicError") <<
"Size mismatch in parameters" 209 <<
" (input symmatrix = " << nRows <<
", selection: " << size <<
")";
212 std::vector<int> rowvec;
213 for (
int i=0;
i<nRows;
i++ )
214 if ( sel[
i] ) rowvec.push_back(i);
216 int nSelectedRows = rowvec.size();
218 for (
int i=0; i<nSelectedRows; i++)
219 for (
int j=0; j<nSelectedRows; j++)
220 result[i][j] = m[ rowvec[i] ][ rowvec[j] ];
229 const std::vector<bool>&
sel )
const 232 int nRows = m.num_row();
233 int size = sel.size();
237 throw cms::Exception(
"LogicError") <<
"Size mismatch in parameters" 238 <<
" (input vector = " << nRows <<
", selection: " << size <<
")";
241 std::vector<int> rowvec;
242 for (
int i=0;
i<nRows;
i++ )
243 if ( sel[
i] ) rowvec.push_back(i);
245 int nSelectedRows=rowvec.size();
247 for (
int i=0; i<nSelectedRows; i++ )
248 result[i] = m[ (
int)rowvec[
i] ];
257 const std::vector<bool>&
sel)
const 260 int nRows = m.num_row();
261 int size = sel.size();
263 std::vector<int> rowvec;
265 if ( sel[
i] ) rowvec.push_back(i);
268 if( nRows != static_cast<int>(rowvec.size()) )
269 throw cms::Exception(
"LogicError") <<
"Size mismatch in parameters" 270 <<
" (input symmatrix = " << nRows <<
", selection: " << size <<
")";
274 for (
int i=0; i<nRows; i++ )
275 for (
int j=0; j<nRows; j++)
276 result[ rowvec[i] ][ rowvec[j] ] = m[i][j];
284 const std::vector<bool>&
sel)
const 287 int nRows = m.num_row();
288 int size = sel.size();
290 std::vector<int> rowvec;
292 if (sel[
i]==
true) rowvec.push_back(
i);
295 if( nRows != static_cast<int>(rowvec.size()) )
296 throw cms::Exception(
"LogicError") <<
"Size mismatch in parameters" 297 <<
" (input vector = " << nRows <<
", selection: " << size <<
")";
301 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.
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