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 { 00031 // std::cout << " ConversionTrackFinder base CTOR " << std::endl; 00032 00033 edm::ParameterSet tise_params = conf_.getParameter<edm::ParameterSet>("TransientInitialStateEstimatorParameters") ; 00034 theInitialState_ = new TransientInitialStateEstimator( es, tise_params); 00035 00036 00037 00038 } 00039 00040 00041 ConversionTrackFinder::~ConversionTrackFinder() { 00042 00043 00044 delete theInitialState_; 00045 00046 } 00047 00048 00049 void ConversionTrackFinder::setEventSetup(const edm::EventSetup& es ) { 00050 00051 edm::ESHandle<MeasurementTracker> measurementTrackerHandle; 00052 es.get<CkfComponentsRecord>().get(measurementTrackerHandle); 00053 theMeasurementTracker_ = measurementTrackerHandle.product(); 00054 00055 // set the TrajectoryBuilder 00056 std::string trajectoryBuilderName = conf_.getParameter<std::string>("TrajectoryBuilder"); 00057 // std::cout << " ConversionTrackFinderBase tbName" << trajectoryBuilderName << std::endl; 00058 edm::ESHandle<TrajectoryBuilder> theTrajectoryBuilderHandle; 00059 es.get<CkfComponentsRecord>().get(trajectoryBuilderName,theTrajectoryBuilderHandle); 00060 theCkfTrajectoryBuilder_ = theTrajectoryBuilderHandle.product(); 00061 00062 edm::ESHandle<TrackerGeometry> trackerHandle; 00063 es.get<TrackerDigiGeometryRecord>().get(trackerHandle); 00064 theTrackerGeom_= trackerHandle.product(); 00065 00066 theInitialState_->setEventSetup( es ); 00067 } 00068 00069 void ConversionTrackFinder::setEvent(const edm::Event& e ) { 00070 theMeasurementTracker_->update( e ); 00071 00072 00073 00074 }