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
GetComponents
comps(tsos);
16
auto
const
& predictedComponents = comps();
17
if
(predictedComponents.empty()) {
18
edm::LogError
(
"GsfMultiStateUpdator"
) <<
"Trying to update trajectory state with zero components! "
;
19
return
TrajectoryStateOnSurface
();
20
}
21
22
auto
&&
weights
=
PosteriorWeightsCalculator
(predictedComponents).
weights
(aRecHit);
23
if
(
weights
.empty()) {
24
edm::LogError
(
"GsfMultiStateUpdator"
) <<
" no weights could be retreived. invalid updated state !."
;
25
return
TrajectoryStateOnSurface
();
26
}
27
28
MultiTrajectoryStateAssembler
result
;
29
30
int
i
= 0;
31
for
(
auto
const
& tsosI : predictedComponents) {
32
TrajectoryStateOnSurface
updatedTSOS =
KFUpdator
().
update
(tsosI, aRecHit);
33
if
(updatedTSOS.
isValid
()) {
34
result
.addState(
TrajectoryStateOnSurface
(
weights
[
i
],
35
updatedTSOS.
localParameters
(),
36
updatedTSOS.
localError
(),
37
updatedTSOS.
surface
(),
38
&(tsos.
globalParameters
().
magneticField
()),
39
tsosI.surfaceSide()));
40
}
else
{
41
edm::LogError
(
"GsfMultiStateUpdator"
) <<
"KF updated state "
<<
i
<<
" is invalid. skipping."
;
42
}
43
++
i
;
44
}
45
46
return
result
.combinedState();
47
}
PosteriorWeightsCalculator.h
KFUpdator::update
TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TrackingRecHit &) const override
Definition:
KFUpdator.cc:177
TrajectoryStateOnSurface.h
mps_fire.i
i
Definition:
mps_fire.py:428
MessageLogger.h
MeasurementExtractor.h
MultiTrajectoryStateAssembler
Definition:
MultiTrajectoryStateAssembler.h:13
TransientTrackingRecHit.h
GetComponents.h
TrajectoryStateOnSurface
Definition:
TrajectoryStateOnSurface.h:16
GetComponents
Definition:
GetComponents.h:4
HLT_FULL_cff.weights
weights
Definition:
HLT_FULL_cff.py:99178
PosteriorWeightsCalculator
Definition:
PosteriorWeightsCalculator.h:13
MultiTrajectoryStateAssembler.h
PosteriorWeightsCalculator::weights
std::vector< double > weights(const TrackingRecHit &tsos) const
Create random state.
Definition:
PosteriorWeightsCalculator.cc:11
TrajectoryStateOnSurface::localParameters
const LocalTrajectoryParameters & localParameters() const
Definition:
TrajectoryStateOnSurface.h:73
KFUpdator.h
edm::LogError
Log< level::Error, false > LogError
Definition:
MessageLogger.h:123
TrackingRecHit
Definition:
TrackingRecHit.h:21
GsfMultiStateUpdator.h
GlobalTrajectoryParameters::magneticField
const MagneticField & magneticField() const
Definition:
GlobalTrajectoryParameters.h:106
TrajectoryStateOnSurface::surface
const SurfaceType & surface() const
Definition:
TrajectoryStateOnSurface.h:78
BoundPlane.h
mps_fire.result
result
Definition:
mps_fire.py:311
TrajectoryStateOnSurface::globalParameters
const GlobalTrajectoryParameters & globalParameters() const
Definition:
TrajectoryStateOnSurface.h:64
BasicMultiTrajectoryState.h
GsfMultiStateUpdator::update
TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TrackingRecHit &) const override
Definition:
GsfMultiStateUpdator.cc:13
TrajectoryStateOnSurface::localError
const LocalTrajectoryError & localError() const
Definition:
TrajectoryStateOnSurface.h:77
KFUpdator
Definition:
KFUpdator.h:32
TrajectoryStateOnSurface::isValid
bool isValid() const
Definition:
TrajectoryStateOnSurface.h:54
Generated for CMSSW Reference Manual by
1.8.16