allpix::RadialStripDetectorModel
Module: Detector models
Model of a radial strip detector. This is a model where the silicon sensor is a trapezoid and the strips fan out radially from a focal point.
#include <RadialStripDetectorModel.hpp>
Inherits from allpix::DetectorModel
Public Functions
Name | |
---|---|
RadialStripDetectorModel(std::string type, const std::shared_ptr< DetectorAssembly > & assembly, const ConfigReader & reader, const Configuration & config) Constructs the radial strip detector model. |
|
unsigned int | getNumberOfStrips(unsigned int row) const Get the number of strips in a given strip row. |
double | getStripLength(unsigned int row) const Get the strip length in a given strip row. |
double | getAngularPitch(unsigned int row) const Get the angular strip pitch in a given strip row. |
double | getAngularPitchMax() const Get the maximum angular strip pitch in all strip rows. |
double | getInnerPitch(unsigned int row) const Get the inner strip pitch in a given strip row. |
double | getSensorBaseInner() const Get the smaller base length of the trapezoidal sensor wrapper. |
double | getSensorBaseOuter() const Get the larger base length of the trapezoidal sensor wrapper. |
double | getRowAngleMax() const Get the maximum angle subtended by the widest strip row. |
double | getRowRadius(unsigned int row) const Get the inner radius of a given strip row. |
const std::vector< double > & | getRowRadii() const Get the vector of strip rows inner radii. |
double | getCenterRadius() const Get the radius of the sensor center. |
double | getStereoAngle() const Get the sensor stereo angle. |
virtual ROOT::Math::XYZPoint | getMatrixCenter() const override Get local coordinate of the position and rotation center in global frame. |
virtual ROOT::Math::XYZVector | getSize() const override Get size of the rectangular wrapper box around the model that contains all elements. |
ROOT::Math::XYVector | getStripSize(unsigned int row) const Returns the dimensions of a strip in a given row. |
virtual bool | isWithinSensor(const ROOT::Math::XYZPoint & position) 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 bool | isWithinMatrix(const Pixel::Index & strip_index) const override Returns if a strip index is within the grid of strips defined for the device. |
virtual bool | isWithinMatrix(const int x, const int y) const override Returns if a set of strip coordinates is within the grid of strips defined for the device. |
ROOT::Math::Polar2DPoint | getPositionPolar(const ROOT::Math::XYZPoint & local_pos) const Converts the local position in cartesian coordinates to polar coordinates. |
ROOT::Math::XYPoint | getPositionCartesian(const ROOT::Math::Polar2DPoint & polar_pos) const Converts the position in polar coordinates to cartesian coordinates in the local frame. |
virtual ROOT::Math::XYZPoint | getPixelCenter(int x, 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 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 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. |
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 | getMatrixSize() const Get total size of the pixel grid. |
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 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_ |
Public Functions Documentation
function RadialStripDetectorModel
explicit RadialStripDetectorModel(
std::string type,
const std::shared_ptr< DetectorAssembly > & assembly,
const ConfigReader & reader,
const Configuration & config
)
Constructs the radial strip 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 getNumberOfStrips
inline unsigned int getNumberOfStrips(
unsigned int row
) const
Get the number of strips in a given strip row.
Parameters:
- row Strip row (y-coordinate)
Return: Number of strips in a given strip row
function getStripLength
inline double getStripLength(
unsigned int row
) const
Get the strip length in a given strip row.
Parameters:
- row Strip row (y-coordinate)
Return: Strip length in a given strip row
function getAngularPitch
inline double getAngularPitch(
unsigned int row
) const
Get the angular strip pitch in a given strip row.
Parameters:
- row Strip row (y-coordinate)
Return: Angular strip pitch in a given strip row
function getAngularPitchMax
inline double getAngularPitchMax() const
Get the maximum angular strip pitch in all strip rows.
Return: Maximum angular strip pitch in all strip rows
function getInnerPitch
inline double getInnerPitch(
unsigned int row
) const
Get the inner strip pitch in a given strip row.
Parameters:
- row Strip row (y-coordinate)
Return: Inner strip pitch in a given strip row
function getSensorBaseInner
inline double getSensorBaseInner() const
Get the smaller base length of the trapezoidal sensor wrapper.
Return: Length of the smaller base of the trapezoidal sensor wrapper
function getSensorBaseOuter
inline double getSensorBaseOuter() const
Get the larger base length of the trapezoidal sensor wrapper.
Return: Length of the larger base of the trapezoidal sensor wrapper
function getRowAngleMax
inline double getRowAngleMax() const
Get the maximum angle subtended by the widest strip row.
Return: Angle subtended by the widest strip row
function getRowRadius
inline double getRowRadius(
unsigned int row
) const
Get the inner radius of a given strip row.
Parameters:
- row Strip row (y-coordinate)
Return: Inner radius of a given strip row
Note: For N rows the row_radius_ vector has N+1 values. The first element is the inner radius of the first row, the last element is the outer radius of the last row (virtually the inner radius of the nonexistent (N+1)-th row).
function getRowRadii
inline const std::vector< double > & getRowRadii() const
Get the vector of strip rows inner radii.
Return: Vector of strip rows inner radii
Note: For N rows the row_radius_ vector has N+1 values. The first element is the inner radius of the first row, the last element is the outer radius of the last row (virtually the inner radius of the nonexistent (N+1)-th row).
function getCenterRadius
inline double getCenterRadius() const
Get the radius of the sensor center.
Return: Radius of the sensor center
function getStereoAngle
inline double getStereoAngle() const
Get the sensor stereo angle.
Return: Sensor stereo angle
function getMatrixCenter
inline virtual ROOT::Math::XYZPoint getMatrixCenter() const override
Get local coordinate of the position and rotation center in global frame.
Return: Local coordinate of the position and rotation center in global frame
Note: For a radial sensor the matrix center is located in the center of the sensor, defined by the center radius
Reimplements: allpix::DetectorModel::getMatrixCenter
function getSize
inline virtual ROOT::Math::XYZVector getSize() const override
Get size of the rectangular wrapper box around the model that contains all elements.
Return: Size of the detector model
Note: The wrapper box for radial strip sensors has the dimensions:
- X: the larger trapezoid base
- Y: length of the trapezoid
- Z: sensor thickness
Warning: While the actual sensor wrapper is build as a trapezoid, the wrapper referred to by this function is rectangular
Reimplements: allpix::DetectorModel::getSize
function getStripSize
inline ROOT::Math::XYVector getStripSize(
unsigned int row
) const
Returns the dimensions of a strip in a given row.
Parameters:
- row Strip row (y-coordinate)
Return: Dimensions of a strip in a given row
Note: For radial strip models the pixel size is the size of the smallest rectangle circumscribed around the trapezoidal strip in a given row
function isWithinSensor
virtual bool isWithinSensor(
const ROOT::Math::XYZPoint & position
) const override
Returns if a local position is within the sensitive device.
Parameters:
- position Position in local coordinates of the detector model
Return: True if a local position is within the sensor, false otherwise
Reimplements: allpix::DetectorModel::isWithinSensor
function isOnSensorBoundary
virtual bool isOnSensorBoundary(
const ROOT::Math::XYZPoint & local_pos
) const override
Returns if a local position is on the sensor boundary.
Parameters:
- local_pos Position in local coordinates of the detector model
Return: True if a local position is on the sensor boundary, false otherwise
Reimplements: allpix::DetectorModel::isOnSensorBoundary
function getSensorIntercept
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).
Parameters:
- inside Position before the step, inside the sensor volume
- outside Position after the step, outside the sensor volume
Exceptions:
- std::invalid_argument if no intersection of track segment with sensor volume can be found
Return: Exit point of the sensor in local coordinates
Note: This method currently only interpolates the z coordinate between the last two points and returns the last position inside otherwise
Reimplements: allpix::DetectorModel::getSensorIntercept
function isWithinMatrix
virtual bool isWithinMatrix(
const Pixel::Index & strip_index
) const override
Returns if a strip index is within the grid of strips defined for the device.
Parameters:
- strip_index Strip index to be checked
Return: True if strip_index is within the strip grid, false otherwise
Reimplements: allpix::DetectorModel::isWithinMatrix
function isWithinMatrix
inline virtual bool isWithinMatrix(
const int x,
const int y
) const override
Returns if a set of strip coordinates is within the grid of strips defined for the device.
Parameters:
- x X- (or column-) coordinate to be checked
- y Y- (or row-) coordinate to be checked
Return: True if strip coordinates are within the strip grid, false otherwise
Reimplements: allpix::DetectorModel::isWithinMatrix
function getPositionPolar
ROOT::Math::Polar2DPoint getPositionPolar(
const ROOT::Math::XYZPoint & local_pos
) const
Converts the local position in cartesian coordinates to polar coordinates.
Parameters:
- local_pos Position in local cartesian coordinates of the detector model
Return: Local position in polar coordinates
Note: The polar coordinates are defined in a system where:
- R is measured from the local coordinate center
- Phi is measured from the strip focal point
function getPositionCartesian
ROOT::Math::XYPoint getPositionCartesian(
const ROOT::Math::Polar2DPoint & polar_pos
) const
Converts the position in polar coordinates to cartesian coordinates in the local frame.
Parameters:
- polar_pos Position in local polar coordinates of the detector model
Return: Local position in cartesian coordinates
function getPixelCenter
virtual ROOT::Math::XYZPoint getPixelCenter(
int x,
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 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