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";
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";
239 std::vector<int> rowvec;
240 for (
int i=0;
i<nRows;
i++ )
241 if ( sel[
i] ) rowvec.push_back(i);
243 int nSelectedRows=rowvec.size();
245 for (
int i=0; i<nSelectedRows; i++ )
246 result[i] = m[ (
int)rowvec[
i] ];
255 const std::vector<bool>&
sel)
const
258 int nRows = m.num_row();
259 int size = sel.size();
261 std::vector<int> rowvec;
263 if ( sel[
i] ) rowvec.push_back(i);
266 if( nRows != static_cast<int>(rowvec.size()) )
267 throw cms::Exception(
"LogicError") <<
"Size mismatch in parameters";
271 for (
int i=0; i<nRows; i++ )
272 for (
int j=0;
j<nRows;
j++)
273 result[ rowvec[i] ][ rowvec[
j] ] = m[i][
j];
281 const std::vector<bool>&
sel)
const
284 int nRows = m.num_row();
285 int size = sel.size();
287 std::vector<int> rowvec;
289 if (sel[
i]==
true) rowvec.push_back(
i);
292 if( nRows != static_cast<int>(rowvec.size()) )
293 throw cms::Exception(
"LogicError") <<
"Size mismatch in parameters";
297 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.
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.
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