CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TkFittedLasBeam.cc
Go to the documentation of this file.
3 #include <vector>
4 
7 
9 
11 void TkFittedLasBeam::setParameters(unsigned int parametrisation,
12  const std::vector<Scalar> &params,
13  const AlgebraicSymMatrix &paramCovariance,
14  const AlgebraicMatrix &derivatives,
15  unsigned int firstFixedParam,
16  float chi2) {
19  paramCovariance_ = paramCovariance;
21  firstFixedParameter_ = firstFixedParam;
22  chi2_ = chi2;
23 
24  // check integrity
25  if (parameters_.size() != static_cast<unsigned int>(derivatives_.num_col()) // # parameters
26  || static_cast<unsigned int>(derivatives_.num_row()) != this->getData().size() // # hits
27  || firstFixedParameter_ > parameters_.size() // index 'fixed' might be the
28  || static_cast<unsigned int>(paramCovariance_.num_row()) != firstFixedParameter_) {
29  throw cms::Exception("BadInput")
30  << "[TkFittedLasBeam::setParameters] with inconsistent sizes: (parametrisation " << parametrisation << "):\n"
31  << parameters_.size() << " parameters,\n"
32  << derivatives_.num_row() << "x" << derivatives_.num_col() << " derivatives,\n"
33  << "firstFixed = " << firstFixedParameter_ << " (i.e. "
34  << static_cast<int>(parameters_.size()) - static_cast<int>(firstFixedParameter_)
35  << " global parameters),\n" // cast on line before to allow difference to be < 0, [un]signed!
36  << "cov. matrix size " << paramCovariance_.num_row() << ".\n";
37  }
38 }
const AlgebraicMatrix & derivatives() const
matrix of local derivatives: columns are parameters, rows are hits
unsigned int parametrisation_
CLHEP::HepMatrix AlgebraicMatrix
unsigned int parametrisation() const
the parametrisation type used (0 means undefined...)
AlgebraicSymMatrix paramCovariance_
beam parameters (depend on parameterisation_)
unsigned int firstFixedParameter_
derivatives with respect to parameters_
CLHEP::HepSymMatrix AlgebraicSymMatrix
const std::vector< SiStripLaserRecHit2D > & getData(void) const
access the collection of hits
Definition: TkLasBeam.h:26
std::vector< Scalar > parameters_
type of parameterisation (0 means undefined)
float chi2_
first non-free parameter in (local) fit
AlgebraicMatrix derivatives_
cov. matrix of &#39;free&#39; params. (dim=firstFixedParameter_)
void setParameters(unsigned int parametrisation, const std::vector< Scalar > &params, const AlgebraicSymMatrix &paramCovariance, const AlgebraicMatrix &derivatives, unsigned int firstFixedParam, float chi2)