CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
KfComponentsHolder.cc
Go to the documentation of this file.
4 #include <typeinfo>
5 
6 template<unsigned int D>
8  typedef typename AlgebraicROOTObject<D,5>::Matrix MatD5;
9  typedef typename AlgebraicROOTObject<D,D>::SymMatrix SMatDD;
10  typedef typename AlgebraicROOTObject<D>::Vector VecD;
11 
12  params<D>() = asSVector<D>(hit.parameters());
13  errors<D>() = asSMatrix<D>(hit.parametersError());
14 
15  MatD5 && H = asSMatrix<D,5>(hit.projectionMatrix());
16  projFunc<D>().fromH(H);
17 
18  measuredParams<D>() = H * (*tsosLocalParameters_);
19  measuredErrors<D>() = ROOT::Math::Similarity(H, (*tsosLocalErrors_));
20 }
21 
23  switch (hit.dimension()) {
24  case 1: genericFill_<1>(hit); break;
25  case 2: genericFill_<2>(hit); break;
26  case 3: genericFill_<3>(hit); break;
27  case 4: genericFill_<4>(hit); break;
28  case 5: genericFill_<5>(hit); break;
29  default:
30  throw cms::Exception("Rec hit of invalid dimension (not 1,2,3,4,5)") <<
31  "The dimension was " << hit.dimension() <<
32  ", type is " << typeid(hit).name() << "\n";
33  }
34 
35 }
36 
virtual int dimension() const =0
void genericFill(const TrackingRecHit &hit)
Fill in datamembers from a generic TrackingRecHit using the CLHEP matrices.
void genericFill_(const TrackingRecHit &hit)
ROOT::Math::SMatrix< double, D1, D1, ROOT::Math::MatRepSym< double, D1 > > SymMatrix
virtual AlgebraicVector parameters() const =0
ROOT::Math::SMatrix< double, D1, D2, ROOT::Math::MatRepStd< double, D1, D2 > > Matrix
ROOT::Math::SVector< double, D1 > Vector
virtual AlgebraicMatrix projectionMatrix() const =0
const AlgebraicSymMatrix55 * tsosLocalErrors_
const AlgebraicVector5 * tsosLocalParameters_
virtual AlgebraicSymMatrix parametersError() const =0