HerdSoftware  0.4.0
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
Herd::PsdGeoParams Class Reference

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 ParallelepipedBoundingBox () 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 PointPosition (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::DirectionSegmentationDirections () 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...
 

Detailed Description

Data structure for PSD geometry parameters.

Constructor & Destructor Documentation

◆ PsdGeoParams() [1/2]

Herd::PsdGeoParams::PsdGeoParams ( )
inline

PsdGeoParams constructor.

◆ PsdGeoParams() [2/2]

Herd::PsdGeoParams::PsdGeoParams ( unsigned int  nTotElements)
inline

Constructor.

◆ ~PsdGeoParams()

virtual Herd::PsdGeoParams::~PsdGeoParams ( )
virtualdefault

Virtual destructor

Member Function Documentation

◆ BaseAngle()

float Herd::PsdGeoParams::BaseAngle ( ) const
inline

Return the base angle of the PSD elements.

Returns
the angle (in radians) of the PSD elements along the primary segmentation direction

◆ BoundingBox()

const Parallelepiped & Herd::PsdGeoParams::BoundingBox ( ) const

Get the layer bounding box for quick geometric checks (intersections and such).

Returns
a Parallelepiped object approximating the layer volume.

◆ ComputeBoundingBox()

void Herd::PsdGeoParams::ComputeBoundingBox ( ) const
private

Bounding box for this layer, to use for quick intersection checks.

◆ CooIndexes()

const CooArray<unsigned char>& Herd::PsdGeoParams::CooIndexes ( unsigned int  volID) const
inline

Return the indexes of a PSD element.

Parameters
volIDVolume identifier.
Returns
the indexes of the PSD element.

◆ ElementShape()

TrapezoidalPrism Herd::PsdGeoParams::ElementShape ( unsigned int  volID) const

Utility function to get the shape in space of a particular tile/bar.

Parameters
volIDThe volume ID of the requested element.
Returns
A TrapezoidalPrism describing the sensitive element and its position in 3D space.

◆ IsSmallerFaceOutward()

bool Herd::PsdGeoParams::IsSmallerFaceOutward ( unsigned int  volID)
inline

Specifies if the PSD element has the smaller basis of the trapezoidal pointing outward.

Returns
true if the small basis is pointing outward, false otherwise

◆ NElements()

const AxesArray<unsigned int>& Herd::PsdGeoParams::NElements ( ) const
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.

Returns
the number of PSD elements along each segmentation axis.

◆ NormalDirection()

RefFrame::Direction Herd::PsdGeoParams::NormalDirection ( ) const
inline

Return the normal to the PSD surface, which points outside the full detector.

Returns
the normal to the PSD surface.

◆ NTotElements()

unsigned int Herd::PsdGeoParams::NTotElements ( ) const
inline

Return the total number of PSD elements.

Returns
the total number of PSD elements.

◆ Position()

const Point& Herd::PsdGeoParams::Position ( unsigned int  volID) const
inline

Return the position of a PSD element.

Parameters
volIDVolume identifier.
Returns
the position of the PSD element.

◆ SegmentationDirections()

std::pair<RefFrame::Direction, RefFrame::Direction> Herd::PsdGeoParams::SegmentationDirections ( ) const
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

Returns
the two segmentation directions.
Exceptions
std::runtime_errorif the normal direction setting is not valid.

◆ SetBaseAngle()

void Herd::PsdGeoParams::SetBaseAngle ( float  baseAngle)
inline

Set the base angle of the PSD elements.

Parameters
baseAnglebase Angles in radians along the primary segmentation direction

◆ SetDefaultSegmDirections()

void Herd::PsdGeoParams::SetDefaultSegmDirections ( )
private

◆ SetNElements()

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

Parameters
nElementsthe number of PSD elements along each segmentation axis.

◆ SetNormal()

void Herd::PsdGeoParams::SetNormal ( RefFrame::Direction  normal)
inline

Set the normal to the PSD surface, which points outside the full detector.

Parameters
normalthe normal to the PSD surface.

◆ SetPosition()

void Herd::PsdGeoParams::SetPosition ( unsigned int  volID,
Point  position 
)
inline

Set the position of a PSD element.

Parameters
volIDVolume identifier.
positionthe position of the PSD element.

◆ SetSegmentationDirections()

void Herd::PsdGeoParams::SetSegmentationDirections ( RefFrame::Direction  mainSegmDir,
RefFrame::Direction  secSegmDir 
)
inline

Set the base segmentation directions of the PSD elements.

Parameters
mainSegmDirMain segmentation direction for elements
secSegmDirSecondary segmentation direction for elements.

◆ SetSizes()

void Herd::PsdGeoParams::SetSizes ( AxesArray< float >  sizes)
inline

Set the size of a PSD element, one value for each direction. Size in trapezoidal shapes refers to the half-height width.

Parameters
sizesthe size of a PSD element in each direction.

◆ Sizes()

const AxesArray<float>& Herd::PsdGeoParams::Sizes ( ) const
inline

Return the size of a PSD element, one value for each direction. Size in trapezoidal shapes refers to the half-height width.

Returns
the size of a PSD element in each direction.

Member Data Documentation

◆ _baseAngle

float Herd::PsdGeoParams::_baseAngle
private

Secondary segmentation direction for elements.

Base angles of the PSD elements

◆ _bbIsValid

bool Herd::PsdGeoParams::_bbIsValid {false}
mutableprivate

◆ _boundingBox

Parallelepiped Herd::PsdGeoParams::_boundingBox
mutableprivate

Flag to signal Bounding box must be recomputed.

◆ _mainSegmDir

RefFrame::Direction Herd::PsdGeoParams::_mainSegmDir
private

◆ _nElements

AxesArray<unsigned int> Herd::PsdGeoParams::_nElements
private

Number of PSD elements along each segmentation axis.

◆ _normal

RefFrame::Direction Herd::PsdGeoParams::_normal
private

Normal of the PSD which points outside the full detector.

◆ _psdElements

std::vector<PsdElement> Herd::PsdGeoParams::_psdElements
private

Vector of PSD elements, which include the position and the indexes.

◆ _secSegmDir

RefFrame::Direction Herd::PsdGeoParams::_secSegmDir
private

Main segmentation direction for elements.

◆ _sizes

AxesArray<float> Herd::PsdGeoParams::_sizes
private

Size of a PSD element, one value for each direction.


The documentation for this class was generated from the following files: