src
TrackingTools
GsfTracking
src
GsfMultiStateUpdator.cc
Go to the documentation of this file.
1
#include "
TrackingTools/GsfTracking/interface/GsfMultiStateUpdator.h
"
2
#include "
TrackingTools/GsfTools/interface/GetComponents.h
"
3
#include "
TrackingTools/KalmanUpdators/interface/KFUpdator.h
"
4
#include "
TrackingTools/PatternTools/interface/MeasurementExtractor.h
"
5
#include "
TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHit.h
"
6
#include "
DataFormats/GeometrySurface/interface/BoundPlane.h
"
7
#include "
TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h
"
8
#include "
TrackingTools/GsfTools/interface/BasicMultiTrajectoryState.h
"
9
#include "
TrackingTools/GsfTracking/interface/PosteriorWeightsCalculator.h
"
10
#include "
TrackingTools/GsfTools/interface/MultiTrajectoryStateAssembler.h
"
11
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
12
13
TrajectoryStateOnSurface
GsfMultiStateUpdator::update
(
const
TrajectoryStateOnSurface
& tsos,
14
const
TrackingRecHit
& aRecHit)
const
{
15
if
(!tsos.
isValid
()) {
16
edm::LogError
(
"GsfMultiStateUpdator"
) <<
"Trying to update trajectory state with invalid TSOS! "
;
17
return
TrajectoryStateOnSurface
();
18
}
19
20
GetComponents
comps(tsos);
21
auto
const
& predictedComponents = comps();
22
if
(predictedComponents.empty()) {
23
edm::LogError
(
"GsfMultiStateUpdator"
) <<
"Trying to update trajectory state with zero components! "
;
24
return
TrajectoryStateOnSurface
();
25
}
26
27
auto
&&
weights
=
PosteriorWeightsCalculator
(predictedComponents).
weights
(aRecHit);
28
if
(
weights
.empty()) {
29
edm::LogError
(
"GsfMultiStateUpdator"
) <<
" no weights could be retreived. invalid updated state !."
;
30
return
TrajectoryStateOnSurface
();
31
}
32
33
MultiTrajectoryStateAssembler
result
;
34
35
int
i
= 0;
36
for
(
auto
const
& tsosI : predictedComponents) {
37
TrajectoryStateOnSurface
updatedTSOS =
KFUpdator
().
update
(tsosI, aRecHit);
38
39
if
(
double
det;
40
updatedTSOS.
isValid
() && updatedTSOS.
localError
().
valid
() && updatedTSOS.
localError
().
posDef
() &&
41
(det = 0., updatedTSOS.
curvilinearError
().
matrix
().Sub<
AlgebraicSymMatrix22
>(0, 0).
Det
(det) && det > 0) &&
42
(det = 0., updatedTSOS.
curvilinearError
().
matrix
().Sub<
AlgebraicSymMatrix33
>(0, 0).
Det
(det) && det > 0) &&
43
(det = 0., updatedTSOS.
curvilinearError
().
matrix
().Sub<
AlgebraicSymMatrix44
>(0, 0).
Det
(det) && det > 0) &&
44
(det = 0., updatedTSOS.
curvilinearError
().
matrix
().Det2(det) && det > 0)) {
45
result
.addState(
TrajectoryStateOnSurface
(
weights
[
i
],
46
updatedTSOS.
localParameters
(),
47
updatedTSOS.
localError
(),
48
updatedTSOS.
surface
(),
49
&(tsos.
globalParameters
().
magneticField
()),
50
tsosI.surfaceSide()));
51
}
else
{
52
edm::LogError
(
"GsfMultiStateUpdator"
) <<
"KF updated state "
<<
i
<<
" is invalid. skipping."
;
53
}
54
++
i
;
55
}
56
57
return
result
.combinedState();
58
}
GetComponents.h
KFUpdator
Definition:
KFUpdator.h:32
mps_fire.i
i
Definition:
mps_fire.py:429
PosteriorWeightsCalculator
Definition:
PosteriorWeightsCalculator.h:13
TrajectoryStateOnSurface::localError
const LocalTrajectoryError & localError() const
Definition:
TrajectoryStateOnSurface.h:77
MessageLogger.h
mps_fire.result
result
Definition:
mps_fire.py:311
TrajectoryStateOnSurface::globalParameters
const GlobalTrajectoryParameters & globalParameters() const
Definition:
TrajectoryStateOnSurface.h:64
BasicMultiTrajectoryState.h
Det
GeometricSearchDet Det
Definition:
DetBelowR.h:8
TrackingRecHit
Definition:
TrackingRecHit.h:21
TrajectoryStateOnSurface::localParameters
const LocalTrajectoryParameters & localParameters() const
Definition:
TrajectoryStateOnSurface.h:73
GsfMultiStateUpdator.h
edm::LogError
Log< level::Error, false > LogError
Definition:
MessageLogger.h:129
TrajectoryStateOnSurface
Definition:
TrajectoryStateOnSurface.h:16
TrajectoryStateOnSurface::surface
const SurfaceType & surface() const
Definition:
TrajectoryStateOnSurface.h:78
TransientTrackingRecHit.h
MultiTrajectoryStateAssembler.h
KFUpdator.h
KFUpdator::update
TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TrackingRecHit &) const override
Definition:
KFUpdator.cc:177
BoundPlane.h
PosteriorWeightsCalculator::weights
std::vector< double > weights(const TrackingRecHit &tsos) const
Create random state.
Definition:
PosteriorWeightsCalculator.cc:11
hltDeepSecondaryVertexTagInfosPFPuppi_cfi.weights
weights
Definition:
hltDeepSecondaryVertexTagInfosPFPuppi_cfi.py:71
LocalTrajectoryError::valid
bool valid() const
Definition:
LocalTrajectoryError.h:32
AlgebraicSymMatrix44
ROOT::Math::SMatrix< double, 4, 4, ROOT::Math::MatRepSym< double, 4 > > AlgebraicSymMatrix44
Definition:
AlgebraicROOTObjects.h:22
TrajectoryStateOnSurface::curvilinearError
const CurvilinearTrajectoryError & curvilinearError() const
Definition:
TrajectoryStateOnSurface.h:72
CurvilinearTrajectoryError::matrix
const AlgebraicSymMatrix55 & matrix() const
Definition:
CurvilinearTrajectoryError.h:61
GlobalTrajectoryParameters::magneticField
const MagneticField & magneticField() const
Definition:
GlobalTrajectoryParameters.h:106
AlgebraicSymMatrix22
ROOT::Math::SMatrix< double, 2, 2, ROOT::Math::MatRepSym< double, 2 > > AlgebraicSymMatrix22
Definition:
AlgebraicROOTObjects.h:20
PosteriorWeightsCalculator.h
TrajectoryStateOnSurface::isValid
bool isValid() const
Definition:
TrajectoryStateOnSurface.h:54
TrajectoryStateOnSurface.h
AlgebraicSymMatrix33
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
Definition:
AlgebraicROOTObjects.h:21
MultiTrajectoryStateAssembler
Definition:
MultiTrajectoryStateAssembler.h:13
LocalTrajectoryError::posDef
bool posDef() const
Definition:
LocalTrajectoryError.h:35
GetComponents
Definition:
GetComponents.h:4
MeasurementExtractor.h
GsfMultiStateUpdator::update
TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TrackingRecHit &) const override
Definition:
GsfMultiStateUpdator.cc:13
Generated for CMSSW Reference Manual by
1.8.14