HerdSoftware
0.1.1
|
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 |
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.
Herd::SiliconDetectorChannelGeoInfo::SiliconDetectorChannelGeoInfo | ( | ) |
Default constructor.
|
virtualdefault |
Destructor.
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.
nStripsPerLadder | The total number of strips (readout+floating) in the ladder. |
firstReadoutStrip | The volume ID on the ladder of the first readout strip. |
readoutStripPeriod | The periodicity of the readout strips. |
nLadders | The total number of ladders in the layer. |
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.
stripVolumeID | The volume ID on the layer of the readout strip. |
Exception | if the given volume ID is not that of a readout strip. |
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).
stripVolumeID | The volume ID on the layer of the strip. |
|
inline |
Gets the volume ID on the ladder of the first readout strip.
The returned volume ID is relative to the ladder.
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.
stripVolumeID | The volume ID on the layer of the strip. |
|
inline |
Gets the total number of readout strips in the layer.
This corresponds to the number of channels (obviously).
|
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.
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
stripChannelID | The channel ID of the readout strip. |
Exception | if the given channel ID is not that of a readout strip. |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |