HerdSoftware  0.3.2
Classes | Public 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 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 Normal () const
 Return the normal to the PSD surface, which points outside the full detector. More...
 
std::pair< RefFrame::Direction, RefFrame::DirectionSegmentationDirections () const
 Return the segmentation directions of the PSD layer. 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...
 
const std::pair< float, float > & BaseAngles () 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...
 
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 SetBaseAngles (std::pair< float, float > baseAngles)
 Set the base angles of the PSD elements. More...
 

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...
 
std::pair< float, float > _baseAngles
 Base angles of the PSD elements. More...
 
std::vector< PsdElement_psdElements
 Vector of PSD elements, which include the position and the indexes. 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

◆ BaseAngles()

const std::pair<float, float>& Herd::PsdGeoParams::BaseAngles ( ) const
inline

Return the base angle of the PSD elements.

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

◆ 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.

◆ 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). For example, for bars PSD nElements[RefFrame::Axis::Y] is the number of bars along Y, while for a tiles PSD it is the number of tiles along Y. For top PSD nElements[RefFrame::Axis::Z] will be 0 since Z is the normal axis; for side PSD the PsdGeoParams object has to describe PSDs on X and Y sides, so both nElements[RefFrame::Axis::Y] and nElements[RefFrame::Axis::X] will be nonzero. However, it is intended that for each PSD the number of elements along the normal axis is 0.

Returns
the number of PSD elements along each segmentation axis.

◆ Normal()

RefFrame::Direction Herd::PsdGeoParams::Normal ( ) 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

Return the segmentation directions of the PSD layer.

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").

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

◆ SetBaseAngles()

void Herd::PsdGeoParams::SetBaseAngles ( std::pair< float, float >  baseAngles)
inline

Set the base angles of the PSD elements.

Parameters
baseAnglesbase Angles in radians along the segmentation directions

◆ 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
nElementsthe 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.

◆ 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

◆ _baseAngles

std::pair<float, float> Herd::PsdGeoParams::_baseAngles
private

Base angles of the PSD elements.

◆ _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.

◆ _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: