HerdSoftware  0.3.2
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
Herd::SiliconDetectorGeoParams Class Reference

Data structure for single silicon layer geometry parameters. More...

#include <dataobjects/SiliconDetectorGeoParams.h>

Inheritance diagram for Herd::SiliconDetectorGeoParams:
Herd::TrackingDetectorGeoParams

Classes

struct  WaferLookupTable
 Internal lookup table used to speedup WaferID queries as function of position. More...
 

Public Member Functions

 SiliconDetectorGeoParams ()
 Default constructor. More...
 
 SiliconDetectorGeoParams (RefFrame::Side dside, size_t layerNumber, RefFrame::Direction stripMainSegm)
 Construct a new SiliconDetectorGeoParams object. More...
 
 ~SiliconDetectorGeoParams () override=default
 Virtual destructor. More...
 
size_t NWafers () const
 Get the total number of wafers in a single layer. More...
 
float StripPitch () const
 Get strip pitch.Calls ChannelPitch. Kept for backwards compatibility. More...
 
int NStripsPerLadder () const
 Number of strips for each ladder. More...
 
float FirstStripPosition () const
 Get distance of first strip from wafer edge. More...
 
const AxesArray< int > & NWafersPerLadder () const
 Get the number of wafers that make up a ladder. This is intended as number of wafers along each direction, and basically defines the ladder orientation. As a convention the number of wafers in the normal plane direction is one. More...
 
const AxesArray< int > & NLadders () const
 Get the number of ladder that make up a layer. This is intended as number of ladders along each direction. As a convention the number of ladders in the normal plane direction is one. More...
 
const AxesArray< float > & WaferSize () const
 Get the dimensions of the single wafer. More...
 
Point ElementPosition (unsigned int volID) const override
 Get position of a given strip. More...
 
Point StripPosition (unsigned int volID) const
 Get position of a given strip. More...
 
const PointWaferPosition (unsigned int volID) const
 Get position of a given wafer in layer. More...
 
Point LadderPosition (unsigned int ladderID) const
 Get position of a given ladder. More...
 
std::pair< RefFrame::Direction, RefFrame::DirectionStripSegmentationDirections () const
 Return the segmentation directions of the silicon strips. More...
 
std::pair< RefFrame::Direction, RefFrame::DirectionWaferSegmentationDirections () const
 Return the segmentation directions of the silicon Wafers. More...
 
std::pair< RefFrame::Direction, RefFrame::DirectionLadderSegmentationDirections () const
 Return the segmentation directions of the silicon Ladders. More...
 
unsigned int LadderIDFromStripID (unsigned int stripID) const
 Retrieves the volume ID of the ladder containing the strip with the given volumeID. More...
 
unsigned int LadderIDFromWaferID (unsigned int waferID) const
 Retrieves the volume ID of the ladder containing the wafer with the given volumeID. More...
 
std::pair< unsigned int, unsigned int > WaferIDsFromLadderID (unsigned int ladderID) const
 Retrieves the volume ID of the first and last wafers contained in the ladder with the given volumeID. More...
 
std::pair< unsigned int, unsigned int > StripIDsFromLadderID (unsigned int ladderID) const
 Retrieves the volume ID of the first and last strip contained in the ladder with the given volumeID. More...
 
unsigned int StripIDOnLadder (unsigned int stripID) const
 Returns the strip ID on ladder. More...
 
unsigned int WaferID (const Point &position) const
 Utility function to get waferID from a set of coordinates. More...
 
unsigned int ElementID (const Point &position) const override
 Utility function to get volumeID from a set of coordinates. Reimplemented in derived classes. More...
 
unsigned int StripID (const Point &position) const
 Utility function to get stripID from a set of coordinates. Calls ElementID. More...
 
void SetSideAndStripMainSegmDir (RefFrame::Side dside, RefFrame::Direction segmDir)
 Set the detector side and the main segmentation direction for strips. Calls SetSideAndMainSegmDir. Kept for backwards compatibility. More...
 
void SetSideAndMainSegmDir (RefFrame::Side dside, RefFrame::Direction segmDir) override
 Set the detector side and the main segmentation direction for channels. More...
 
void SetStripPitch (float pitch)
 Set the strip pitch. More...
 
void SetNStripsPerLadder (int nStrips)
 Set the number of strips per ladder. More...
 
void SetNWafersPerLadder (AxesArray< int > nWafers)
 Set the number of wafers in each ladder along each axis. More...
 
void SetNLadders (AxesArray< int > nLadders)
 Set the number of ladders along each axis. More...
 
void SetWaferSize (const AxesArray< float > &sizes)
 Set the wafer sizes along the three axes. More...
 
void SetWaferPosition (size_t waferID, Point position)
 Set the wafer position for a given wafer. More...
 
- Public Member Functions inherited from Herd::TrackingDetectorGeoParams
 TrackingDetectorGeoParams ()
 Default constructor. More...
 
virtual ~TrackingDetectorGeoParams ()=default
 Virtual destructor. More...
 
virtual const RefFrame::SideSide () const
 Return the detector side this layer is in. More...
 
virtual size_t LayerNumber () const
 Return the layer number for this layer in its detector. More...
 
virtual bool HasTungsten () const
 Check if layer is preceded by tungsten plane. More...
 
float TungstenThickness () const
 Get the tungsten layer thickness. More...
 
virtual float ElementPitch () const
 Get element pitch. More...
 
virtual RefFrame::Direction NormalDirection () const
 Get the normal direction to the detector. More...
 
virtual std::pair< RefFrame::Direction, RefFrame::DirectionSegmentationDirections () const
 Return the segmentation directions of the tracking elements. More...
 
virtual void SetHasTungsten (bool value)
 Set the tungsten flag. More...
 
virtual void SetTungstenThickness (float value)
 Set the tungsten plane thickness. More...
 

Protected Member Functions

void UpdateLUT () const
 Position of all the Si wafers. More...
 

Protected Attributes

struct Herd::SiliconDetectorGeoParams::WaferLookupTable m_waferLUT
 
- Protected Attributes inherited from Herd::TrackingDetectorGeoParams
RefFrame::Side _side
 
size_t _layerNumber
 Detector side. More...
 
RefFrame::Direction _normalDir
 Layer number. More...
 
RefFrame::Direction _mainSegmDir
 Normal direction. More...
 
RefFrame::Direction _secSegmDir
 Main segmentation direction for elements. More...
 
float _elementPitch
 Secondary segmentation direction for elements. More...
 
bool _hasTungsten
 Element pitch. More...
 
float _tungstenThickness
 True if layer is preceded by a tungsten plane. More...
 

Private Attributes

float _firstStripPos
 
int _nStripsPerLadder
 Position of the first strip w.r.t the left border of the wafer [cm];. More...
 
AxesArray< float > _waferSize
 Number of strips in each wafer. More...
 
AxesArray< int > _nWafersPerLadder
 Dimensions of a Si wafer along the three axes. More...
 
AxesArray< int > _nLadders
 Number of wafers in each ladder along the three axes. More...
 
std::vector< Point_waferPos
 Number of ladders in each wafer along the three axes. More...
 

Detailed Description

Data structure for single silicon layer geometry parameters.

Constructor & Destructor Documentation

◆ SiliconDetectorGeoParams() [1/2]

Herd::SiliconDetectorGeoParams::SiliconDetectorGeoParams ( )
inline

Default constructor.

◆ SiliconDetectorGeoParams() [2/2]

Herd::SiliconDetectorGeoParams::SiliconDetectorGeoParams ( RefFrame::Side  dside,
size_t  layerNumber,
RefFrame::Direction  stripMainSegm 
)

Construct a new SiliconDetectorGeoParams object.

Parameters
dsideThe detector side.
stripMainSegmThe main segmentation direction for strips.

◆ ~SiliconDetectorGeoParams()

Herd::SiliconDetectorGeoParams::~SiliconDetectorGeoParams ( )
overridedefault

Virtual destructor.

Member Function Documentation

◆ ElementID()

unsigned int Herd::SiliconDetectorGeoParams::ElementID ( const Point position) const
overridevirtual

Utility function to get volumeID from a set of coordinates. Reimplemented in derived classes.

Parameters
positionThe coordinates of the point (normal coordinate is ignored).
Returns
The ID of the element containing the point. If the position is not on any element, returns defaultValue<unsigned int>.

Implements Herd::TrackingDetectorGeoParams.

◆ ElementPosition()

Point Herd::SiliconDetectorGeoParams::ElementPosition ( unsigned int  volID) const
overridevirtual

Get position of a given strip.

Parameters
stripIDThe unique ID of the strip.
Returns
the strip position.

Implements Herd::TrackingDetectorGeoParams.

◆ FirstStripPosition()

float Herd::SiliconDetectorGeoParams::FirstStripPosition ( ) const
inline

Get distance of first strip from wafer edge.

Returns
first strip position

◆ LadderIDFromStripID()

unsigned int Herd::SiliconDetectorGeoParams::LadderIDFromStripID ( unsigned int  stripID) const

Retrieves the volume ID of the ladder containing the strip with the given volumeID.

Parameters
stripIDThe volumeID of the strip.
Returns
The volumeID of the ladder containing the strip.

◆ LadderIDFromWaferID()

unsigned int Herd::SiliconDetectorGeoParams::LadderIDFromWaferID ( unsigned int  waferID) const

Retrieves the volume ID of the ladder containing the wafer with the given volumeID.

Parameters
waferIDThe volumeID of the wafer.
Returns
The volumeID of the ladder containing the wafer.

◆ LadderPosition()

Point Herd::SiliconDetectorGeoParams::LadderPosition ( unsigned int  ladderID) const

Get position of a given ladder.

Parameters
ladderIDThe unique ID of the ladder.
Returns
the ladder position.

◆ LadderSegmentationDirections()

std::pair< RefFrame::Direction, RefFrame::Direction > Herd::SiliconDetectorGeoParams::LadderSegmentationDirections ( ) const

Return the segmentation directions of the silicon Ladders.

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 the silicon strip the main segmentation direction is the natural one defined by the strip orientation.

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

◆ NLadders()

const AxesArray<int>& Herd::SiliconDetectorGeoParams::NLadders ( ) const
inline

Get the number of ladder that make up a layer. This is intended as number of ladders along each direction. As a convention the number of ladders in the normal plane direction is one.

Returns
ladder orientation in the plane

◆ NStripsPerLadder()

int Herd::SiliconDetectorGeoParams::NStripsPerLadder ( ) const
inline

Number of strips for each ladder.

Returns
number of strips per ladder

◆ NWafers()

size_t Herd::SiliconDetectorGeoParams::NWafers ( ) const
inline

Get the total number of wafers in a single layer.

Returns
const size_t nWafers

◆ NWafersPerLadder()

const AxesArray<int>& Herd::SiliconDetectorGeoParams::NWafersPerLadder ( ) const
inline

Get the number of wafers that make up a ladder. This is intended as number of wafers along each direction, and basically defines the ladder orientation. As a convention the number of wafers in the normal plane direction is one.

Returns
wafers orientation in a ladder

◆ SetNLadders()

void Herd::SiliconDetectorGeoParams::SetNLadders ( AxesArray< int >  nLadders)

Set the number of ladders along each axis.

The value for the orthogonal axis must be 1.

Parameters
nLaddersThe number of ladders along each direction
Exceptions
std::runtime_errorif the number of ladders along the orthogonal direction is not 1.

◆ SetNStripsPerLadder()

void Herd::SiliconDetectorGeoParams::SetNStripsPerLadder ( int  nStrips)

Set the number of strips per ladder.

Must be called after SetSideAndStripMainSegmDir and SetWaferSize. This method computes and sets also the strip pitch.

Parameters
nStripsThe number of strips per ladder.
Exceptions
std::runtime_errorif this method is called before SetSideAndStripMainSegmDir or SetWaferSize.
See also
FirstStripPosition

◆ SetNWafersPerLadder()

void Herd::SiliconDetectorGeoParams::SetNWafersPerLadder ( AxesArray< int >  nWafers)

Set the number of wafers in each ladder along each axis.

Must be called after SetSideAndStripMainSegmDir. The number of wafers must be 1 along the normal and along the strip main segmentation direction.

Parameters
nWafersThe number of wafers
Exceptions
std::runtime_errorif this method is called before SetSideAndStripMainSegmDir.
std::runtime_errorif the number of wafers along the orthogonal direction and along the strip main segmentation direction is not 1.

◆ SetSideAndMainSegmDir()

void Herd::SiliconDetectorGeoParams::SetSideAndMainSegmDir ( RefFrame::Side  dside,
RefFrame::Direction  segmDir 
)
overridevirtual

Set the detector side and the main segmentation direction for channels.

Parameters
dsideThe side.
segmDirthe main segmentation direction for channels.

Implements Herd::TrackingDetectorGeoParams.

◆ SetSideAndStripMainSegmDir()

void Herd::SiliconDetectorGeoParams::SetSideAndStripMainSegmDir ( RefFrame::Side  dside,
RefFrame::Direction  segmDir 
)
inline

Set the detector side and the main segmentation direction for strips. Calls SetSideAndMainSegmDir. Kept for backwards compatibility.

Parameters
dsideThe side.
segmDirthe main segmentation direction for strips.

◆ SetStripPitch()

void Herd::SiliconDetectorGeoParams::SetStripPitch ( float  pitch)

Set the strip pitch.

Must be called after SetSideAndStripMainSegmDir and SetWaferSize. This method computes and sets also the position of the first strip.

Parameters
pitchthe strip pitch [cm].
Exceptions
std::runtime_errorif this method is called before SetSideAndStripMainSegmDir or SetWaferSize.
See also
FirstStripPosition

◆ SetWaferPosition()

void Herd::SiliconDetectorGeoParams::SetWaferPosition ( size_t  waferID,
Point  position 
)
inline

Set the wafer position for a given wafer.

See the wiki page for the wafer numbering convention.

Parameters
waferID
position

◆ SetWaferSize()

void Herd::SiliconDetectorGeoParams::SetWaferSize ( const AxesArray< float > &  sizes)
inline

Set the wafer sizes along the three axes.

Must be called before SetStripPitch and SetNStripsPerLadder.

Parameters
sizesthe size of the wafer along each axis [cm].

◆ StripID()

unsigned int Herd::SiliconDetectorGeoParams::StripID ( const Point position) const
inline

Utility function to get stripID from a set of coordinates. Calls ElementID.

This method is just a more descriptive name for ElementID.

Parameters
positionThe coordinates of the point (normal coordinate is ignored).
Returns
The ID of the strip containing the point. If the position is not on any strip, returns defaultValue<unsigned int>.

◆ StripIDOnLadder()

unsigned int Herd::SiliconDetectorGeoParams::StripIDOnLadder ( unsigned int  stripID) const

Returns the strip ID on ladder.

This method computes the relative strip ID on the ladder for the given strip. This will return 0 for the first strip of the ladder etc.

Parameters
stripIDThe absolute strip ID.
Returns
The strip ID relative to the ladder.

◆ StripIDsFromLadderID()

std::pair< unsigned int, unsigned int > Herd::SiliconDetectorGeoParams::StripIDsFromLadderID ( unsigned int  ladderID) const

Retrieves the volume ID of the first and last strip contained in the ladder with the given volumeID.

Parameters
ladderIDThe volumeID of the ladder.
Returns
The volumeIDs of the first and last strip contained in the ladder.

◆ StripPitch()

float Herd::SiliconDetectorGeoParams::StripPitch ( ) const
inline

Get strip pitch.Calls ChannelPitch. Kept for backwards compatibility.

Returns
strip pitch

◆ StripPosition()

Point Herd::SiliconDetectorGeoParams::StripPosition ( unsigned int  volID) const
inline

Get position of a given strip.

Parameters
stripIDThe unique ID of the strip.
Returns
the strip position.

◆ StripSegmentationDirections()

std::pair<RefFrame::Direction, RefFrame::Direction> Herd::SiliconDetectorGeoParams::StripSegmentationDirections ( ) const
inline

Return the segmentation directions of the silicon strips.

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 the silicon strip the main segmentation direction is the natural one defined by the strip orientation.

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

◆ UpdateLUT()

void Herd::SiliconDetectorGeoParams::UpdateLUT ( ) const
protected

Position of all the Si wafers.

◆ WaferID()

unsigned int Herd::SiliconDetectorGeoParams::WaferID ( const Point position) const

Utility function to get waferID from a set of coordinates.

Parameters
positionThe coordinates of the point (normal coordinate is ignored).
Returns
The ID of the wafer containing the point. If the position is not on any Wafer, returns defaultValue<unsigned int>.

◆ WaferIDsFromLadderID()

std::pair< unsigned int, unsigned int > Herd::SiliconDetectorGeoParams::WaferIDsFromLadderID ( unsigned int  ladderID) const

Retrieves the volume ID of the first and last wafers contained in the ladder with the given volumeID.

Parameters
ladderIDThe volumeID of the ladder.
Returns
The volumeIDs of the first and last wafer contained in the ladder.

◆ WaferPosition()

const Point& Herd::SiliconDetectorGeoParams::WaferPosition ( unsigned int  volID) const
inline

Get position of a given wafer in layer.

Parameters
volIDThe wafer ID
Returns
const Point& position

◆ WaferSegmentationDirections()

std::pair< RefFrame::Direction, RefFrame::Direction > Herd::SiliconDetectorGeoParams::WaferSegmentationDirections ( ) const

Return the segmentation directions of the silicon Wafers.

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 the silicon strip the main segmentation direction is the natural one defined by the strip orientation.

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

◆ WaferSize()

const AxesArray<float>& Herd::SiliconDetectorGeoParams::WaferSize ( ) const
inline

Get the dimensions of the single wafer.

Returns
wafer dimensions

Member Data Documentation

◆ _firstStripPos

float Herd::SiliconDetectorGeoParams::_firstStripPos
private

◆ _nLadders

AxesArray<int> Herd::SiliconDetectorGeoParams::_nLadders
private

Number of wafers in each ladder along the three axes.

◆ _nStripsPerLadder

int Herd::SiliconDetectorGeoParams::_nStripsPerLadder
private

Position of the first strip w.r.t the left border of the wafer [cm];.

◆ _nWafersPerLadder

AxesArray<int> Herd::SiliconDetectorGeoParams::_nWafersPerLadder
private

Dimensions of a Si wafer along the three axes.

◆ _waferPos

std::vector<Point> Herd::SiliconDetectorGeoParams::_waferPos
private

Number of ladders in each wafer along the three axes.

◆ _waferSize

AxesArray<float> Herd::SiliconDetectorGeoParams::_waferSize
private

Number of strips in each wafer.

◆ m_waferLUT

struct Herd::SiliconDetectorGeoParams::WaferLookupTable Herd::SiliconDetectorGeoParams::m_waferLUT
protected

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