CMS 3D CMS Logo

GsfMultiStateUpdator.cc
Go to the documentation of this file.
12 
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 
29 
30  int i = 0;
31  for (auto const & tsosI : predictedComponents) {
32  TrajectoryStateOnSurface updatedTSOS = KFUpdator().update(tsosI, aRecHit);
33  if (updatedTSOS.isValid()){
35  updatedTSOS.localParameters(),
36  updatedTSOS.localError(), updatedTSOS.surface(),
37  &(tsos.globalParameters().magneticField()),
38  tsosI.surfaceSide()
39  ));
40  }
41  else{
42  edm::LogError("GsfMultiStateUpdator") << "KF updated state " << i << " is invalid. skipping.";
43  }
44  ++i;
45  }
46 
47  return result.combinedState();
48 }
const LocalTrajectoryParameters & localParameters() const
std::vector< double > weights(const TrackingRecHit &tsos) const
Create random state.
void addState(const TrajectoryStateOnSurface)
const SurfaceType & surface() const
TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TrackingRecHit &) const
Definition: KFUpdator.cc:75
TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TrackingRecHit &) const
const LocalTrajectoryError & localError() const
const GlobalTrajectoryParameters & globalParameters() const
const MagneticField & magneticField() const