HerdSoftware
0.4.0
|
Data structure for PSD geometry parameters. More...
#include <dataobjects/PsdGeoParams.h>
Classes | |
struct | PsdElement |
This struct is used only inside the object, it is public since Root can not save the object otherwise. More... | |
Public Member Functions | |
PsdGeoParams () | |
PsdGeoParams constructor. More... | |
PsdGeoParams (unsigned int nTotElements) | |
Constructor. More... | |
virtual | ~PsdGeoParams ()=default |
Virtual destructor More... | |
const Parallelepiped & | BoundingBox () const |
Get the layer bounding box for quick geometric checks (intersections and such). More... | |
const AxesArray< unsigned int > & | NElements () const |
Return the number of PSD elements along each segmentation axis. More... | |
unsigned int | NTotElements () const |
Return the total number of PSD elements. More... | |
RefFrame::Direction | NormalDirection () const |
Return the normal to the PSD surface, which points outside the full detector. More... | |
const AxesArray< float > & | Sizes () const |
Return the size of a PSD element, one value for each direction. Size in trapezoidal shapes refers to the half-height width. More... | |
const Point & | Position (unsigned int volID) const |
Return the position of a PSD element. More... | |
const CooArray< unsigned char > & | CooIndexes (unsigned int volID) const |
Return the indexes of a PSD element. More... | |
TrapezoidalPrism | ElementShape (unsigned int volID) const |
Utility function to get the shape in space of a particular tile/bar. More... | |
float | BaseAngle () const |
Return the base angle of the PSD elements. More... | |
bool | IsSmallerFaceOutward (unsigned int volID) |
Specifies if the PSD element has the smaller basis of the trapezoidal pointing outward. More... | |
std::pair< RefFrame::Direction, RefFrame::Direction > | SegmentationDirections () const |
Return the segmentation directions of the PSD tiles. More... | |
void | SetNElements (AxesArray< unsigned int > nElements) |
Set the number of PSD elements along each segmentation axis and compute the indexes. More... | |
void | SetNormal (RefFrame::Direction normal) |
Set the normal to the PSD surface, which points outside the full detector. More... | |
void | SetSizes (AxesArray< float > sizes) |
Set the size of a PSD element, one value for each direction. Size in trapezoidal shapes refers to the half-height width. More... | |
void | SetPosition (unsigned int volID, Point position) |
Set the position of a PSD element. More... | |
void | SetBaseAngle (float baseAngle) |
Set the base angle of the PSD elements. More... | |
void | SetSegmentationDirections (RefFrame::Direction mainSegmDir, RefFrame::Direction secSegmDir) |
Set the base segmentation directions of the PSD elements. More... | |
Private Member Functions | |
void | ComputeBoundingBox () const |
Bounding box for this layer, to use for quick intersection checks. More... | |
void | SetDefaultSegmDirections () |
Private Attributes | |
AxesArray< unsigned int > | _nElements |
Number of PSD elements along each segmentation axis. More... | |
AxesArray< float > | _sizes |
Size of a PSD element, one value for each direction. More... | |
RefFrame::Direction | _normal |
Normal of the PSD which points outside the full detector. More... | |
RefFrame::Direction | _mainSegmDir |
RefFrame::Direction | _secSegmDir |
Main segmentation direction for elements. More... | |
float | _baseAngle |
Secondary segmentation direction for elements. More... | |
std::vector< PsdElement > | _psdElements |
Vector of PSD elements, which include the position and the indexes. More... | |
bool | _bbIsValid {false} |
Parallelepiped | _boundingBox |
Flag to signal Bounding box must be recomputed. More... | |
Data structure for PSD geometry parameters.
|
inline |
PsdGeoParams constructor.
|
inline |
Constructor.
|
virtualdefault |
Virtual destructor
|
inline |
Return the base angle of the PSD elements.
const Parallelepiped & Herd::PsdGeoParams::BoundingBox | ( | ) | const |
Get the layer bounding box for quick geometric checks (intersections and such).
|
private |
Bounding box for this layer, to use for quick intersection checks.
|
inline |
Return the indexes of a PSD element.
volID | Volume identifier. |
TrapezoidalPrism Herd::PsdGeoParams::ElementShape | ( | unsigned int | volID | ) | const |
Utility function to get the shape in space of a particular tile/bar.
volID | The volume ID of the requested element. |
|
inline |
Specifies if the PSD element has the smaller basis of the trapezoidal pointing outward.
|
inline |
Return the number of PSD elements along each segmentation axis.
The returned array holds the number of sensitive elements along each segmentation axis (the segmentation axes are those orthogonal to the normal axis, e.g. X and Z are the segmentation axes for the lateral PSD on Y sides). When a PsdGeoParams object describes the top PSD nElements[RefFrame::Axis::Z] will be 0 since Z is the normal axis; for a lateral PSD on an X side side nElements[RefFrame::Axis::X] will be zero, and similarly for Y sides.
|
inline |
Return the normal to the PSD surface, which points outside the full detector.
|
inline |
Return the total number of PSD elements.
|
inline |
Return the position of a PSD element.
volID | Volume identifier. |
|
inline |
Return the segmentation directions of the PSD tiles.
The first element of the returned pair is the direction along which the volume ID increases by 1 (the so called "main segmentation direction"), the second element is the other segmentation direction (the "secondary segmentation direction"). For PSD made by bars, this would represent the direction on which the bar has shorter size, hence having a finer segmentation
std::runtime_error | if the normal direction setting is not valid. |
|
inline |
Set the base angle of the PSD elements.
baseAngle | base Angles in radians along the primary segmentation direction |
|
private |
void Herd::PsdGeoParams::SetNElements | ( | AxesArray< unsigned int > | nElements | ) |
Set the number of PSD elements along each segmentation axis and compute the indexes.
This method must be used after setting the normal, otherwise it can not compute the indexes
nElements | the number of PSD elements along each segmentation axis. |
|
inline |
Set the normal to the PSD surface, which points outside the full detector.
normal | the normal to the PSD surface. |
|
inline |
Set the position of a PSD element.
volID | Volume identifier. |
position | the position of the PSD element. |
|
inline |
Set the base segmentation directions of the PSD elements.
mainSegmDir | Main segmentation direction for elements |
secSegmDir | Secondary segmentation direction for elements. |
|
inline |
Set the size of a PSD element, one value for each direction. Size in trapezoidal shapes refers to the half-height width.
sizes | the size of a PSD element in each direction. |
|
inline |
Return the size of a PSD element, one value for each direction. Size in trapezoidal shapes refers to the half-height width.
|
private |
Secondary segmentation direction for elements.
Base angles of the PSD elements
|
mutableprivate |
|
mutableprivate |
Flag to signal Bounding box must be recomputed.
|
private |
|
private |
Number of PSD elements along each segmentation axis.
|
private |
Normal of the PSD which points outside the full detector.
|
private |
Vector of PSD elements, which include the position and the indexes.
|
private |
Main segmentation direction for elements.
|
private |
Size of a PSD element, one value for each direction.