Group eventdata-charge¶
- group eventdata-charge
Track parameters store a single coefficient that describes charge and momentum.
This is either charge/momentum or 1/momentum, but the interpretation depends on what type of particle is described. In this code base this coefficient is always referred to as
qOverP
(or charge-over-momentum) even for uncharged particles. The following types are used to restrict the particle charge magnitude (at compile time) and support the umambigous extraction of charge and absolute momentum from said track parameter coefficient.All types are designed to be interchangeable. Each one can be constructed with the input charge magnitude
Charge c(1_e);
and can then be used to extract the charge value
auto q = c.extractCharge(qOverP);
or the absolute momentum
auto p = c.extractMomentum(qOverP);
from the charge-over-momentum track parameter.
-
class Acts::AnyCharge
- #include <Acts/EventData/Charge.hpp>
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
-
AnyCharge() = delete
Delete default constructor to ensure charge is always explicitely given.
-
template<typename T>
inline constexpr AnyCharge(T absQ) noexcept Construct with the magnitude of the input charge.
-
AnyCharge() = delete
-
struct Acts::Neutral
- #include <Acts/EventData/Charge.hpp>
Charge and momentum interpretation for neutral particles.
Public Functions
-
Neutral() = default
-
template<typename T>
inline constexpr Neutral(T absQ) noexcept Construct and verify the input charge magnitude (in debug builds).
This constructor is only provided to allow consistent construction.
Friends
- inline friend friend constexpr bool operator== (Neutral, Neutral) noexcept
Compare for equality.
This is always
true
asNeutral
has no internal state. Must be available to provide a consistent interface.
-
Neutral() = default
-
struct Acts::SinglyCharged
- #include <Acts/EventData/Charge.hpp>
Charge and momentum interpretation for particles with +-e charge.
Public Functions
-
SinglyCharged() = default
-
template<typename T>
inline constexpr SinglyCharged(T absQ) noexcept Construct and verify the input charge magnitude (in debug builds).
This constructor is only provided to allow consistent construction.
Friends
- inline friend friend constexpr bool operator== (SinglyCharged, SinglyCharged) noexcept
Compare for equality.
This is always
true
asSinglyCharged
has no internal state. Must be available to provide a consistent interface.
-
SinglyCharged() = default
-
class Acts::AnyCharge