ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FW::SimIdentifier Class Reference

#include <acts/blob/master/Examples/Framework/include/ACTFW/EventData/SimIdentifier.hpp>

+ Inheritance diagram for FW::SimIdentifier:
+ Collaboration diagram for FW::SimIdentifier:

Public Types

using Value = uint64_t
 
using Difference = int64_t
 

Public Member Functions

 SimIdentifier (Value value)
 
 SimIdentifier (Value value, std::vector< std::size_t > indices)
 
 SimIdentifier ()=default
 
 SimIdentifier (const SimIdentifier &)=default
 
 SimIdentifier (SimIdentifier &&)=default
 
SimIdentifieroperator= (const SimIdentifier &)=default
 
SimIdentifieroperator= (SimIdentifier &&)=default
 
SimIdentifieroperator= (Value value)
 Assign from an identifier value.
 
 operator Value () const
 Cast to an identifier value.
 
Value value () const
 Explicit access the underlying identifier value.
 
const std::vector< std::size_t > & indices () const
 Access all associated truth indices.
 
void addIndex (std::size_t index)
 Attach a truth index to the identifier.
 

Private Attributes

Value m_value = 0u
 The stored identifier value.
 
std::vector< std::size_t > m_indices
 Associated truth indices.
 

Friends

constexpr bool operator< (const SimIdentifier &lhs, const SimIdentifier &rhs)
 
bool operator== (const SimIdentifier &lhs, const SimIdentifier &rhs)
 

Additional Inherited Members

Detailed Description

A hit identifier with additional truth information.

In an addition to a unique identifier, an list of additional indices is stored. These can refer e.g. to particle indices or truth hit indices. Using indices instead of pointers allows more flexibility, i.e. we are not fixed to a specific object type when using e.g. pointers, and is more robust since no requirements on stable memory locations of the pointed-to objects are necessary (as would be the case for pointers).

Definition at line 26 of file SimIdentifier.hpp.

View newest version in sPHENIX GitHub at line 26 of file SimIdentifier.hpp

Member Typedef Documentation

Definition at line 29 of file SimIdentifier.hpp.

View newest version in sPHENIX GitHub at line 29 of file SimIdentifier.hpp

using FW::SimIdentifier::Value = uint64_t

Definition at line 28 of file SimIdentifier.hpp.

View newest version in sPHENIX GitHub at line 28 of file SimIdentifier.hpp

Constructor & Destructor Documentation

FW::SimIdentifier::SimIdentifier ( Value  value)
inlineexplicit

Constructor from encoded identifier value.

Parameters
valueis the identifier value

Definition at line 34 of file SimIdentifier.hpp.

View newest version in sPHENIX GitHub at line 34 of file SimIdentifier.hpp

FW::SimIdentifier::SimIdentifier ( Value  value,
std::vector< std::size_t >  indices 
)
inline

Constructor from encoded identifier value and truth information.

Parameters
valueis the identifier value
indices

Definition at line 39 of file SimIdentifier.hpp.

View newest version in sPHENIX GitHub at line 39 of file SimIdentifier.hpp

FW::SimIdentifier::SimIdentifier ( )
default
FW::SimIdentifier::SimIdentifier ( const SimIdentifier )
default
FW::SimIdentifier::SimIdentifier ( SimIdentifier &&  )
default

Member Function Documentation

void FW::SimIdentifier::addIndex ( std::size_t  index)
inline

Attach a truth index to the identifier.

Definition at line 60 of file SimIdentifier.hpp.

View newest version in sPHENIX GitHub at line 60 of file SimIdentifier.hpp

References m_indices.

const std::vector<std::size_t>& FW::SimIdentifier::indices ( ) const
inline

Access all associated truth indices.

Definition at line 57 of file SimIdentifier.hpp.

View newest version in sPHENIX GitHub at line 57 of file SimIdentifier.hpp

References m_indices.

FW::SimIdentifier::operator Value ( ) const
inline

Cast to an identifier value.

Definition at line 52 of file SimIdentifier.hpp.

View newest version in sPHENIX GitHub at line 52 of file SimIdentifier.hpp

References m_value.

SimIdentifier& FW::SimIdentifier::operator= ( const SimIdentifier )
default
SimIdentifier& FW::SimIdentifier::operator= ( SimIdentifier &&  )
default
SimIdentifier& FW::SimIdentifier::operator= ( Value  value)

Assign from an identifier value.

Value FW::SimIdentifier::value ( ) const
inline

Explicit access the underlying identifier value.

Definition at line 55 of file SimIdentifier.hpp.

View newest version in sPHENIX GitHub at line 55 of file SimIdentifier.hpp

References m_value.

Friends And Related Function Documentation

constexpr bool operator< ( const SimIdentifier lhs,
const SimIdentifier rhs 
)
friend

Definition at line 68 of file SimIdentifier.hpp.

View newest version in sPHENIX GitHub at line 68 of file SimIdentifier.hpp

bool operator== ( const SimIdentifier lhs,
const SimIdentifier rhs 
)
friend

Definition at line 72 of file SimIdentifier.hpp.

View newest version in sPHENIX GitHub at line 72 of file SimIdentifier.hpp

Member Data Documentation

std::vector<std::size_t> FW::SimIdentifier::m_indices
private

Associated truth indices.

Definition at line 66 of file SimIdentifier.hpp.

View newest version in sPHENIX GitHub at line 66 of file SimIdentifier.hpp

Referenced by addIndex(), and indices().

Value FW::SimIdentifier::m_value = 0u
private

The stored identifier value.

Definition at line 64 of file SimIdentifier.hpp.

View newest version in sPHENIX GitHub at line 64 of file SimIdentifier.hpp

Referenced by operator Value(), and value().


The documentation for this class was generated from the following file: