CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch13/src/RecoTracker/NuclearSeedGenerator/interface/NuclearInteractionFinder.h

Go to the documentation of this file.
00001 #ifndef CD_NuclearInteractionFinder_H_
00002 #define CD_NuclearInteractionFinder_H_
00003 
00004 //----------------------------------------------------------------------------
00012 //-----------------------------------------------------------------------------
00013 
00014 #include "TrackingTools/GeomPropagators/interface/Propagator.h"
00015 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
00016 #include "TrackingTools/TrajectoryState/interface/FreeTrajectoryState.h"
00017 #include "TrackingTools/PatternTools/interface/TrajectoryStateUpdator.h"
00018 #include "TrackingTools/PatternTools/interface/Trajectory.h"
00019 #include "TrackingTools/TrackFitters/interface/TrajectoryFitter.h"
00020 #include "TrackingTools/PatternTools/interface/TrajectoryMeasurement.h"
00021 #include "TrackingTools/PatternTools/interface/MeasurementEstimator.h"
00022 #include "TrackingTools/MeasurementDet/interface/LayerMeasurements.h"
00023 
00024 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00025 
00026 #include "RecoTracker/MeasurementDet/interface/MeasurementTracker.h"
00027 #include "RecoTracker/TkDetLayers/interface/GeometricSearchTracker.h"
00028 
00029 #include "MagneticField/Engine/interface/MagneticField.h"
00030 
00031 #include "DataFormats/TrajectorySeed/interface/TrajectorySeedCollection.h"
00032 
00033 #include "RecoTracker/NuclearSeedGenerator/interface/NuclearTester.h"
00034 #include "RecoTracker/NuclearSeedGenerator/interface/SeedFromNuclearInteraction.h"
00035 #include "RecoTracker/NuclearSeedGenerator/interface/TangentHelix.h"
00036 
00037 #include "TrackingTools/DetLayers/interface/NavigationSetter.h"
00038 #include "TrackingTools/DetLayers/interface/NavigationSchool.h"
00039 #include "RecoTracker/TkNavigation/interface/SimpleNavigationSchool.h"
00040 
00041 
00042 #include <boost/shared_ptr.hpp>
00043 
00044 class NuclearInteractionFinder {
00045 private:
00046 
00047   typedef TrajectoryStateOnSurface TSOS;
00048   typedef FreeTrajectoryState FTS;
00049   typedef TrajectoryMeasurement TM;
00050   typedef std::vector<Trajectory> TrajectoryContainer;
00051   typedef TrajectoryMeasurement::ConstRecHitPointer    ConstRecHitPointer;
00052 
00054   void fillSeeds( const std::pair<TrajectoryMeasurement, std::vector<TrajectoryMeasurement> >& tmPairs );
00055 
00057   std::vector<TrajectoryMeasurement>
00058          findCompatibleMeasurements( const TM& lastMeas, double rescaleFactor) const;
00059 
00060   std::vector<TrajectoryMeasurement>
00061          findMeasurementsFromTSOS(const TSOS& currentState, DetId detid) const;
00062 
00064   void definePrimaryHelix(std::vector<TrajectoryMeasurement>::const_iterator it_meas);
00065 
00066 public:
00067 
00068   NuclearInteractionFinder(){}
00069 
00070   NuclearInteractionFinder(const edm::EventSetup& es, const edm::ParameterSet& iConfig);
00071 
00072   virtual ~NuclearInteractionFinder();
00073 
00075   bool  run(const Trajectory& traj);
00076 
00078   void  setEvent(const edm::Event& event) const;
00079 
00081   std::auto_ptr<TrajectorySeedCollection>  getPersistentSeeds();
00082 
00084   void  improveSeeds();
00085 
00086   TrajectoryStateOnSurface rescaleError(float rescale, const TSOS& state) const;
00087 
00088   const NavigationSchool* nav() const { return theNavigationSchool; }
00089 
00090 private:
00091 
00092   const Propagator*               thePropagator;
00093   const MeasurementEstimator*     theEstimator;
00094   const MeasurementTracker*       theMeasurementTracker;
00095   const LayerMeasurements*        theLayerMeasurements;
00096   const GeometricSearchTracker*   theGeomSearchTracker;
00097   const NavigationSchool*         theNavigationSchool;
00098   edm::ESHandle<MagneticField>    theMagField;
00099 
00100   NuclearTester*                             nuclTester;
00101   SeedFromNuclearInteraction                   *currentSeed;
00102   std::vector< SeedFromNuclearInteraction >    allSeeds;
00103   TangentHelix*                              thePrimaryHelix;
00104 
00105   // parameters
00106   double        ptMin;
00107   unsigned int  maxHits;
00108   double        rescaleErrorFactor;
00109   bool          checkCompletedTrack; 
00110   std::string   navigationSchoolName;
00111 
00112 };
00113 #endif