CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_1/src/RecoEgamma/EgammaPhotonAlgos/interface/ConversionSeedFinder.h

Go to the documentation of this file.
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 #include "DataFormats/BeamSpot/interface/BeamSpot.h"
00027 
00028 #include "DataFormats/Math/interface/Vector3D.h"
00029 #include "DataFormats/Math/interface/Point3D.h"
00030 
00031 
00032 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
00033 #include "DataFormats/GeometryVector/interface/GlobalVector.h"
00034 
00035 // C/C++ headers
00036 #include <string>
00037 #include <vector>
00038 
00039 
00040 
00041 
00042 //
00043 
00044 
00045 class DetLayer;
00046 class FreeTrajectoryState;
00047 class TrajectoryStateOnSurface;
00048 
00049 
00050 class ConversionSeedFinder {
00051 
00052  public:
00053   
00054 
00055   ConversionSeedFinder();
00056   ConversionSeedFinder( const edm::ParameterSet& config );
00057   
00058   virtual ~ConversionSeedFinder(){}
00059 
00060   
00061   virtual void makeSeeds(const edm::Handle<edm::View<reco::CaloCluster> > & allBc ) const  =0 ;
00062  
00063 
00064 
00065   TrajectorySeedCollection & seeds() {  return theSeeds_;}
00066   virtual void setCandidate( float e, GlobalPoint pos ) const {  theSCenergy_=e; theSCPosition_= pos; }                        
00067   std::vector<const DetLayer*> const & layerList() const { return theLayerList_;}
00068  
00069   
00070   void setMeasurementTracker(const MeasurementTracker* tracker) const { ; }
00071   const MeasurementTracker* getMeasurementTracker() const  {return  theMeasurementTracker_;}
00072 
00074   void setEventSetup( const edm::EventSetup& es ) ; 
00075   void setEvent( const edm::Event& e ) ; 
00076 
00077   void clear() {
00078     theSeeds_.clear();
00079   }
00080 
00081  protected:
00082 
00083 
00084   edm::ParameterSet conf_;
00085   void findLayers() const ;
00086   void findLayers(const FreeTrajectoryState & fts) const  ; 
00087 
00088   FreeTrajectoryState trackStateFromClusters ( int aCharge,
00089                                                const GlobalPoint & gpOrigine, 
00090                                                PropagationDirection dir, 
00091                                                float scaleFactor ) const;
00092   
00093 
00094   void printLayer(int i) const ;
00095 
00096   
00097   mutable TrajectorySeedCollection theSeeds_;
00098   mutable GlobalPoint theSCPosition_;
00099     
00100 
00101   std::string theMeasurementTrackerName_;
00102   const MeasurementTracker*     theMeasurementTracker_;
00103   const TrackingGeometry* theTrackerGeom_;
00104 
00105  
00106   edm::ESHandle<MagneticField> theMF_;
00107   edm::ESHandle<GeometricSearchTracker>       theGeomSearchTracker_;
00108 
00109 
00110   KFUpdator                  theUpdator_;
00111   PropagationDirection       dir_; 
00112   mutable reco::CaloCluster*  theSC_;
00113   mutable float theSCenergy_;  
00114 
00115   
00116   mutable std::vector<const DetLayer *> theLayerList_ ;    
00117     
00118   mutable GlobalPoint theBCPosition_;
00119   mutable float       theBCEnergy_; 
00120 
00121   const Propagator*  thePropagatorAlongMomentum_;
00122   const Propagator*  thePropagatorOppositeToMomentum_;
00123 
00124   reco::BeamSpot theBeamSpot_;
00125 
00126 
00127 
00128 };
00129 
00130 #endif