00001 #ifndef RecoEGAMMA_ConversionTrack_ConversionTrackFinder_h 00002 #define RecoEGAMMA_ConversionTrack_ConversionTrackFinder_h 00003 00013 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00014 #include "FWCore/Framework/interface/EventSetup.h" 00015 #include "FWCore/Framework/interface/Event.h" 00016 #include "TrackingTools/PatternTools/interface/TrajectoryMeasurement.h" 00017 #include "TrackingTools/PatternTools/interface/Trajectory.h" 00018 // 00019 #include "DataFormats/TrajectorySeed/interface/TrajectorySeedCollection.h" 00020 #include "DataFormats/TrackCandidate/interface/TrackCandidateCollection.h" 00021 // 00022 #include "RecoEgamma/EgammaPhotonAlgos/interface/ConversionSeedFinder.h" 00023 00024 #include "RecoTracker/MeasurementDet/interface/MeasurementTracker.h" 00025 #include "TrackingTools/PatternTools/interface/TrajectoryBuilder.h" 00026 00027 // C/C++ headers 00028 #include <string> 00029 #include <vector> 00030 00031 class TransientInitialStateEstimator; 00032 class ConversionTrackFinder { 00033 00034 public: 00035 00036 ConversionTrackFinder( const edm::EventSetup& es, 00037 const edm::ParameterSet& config ); 00038 00039 00040 virtual ~ConversionTrackFinder(); 00041 00042 00043 virtual std::vector<Trajectory> tracks(const TrajectorySeedCollection seeds , TrackCandidateCollection &candidate) const =0; 00044 00046 void setEventSetup( const edm::EventSetup& es ) ; 00047 void setEvent(const edm::Event& e ) ; 00048 00049 00050 private: 00051 00052 00053 00054 00055 00056 protected: 00057 00058 edm::ParameterSet conf_; 00059 const MagneticField* theMF_; 00060 00061 const MeasurementTracker* theMeasurementTracker_; 00062 const TrajectoryBuilder* theCkfTrajectoryBuilder_; 00063 00064 TransientInitialStateEstimator* theInitialState_; 00065 const TrackerGeometry* theTrackerGeom_; 00066 KFUpdator* theUpdator_; 00067 00068 edm::ESHandle<Propagator> thePropagator_; 00069 00070 bool useSplitHits_; 00071 00072 struct ExtractNumOfHits { 00073 typedef int result_type; 00074 result_type operator()(const Trajectory& t) const {return t.foundHits();} 00075 result_type operator()(const Trajectory* t) const {return t->foundHits();} 00076 }; 00077 00078 00079 struct ExtractChi2 { 00080 typedef float result_type; 00081 result_type operator()(const Trajectory& t) const {return t.chiSquared();} 00082 result_type operator()(const Trajectory* t) const {return t->chiSquared();} 00083 }; 00084 00085 00086 00087 00088 }; 00089 00090 #endif