CMS 3D CMS Logo

TrajectoryFitter.h
Go to the documentation of this file.
1 #ifndef _TrajectoryFitter_H_
2 #define _TrajectoryFitter_H_
3 
6 
7 #include <memory>
8 
9 class TrajectorySeed;
11 class TkCloner;
12 
18 
20 public:
21  enum fitType { standard = 0, looper = 1 };
22 
25 
26  virtual ~TrajectoryFitter() {}
27  virtual std::unique_ptr<TrajectoryFitter> clone() const = 0;
28 
29  // FIXME a prototype: final inplementaiton may differ
30  virtual void setHitCloner(TkCloner const*) = 0;
31 
32  // new interface return one trajectory: if fit fails trajectory is invalid...
33  virtual Trajectory fitOne(const Trajectory& traj, fitType type = standard) const = 0;
34  virtual Trajectory fitOne(const TrajectorySeed& seed,
35  const RecHitContainer& hits,
36  fitType typee = standard) const = 0;
37  virtual Trajectory fitOne(const TrajectorySeed& seed,
38  const RecHitContainer& hits,
39  const TrajectoryStateOnSurface& tsos,
40  fitType type = standard) const = 0;
41 
42  // backward compatible interface...
43  std::vector<Trajectory> fit(const Trajectory& traj, fitType type = standard) const {
44  return makeVect(fitOne(traj, type));
45  }
46 
47  std::vector<Trajectory> fit(const TrajectorySeed& seed, const RecHitContainer& hits, fitType type = standard) const {
48  return makeVect(fitOne(seed, hits, type));
49  }
50  std::vector<Trajectory> fit(const TrajectorySeed& seed,
51  const RecHitContainer& hits,
52  const TrajectoryStateOnSurface& tsos,
53  fitType type = standard) const {
54  return makeVect(fitOne(seed, hits, tsos, type));
55  }
56 
57 private:
58  static std::vector<Trajectory> makeVect(Trajectory&& outTraj) {
59  if (outTraj.isValid())
60  return std::vector<Trajectory>(1, std::move(outTraj));
61  return std::vector<Trajectory>();
62  }
63 };
64 
65 #endif
TrajectoryFitter::fit
std::vector< Trajectory > fit(const TrajectorySeed &seed, const RecHitContainer &hits, fitType type=standard) const
Definition: TrajectoryFitter.h:47
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
TransientTrackingRecHit.h
TrajectoryFitter::setHitCloner
virtual void setHitCloner(TkCloner const *)=0
fileCollector.seed
seed
Definition: fileCollector.py:127
TrajectoryFitter::clone
virtual std::unique_ptr< TrajectoryFitter > clone() const =0
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
TkCloner
Definition: TkCloner.h:16
TrajectoryFitterRecord
Definition: TrajectoryFitterRecord.h:12
TrajectoryFitterRecord.h
looper
Definition: looper.py:1
Trajectory::RecHitContainer
ConstRecHitContainer RecHitContainer
Definition: Trajectory.h:42
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
TrajectoryFitter::fit
std::vector< Trajectory > fit(const Trajectory &traj, fitType type=standard) const
Definition: TrajectoryFitter.h:43
Trajectory.h
TrajectoryFitter
Definition: TrajectoryFitter.h:19
eostools.move
def move(src, dest)
Definition: eostools.py:511
standard
TrajectoryFitter::~TrajectoryFitter
virtual ~TrajectoryFitter()
Definition: TrajectoryFitter.h:26
Trajectory
Definition: Trajectory.h:38
TrajectoryFitter::fit
std::vector< Trajectory > fit(const TrajectorySeed &seed, const RecHitContainer &hits, const TrajectoryStateOnSurface &tsos, fitType type=standard) const
Definition: TrajectoryFitter.h:50
TrajectoryFitter::makeVect
static std::vector< Trajectory > makeVect(Trajectory &&outTraj)
Definition: TrajectoryFitter.h:58
TrajectorySeed
Definition: TrajectorySeed.h:18
TrajectoryFitter::Record
TrajectoryFitterRecord Record
Definition: TrajectoryFitter.h:23
TrajectoryFitter::fitOne
virtual Trajectory fitOne(const Trajectory &traj, fitType type=standard) const =0
TrajectoryFitter::RecHitContainer
Trajectory::RecHitContainer RecHitContainer
Definition: TrajectoryFitter.h:24
TrajectoryFitter::fitType
fitType
Definition: TrajectoryFitter.h:21