CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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,
RefCountedLinearizedTrackState
LinTrkMap
 

Private Attributes

std::map< GlobalPoint,
HasLinTrkMap, Vicinity
theHasLinTrack
 
std::map< GlobalPoint,
LinTrkMap, Vicinity
theLinTracks
 

Detailed Description

caches LinearizedTrackStates

Definition at line 10 of file LinTrackCache.h.

Member Typedef Documentation

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

Definition at line 33 of file LinTrackCache.h.

Definition at line 32 of file LinTrackCache.h.

Definition at line 21 of file LinTrackCache.h.

Constructor & Destructor Documentation

LinTrackCache::~LinTrackCache ( )

Definition at line 52 of file LinTrackCache.cc.

References clear().

52 { clear(); }

Member Function Documentation

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
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;
23  RefCountedLinearizedTrackState lTrData = lTrackFactory.linearizedTrackState(pos, rt);
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
list rt
Definition: hcal_runs.py:76
std::map< GlobalPoint, LinTrkMap, Vicinity > theLinTracks
Definition: LinTrackCache.h:34
std::map< GlobalPoint, HasLinTrkMap, Vicinity > theHasLinTrack
Definition: LinTrackCache.h:35

Member Data Documentation

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

Definition at line 35 of file LinTrackCache.h.

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

Definition at line 34 of file LinTrackCache.h.