Class Acts::AnyCharge

class AnyCharge

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.

Public Functions

inline constexpr AnyCharge(float absQ) noexcept

Construct with the magnitude of the input charge.

inline constexpr AnyCharge(SinglyCharged) noexcept
inline constexpr AnyCharge(Neutral) noexcept
inline constexpr float absQ() const noexcept
template<typename T>
inline constexpr auto extractCharge(T qOverP) const noexcept
template<typename T>
inline constexpr auto extractMomentum(T qOverP) const noexcept
template<typename P, typename Q>
inline constexpr auto qOverP(P momentum, Q signedQ) const noexcept


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

Compare for equality.