CMS 3D CMS Logo

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 }
TkFittedLasBeam.h
TkFittedLasBeam::paramCovariance_
AlgebraicSymMatrix paramCovariance_
beam parameters (depend on parameterisation_)
Definition: TkFittedLasBeam.h:53
TkFittedLasBeam::TkFittedLasBeam
TkFittedLasBeam()
Definition: TkFittedLasBeam.cc:6
TkFittedLasBeam::parametrisation
unsigned int parametrisation() const
the parametrisation type used (0 means undefined...)
Definition: TkFittedLasBeam.h:27
TkFittedLasBeam::chi2_
float chi2_
first non-free parameter in (local) fit
Definition: TkFittedLasBeam.h:56
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
TkFittedLasBeam::derivatives_
AlgebraicMatrix derivatives_
cov. matrix of 'free' params. (dim=firstFixedParameter_)
Definition: TkFittedLasBeam.h:54
hltPixelTracks_cff.chi2
chi2
Definition: hltPixelTracks_cff.py:25
TkLasBeam
Definition: TkLasBeam.h:12
TkFittedLasBeam::firstFixedParameter_
unsigned int firstFixedParameter_
derivatives with respect to parameters_
Definition: TkFittedLasBeam.h:55
AlgebraicSymMatrix
CLHEP::HepSymMatrix AlgebraicSymMatrix
Definition: AlgebraicObjects.h:15
TkFittedLasBeam::setParameters
void setParameters(unsigned int parametrisation, const std::vector< Scalar > &params, const AlgebraicSymMatrix &paramCovariance, const AlgebraicMatrix &derivatives, unsigned int firstFixedParam, float chi2)
Definition: TkFittedLasBeam.cc:11
AlgebraicMatrix
CLHEP::HepMatrix AlgebraicMatrix
Definition: AlgebraicObjects.h:14
Exception
Definition: hltDiff.cc:246
TkFittedLasBeam::parametrisation_
unsigned int parametrisation_
Definition: TkFittedLasBeam.h:51
TkFittedLasBeam::parameters_
std::vector< Scalar > parameters_
type of parameterisation (0 means undefined)
Definition: TkFittedLasBeam.h:52
TkLasBeam::getData
const std::vector< SiStripLaserRecHit2D > & getData(void) const
access the collection of hits
Definition: TkLasBeam.h:26
Exception.h
TkFittedLasBeam::derivatives
const AlgebraicMatrix & derivatives() const
matrix of local derivatives: columns are parameters, rows are hits
Definition: TkFittedLasBeam.h:33