CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch2/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 #include "FWCore/Framework/interface/ESHandle.h"
00026 
00027 #include "RecoTracker/MeasurementDet/interface/MeasurementTracker.h"
00028 #include "RecoTracker/TkDetLayers/interface/GeometricSearchTracker.h"
00029 
00030 #include "MagneticField/Engine/interface/MagneticField.h"
00031 
00032 #include "DataFormats/TrajectorySeed/interface/TrajectorySeedCollection.h"
00033 
00034 #include "RecoTracker/NuclearSeedGenerator/interface/NuclearTester.h"
00035 #include "RecoTracker/NuclearSeedGenerator/interface/SeedFromNuclearInteraction.h"
00036 #include "RecoTracker/NuclearSeedGenerator/interface/TangentHelix.h"
00037 
00038 #include "TrackingTools/DetLayers/interface/NavigationSetter.h"
00039 #include "TrackingTools/DetLayers/interface/NavigationSchool.h"
00040 #include "RecoTracker/TkNavigation/interface/SimpleNavigationSchool.h"
00041 
00042 
00043 #include <boost/shared_ptr.hpp>
00044 
00045 class NuclearInteractionFinder {
00046 private:
00047 
00048   typedef TrajectoryStateOnSurface TSOS;
00049   typedef FreeTrajectoryState FTS;
00050   typedef TrajectoryMeasurement TM;
00051   typedef std::vector<Trajectory> TrajectoryContainer;
00052   typedef TrajectoryMeasurement::ConstRecHitPointer    ConstRecHitPointer;
00053 
00055   void fillSeeds( const std::pair<TrajectoryMeasurement, std::vector<TrajectoryMeasurement> >& tmPairs );
00056 
00058   std::vector<TrajectoryMeasurement>
00059          findCompatibleMeasurements( const TM& lastMeas, double rescaleFactor) const;
00060 
00061   std::vector<TrajectoryMeasurement>
00062          findMeasurementsFromTSOS(const TSOS& currentState, DetId detid) const;
00063 
00065   void definePrimaryHelix(std::vector<TrajectoryMeasurement>::const_iterator it_meas);
00066 
00067 public:
00068 
00069   NuclearInteractionFinder(){}
00070 
00071   NuclearInteractionFinder(const edm::EventSetup& es, const edm::ParameterSet& iConfig);
00072 
00073   virtual ~NuclearInteractionFinder();
00074 
00076   bool  run(const Trajectory& traj);
00077 
00079   void  setEvent(const edm::Event& event) const;
00080 
00082   std::auto_ptr<TrajectorySeedCollection>  getPersistentSeeds();
00083 
00085   void  improveSeeds();
00086 
00087   TrajectoryStateOnSurface rescaleError(float rescale, const TSOS& state) const;
00088 
00089   const NavigationSchool* nav() const { return theNavigationSchool; }
00090 
00091 private:
00092 
00093   const Propagator*               thePropagator;
00094   const MeasurementEstimator*     theEstimator;
00095   const MeasurementTracker*       theMeasurementTracker;
00096   const LayerMeasurements*        theLayerMeasurements;
00097   const GeometricSearchTracker*   theGeomSearchTracker;
00098   const NavigationSchool*         theNavigationSchool;
00099   edm::ESHandle<MagneticField>    theMagField;
00100 
00101   NuclearTester*                             nuclTester;
00102   SeedFromNuclearInteraction                   *currentSeed;
00103   std::vector< SeedFromNuclearInteraction >    allSeeds;
00104   TangentHelix*                              thePrimaryHelix;
00105 
00106   // parameters
00107   double        ptMin;
00108   unsigned int  maxHits;
00109   double        rescaleErrorFactor;
00110   bool          checkCompletedTrack; 
00111   std::string   navigationSchoolName;
00112 
00113 };
00114 #endif