ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
ActsPlugins::EDM4hepUtil::SimHitAssociation Class Reference

Helper class for associating simulation hits between EDM4hep and internal indices. More...

#include </home/runner/work/acts/acts/Plugins/EDM4hep/include/ActsPlugins/EDM4hep/EDM4hepUtil.hpp>

Public Member Functions

void add (std::size_t internalIndex, const edm4hep::SimTrackerHit &edm4hepHit)
 Add association between internal index and EDM4hep hit.
std::size_t lookup (const edm4hep::SimTrackerHit &hit) const
 Look up internal index by EDM4hep hit.
edm4hep::SimTrackerHit lookup (std::size_t internalIndex) const
 Look up EDM4hep hit by internal index.
void reserve (std::size_t size)
 Reserve space for associations.
std::size_t size () const
 Get number of associations.

Detailed Description

Helper class for associating simulation hits between EDM4hep and internal indices.

Member Function Documentation

◆ add()

void ActsPlugins::EDM4hepUtil::SimHitAssociation::add ( std::size_t internalIndex,
const edm4hep::SimTrackerHit & edm4hepHit )

Add association between internal index and EDM4hep hit.

Parameters
internalIndexInternal hit index
edm4hepHitEDM4hep hit object

◆ lookup() [1/2]

std::size_t ActsPlugins::EDM4hepUtil::SimHitAssociation::lookup ( const edm4hep::SimTrackerHit & hit) const

Look up internal index by EDM4hep hit.

Parameters
hitEDM4hep hit object
Returns
Internal hit index

◆ lookup() [2/2]

edm4hep::SimTrackerHit ActsPlugins::EDM4hepUtil::SimHitAssociation::lookup ( std::size_t internalIndex) const
nodiscard

Look up EDM4hep hit by internal index.

Parameters
internalIndexInternal hit index
Returns
EDM4hep hit object

◆ reserve()

void ActsPlugins::EDM4hepUtil::SimHitAssociation::reserve ( std::size_t size)

Reserve space for associations.

Parameters
sizeNumber of associations to reserve

◆ size()

std::size_t ActsPlugins::EDM4hepUtil::SimHitAssociation::size ( ) const

Get number of associations.

Returns
Number of associations