CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/RecoEgamma/EgammaPhotonAlgos/src/ConversionTrackFinder.cc

Go to the documentation of this file.
00001 //
00002 #include "RecoEgamma/EgammaPhotonAlgos/interface/ConversionTrackFinder.h"
00003 //
00004 #include "RecoTracker/Record/interface/CkfComponentsRecord.h"
00005 #include "RecoTracker/CkfPattern/interface/TransientInitialStateEstimator.h"
00006 //
00007 
00008 #include "TrackingTools/KalmanUpdators/interface/KFUpdator.h"
00009 //
00010 //
00011 
00012 #include <sstream>
00013 
00014 
00015 ConversionTrackFinder::ConversionTrackFinder(const edm::EventSetup& es, 
00016                                              const edm::ParameterSet& conf ) :  
00017   conf_(conf), 
00018   theCkfTrajectoryBuilder_(0), 
00019   theInitialState_(0),
00020   theTrackerGeom_(0),
00021   theUpdator_(0),
00022   thePropagator_(0) 
00023 {
00024   //  std::cout << " ConversionTrackFinder base CTOR " << std::endl;
00025 
00026   edm::ParameterSet tise_params = conf_.getParameter<edm::ParameterSet>("TransientInitialStateEstimatorParameters") ;
00027   theInitialState_       = new TransientInitialStateEstimator( es,  tise_params);
00028   useSplitHits_ =  conf_.getParameter<bool>("useHitsSplitting");
00029 
00030   theMeasurementTrackerName_ = conf.getParameter<std::string>("MeasurementTrackerName");
00031 
00032 }
00033 
00034 
00035 ConversionTrackFinder::~ConversionTrackFinder() {
00036 
00037 
00038   delete theInitialState_;
00039 
00040 }
00041 
00042 
00043 void ConversionTrackFinder::setEventSetup(const edm::EventSetup& es )   {
00044 
00045   edm::ESHandle<MeasurementTracker> measurementTrackerHandle;
00046   es.get<CkfComponentsRecord>().get(theMeasurementTrackerName_,measurementTrackerHandle);
00047   theMeasurementTracker_ = measurementTrackerHandle.product();
00048 
00049  // set the TrajectoryBuilder
00050   std::string trajectoryBuilderName = conf_.getParameter<std::string>("TrajectoryBuilder");
00051   //  std::cout << " ConversionTrackFinderBase tbName" <<  trajectoryBuilderName << std::endl;
00052   edm::ESHandle<TrajectoryBuilder> theTrajectoryBuilderHandle;
00053   es.get<CkfComponentsRecord>().get(trajectoryBuilderName,theTrajectoryBuilderHandle);
00054   theCkfTrajectoryBuilder_ = theTrajectoryBuilderHandle.product();
00055 
00056   edm::ESHandle<TrackerGeometry> trackerHandle;
00057   es.get<TrackerDigiGeometryRecord>().get(trackerHandle);
00058   theTrackerGeom_= trackerHandle.product();
00059 
00060   es.get<TrackingComponentsRecord>().get("AnyDirectionAnalyticalPropagator",
00061                                         thePropagator_);
00062 
00063   theInitialState_->setEventSetup( es );
00064 }
00065 
00066 void ConversionTrackFinder::setEvent(const edm::Event& e )   {
00067   theMeasurementTracker_->update( e );
00068 
00069 
00070 
00071 }