Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-10-01 22:40:51

0001 #ifndef RecoEGAMMA_ConversionSeed_ConversionSeedFinder_h
0002 #define RecoEGAMMA_ConversionSeed_ConversionSeedFinder_h
0003 /** \class ConversionSeedFinder
0004  **  
0005  **
0006  **  \author Nancy Marinelli, U. of Notre Dame, US
0007  **
0008  ***/
0009 #include "FWCore/Framework/interface/EventSetup.h"
0010 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0011 #include "DataFormats/TrajectorySeed/interface/PropagationDirection.h"
0012 #include "DataFormats/TrajectorySeed/interface/TrajectorySeedCollection.h"
0013 #include "DataFormats/CaloRecHit/interface/CaloCluster.h"
0014 #include "DataFormats/CaloRecHit/interface/CaloClusterFwd.h"
0015 #include "DataFormats/Common/interface/View.h"
0016 #include "DataFormats/Common/interface/Handle.h"
0017 #include "TrackingTools/MaterialEffects/interface/PropagatorWithMaterial.h"
0018 #include "TrackingTools/GeomPropagators/interface/StraightLinePropagator.h"
0019 #include "TrackingTools/KalmanUpdators/interface/KFUpdator.h"
0020 #include "TrackingTools/TrajectoryState/interface/FreeTrajectoryState.h"
0021 #include "TrackingTools/PatternTools/interface/TrajectoryMeasurement.h"
0022 #include "RecoTracker/TkDetLayers/interface/GeometricSearchTracker.h"
0023 #include "RecoTracker/MeasurementDet/interface/MeasurementTracker.h"
0024 #include "RecoTracker/MeasurementDet/interface/MeasurementTrackerEvent.h"
0025 #include "DataFormats/BeamSpot/interface/BeamSpot.h"
0026 
0027 #include "DataFormats/Math/interface/Vector3D.h"
0028 #include "DataFormats/Math/interface/Point3D.h"
0029 
0030 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
0031 #include "DataFormats/GeometryVector/interface/GlobalVector.h"
0032 
0033 // C/C++ headers
0034 #include <string>
0035 #include <vector>
0036 
0037 //
0038 namespace edm {
0039   class ConsumesCollector;
0040 }
0041 
0042 class DetLayer;
0043 class FreeTrajectoryState;
0044 class TrajectoryStateOnSurface;
0045 class NavigationSchool;
0046 class TrackingGeometry;
0047 class IdealMagneticFieldRecord;
0048 class TrackerRecoGeometryRecord;
0049 class CkfComponentsRecord;
0050 class TrackingComponentsRecord;
0051 
0052 class ConversionSeedFinder {
0053 public:
0054   ConversionSeedFinder();
0055   ConversionSeedFinder(const edm::ParameterSet& config, edm::ConsumesCollector& iC);
0056 
0057   virtual ~ConversionSeedFinder() {}
0058 
0059   virtual void makeSeeds(const edm::Handle<edm::View<reco::CaloCluster> >& allBc) = 0;
0060 
0061   TrajectorySeedCollection& seeds() { return theSeeds_; }
0062   virtual void setCandidate(float e, GlobalPoint pos) {
0063     theSCenergy_ = e;
0064     theSCPosition_ = pos;
0065   }
0066   std::vector<const DetLayer*> const& layerList() const { return theLayerList_; }
0067 
0068   void setMeasurementTracker(const MeasurementTracker* tracker) const { ; }
0069   const MeasurementTracker* getMeasurementTracker() const { return theMeasurementTracker_; }
0070 
0071   /// Initialize EventSetup objects at each event
0072   void setEventSetup(const edm::EventSetup& es);
0073   void setNavigationSchool(const NavigationSchool* navigation) { theNavigationSchool_ = navigation; }
0074   void setEvent(const edm::Event& e);
0075 
0076   void clear() { theSeeds_.clear(); }
0077 
0078 protected:
0079   //edm::ParameterSet conf_; found this to be completely unused
0080   void findLayers();
0081   void findLayers(const FreeTrajectoryState& fts);
0082 
0083   FreeTrajectoryState trackStateFromClusters(int aCharge,
0084                                              const GlobalPoint& gpOrigine,
0085                                              PropagationDirection dir,
0086                                              float scaleFactor) const;
0087 
0088   void printLayer(int i) const;
0089 
0090   TrajectorySeedCollection theSeeds_;
0091   GlobalPoint theSCPosition_;
0092 
0093   const MeasurementTracker* theMeasurementTracker_;
0094   const TrackingGeometry* theTrackerGeom_;
0095   const NavigationSchool* theNavigationSchool_ = nullptr;
0096 
0097   edm::ESHandle<MagneticField> theMF_;
0098   edm::ESHandle<GeometricSearchTracker> theGeomSearchTracker_;
0099 
0100   edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> theMFToken_;
0101   edm::ESGetToken<GeometricSearchTracker, TrackerRecoGeometryRecord> theGeomSearchTrackerToken_;
0102   edm::ESGetToken<MeasurementTracker, CkfComponentsRecord> theMeasurementTrackerToken_;
0103   edm::ESGetToken<Propagator, TrackingComponentsRecord> thePropagatorAlongMomentumToken_;
0104   edm::ESGetToken<Propagator, TrackingComponentsRecord> thePropagatorOppositeToMomentumToken_;
0105 
0106   edm::EDGetTokenT<reco::BeamSpot> beamSpotToken_;
0107   edm::EDGetTokenT<MeasurementTrackerEvent> measurementTrkToken_;
0108 
0109   KFUpdator theUpdator_;
0110   PropagationDirection dir_;
0111   reco::CaloCluster* theSC_;
0112   float theSCenergy_;
0113 
0114   std::vector<const DetLayer*> theLayerList_;
0115 
0116   GlobalPoint theBCPosition_;
0117   float theBCEnergy_;
0118 
0119   const Propagator* thePropagatorAlongMomentum_;
0120   const Propagator* thePropagatorOppositeToMomentum_;
0121 
0122   reco::BeamSpot theBeamSpot_;
0123   edm::Handle<MeasurementTrackerEvent> theTrackerData_;
0124 };
0125 
0126 #endif