Go to the documentation of this file.00001 #ifndef MTFTrackProducerAlgorithm_h
00002 #define MTFTrackProducerAlgorithm_h
00003
00004 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00005 #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHit.h"
00006 #include "DataFormats/TrackCandidate/interface/TrackCandidateCollection.h"
00007 #include "DataFormats/TrajectorySeed/interface/PropagationDirection.h"
00008 #include "DataFormats/BeamSpot/interface/BeamSpot.h"
00009
00010 class MagneticField;
00011 class TrackingGeometry;
00012 class TrajectoryFitter;
00013 class Trajectory;
00014 class TrajectoryStateOnSurface;
00015 class TransientTrackingRecHitBuilder;
00016 class MultiRecHitCollector;
00017 class SiTrackerMultiRecHitUpdatorMTF;
00018 class TrajectoryMeasurement;
00019 class MultiTrajectoryMeasurement;
00020 class MultiTrackFilterHitCollector;
00021
00022 namespace reco{
00023 class Track;
00024 }
00025
00026 class MTFTrackProducerAlgorithm {
00027
00028 typedef std::pair<Trajectory*, std::pair<reco::Track*,PropagationDirection> > AlgoProduct;
00029 typedef std::vector< AlgoProduct > AlgoProductCollection;
00030 typedef MultiTrajectoryMeasurement MTM;
00031 typedef TrajectoryStateOnSurface TSOS;
00032
00033 public:
00034
00036 MTFTrackProducerAlgorithm(const edm::ParameterSet& pset):conf_(pset){}
00037
00039 ~MTFTrackProducerAlgorithm() {}
00040
00042 void runWithCandidate(const TrackingGeometry *,
00043 const MagneticField *,
00044
00045 const std::vector<Trajectory>&,
00046 const TrajectoryFitter *,
00047 const TransientTrackingRecHitBuilder*,
00048 const MultiTrackFilterHitCollector* measurementTracker,
00049 const SiTrackerMultiRecHitUpdatorMTF*,
00050 const reco::BeamSpot&,
00051 AlgoProductCollection &) const;
00052
00053 private:
00055 bool buildTrack(const std::vector<Trajectory>&,
00056 AlgoProductCollection& algoResults,
00057 float,
00058 const reco::BeamSpot&) const;
00059
00061 bool fit(const std::pair<TransientTrackingRecHit::RecHitContainer, TrajectoryStateOnSurface>& hits,
00062 const TrajectoryFitter * theFitter,
00063 std::vector<Trajectory>& vtraj) const;
00064
00065
00066 float calculateNdof(const std::vector<Trajectory>& vtraj) const;
00067
00068
00069 std::pair<TransientTrackingRecHit::RecHitContainer, TrajectoryStateOnSurface>
00070 collectHits(const std::map<int, std::vector<TrajectoryMeasurement> >& mapvtm,
00071 const MultiTrackFilterHitCollector* measurementCollector,
00072 int i) const;
00073
00074
00075 std::pair<TransientTrackingRecHit::RecHitContainer, TrajectoryStateOnSurface>
00076 updateHits(const std::map<int, std::vector<TrajectoryMeasurement> >& mapvtm,
00077 const MultiTrackFilterHitCollector* measurementCollector,
00078 const SiTrackerMultiRecHitUpdatorMTF* updator,
00079 double annealing,
00080 const TransientTrackingRecHitBuilder* builder,
00081 int i) const;
00082
00083
00084 void filter(const TrajectoryFitter* fitter,
00085 std::vector<Trajectory>& input,
00086 int minhits, std::vector<Trajectory>& output) const;
00087
00088 edm::ParameterSet conf_;
00089 };
00090
00091 #endif