allpix::HexagonalPixelDetectorModel

Module: Detector models

Detector model with hexagonal pixel grid. More…

#include <HexagonalPixelDetectorModel.hpp>

Inherits from allpix::PixelDetectorModel, allpix::DetectorModel

Public Functions

Name
HexagonalPixelDetectorModel(std::string type, const std::shared_ptr< DetectorAssembly > & assembly, const ConfigReader & reader, const Configuration & config)
constructor of a hexagonal pixel detector model
~HexagonalPixelDetectorModel() override =default
Essential virtual destructor.
virtual ROOT::Math::XYZPoint getMatrixCenter() const override
Get local coordinate of the position and rotation center in global frame.
virtual ROOT::Math::XYZPoint getPixelCenter(const int x, const int y) const override
Returns a pixel center in local coordinates.
virtual std::pair< int, int > getPixelIndex(const ROOT::Math::XYZPoint & position) const override
Return X,Y indices of a pixel corresponding to a local position in a sensor.
virtual bool isWithinMatrix(const int x, const int y) const override
Returns if a set of pixel coordinates is within the grid of pixels defined for the device.
virtual bool isWithinMatrix(const Pixel::Index & pixel_index) const override
Returns if a pixel index is within the grid of pixels defined for the device.
virtual ROOT::Math::XYZVector getMatrixSize() const override
Return grid size along X,Y of a hexagonal sensor grid.
virtual std::set< Pixel::Index > getNeighbors(const Pixel::Index & idx, const size_t distance) const override
Return a set containing all pixels neighboring the given one with a configurable maximum distance.
virtual bool areNeighbors(const Pixel::Index & seed, const Pixel::Index & entrant, const size_t distance) const override
Check if two pixel indices are neighbors to each other.

Additional inherited members

Public Functions inherited from allpix::PixelDetectorModel

Name
PixelDetectorModel(std::string type, const std::shared_ptr< DetectorAssembly > & assembly, const ConfigReader & reader, const Configuration & config)
Constructs the pixel detector model.
virtual bool isWithinSensor(const ROOT::Math::XYZPoint & local_pos) const override
Returns if a local position is within the sensitive device.
virtual bool isOnSensorBoundary(const ROOT::Math::XYZPoint & local_pos) const override
Returns if a local position is on the sensor boundary.
virtual ROOT::Math::XYZPoint getSensorIntercept(const ROOT::Math::XYZPoint & inside, const ROOT::Math::XYZPoint & outside) const override
Calculate exit point of step outside sensor volume from one point inside the sensor (before step) and one point outside (after step).

Protected Functions inherited from allpix::PixelDetectorModel

Name
virtual void validate() override

Public Classes inherited from allpix::DetectorModel

Name
class Implant
Helper class to hold implant definitions for a detector model.

Public Functions inherited from allpix::DetectorModel

Name
std::shared_ptr< DetectorModel > factory(const std::string & name, const ConfigReader & reader)
Factory to dynamically create detector model objects.
template <class T >
bool
is()
Helper method to determine if this detector model is of a given type The template parameter needs to be specified specifically, i.e. if(model->is()) { }.
DetectorModel(std::string type, std::shared_ptr< DetectorAssembly > assembly, const ConfigReader & reader, const Configuration & config)
Constructs the base detector model.
virtual ~DetectorModel() =default
Essential virtual destructor.
std::vector< Configuration > getConfigurations() const
Get the configuration associated with this model.
const std::string & getType() const
Get the type of the model.
const std::shared_ptr< DetectorAssembly > getAssembly() const
virtual ROOT::Math::XYZPoint getModelCenter() const
Get local coordinate of the geometric center of the model.
virtual ROOT::Math::XYZVector getSize() const
Get size of the wrapper box around the model that contains all elements.
ROOT::Math::DisplacementVector2D< ROOT::Math::Cartesian2D< unsigned int > > getNPixels() const
Get number of pixels (replicated blocks in generic sensors)
const ROOT::Math::XYVector & getPixelSize() const
Get size of a single pixel.
Pixel::Type getPixelType() const
Get type of the pixels.
const std::vector< Implant > & getImplants() const
Return all implants.
virtual ROOT::Math::XYZVector getSensorSize() const
Get size of the sensor.
virtual ROOT::Math::XYZPoint getSensorCenter() const
Get center of the sensor in local coordinates.
SensorMaterial getSensorMaterial() const
Get the material of the sensor.
virtual ROOT::Math::XYZVector getChipSize() const
Get size of the chip.
virtual ROOT::Math::XYZPoint getChipCenter() const
Get center of the chip in local coordinates.
virtual std::vector< SupportLayer > getSupportLayers() const
Return all layers of support.
virtual bool isWithinSensor(const ROOT::Math::XYZPoint & local_pos) const =0
Returns if a local position is within the sensitive device.
virtual bool isOnSensorBoundary(const ROOT::Math::XYZPoint & local_pos) const =0
Returns if a local position is on the sensor boundary.
virtual ROOT::Math::XYZPoint getSensorIntercept(const ROOT::Math::XYZPoint & inside, const ROOT::Math::XYZPoint & outside) const =0
Calculate exit point of step outside sensor volume from one point inside the sensor (before step) and one point outside (after step).
virtual std::optional< Implant > isWithinImplant(const ROOT::Math::XYZPoint & local_pos) const
Returns if a local position is within the pixel implant region of the sensitive device.
ROOT::Math::XYZPoint getImplantIntercept(const Implant & implant, const ROOT::Math::XYZPoint & outside, const ROOT::Math::XYZPoint & inside) const
Calculate entry point of step into impant volume from one point outside the implant (before step) and one point inside (after step).

Protected Functions inherited from allpix::DetectorModel

Name
void setNPixels(ROOT::Math::DisplacementVector2D< ROOT::Math::Cartesian2D< unsigned int » val)
Set number of pixels (replicated blocks in generic sensors)
void setPixelSize(ROOT::Math::XYVector val)
Set the size of a pixel.
void setSensorThickness(double val)
Set the thickness of the sensor.
void setSensorExcessTop(double val)
Set the excess at the top of the sensor (positive y-coordinate)
void setSensorExcessRight(double val)
Set the excess at the right of the sensor (positive x-coordinate)
void setSensorExcessBottom(double val)
Set the excess at the bottom of the sensor (negative y-coordinate)
void setSensorExcessLeft(double val)
Set the excess at the left of the sensor (negative x-coordinate)

Protected Attributes inherited from allpix::DetectorModel

Name
std::string type_
ROOT::Math::DisplacementVector2D< ROOT::Math::Cartesian2D< unsigned int > > number_of_pixels_
ROOT::Math::XYVector pixel_size_
Pixel::Type pixel_type_
double sensor_thickness_
std::array< double, 4 > sensor_excess_
SensorMaterial sensor_material_
std::shared_ptr< DetectorAssembly > assembly_
std::vector< Implant > implants_
std::vector< SupportLayer > support_layers_

Detailed Description

class allpix::HexagonalPixelDetectorModel;

Detector model with hexagonal pixel grid.

The implementation of this detector model follows the axial coordinate system approach where two non-orthogonal axes along the rows and (slanted) columns of the hexagonal grid are defined. An excellent description of this coordinate systam along with all necessary math and transformations can be found at https://www.redblobgames.com/grids/hexagons

Public Functions Documentation

function HexagonalPixelDetectorModel

explicit HexagonalPixelDetectorModel(
    std::string type,
    const std::shared_ptr< DetectorAssembly > & assembly,
    const ConfigReader & reader,
    const Configuration & config
)

constructor of a hexagonal pixel detector model

Parameters:

  • type Name of the model type
  • assembly Detector assembly object with information about ASIC and packaging
  • reader Configuration reader with description of the model
  • config Configuration reference holding the unnamed section of detector configuration

function ~HexagonalPixelDetectorModel

~HexagonalPixelDetectorModel() override =default

Essential virtual destructor.

function getMatrixCenter

virtual ROOT::Math::XYZPoint getMatrixCenter() const override

Get local coordinate of the position and rotation center in global frame.

Note: It can be a bit counter intuitive that this is not usually the origin, neither the geometric center of the model, but the geometric center of the sensitive part. This way, the position of the sensing element is invariant under rotations

Reimplements: allpix::DetectorModel::getMatrixCenter

The center coordinate corresponds to the position in the global frame.

function getPixelCenter

virtual ROOT::Math::XYZPoint getPixelCenter(
    const int x,
    const int y
) const override

Returns a pixel center in local coordinates.

Parameters:

  • x X- (or column-) coordinate of the pixel
  • y Y- (or row-) coordinate of the pixel

Return: Coordinates of the pixel center

Reimplements: allpix::DetectorModel::getPixelCenter

function getPixelIndex

virtual std::pair< int, int > getPixelIndex(
    const ROOT::Math::XYZPoint & position
) const override

Return X,Y indices of a pixel corresponding to a local position in a sensor.

Parameters:

  • position Position in local coordinates of the detector model

Return: X,Y pixel indices

Note: No checks are performed on whether these indices represent an existing pixel or are within the pixel matrix.

Reimplements: allpix::DetectorModel::getPixelIndex

function isWithinMatrix

virtual bool isWithinMatrix(
    const int x,
    const int y
) const override

Returns if a set of pixel coordinates is within the grid of pixels defined for the device.

Parameters:

  • x X- (or column-) coordinate to be checked
  • y Y- (or row-) coordinate to be checked

Return: True if pixel coordinates are within the pixel grid, false otherwise

Reimplements: allpix::DetectorModel::isWithinMatrix

function isWithinMatrix

virtual bool isWithinMatrix(
    const Pixel::Index & pixel_index
) const override

Returns if a pixel index is within the grid of pixels defined for the device.

Parameters:

  • pixel_index Pixel index to be checked

Return: True if pixel_index is within the pixel grid, false otherwise

Reimplements: allpix::DetectorModel::isWithinMatrix

function getMatrixSize

virtual ROOT::Math::XYZVector getMatrixSize() const override

Return grid size along X,Y of a hexagonal sensor grid.

Return: X and Y grid length in mm

Reimplements: allpix::DetectorModel::getMatrixSize

function getNeighbors

virtual std::set< Pixel::Index > getNeighbors(
    const Pixel::Index & idx,
    const size_t distance
) const override

Return a set containing all pixels neighboring the given one with a configurable maximum distance.

Parameters:

  • idx Index of the pixel in question
  • distance Distance for pixels to be considered neighbors

Return: Set of neighboring pixel indices, including the initial pixel

Note: The returned set should always also include the initial pixel indices the neighbors are calculated for

Reimplements: allpix::DetectorModel::getNeighbors

function areNeighbors

virtual bool areNeighbors(
    const Pixel::Index & seed,
    const Pixel::Index & entrant,
    const size_t distance
) const override

Check if two pixel indices are neighbors to each other.

Parameters:

  • seed Initial pixel index
  • entrant Entrant pixel index to be tested
  • distance Distance for pixels to be considered neighbors

Return: Boolean whether pixels are neighbors or not

Reimplements: allpix::DetectorModel::areNeighbors


Updated on 2024-12-13 at 08:31:37 +0000