CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
KFSplittingFitter.cc
Go to the documentation of this file.
5 
7  result.reserve(hits.size());
8  for (RecHitContainer::const_iterator ihit = hits.begin(); ihit != hits.end(); ihit++) {
9  if (!(**ihit).isValid())
10  result.push_back(*ihit);
11  else if ((**ihit).transientHits().size() == 1)
12  result.push_back(*ihit);
13  else {
14  RecHitContainer splitted = RecHitSplitter().split((**ihit).transientHits());
15  RecHitContainer sorted = RecHitSorter().sortHits(splitted, dir);
16  for (RecHitContainer::iterator srt = sorted.begin(); srt != sorted.end(); srt++) {
17  result.push_back(*srt);
18  // result.insert(result.end(), sorted.begin(), sorted.end());
19  }
20  }
21  }
22 }
23 
25  if (aTraj.empty())
26  return Trajectory();
27 
28  const TM& firstTM = aTraj.firstMeasurement();
29  TSOS firstTsos = TrajectoryStateWithArbitraryError()(firstTM.predictedState());
30 
31  RecHitContainer const& hits = aTraj.recHits();
33  sorter(hits, aTraj.direction(), result);
34 
35  return fitter.fitOne(aTraj.seed(), result, firstTsos, type);
36 }
37 
40  sorter(hits, aSeed.direction(), result);
41 
42  return fitter.fitOne(aSeed, result, type);
43 }
44 
46  const RecHitContainer& hits,
47  const TSOS& firstPredTsos,
48  fitType type) const {
50  sorter(hits, aSeed.direction(), result);
51 
52  return fitter.fitOne(aSeed, result, firstPredTsos, type);
53 }
PropagationDirection direction() const
bool empty() const
True if trajectory has no measurements.
Definition: Trajectory.h:233
TrajectoryStateOnSurface const & predictedState() const
TrajectorySeed const & seed() const
Access to the seed used to reconstruct the Trajectory.
Definition: Trajectory.h:263
ConstRecHitContainer recHits() const
Definition: Trajectory.h:186
RecHitContainer sortHits(const RecHitContainer &hits, const PropagationDirection &dir) const
Definition: RecHitSorter.cc:6
PropagationDirection
tuple result
Definition: mps_fire.py:311
PropagationDirection const & direction() const
Definition: Trajectory.cc:133
void sorter(const RecHitContainer &hits, PropagationDirection dir, RecHitContainer &result) const
RecHitSplitter::RecHitContainer RecHitContainer
RecHitContainer split(const RecHitContainer &hits) const
KFTrajectoryFitter fitter
TrajectoryMeasurement const & firstMeasurement() const
Definition: Trajectory.h:166
Trajectory fitOne(const Trajectory &aTraj, fitType type) const override
Trajectory fitOne(const Trajectory &aTraj, fitType) const override