HerdSoftware  0.1.1
Public Member Functions | Private Attributes | List of all members
Herd::SiliconDetectorChannelGeoInfo Class Reference

Object managing the geometry of the Si readout strips in a single layer. More...

#include <dataobjects/SiliconDetectorChannelGeoInfo.h>

Public Member Functions

 SiliconDetectorChannelGeoInfo ()
 Default constructor. More...
 
virtual ~SiliconDetectorChannelGeoInfo ()=default
 Destructor. More...
 
 SiliconDetectorChannelGeoInfo (unsigned int nStripsPerLadder, unsigned int firstReadoutStrip, unsigned int readoutStripPeriod, unsigned int nLadders)
 Constructor. More...
 
bool IsReadoutStrip (unsigned int stripVolumeID)
 Checks if a strip is a readout one. More...
 
std::pair< unsigned int, unsigned int > ClosestChannelIDFromVolumeID (unsigned int stripVolumeID)
 Gets the closest left readout strip and the inter-readout position. More...
 
unsigned int ChannelIDFromVolumeID (unsigned int stripVolumeID)
 Gets the channel ID of a readout strip. More...
 
unsigned int VolumeIDFromChannelID (unsigned int stripChannelID)
 Gets the volume ID on the layer of a readout strip. More...
 
unsigned int FirstReadoutStrip ()
 Gets the volume ID on the ladder of the first readout strip. More...
 
unsigned int ReadoutStripPeriod ()
 Gets the readout period. More...
 
unsigned int NReadoutStrips ()
 Gets the total number of readout strips in the layer. More...
 

Private Attributes

unsigned int _nStripsPerLadder
 
unsigned int _nStrips
 
unsigned int _firstReadoutStrip
 
unsigned int _readoutStripPeriod
 
unsigned int _nReadoutStrips
 
unsigned int _nReadoutStripsPerLadder
 
unsigned int _volumeIDOnLadder
 

Detailed Description

Object managing the geometry of the Si readout strips in a single layer.

In silicon detectors, not all the strips are read out by the electronics. All the strips have a geometric identifier, but an identifier for the readout channel can be defined only for the strips that are actually read out.

This class manages the correspondence between the geometric IDs of the strips (the "volume IDs") and the IDs of the readout channels (the "channel IDs"). Currently it assumes that the strips are read with a given periodicity starting from a given first strip. For example, if each ladder has 9 strips read out with a period of 3 starting from strip 1 (relative to the ladder) the volume-channel correspondence for the ladder containing the 9 strips with volume IDs from M*9 to M*9+8 is:

*                              readout                 readout
*                                 |                       |
*                                 |       floating        |
*                                 |       |       |       |
*                                 V       V       V       V
*                      |--*-------o-------*-------*-------o-------*-------*-------o-------*--|
*
* volume ID (on layer)   M*9    M*9+1   M*9+2   M*9+3   M*9+4   M*9+5   M*9+6   M*9+7   M*9+8
* volume ID (on ladder)   0       1       2       3       4       5       6       7       8
* channel ID                     M*3                    M*3+1                   M*3+2
* 

Note: for the sake of clarity, M is not the ladder ID as would be returned by SiliconDetectorGeoParams::LadderIDFromStripID since the main segmentation directions for strips and ladders are different. See the data model description on the wiki for more information about this aspect, if needed.

Constructor & Destructor Documentation

◆ SiliconDetectorChannelGeoInfo() [1/2]

Herd::SiliconDetectorChannelGeoInfo::SiliconDetectorChannelGeoInfo ( )

Default constructor.

◆ ~SiliconDetectorChannelGeoInfo()

virtual Herd::SiliconDetectorChannelGeoInfo::~SiliconDetectorChannelGeoInfo ( )
virtualdefault

Destructor.

◆ SiliconDetectorChannelGeoInfo() [2/2]

Herd::SiliconDetectorChannelGeoInfo::SiliconDetectorChannelGeoInfo ( unsigned int  nStripsPerLadder,
unsigned int  firstReadoutStrip,
unsigned int  readoutStripPeriod,
unsigned int  nLadders 
)

Constructor.

The firstReadoutStrip argument sets the volume ID on the ladder of the first readout strip in the ladder.

The readoutStripPeriod argument sets the periodicity of the readout strips; for example, if set to 4 then 1 strip over 4 is a readout strip, meaning that 3 floating strips are present between two consecutive readout strips.

Parameters
nStripsPerLadderThe total number of strips (readout+floating) in the ladder.
firstReadoutStripThe volume ID on the ladder of the first readout strip.
readoutStripPeriodThe periodicity of the readout strips.
nLaddersThe total number of ladders in the layer.

Member Function Documentation

◆ ChannelIDFromVolumeID()

unsigned int Herd::SiliconDetectorChannelGeoInfo::ChannelIDFromVolumeID ( unsigned int  stripVolumeID)

Gets the channel ID of a readout strip.

This method returns the channel ID of the readout strip whose volume ID on the layer is passed as argument. Throws an exception if the given volume ID does not correspond to a readout strip.

Parameters
stripVolumeIDThe volume ID on the layer of the readout strip.
Returns
the channel ID of the readout strip.
Exceptions
Exceptionif the given volume ID is not that of a readout strip.

◆ ClosestChannelIDFromVolumeID()

std::pair< unsigned int, unsigned int > Herd::SiliconDetectorChannelGeoInfo::ClosestChannelIDFromVolumeID ( unsigned int  stripVolumeID)

Gets the closest left readout strip and the inter-readout position.

Given a volume ID on the layer of a strip, this method calculates the closest implant strip on the left, and derives the inter-readout strip position (returns 0 for a readout strip).

Parameters
stripVolumeIDThe volume ID on the layer of the strip.
Returns
a pair of integers, first is closest ChannelID of readout on the left, second is the inter-readout strip position.

◆ FirstReadoutStrip()

unsigned int Herd::SiliconDetectorChannelGeoInfo::FirstReadoutStrip ( )
inline

Gets the volume ID on the ladder of the first readout strip.

The returned volume ID is relative to the ladder.

Returns
the volume ID of the first readout strip.

◆ IsReadoutStrip()

bool Herd::SiliconDetectorChannelGeoInfo::IsReadoutStrip ( unsigned int  stripVolumeID)

Checks if a strip is a readout one.

Given a volume ID on the layer of a strip, this method checks if it is a readout strip.

Parameters
stripVolumeIDThe volume ID on the layer of the strip.
Returns
true if the strip is a readout one.

◆ NReadoutStrips()

unsigned int Herd::SiliconDetectorChannelGeoInfo::NReadoutStrips ( )
inline

Gets the total number of readout strips in the layer.

This corresponds to the number of channels (obviously).

Returns
The total number of readout strips in the layer.

◆ ReadoutStripPeriod()

unsigned int Herd::SiliconDetectorChannelGeoInfo::ReadoutStripPeriod ( )
inline

Gets the readout period.

One strip per period is read out, i.e. if the period is 4 then 1 strip over 4 is read out.

Returns
the readout period.

◆ VolumeIDFromChannelID()

unsigned int Herd::SiliconDetectorChannelGeoInfo::VolumeIDFromChannelID ( unsigned int  stripChannelID)

Gets the volume ID on the layer of a readout strip.

This method returns the volume ID on the layer of the readout strip whose channel ID is passed as argument. Throws an exception if the given channel ID does not correspond to a readout strip (e.g. if the given channel ID is greater than

Parameters
stripChannelIDThe channel ID of the readout strip.
Returns
the volume ID of the readout strip.
Exceptions
Exceptionif the given channel ID is not that of a readout strip.

Member Data Documentation

◆ _firstReadoutStrip

unsigned int Herd::SiliconDetectorChannelGeoInfo::_firstReadoutStrip
private

◆ _nReadoutStrips

unsigned int Herd::SiliconDetectorChannelGeoInfo::_nReadoutStrips
private

◆ _nReadoutStripsPerLadder

unsigned int Herd::SiliconDetectorChannelGeoInfo::_nReadoutStripsPerLadder
private

◆ _nStrips

unsigned int Herd::SiliconDetectorChannelGeoInfo::_nStrips
private

◆ _nStripsPerLadder

unsigned int Herd::SiliconDetectorChannelGeoInfo::_nStripsPerLadder
private

◆ _readoutStripPeriod

unsigned int Herd::SiliconDetectorChannelGeoInfo::_readoutStripPeriod
private

◆ _volumeIDOnLadder

unsigned int Herd::SiliconDetectorChannelGeoInfo::_volumeIDOnLadder
private

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