Cell class
#include <Cell.h>

Public types

enum SubPos { MID = 0, ENT = 1, EXT = 2 }

Public static functions

static auto norm_angle(double angle) -> double

Constructors, destructors, conversion operators

Cell()
Cell(uint64_t id, Position pos, uint32_t layer, bool isBarrel, bool isXYZ, bool isEtaPhiR, bool isEtaPhiZ, bool isRPhiZ, double dx, double dy, double dz, double deta, double dphi, double dr)

Public functions

auto id() const -> uint64_t
auto x() const -> double
auto y() const -> double
auto z() const -> double
auto eta() const -> double
auto phi() const -> double
auto r() const -> double
auto layer() const -> uint32_t
auto isBarrel() const -> bool
auto isXYZ() const -> bool
auto isEtaPhiR() const -> bool
auto isEtaPhiZ() const -> bool
auto isRPhiZ() const -> bool
auto dx() const -> double
auto dy() const -> double
auto dz() const -> double
auto deta() const -> double
auto dphi() const -> double
auto dr() const -> double
auto is_valid() const -> bool
void invalidate()
auto raw() const -> const CellData &
auto raw() -> CellData &
auto rent() const -> double
auto rext() const -> double
auto zent() const -> double
auto zext() const -> double
auto r(SubPos subpos) const -> double
auto z(SubPos subpos) const -> double
auto boundary_proximity(const Position& pos) const -> double
Calculates the 2D proximity between a hit and the boundary of a cell.
auto is_inside(const Position& pos) const -> bool

Friends

auto operator<<(std::ostream& os, const Cell& cell) -> std::ostream &

Function documentation

auto Cell::boundary_proximity(const Position& pos) const -> double

Calculates the 2D proximity between a hit and the boundary of a cell.

This method returns the signed distance between the given hit and the cell boundary:

  • A negative value indicates that the hit is inside the cell, with the magnitude representing how deep within the cell the hit is.
  • A positive value indicates that the hit is outside the cell, with the magnitude representing the distance from the cell boundary.