Go to the documentation of this file.00001 #ifndef RecoTracker_CkfPattern_BaseCkfTrajectoryBuilder_h
00002 #define RecoTracker_CkfPattern_BaseCkfTrajectoryBuilder_h
00003
00004 #include "TrackingTools/PatternTools/interface/TrajectoryMeasurement.h"
00005 #include "TrackingTools/PatternTools/interface/TrajectoryBuilder.h"
00006 #include "FWCore/Framework/interface/Event.h"
00007 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00008
00009 class CkfDebugger;
00010 class Chi2MeasurementEstimatorBase;
00011 class DetGroup;
00012 class FreeTrajectoryState;
00013 class IntermediateTrajectoryCleaner;
00014 class LayerMeasurements;
00015 class MeasurementTracker;
00016 class MeasurementEstimator;
00017 class NavigationSchool;
00018 class Propagator;
00019 class TrajectoryStateUpdator;
00020 class TrajectoryMeasurement;
00021 class TrajectorySeed;
00022 class TrajectoryContainer;
00023 class TrajectoryStateOnSurface;
00024 class TrajectoryFitter;
00025 class TransientTrackingRecHitBuilder;
00026 class Trajectory;
00027 class TempTrajectory;
00028 class TrajectoryFilter;
00029 class TrackingRegion;
00030 class TrajectoryMeasurementGroup;
00031 class TrajectoryCleaner;
00032
00033 #include "TrackingTools/PatternTools/interface/bqueue.h"
00034 #include "RecoTracker/CkfPattern/interface/PrintoutHelper.h"
00035
00043 class BaseCkfTrajectoryBuilder : public TrajectoryBuilder {
00044 protected:
00045
00046 typedef FreeTrajectoryState FTS;
00047 typedef TrajectoryStateOnSurface TSOS;
00048 typedef TrajectoryMeasurement TM;
00049 typedef std::pair<TSOS,std::vector<const DetLayer*> > StateAndLayers;
00050
00051 public:
00052
00053 typedef std::vector<Trajectory> TrajectoryContainer;
00054 typedef std::vector<TempTrajectory> TempTrajectoryContainer;
00055 typedef TrajectoryContainer::iterator TrajectoryIterator;
00056
00057 BaseCkfTrajectoryBuilder(const edm::ParameterSet& conf,
00058 const TrajectoryStateUpdator* updator,
00059 const Propagator* propagatorAlong,
00060 const Propagator* propagatorOpposite,
00061 const Chi2MeasurementEstimatorBase* estimator,
00062 const TransientTrackingRecHitBuilder* RecHitBuilder,
00063 const MeasurementTracker* measurementTracker,
00064 const TrajectoryFilter* filter,
00065 const TrajectoryFilter* inOutFilter = 0);
00066
00067 virtual ~BaseCkfTrajectoryBuilder();
00068
00069 virtual TrajectoryContainer trajectories(const TrajectorySeed&) const = 0;
00070
00071 virtual void setEvent(const edm::Event& event) const;
00072 virtual void unset() const;
00073
00074 virtual void setDebugger( CkfDebugger * dbg) const {;}
00075
00077
00078
00080
00081
00082 protected:
00083
00084 virtual bool analyzeMeasurementsDebugger(Trajectory& traj, std::vector<TrajectoryMeasurement> meas,
00085 const MeasurementTracker* theMeasurementTracker,
00086 const Propagator* theForwardPropagator,
00087 const Chi2MeasurementEstimatorBase* theEstimator,
00088 const TransientTrackingRecHitBuilder * theTTRHBuilder) const {return true;}
00089 virtual bool analyzeMeasurementsDebugger(TempTrajectory& traj, std::vector<TrajectoryMeasurement> meas,
00090 const MeasurementTracker* theMeasurementTracker,
00091 const Propagator* theForwardPropagator,
00092 const Chi2MeasurementEstimatorBase* theEstimator,
00093 const TransientTrackingRecHitBuilder * theTTRHBuilder) const {return true;}
00094 virtual void fillSeedHistoDebugger(std::vector<TrajectoryMeasurement>::iterator begin,
00095 std::vector<TrajectoryMeasurement>::iterator end) const {;}
00096
00097 protected:
00098
00099 TempTrajectory createStartingTrajectory( const TrajectorySeed& seed) const;
00100
00102
00103
00104 bool toBeContinued( TempTrajectory& traj, bool inOut = false) const;
00105
00107 bool qualityFilter( const TempTrajectory& traj, bool inOut = false) const;
00108
00109 void addToResult( TempTrajectory& traj, TrajectoryContainer& result, bool inOut = false) const;
00110 void addToResult( TempTrajectory& traj, TempTrajectoryContainer& result, bool inOut = false) const;
00111
00112 StateAndLayers findStateAndLayers(const TempTrajectory& traj) const;
00113
00114 private:
00115 void seedMeasurements(const TrajectorySeed& seed, std::vector<TrajectoryMeasurement> & result) const;
00116
00117
00118
00119 protected:
00120 const TrajectoryStateUpdator* theUpdator;
00121 const Propagator* thePropagatorAlong;
00122 const Propagator* thePropagatorOpposite;
00123 const Chi2MeasurementEstimatorBase* theEstimator;
00124 const TransientTrackingRecHitBuilder* theTTRHBuilder;
00125 const MeasurementTracker* theMeasurementTracker;
00126 const LayerMeasurements* theLayerMeasurements;
00127
00128
00129 mutable const Propagator* theForwardPropagator;
00130 mutable const Propagator* theBackwardPropagator;
00131
00132 private:
00133
00134
00135
00136
00137
00138
00139
00140
00141 const TrajectoryFilter* theFilter;
00142 const TrajectoryFilter* theInOutFilter;
00144 bool skipClusters_;
00145 edm::InputTag clustersToSkip_;
00146 };
00147
00148
00149 #endif