CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Private Types | Private Attributes
LinTrackCache Class Reference

#include <LinTrackCache.h>

Classes

struct  Comparer
 
struct  Vicinity
 

Public Types

typedef ReferenceCountingPointer< LinearizedTrackState< 5 > > RefCountedLinearizedTrackState
 

Public Member Functions

void clear ()
 
RefCountedLinearizedTrackState linTrack (const GlobalPoint &, const reco::TransientTrack &)
 
 ~LinTrackCache ()
 

Private Types

typedef std::map< reco::TransientTrack, bool > HasLinTrkMap
 
typedef std::map< reco::TransientTrack, RefCountedLinearizedTrackStateLinTrkMap
 

Private Attributes

std::map< GlobalPoint, HasLinTrkMap, VicinitytheHasLinTrack
 
std::map< GlobalPoint, LinTrkMap, VicinitytheLinTracks
 

Detailed Description

caches LinearizedTrackStates

Definition at line 10 of file LinTrackCache.h.

Member Typedef Documentation

◆ HasLinTrkMap

typedef std::map<reco::TransientTrack, bool> LinTrackCache::HasLinTrkMap
private

Definition at line 33 of file LinTrackCache.h.

◆ LinTrkMap

Definition at line 32 of file LinTrackCache.h.

◆ RefCountedLinearizedTrackState

Definition at line 21 of file LinTrackCache.h.

Constructor & Destructor Documentation

◆ ~LinTrackCache()

LinTrackCache::~LinTrackCache ( )

Definition at line 52 of file LinTrackCache.cc.

References clear().

52 { clear(); }

Member Function Documentation

◆ clear()

void LinTrackCache::clear ( void  )

Definition at line 54 of file LinTrackCache.cc.

54  {
55  theLinTracks.clear();
56  theHasLinTrack.clear();
57 }
std::map< GlobalPoint, LinTrkMap, Vicinity > theLinTracks
Definition: LinTrackCache.h:34
std::map< GlobalPoint, HasLinTrkMap, Vicinity > theHasLinTrack
Definition: LinTrackCache.h:35

◆ linTrack()

LinTrackCache::RefCountedLinearizedTrackState LinTrackCache::linTrack ( const GlobalPoint pos,
const reco::TransientTrack rt 
)

Definition at line 16 of file LinTrackCache.cc.

References LinearizedTrackStateFactory::linearizedTrackState(), and hcal_runs::rt.

Referenced by MultiVertexFitter::updateSeeds(), and MultiVertexFitter::updateWeights().

17  {
18  if (theHasLinTrack[pos][rt]) {
19  return theLinTracks[pos][rt];
20  };
21 
22  LinearizedTrackStateFactory lTrackFactory;
24 
25  theLinTracks[pos][rt] = lTrData;
26  theHasLinTrack[pos][rt] = true;
27  return lTrData;
28 }
RefCountedLinearizedTrackState linearizedTrackState(const GlobalPoint &linP, const reco::TransientTrack &track) const override
ReferenceCountingPointer< LinearizedTrackState< 5 > > RefCountedLinearizedTrackState
Definition: LinTrackCache.h:21
std::map< GlobalPoint, LinTrkMap, Vicinity > theLinTracks
Definition: LinTrackCache.h:34
std::map< GlobalPoint, HasLinTrkMap, Vicinity > theHasLinTrack
Definition: LinTrackCache.h:35

Member Data Documentation

◆ theHasLinTrack

std::map<GlobalPoint, HasLinTrkMap, Vicinity> LinTrackCache::theHasLinTrack
private

Definition at line 35 of file LinTrackCache.h.

◆ theLinTracks

std::map<GlobalPoint, LinTrkMap, Vicinity> LinTrackCache::theLinTracks
private

Definition at line 34 of file LinTrackCache.h.