CMS 3D CMS Logo

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 }
KfComponentsHolder.h
class-composition.H
H
Definition: class-composition.py:31
AlgebraicROOTObject::SymMatrix
ROOT::Math::SMatrix< double, D1, D1, ROOT::Math::MatRepSym< double, D1 > > SymMatrix
Definition: AlgebraicROOTObjects.h:68
KfComponentsHolder::genericFill_
void genericFill_(const TrackingRecHit &hit)
Definition: KfComponentsHolder.cc:7
TrackingRecHit.h
KfComponentsHolder::genericFill
void genericFill(const TrackingRecHit &hit)
Fill in datamembers from a generic TrackingRecHit using the CLHEP matrices.
Definition: KfComponentsHolder.cc:22
AlgebraicROOTObject::Matrix
ROOT::Math::SMatrix< double, D1, D2, ROOT::Math::MatRepStd< double, D1, D2 > > Matrix
Definition: AlgebraicROOTObjects.h:69
TrackingRecHit
Definition: TrackingRecHit.h:21
Exception
Definition: hltDiff.cc:245
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
Exception.h
KfComponentsHolder::tsosLocalErrors_
const AlgebraicSymMatrix55 * tsosLocalErrors_
Definition: KfComponentsHolder.h:94
AlgebraicROOTObject::Vector
ROOT::Math::SVector< double, D1 > Vector
Definition: AlgebraicROOTObjects.h:67
hit
Definition: SiStripHitEffFromCalibTree.cc:88