00001 #ifndef RecoEGAMMA_ConversionSeed_ConversionSeedFinder_h 00002 #define RecoEGAMMA_ConversionSeed_ConversionSeedFinder_h 00003 00012 #include "FWCore/Framework/interface/EventSetup.h" 00013 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00014 #include "DataFormats/TrajectorySeed/interface/PropagationDirection.h" 00015 #include "DataFormats/TrajectorySeed/interface/TrajectorySeedCollection.h" 00016 #include "DataFormats/CaloRecHit/interface/CaloCluster.h" 00017 #include "DataFormats/CaloRecHit/interface/CaloClusterFwd.h" 00018 #include "DataFormats/Common/interface/View.h" 00019 #include "TrackingTools/MaterialEffects/interface/PropagatorWithMaterial.h" 00020 #include "TrackingTools/GeomPropagators/interface/StraightLinePropagator.h" 00021 #include "TrackingTools/KalmanUpdators/interface/KFUpdator.h" 00022 #include "TrackingTools/TrajectoryState/interface/FreeTrajectoryState.h" 00023 #include "TrackingTools/PatternTools/interface/TrajectoryMeasurement.h" 00024 #include "RecoTracker/TkDetLayers/interface/GeometricSearchTracker.h" 00025 #include "RecoTracker/MeasurementDet/interface/MeasurementTracker.h" 00026 00027 #include "DataFormats/Math/interface/Vector3D.h" 00028 #include "DataFormats/Math/interface/Point3D.h" 00029 00030 00031 #include "DataFormats/GeometryVector/interface/GlobalPoint.h" 00032 #include "DataFormats/GeometryVector/interface/GlobalVector.h" 00033 00034 // C/C++ headers 00035 #include <string> 00036 #include <vector> 00037 00038 00039 00040 00041 // 00042 00043 00044 class DetLayer; 00045 class FreeTrajectoryState; 00046 class TrajectoryStateOnSurface; 00047 00048 00049 class ConversionSeedFinder { 00050 00051 public: 00052 00053 00054 ConversionSeedFinder(); 00055 ConversionSeedFinder( const edm::ParameterSet& config ); 00056 00057 virtual ~ConversionSeedFinder(){} 00058 00059 00060 virtual void makeSeeds(const edm::Handle<edm::View<reco::CaloCluster> > & allBc ) const =0 ; 00061 00062 00063 00064 TrajectorySeedCollection seeds() { return theSeeds_;} 00065 virtual void setCandidate( float e, GlobalPoint pos ) const { theSCenergy_=e; theSCPosition_= pos; } 00066 std::vector<const DetLayer*> layerList() const { return theLayerList_;} 00067 00068 00069 void setMeasurementTracker(const MeasurementTracker* tracker) const { ; } 00070 const MeasurementTracker* getMeasurementTracker() const {return theMeasurementTracker_;} 00071 00073 void setEventSetup( const edm::EventSetup& es ) ; 00074 void setEvent( const edm::Event& e ) ; 00075 00076 00077 00078 protected: 00079 00080 00081 edm::ParameterSet conf_; 00082 void findLayers() const ; 00083 void findLayers(const FreeTrajectoryState & fts) const ; 00084 00085 FreeTrajectoryState trackStateFromClusters ( int aCharge, 00086 const GlobalPoint & gpOrigine, 00087 PropagationDirection dir, 00088 float scaleFactor ) const; 00089 00090 00091 void printLayer(int i) const ; 00092 00093 00094 mutable TrajectorySeedCollection theSeeds_; 00095 mutable GlobalPoint theSCPosition_; 00096 00097 00098 const MeasurementTracker* theMeasurementTracker_; 00099 const TrackingGeometry* theTrackerGeom_; 00100 00101 00102 edm::ESHandle<MagneticField> theMF_; 00103 edm::ESHandle<GeometricSearchTracker> theGeomSearchTracker_; 00104 00105 00106 KFUpdator theUpdator_; 00107 PropagationDirection dir_; 00108 mutable reco::CaloCluster* theSC_; 00109 mutable float theSCenergy_; 00110 00111 00112 mutable std::vector<const DetLayer *> theLayerList_ ; 00113 00114 mutable GlobalPoint theBCPosition_; 00115 mutable float theBCEnergy_; 00116 00117 00118 00119 }; 00120 00121 #endif