Class Hit

Class Documentation

class ActsFatras::Hit

A simulation hit on a surface.

This is the undigitized, truth hit, i.e. just a recording of the particle state at the surface intersection. Since Fatras is surface-based, the hit position is always constrained to a surface. Depending on the simulated interactions the momentum state before and after might differ and is thus stored as two separate four-vectors.

Public Types

using Scalar = Acts::ActsScalar
using Vector3 = Acts::ActsVector<3>
using Vector4 = Acts::ActsVector<4>

Public Functions

Hit() = default

Construct default hit with (mostly) invalid information.

Hit(Acts::GeometryIdentifier geometryId, Barcode particleId, const Vector4 &pos4, const Vector4 &before4, const Vector4 &after4, int32_t index_ = -1)

Construct from four-position and four-momenta.

All quantities are given in the global coordinate system. It is the users responsibility to ensure that the position correspond to a position on the given surface.

Parameters
  • geoId: Geometry identifier of the surface

  • particleId: Particle identifier of the particle that created the hit

  • pos4: Particle space-time four-vector on the surface

  • before4: Particle four-momentum before the interaction

  • after4: Particle four-momentum after the interaction

  • index_: Hit index along the particle trajectory

Hit(const Hit&) = default
Hit(Hit&&) = default
Scalar depositedEnergy() const

Energy deposited by the hit.

Return Value
  • positive: if the particle lost energy when it passed the surface

  • negative: if magic was involved

const Vector4 &fourPosition() const

Space-time position four-vector.

constexpr Acts::GeometryIdentifier geometryId() const

Geometry identifier of the hit surface.

constexpr int32_t index() const

Hit index along the particle trajectory.

Return Value
  • negative: if the hit index is undefined.

const Vector4 &momentum4After() const

Particle four-momentum after the hit.

const Vector4 &momentum4Before() const

Particle four-momentum before the hit.

Hit &operator=(const Hit&) = default
Hit &operator=(Hit&&) = default
constexpr Barcode particleId() const

Particle identifier of the particle that generated the hit.

auto position() const

Three-position, i.e. spatial coordinates without the time.

Scalar time() const

Time coordinate.

Vector3 unitDirection() const

Average normalized particle direction vector through the surface.

Vector3 unitDirectionAfter() const

Normalized particle direction vector the hit.

Vector3 unitDirectionBefore() const

Normalized particle direction vector before the hit.