allpix::DetectorModel::Implant
Helper class to hold implant definitions for a detector model.
#include <DetectorModel.hpp>
Public Types
Name | |
---|---|
enum class | Type { FRONTSIDE, BACKSIDE} |
enum class | Shape { RECTANGLE, ELLIPSE} |
Public Functions
Name | |
---|---|
ROOT::Math::XYZVector | getOffset() const Get the offset of the implant with respect to the pixel center. |
ROOT::Math::RotationZ | getOrientation() const Get the implant orientation as rotation around its z-axis. |
ROOT::Math::XYZVector | getSize() const Get the size of the implant. |
Type | getType() const Return the type of the implant. |
Shape | getShape() const Return the shape of the implant. |
bool | contains(const ROOT::Math::XYZVector & position) const helper to calculate containment of points with this implant |
const Configuration & | getConfiguration() const Fetch the configuration of this implant. |
std::optional< ROOT::Math::XYZPoint > | intersect(const ROOT::Math::XYZVector & direction, const ROOT::Math::XYZPoint & position) const calculate intersection of line segment with implant. The first intersection in the given direction is returned. |
Friends
Name | |
---|---|
class | DetectorModel |
Public Types Documentation
enum Type
Enumerator | Value | Description |
---|---|---|
FRONTSIDE | ||
BACKSIDE |
enum Shape
Enumerator | Value | Description |
---|---|---|
RECTANGLE | ||
ELLIPSE |
Public Functions Documentation
function getOffset
inline ROOT::Math::XYZVector getOffset() const
Get the offset of the implant with respect to the pixel center.
Return: Implant offset
function getOrientation
inline ROOT::Math::RotationZ getOrientation() const
Get the implant orientation as rotation around its z-axis.
Return: Implant orientation
function getSize
inline ROOT::Math::XYZVector getSize() const
Get the size of the implant.
Return: Size of the implant
function getType
inline Type getType() const
Return the type of the implant.
Return: implant type
function getShape
inline Shape getShape() const
Return the shape of the implant.
Return: implant shape
function contains
bool contains(
const ROOT::Math::XYZVector & position
) const
helper to calculate containment of points with this implant
Parameters:
- position Position relative to the pixel center
Return: True if point lies within implant, false otherwise
function getConfiguration
inline const Configuration & getConfiguration() const
Fetch the configuration of this implant.
Return: Implant configuration
function intersect
std::optional< ROOT::Math::XYZPoint > intersect(
const ROOT::Math::XYZVector & direction,
const ROOT::Math::XYZPoint & position
) const
calculate intersection of line segment with implant. The first intersection in the given direction is returned.
Parameters:
- direction Direction vector of line
- position Position vector of line
Exceptions:
- std::invalid_argument if intersection calculation is not implemented for the implant type
Return: Closest intersection point with implant, std::nullopt if none could be found
Friends
friend DetectorModel
friend class DetectorModel(
DetectorModel
);
Updated on 2024-12-13 at 08:31:37 +0000