DataFormats
TrackingRecHit
src
KfComponentsHolder.cc
Go to the documentation of this file.
1
#include "
DataFormats/TrackingRecHit/interface/KfComponentsHolder.h
"
2
#include "
DataFormats/TrackingRecHit/interface/TrackingRecHit.h
"
3
#include "
FWCore/Utilities/interface/Exception.h
"
4
#include <typeinfo>
5
6
template
<
unsigned
int
D>
7
void
KfComponentsHolder::genericFill_
(
const
TrackingRecHit
&
hit
) {
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
22
void
KfComponentsHolder::genericFill
(
const
TrackingRecHit
&
hit
) {
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
Generated for CMSSW Reference Manual by
1.8.16