allpix::StaggeredPixelDetectorModel

Module: Detector models

Model of a pixel detector with a brick wall layout.

#include <StaggeredPixelDetectorModel.hpp>

Inherits from allpix::PixelDetectorModel, allpix::DetectorModel

Public Functions

Name
StaggeredPixelDetectorModel(std::string type, const std::shared_ptr< DetectorAssembly > & assembly, const ConfigReader & reader, const Configuration & config)
Constructs the pixel detector model.
virtual ROOT::Math::XYZPoint getMatrixCenter() const override
Get local coordinate of the position and rotation center in global frame.
virtual ROOT::Math::XYZVector getMatrixSize() const override
Get total size of the pixel grid.
virtual bool isWithinMatrix(const ROOT::Math::XYZPoint & position) const override
Returns if a position is within the grid of pixels defined for the device.
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 & local_pos) const override
Return X,Y indices of a pixel corresponding to a local position in a sensor.
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).
virtual std::set< Pixel::Index > getPixels() const override
Return a set containing all pixels of the matrix.

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).
virtual std::set< Pixel::Index > getPixels() const =0
Return a set containing all pixels of the matrix.

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_

Public Functions Documentation

function StaggeredPixelDetectorModel

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

Constructs the 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 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 getMatrixSize

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

Get total size of the pixel grid.

Return: Size of the pixel grid

Note: This is basically a 2D method, but provided in 3D because it is primarily used there

Warning: The grid has zero thickness

Reimplements: allpix::DetectorModel::getMatrixSize

function isWithinMatrix

virtual bool isWithinMatrix(
    const ROOT::Math::XYZPoint & position
) const override

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

Parameters:

  • position Position in local coordinates of the detector model

Return: True if position within the pixel grid, false otherwise

Reimplements: allpix::PixelDetectorModel::isWithinMatrix

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::PixelDetectorModel::getPixelCenter

function getPixelIndex

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

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

Parameters:

  • local_pos 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::PixelDetectorModel::getPixelIndex

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::PixelDetectorModel::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::PixelDetectorModel::areNeighbors


Updated on 2025-05-10 at 19:40:39 +0000