CMS 3D CMS Logo

DAFTrackProducerAlgorithm.h
Go to the documentation of this file.
1 
8 #ifndef DAFTrackProducerAlgorithm_h
9 #define DAFTrackProducerAlgorithm_h
10 
11 
12 #include "AlgoProductTraits.h"
13 
14 
22 
23 class MagneticField;
24 class TrackingGeometry;
25 class TrajAnnealing;
26 class TrajectoryFitter;
27 class Trajectory;
32 namespace reco{
33  class Track;
34 }
35 
36 class DAFTrackProducerAlgorithm : public AlgoProductTraits<reco::Track> {
37 public:
41 
42  using TrajAnnealingCollection=std::vector<TrajAnnealing>;
43 
44 public:
45 
48 
50  void runWithCandidate(const TrackingGeometry *,
51  const MagneticField *,
52  //const TrackCandidateCollection&,
54  const MeasurementTrackerEvent *measTk,
55  const TrajectoryFitter *,
57  const MultiRecHitCollector* measurementTracker,
59  const reco::BeamSpot&,
62  bool ,
64  AlgoProductCollection&) const;
65 
66  private:
68  bool buildTrack(const Trajectory,
69  AlgoProductCollection& algoResults,
70  float,
71  const reco::BeamSpot&,
72  const reco::TrackRef* ) const;
73 
77  const TrajectoryFitter * theFitter,
78  Trajectory vtraj) const;
79 
80  //calculates the ndof according to the DAF prescription
81  float calculateNdof(const Trajectory vtraj) const;
82 
83  //creates MultiRecHits out of a KF trajectory
84  std::pair<TransientTrackingRecHit::RecHitContainer, TrajectoryStateOnSurface> collectHits(
85  const Trajectory vtraj,
86  const MultiRecHitCollector* measurementCollector,
87  const MeasurementTrackerEvent *measTk ) const;
88 
89  //updates the hits with the specified annealing factor
90  std::pair<TransientTrackingRecHit::RecHitContainer, TrajectoryStateOnSurface> updateHits(
91  const Trajectory vtraj,
93  const MeasurementTrackerEvent* theMTE,
94  double annealing) const;
95 
96  //removes from the trajectory isolated hits with very low weight
97  void filter(const TrajectoryFitter* fitter,
98  std::vector<Trajectory>& input,
99  int minhits, std::vector<Trajectory>& output,
100  const TransientTrackingRecHitBuilder* builder) const;
101 
102  int countingGoodHits(const Trajectory traj) const;
103 
104  int checkHits( Trajectory iInitTraj, const Trajectory iFinalTraj) const;
105 
106  void PrintHit(const TrackingRecHit* const& hit, TrajectoryStateOnSurface& tsos) const;
107 
109  int minHits_;
110 };
111 
112 #endif
typename Base::TrackCollection TrackCollection
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:15
std::vector< ConstRecHitPointer > RecHitContainer
static std::string const input
Definition: EdmProvDump.cc:48
std::vector< TrajAnnealing > TrajAnnealingCollection
std::vector< AlgoProduct > AlgoProductCollection
fixed size matrix
typename Base::AlgoProductCollection AlgoProductCollection