ATLAS Offline Software
Classes | Public Member Functions | Static Public Member Functions | Private Types | Private Attributes | List of all members
eflowTrackClusterLink Class Reference

Stores pointers to an eflowRecTrack and an eflowRecCluster. More...

#include <eflowTrackClusterLink.h>

Collaboration diagram for eflowTrackClusterLink:

Classes

struct  Cache
 
struct  Hasher
 

Public Member Functions

 eflowTrackClusterLink (eflowRecTrack *track, eflowRecCluster *cluster)
 
virtual ~eflowTrackClusterLink ()
 
eflowRecClustergetCluster ()
 
const eflowRecClustergetCluster () const
 
eflowRecTrackgetTrack ()
 
const eflowRecTrackgetTrack () const
 
void setClusterIntegral (const std::vector< double > &clusterIntegral)
 
const std::vector< double > & getClusterIntegral () const
 

Static Public Member Functions

static eflowTrackClusterLinkgetInstance (eflowRecTrack *track, eflowRecCluster *cluster, const EventContext &ctx=Gaudi::Hive::currentContext())
 

Private Types

using key_t = std::pair< eflowRecTrack *, eflowRecCluster * >
 

Private Attributes

eflowRecTrackm_track
 
eflowRecClusterm_cluster
 
std::vector< double > m_clusterIntegral
 

Detailed Description

Stores pointers to an eflowRecTrack and an eflowRecCluster.

These pointers kept in a cache internal to the getInstance function. We also store a vector of energy density, around the track impact point in each calorimeter layer, corresponding to the layers in the calorimeter.

Definition at line 35 of file eflowTrackClusterLink.h.

Member Typedef Documentation

◆ key_t

Definition at line 57 of file eflowTrackClusterLink.h.

Constructor & Destructor Documentation

◆ eflowTrackClusterLink()

eflowTrackClusterLink::eflowTrackClusterLink ( eflowRecTrack track,
eflowRecCluster cluster 
)
inline

Definition at line 37 of file eflowTrackClusterLink.h.

37  :
38  m_track(track), m_cluster(cluster) { }

◆ ~eflowTrackClusterLink()

virtual eflowTrackClusterLink::~eflowTrackClusterLink ( )
inlinevirtual

Definition at line 40 of file eflowTrackClusterLink.h.

40 { }

Member Function Documentation

◆ getCluster() [1/2]

eflowRecCluster* eflowTrackClusterLink::getCluster ( )
inline

Definition at line 46 of file eflowTrackClusterLink.h.

46 { return m_cluster; }

◆ getCluster() [2/2]

const eflowRecCluster* eflowTrackClusterLink::getCluster ( ) const
inline

Definition at line 47 of file eflowTrackClusterLink.h.

47 { return m_cluster; }

◆ getClusterIntegral()

const std::vector<double>& eflowTrackClusterLink::getClusterIntegral ( ) const
inline

Definition at line 54 of file eflowTrackClusterLink.h.

54 { return m_clusterIntegral; }

◆ getInstance()

eflowTrackClusterLink * eflowTrackClusterLink::getInstance ( eflowRecTrack track,
eflowRecCluster cluster,
const EventContext &  ctx = Gaudi::Hive::currentContext() 
)
static

Definition at line 19 of file eflowTrackClusterLink.cxx.

22 {
24  Cache& c = *slots.get (ctx);
25  std::lock_guard lock (c.m_mutex);
26  if (c.m_evt != ctx.evt()) {
27  c.m_map.clear();
28  c.m_evt = ctx.evt();
29  }
30 
31  key_t key (track, cluster);
32  auto it = c.m_map.try_emplace (key, std::unique_ptr<eflowTrackClusterLink>()).first;
33  if (!it->second) {
34  it->second = std::make_unique<eflowTrackClusterLink>(track,cluster);
35  }
36  return it->second.get();
37 }

◆ getTrack() [1/2]

eflowRecTrack* eflowTrackClusterLink::getTrack ( )
inline

Definition at line 48 of file eflowTrackClusterLink.h.

48 { return m_track; }

◆ getTrack() [2/2]

const eflowRecTrack* eflowTrackClusterLink::getTrack ( ) const
inline

Definition at line 49 of file eflowTrackClusterLink.h.

49 { return m_track; }

◆ setClusterIntegral()

void eflowTrackClusterLink::setClusterIntegral ( const std::vector< double > &  clusterIntegral)
inline

Definition at line 51 of file eflowTrackClusterLink.h.

51  {
52  m_clusterIntegral = clusterIntegral;
53  }

Member Data Documentation

◆ m_cluster

eflowRecCluster* eflowTrackClusterLink::m_cluster
private

Definition at line 74 of file eflowTrackClusterLink.h.

◆ m_clusterIntegral

std::vector<double> eflowTrackClusterLink::m_clusterIntegral
private

Definition at line 76 of file eflowTrackClusterLink.h.

◆ m_track

eflowRecTrack* eflowTrackClusterLink::m_track
private

Definition at line 73 of file eflowTrackClusterLink.h.


The documentation for this class was generated from the following files:
skel.it
it
Definition: skel.GENtoEVGEN.py:423
SG::SlotSpecificObj
Maintain a set of objects, one per slot.
Definition: AthenaKernel/AthenaKernel/SlotSpecificObj.h:70
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
ATLAS_THREAD_SAFE
#define ATLAS_THREAD_SAFE
Definition: checker_macros.h:211
python.compressB64.c
def c
Definition: compressB64.py:93
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37