EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Acts::AnyCharge Class Reference

#include <acts/blob/sPHENIX/Core/include/Acts/EventData/Charge.hpp>

Public Member Functions

 AnyCharge ()=delete
 Delete default constructor to ensure charge is always explicitely given.
 
template<typename T >
constexpr AnyCharge (T absQ) noexcept
 Construct with the magnitude of the input charge.
 
template<typename T >
constexpr T extractCharge (T qOverP) const noexcept
 
template<typename T >
constexpr T extractMomentum (T qOverP) const noexcept
 

Private Attributes

float m_magnitude
 

Friends

constexpr bool operator== (AnyCharge lhs, AnyCharge rhs) noexcept
 Compare for equality.
 

Detailed Description

Charge and momentum interpretation for arbitrarily charged particles.

Only a charge magnitude identical to zero is interpreted as representing a neutral particle. This avoids ambiguities that might arise from using an approximate comparison with an arbitrary epsilon.

Definition at line 120 of file Charge.hpp.

View newest version in sPHENIX GitHub at line 120 of file Charge.hpp

Constructor & Destructor Documentation

Acts::AnyCharge::AnyCharge ( )
delete

Delete default constructor to ensure charge is always explicitely given.

template<typename T >
constexpr Acts::AnyCharge::AnyCharge ( T  absQ)
inlinenoexcept

Construct with the magnitude of the input charge.

Definition at line 126 of file Charge.hpp.

View newest version in sPHENIX GitHub at line 126 of file Charge.hpp

Member Function Documentation

template<typename T >
constexpr T Acts::AnyCharge::extractCharge ( T  qOverP) const
inlinenoexcept

Definition at line 131 of file Charge.hpp.

View newest version in sPHENIX GitHub at line 131 of file Charge.hpp

References m_magnitude, and dfe::static_cast< T >().

Referenced by BOOST_AUTO_TEST_CASE().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<typename T >
constexpr T Acts::AnyCharge::extractMomentum ( T  qOverP) const
inlinenoexcept

Definition at line 135 of file Charge.hpp.

View newest version in sPHENIX GitHub at line 135 of file Charge.hpp

References kdfinder::abs(), m_magnitude, and dfe::static_cast< T >().

Referenced by BOOST_AUTO_TEST_CASE().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Friends And Related Function Documentation

constexpr bool operator== ( AnyCharge  lhs,
AnyCharge  rhs 
)
friend

Compare for equality.

Definition at line 145 of file Charge.hpp.

View newest version in sPHENIX GitHub at line 145 of file Charge.hpp

Member Data Documentation

float Acts::AnyCharge::m_magnitude
private

Definition at line 142 of file Charge.hpp.

View newest version in sPHENIX GitHub at line 142 of file Charge.hpp

Referenced by extractCharge(), and extractMomentum().


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