TrackingTools
KalmanUpdators
src
Chi2MeasurementEstimator.cc
Go to the documentation of this file.
1
#include "
TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h
"
2
#include "
TrackingTools/KalmanUpdators/interface/Chi2MeasurementEstimator.h
"
3
#include "
TrackingTools/PatternTools/interface/MeasurementExtractor.h
"
4
#include "
DataFormats/TrackingRecHit/interface/KfComponentsHolder.h
"
5
#include "
DataFormats/GeometrySurface/interface/Plane.h
"
6
#include "
DataFormats/Math/interface/invertPosDefMatrix.h
"
7
8
namespace
{
9
template
<
unsigned
int
D>
10
double
lestimate(
const
TrajectoryStateOnSurface
& tsos,
const
TrackingRecHit
& aRecHit) {
11
typedef
typename
AlgebraicROOTObject<D, 5>::Matrix
MatD5;
12
typedef
typename
AlgebraicROOTObject<5, D>::Matrix
Mat5D;
13
typedef
typename
AlgebraicROOTObject<D, D>::SymMatrix
SMatDD;
14
typedef
typename
AlgebraicROOTObject<D>::Vector
VecD;
15
using
ROOT::Math::SMatrixNoInit;
16
17
VecD
r
, rMeas;
18
SMatDD
R
(SMatrixNoInit{}), RMeas(SMatrixNoInit{});
19
ProjectMatrix<double, 5, D>
dummyProjFunc;
20
auto
&&
v
= tsos.
localParameters
().
vector
();
21
auto
&&
m
= tsos.
localError
().
matrix
();
22
KfComponentsHolder
holder;
23
holder.template setup<D>(&
r
, &
R
, &dummyProjFunc, &rMeas, &RMeas,
v
,
m
);
24
aRecHit.
getKfComponents
(holder);
25
26
R
+= RMeas;
27
invertPosDefMatrix
(
R
);
28
return
ROOT::Math::Similarity(
r
- rMeas,
R
);
29
}
30
}
// namespace
31
32
std::pair<bool, double>
Chi2MeasurementEstimator::estimate
(
const
TrajectoryStateOnSurface
& tsos,
33
const
TrackingRecHit
& aRecHit)
const
{
34
switch
(aRecHit.
dimension
()) {
35
case
1:
36
return
returnIt
(lestimate<1>(tsos, aRecHit));
37
case
2:
38
return
returnIt
(lestimate<2>(tsos, aRecHit));
39
case
3:
40
return
returnIt
(lestimate<3>(tsos, aRecHit));
41
case
4:
42
return
returnIt
(lestimate<4>(tsos, aRecHit));
43
case
5:
44
return
returnIt
(lestimate<5>(tsos, aRecHit));
45
}
46
throw
cms::Exception
(
"RecHit of invalid size (not 1,2,3,4,5)"
);
47
}
KfComponentsHolder.h
Chi2MeasurementEstimator.h
TrajectoryStateOnSurface.h
Chi2MeasurementEstimatorBase::returnIt
std::pair< bool, double > returnIt(double est) const
Definition:
Chi2MeasurementEstimatorBase.h:40
MeasurementExtractor.h
AlgebraicROOTObject::SymMatrix
ROOT::Math::SMatrix< double, D1, D1, ROOT::Math::MatRepSym< double, D1 > > SymMatrix
Definition:
AlgebraicROOTObjects.h:68
LocalTrajectoryError::matrix
const AlgebraicSymMatrix55 & matrix() const
Definition:
LocalTrajectoryError.h:60
findQualityFiles.v
v
Definition:
findQualityFiles.py:179
Plane.h
TrajectoryStateOnSurface
Definition:
TrajectoryStateOnSurface.h:16
visualization-live-secondInstance_cfg.m
m
Definition:
visualization-live-secondInstance_cfg.py:72
LocalTrajectoryParameters::vector
AlgebraicVector5 vector() const
Definition:
LocalTrajectoryParameters.h:120
TrajectoryStateOnSurface::localParameters
const LocalTrajectoryParameters & localParameters() const
Definition:
TrajectoryStateOnSurface.h:73
AlgebraicROOTObject::Matrix
ROOT::Math::SMatrix< double, D1, D2, ROOT::Math::MatRepStd< double, D1, D2 > > Matrix
Definition:
AlgebraicROOTObjects.h:69
invertPosDefMatrix
bool invertPosDefMatrix(ROOT::Math::SMatrix< T, N, N, ROOT::Math::MatRepSym< T, N > > &m)
Definition:
invertPosDefMatrix.h:10
KfComponentsHolder
Definition:
KfComponentsHolder.h:13
TrackingRecHit
Definition:
TrackingRecHit.h:21
alignCSCRings.r
r
Definition:
alignCSCRings.py:93
TrackingRecHit::getKfComponents
virtual void getKfComponents(KfComponentsHolder &holder) const
Definition:
TrackingRecHit.cc:23
TrackingRecHit::dimension
virtual int dimension() const =0
Exception
Definition:
hltDiff.cc:245
Chi2MeasurementEstimator::estimate
std::pair< bool, double > estimate(const TrajectoryStateOnSurface &, const TrackingRecHit &) const override
Definition:
Chi2MeasurementEstimator.cc:32
TrajectoryStateOnSurface::localError
const LocalTrajectoryError & localError() const
Definition:
TrajectoryStateOnSurface.h:77
dttmaxenums::R
Definition:
DTTMax.h:29
ProjectMatrix
Definition:
ProjectMatrix.h:8
AlgebraicROOTObject::Vector
ROOT::Math::SVector< double, D1 > Vector
Definition:
AlgebraicROOTObjects.h:67
invertPosDefMatrix.h
Generated for CMSSW Reference Manual by
1.8.16