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 = double
using Vector3 = Acts::ActsVector<Scalar, 3>
using Vector4 = Acts::ActsVector<Scalar, 4>

Public Functions

Hit() = default

Construct default hit with (mostly) invalid information.

template<typename Position4, typename Momentum40, typename Momentum41>
Hit(Acts::GeometryID geometryId, Barcode particleId, const Eigen::MatrixBase<Position4> &pos4, const Eigen::MatrixBase<Momentum40> &before4, const Eigen::MatrixBase<Momentum41> &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. The four-vector component order must be [x,y,z,t] and [px,py,pz,E].

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

constexpr Acts::GeometryID 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.

The component order is [px,py,pz,E].

const Vector4 &momentum4Before() const

Particle four-momentum before the hit.

The component order is [px,py,pz,E].

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.

const Vector4 &position4() const

Space-time position four-vector.

The component order is [x,y,z,t].

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.