CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch13/src/RecoTracker/TrackProducer/interface/DAFTrackProducerAlgorithm.h

Go to the documentation of this file.
00001 #ifndef DAFTrackProducerAlgorithm_h
00002 #define DAFTrackProducerAlgorithm_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 SiTrackerMultiRecHitUpdator;
00018 namespace reco{
00019         class Track;
00020 }
00021 
00022 class DAFTrackProducerAlgorithm {
00023    
00024    typedef std::pair<Trajectory*, std::pair<reco::Track*,PropagationDirection> > AlgoProduct;
00025    typedef std::vector< AlgoProduct >  AlgoProductCollection;
00026   
00027  public:
00028 
00030   DAFTrackProducerAlgorithm(const edm::ParameterSet& pset):conf_(pset){}
00031 
00033   ~DAFTrackProducerAlgorithm() {}
00034   
00036   void runWithCandidate(const TrackingGeometry *, 
00037                         const MagneticField *, 
00038                         //const TrackCandidateCollection&,
00039                         const std::vector<Trajectory>&,
00040                         const TrajectoryFitter *,
00041                         const TransientTrackingRecHitBuilder*,
00042                         const MultiRecHitCollector* measurementTracker,
00043                         const SiTrackerMultiRecHitUpdator*,
00044                         const reco::BeamSpot&,
00045                         AlgoProductCollection &) const;
00046 
00047  private:
00049   bool buildTrack(const std::vector<Trajectory>&,
00050                   AlgoProductCollection& algoResults,
00051                   float,
00052                   const reco::BeamSpot&) const;
00053 
00055   void fit(const std::pair<TransientTrackingRecHit::RecHitContainer, TrajectoryStateOnSurface>& hits,
00056            const TrajectoryFitter * theFitter,
00057            std::vector<Trajectory>& vtraj) const;
00058 
00059   //calculates the ndof according to the DAF prescription
00060   float calculateNdof(const std::vector<Trajectory>& vtraj) const;
00061 
00062   //creates MultiRecHits out of a KF trajectory         
00063   std::pair<TransientTrackingRecHit::RecHitContainer, TrajectoryStateOnSurface>
00064   collectHits(const std::vector<Trajectory>& vtraj,
00065               const MultiRecHitCollector* measurementCollector) const;
00066 
00067   //updates the hits with the specified annealing factor
00068   std::pair<TransientTrackingRecHit::RecHitContainer, TrajectoryStateOnSurface>
00069   updateHits(const std::vector<Trajectory>& vtraj,
00070              const SiTrackerMultiRecHitUpdator* updator,
00071              double annealing) const; 
00072 
00073   //removes from the trajectory isolated hits with very low weight
00074   void filter(const TrajectoryFitter* fitter, 
00075               std::vector<Trajectory>& input, 
00076               int minhits, std::vector<Trajectory>& output) const;
00077 
00078   edm::ParameterSet conf_;
00079 };
00080 
00081 #endif