Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 10:03:24

0001 #ifndef _LinTrackCache_H_
0002 #define _LinTrackCache_H_
0003 
0004 #include <map>
0005 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
0006 #include "RecoVertex/VertexPrimitives/interface/LinearizedTrackState.h"
0007 #include "DataFormats/GeometrySurface/interface/ReferenceCounted.h"
0008 #include "TrackingTools/TransientTrack/interface/TransientTrack.h"
0009 
0010 class LinTrackCache {
0011 private:
0012   struct Comparer {
0013     bool operator()(const GlobalPoint &, const GlobalPoint &) const;
0014   };
0015 
0016   struct Vicinity {
0017     bool operator()(const GlobalPoint &, const GlobalPoint &) const;
0018   };
0019 
0020 public:
0021   typedef ReferenceCountingPointer<LinearizedTrackState<5> > RefCountedLinearizedTrackState;
0022 
0023   /**
0024    *  \class LinTrackCache
0025    *  caches LinearizedTrackStates
0026    */
0027   RefCountedLinearizedTrackState linTrack(const GlobalPoint &, const reco::TransientTrack &);
0028   ~LinTrackCache();
0029   void clear();
0030 
0031 private:
0032   typedef std::map<reco::TransientTrack, RefCountedLinearizedTrackState> LinTrkMap;
0033   typedef std::map<reco::TransientTrack, bool> HasLinTrkMap;
0034   std::map<GlobalPoint, LinTrkMap, Vicinity> theLinTracks;
0035   std::map<GlobalPoint, HasLinTrkMap, Vicinity> theHasLinTrack;
0036 };
0037 
0038 #endif