CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_9_patch3/src/RecoTracker/DebugTools/interface/CkfDebugTrajectoryBuilder.h

Go to the documentation of this file.
00001 #ifndef CkfDebugTrajectoryBuilder_H
00002 #define CkfDebugTrajectoryBuilder_H
00003 
00004 #include "RecoTracker/CkfPattern/interface/CkfTrajectoryBuilder.h"
00005 #include "RecoTracker/DebugTools/interface/CkfDebugger.h"
00006 #include "TrackingTools/PatternTools/interface/TempTrajectory.h"
00007 
00008 
00009 class CkfDebugTrajectoryBuilder: public CkfTrajectoryBuilder{
00010  public:
00011 
00012   CkfDebugTrajectoryBuilder(const edm::ParameterSet&              conf,
00013                        const TrajectoryStateUpdator*         updator,
00014                        const Propagator*                     propagatorAlong,
00015                        const Propagator*                     propagatorOpposite,
00016                        const Chi2MeasurementEstimatorBase*   estimator,
00017                        const TransientTrackingRecHitBuilder* RecHitBuilder,
00018                        const MeasurementTracker*             measurementTracker) : 
00019     CkfTrajectoryBuilder( conf,updator,propagatorAlong,propagatorOpposite,estimator,RecHitBuilder,measurementTracker,0) 
00020     {    
00021       //edm::LogVerbatim("CkfDebugger") <<"CkfDebugTrajectoryBuilder::CkfDebugTrajectoryBuilder";
00022     }
00023 
00024   virtual void setDebugger( CkfDebugger * dbg) const { theDbg = dbg;}
00025   virtual CkfDebugger * debugger() const{ return theDbg;}
00026 
00027  private:
00028   mutable CkfDebugger * theDbg;
00029   bool analyzeMeasurementsDebugger(TempTrajectory& traj, std::vector<TM> meas,
00030                                    const MeasurementTracker* theMeasurementTracker, const Propagator* theForwardPropagator, 
00031                                    const Chi2MeasurementEstimatorBase* theEstimator, 
00032                                    const TransientTrackingRecHitBuilder * theTTRHBuilder) const { 
00033     return theDbg->analyseCompatibleMeasurements(traj.toTrajectory(),meas,theMeasurementTracker,theForwardPropagator,theEstimator,theTTRHBuilder);
00034   };
00035   bool analyzeMeasurementsDebugger(Trajectory& traj, std::vector<TM> meas,
00036                                    const MeasurementTracker* theMeasurementTracker, const Propagator* theForwardPropagator, 
00037                                    const Chi2MeasurementEstimatorBase* theEstimator, 
00038                                    const TransientTrackingRecHitBuilder * theTTRHBuilder) const { 
00039     return theDbg->analyseCompatibleMeasurements(traj,meas,theMeasurementTracker,theForwardPropagator,theEstimator,theTTRHBuilder);
00040   };
00041   void fillSeedHistoDebugger(std::vector<TrajectoryMeasurement>::iterator begin, 
00042                              std::vector<TrajectoryMeasurement>::iterator end) const {
00043     //edm::LogVerbatim("CkfDebugger") <<"CkfDebugTrajectoryBuilder::fillSeedHistoDebugger "<<theDbg;
00044     if (end-begin>=2)
00045       theDbg->fillSeedHist(begin->recHit(),(begin+1)->recHit(),(begin+1)->updatedState());
00046   }; 
00047 
00048 };
00049 #endif