CMS 3D CMS Logo

AlignmentParametersData.cc
Go to the documentation of this file.
2 
4 
5 #include <algorithm>
6 #include <functional>
7 
9  : theParameters(new AlgebraicVector()),
10  theCovariance(new AlgebraicSymMatrix()),
11  theSelector(new std::vector<bool>()),
12  theNumSelected(0) {}
13 
15  AlgebraicSymMatrix* cov,
16  std::vector<bool>* sel)
17  : theParameters(param), theCovariance(cov), theSelector(sel) {
18  theNumSelected = std::count_if(theSelector->begin(), theSelector->end(), [](auto const& c) { return c == true; });
19 }
20 
22  const AlgebraicSymMatrix& cov,
23  const std::vector<bool>& sel)
24  : theParameters(new AlgebraicVector(param)),
25  theCovariance(new AlgebraicSymMatrix(cov)),
26  theSelector(new std::vector<bool>(sel)) {
27  theNumSelected = std::count_if(theSelector->begin(), theSelector->end(), [](auto const& c) { return c == true; });
28 }
29 
31  : theParameters(param),
32  theCovariance(cov),
33  theSelector(new std::vector<bool>(param->num_row(), true)),
34  theNumSelected(param->num_row()) {}
35 
37  : theParameters(new AlgebraicVector(param)),
38  theCovariance(new AlgebraicSymMatrix(cov)),
39  theSelector(new std::vector<bool>(param.num_row(), true)),
40  theNumSelected(param.num_row()) {}
41 
43  delete theParameters;
44  delete theCovariance;
45  delete theSelector;
46 }
47 
49  int selectorSize = static_cast<int>(theSelector->size());
50  int paramSize = theParameters->num_row();
51  int covSize = theCovariance->num_row();
52 
53  if ((paramSize != covSize) || (paramSize != selectorSize))
54  throw cms::Exception("LogicError") << "@SUB=AlignmentParametersData::checkConsistency "
55  << "\nSize mismatch: parameter size = " << paramSize
56  << ", covariance size = " << covSize << ", selector size = " << selectorSize
57  << ".";
58 }
AlignmentParametersData(void)
Default constructor.
CLHEP::HepVector AlgebraicVector
CLHEP::HepSymMatrix AlgebraicSymMatrix
std::vector< bool > * theSelector
AlgebraicSymMatrix * theCovariance