CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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:
25  genericFill_<1>(hit);
26  break;
27  case 2:
28  genericFill_<2>(hit);
29  break;
30  case 3:
31  genericFill_<3>(hit);
32  break;
33  case 4:
34  genericFill_<4>(hit);
35  break;
36  case 5:
37  genericFill_<5>(hit);
38  break;
39  default:
40  throw cms::Exception("Rec hit of invalid dimension (not 1,2,3,4,5)")
41  << "The dimension was " << hit.dimension() << ", type is " << typeid(hit).name() << "\n";
42  }
43 }
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
ROOT::Math::SMatrix< double, D1, D2, ROOT::Math::MatRepStd< double, D1, D2 > > Matrix
virtual AlgebraicVector parameters() const =0
virtual AlgebraicMatrix projectionMatrix() const =0
const AlgebraicSymMatrix55 * tsosLocalErrors_
ROOT::Math::SVector< double, D1 > Vector
const AlgebraicVector5 * tsosLocalParameters_
virtual AlgebraicSymMatrix parametersError() const =0