CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_9_patch3/src/RecoVertex/LinearizationPointFinders/interface/CrossingPtBasedLinearizationPointFinder.h

Go to the documentation of this file.
00001 #ifndef CrossingPtBasedLinearizationPointFinder_H
00002 #define CrossingPtBasedLinearizationPointFinder_H
00003 
00004 #include "RecoVertex/VertexTools/interface/LinearizationPointFinder.h"
00005 #include "TrackingTools/TransientTrack/interface/TransientTrack.h"
00006 #include "RecoVertex/VertexTools/interface/ModeFinder3d.h"
00007 #include "RecoVertex/VertexTools/interface/RecTracksDistanceMatrix.h"
00008 
00026 class CrossingPtBasedLinearizationPointFinder : public LinearizationPointFinder
00027 {
00028 public:
00032   CrossingPtBasedLinearizationPointFinder( const ModeFinder3d & algo,
00033      const signed int n_pairs = 5 );
00034 
00041   CrossingPtBasedLinearizationPointFinder( 
00042       const RecTracksDistanceMatrix * m, const ModeFinder3d & algo,
00043       const signed int n_pairs = -1 );
00044 
00045   CrossingPtBasedLinearizationPointFinder(
00046       const CrossingPtBasedLinearizationPointFinder & );
00047 
00048   ~CrossingPtBasedLinearizationPointFinder();
00049 
00052   virtual GlobalPoint getLinearizationPoint(const std::vector<reco::TransientTrack> & ) const;
00053   virtual GlobalPoint getLinearizationPoint(const std::vector<FreeTrajectoryState> & ) const;
00054 
00055   virtual CrossingPtBasedLinearizationPointFinder * clone() const {
00056     return new CrossingPtBasedLinearizationPointFinder ( * this );
00057   };
00058 protected:
00059   const bool useMatrix;
00060   signed int theNPairs;
00061   const RecTracksDistanceMatrix *theMatrix;
00062 
00063 private:
00066   GlobalPoint find ( const std::vector<std::pair <GlobalPoint , float> > & ) const;
00067 private:
00068   ModeFinder3d * theAlgo;
00069 
00072   struct CompareTwoTracks {
00073     int operator() ( const reco::TransientTrack & a, const reco::TransientTrack & b ) {
00074             return a.initialFreeState().momentum().mag() >
00075                    b.initialFreeState().momentum().mag();
00076 //       return a.p() > b.p();
00077     };
00078   };
00079   std::vector <reco::TransientTrack> getBestTracks ( const std::vector<reco::TransientTrack> & ) const;
00080   GlobalPoint useFullMatrix ( const std::vector<reco::TransientTrack> & ) const;
00081   GlobalPoint useAllTracks  ( const std::vector<reco::TransientTrack> & ) const;
00082 };
00083 
00084 #endif