CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/RecoEgamma/EgammaPhotonAlgos/src/ConversionTrackFinder.cc

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