HerdSoftware
0.4.0
|
Data structure for single silicon layer geometry parameters. More...
#include <dataobjects/ScdGeoParams.h>
Classes | |
struct | WaferLookupTable |
Internal lookup table used to speedup WaferID queries as function of position. More... | |
Public Types | |
enum | BondingType { BondingType::NONE, BondingType::STRAIGHT, BondingType::ZIGZAG } |
Enum class for the different bonding types. More... | |
Public Member Functions | |
ScdGeoParams () | |
Default constructor. More... | |
ScdGeoParams (RefFrame::Side dside, size_t layerNumber, RefFrame::Direction stripMainSegm) | |
Construct a new ScdGeoParams object. More... | |
~ScdGeoParams () override=default | |
Virtual destructor More... | |
const Parallelepiped & | BoundingBox () const |
Get the layer bounding box for quick geometric checks (intersections and such). More... | |
size_t | NWafers () const |
Get the total number of wafers in a single la_boundingBoxyer. More... | |
size_t | NTotElements () const |
Get the total number of strips (sensitive elements) in a single layer. More... | |
float | StripPitch () const |
Get strip pitch.Calls ChannelPitch. Kept for backwards compatibility. More... | |
int | NStripsPerWafer () const |
Number of strips for each wafer. More... | |
int | NStripsPerBondedLadder () const |
Number of strips for each bonded ladder. More... | |
int | NStripsPerPhysLadder () const |
Number of strips for each physical ladder. More... | |
float | FirstStripPosition () const |
Get distance of first strip from wafer edge. More... | |
const AxesArray< int > & | NWafersPerBondedLadder () const |
Get the number of wafers that make up a ladder. More... | |
const AxesArray< int > & | NBondedLadders () const |
Get the number of ladders that make up a layer. More... | |
const AxesArray< int > & | NWafersPerPhysLadder () const |
Get the number of wafers that make up a physical ladder. More... | |
const AxesArray< int > & | NPhysLadders () const |
Get the number of physical ladders that make up a layer. 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 Point & | WaferPosition (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::Direction > | StripSegmentationDirections () const |
Return the segmentation directions of the silicon strips. More... | |
std::pair< RefFrame::Direction, RefFrame::Direction > | WaferSegmentationDirections () const |
Return the segmentation directions of the silicon Wafers. More... | |
std::pair< RefFrame::Direction, RefFrame::Direction > | LadderSegmentationDirections () 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... | |
unsigned int | WaferIDFromStripID (unsigned int stripID) const |
Retrieves the ID of the wafer containing the given unbonded strip. 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... | |
std::optional< unsigned int > | WaferID (const Point &position) const |
Utility function to get waferID from a set of coordinates. More... | |
std::optional< unsigned int > | ElementID (const Point &position) const override |
Utility function to get volumeID from a set of coordinates. Reimplemented in derived classes. More... | |
std::optional< unsigned int > | StripID (const Point &position) const |
Utility function to get stripID from a set of coordinates. Calls ElementID. More... | |
Parallelepiped | ElementShape (size_t volID) const |
Utility function to get the shape in space of a particular strip. More... | |
BondingType | LadderBonding () const |
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 | SetNStripsPerWafer (int nStrips) |
Set the number of strips per wafer. More... | |
void | SetBondedLadders (const AxesArray< int > &nLadders, const AxesArray< int > &nWafersPerLadder, BondingType bType) |
Set the ladders bonding. More... | |
void | SetPhysLadders (const AxesArray< int > &nLadders, const AxesArray< int > &nWafersPerLadder) |
Set the number of physical ladders and of wafers per physical ladder 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... | |
void | SetLadderNormalToStrips (bool value=true) |
Sets a flag for ladders normal to strips. More... | |
![]() | |
TrackingDetectorGeoParams () | |
Default constructor. More... | |
virtual | ~TrackingDetectorGeoParams ()=default |
Virtual destructor More... | |
virtual const RefFrame::Side & | Side () 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::Direction > | SegmentationDirections () 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 |
Protected Attributes | |
struct Herd::ScdGeoParams::WaferLookupTable | m_waferLUT |
! ROOT-transient More... | |
![]() | |
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 Member Functions | |
void | ComputeBoundingBox () const |
Number of physical ladders along the three axes. More... | |
void | SetLaddersHelper (const AxesArray< int > &nLadders, const AxesArray< int > &nWafersPerLadder, int type) |
Private Attributes | |
float | _firstStripPos |
int | _nStripsPerWafer |
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 > | _nWafersPerBondedLadder |
Dimensions of a Si wafer along the three axes. More... | |
AxesArray< int > | _nBondedLadders |
Number of wafers in each bonded ladder along the three axes. More... | |
std::vector< Point > | _waferPos |
Number of bonded ladders along the three axes. More... | |
bool | _bbIsValid {false} |
Position of all the Si wafers. More... | |
Parallelepiped | _boundingBox |
Flag to signal Bounding box must be recomputed. More... | |
BondingType | m_ladderBonding |
Bounding box for this layer, to use for quick intersection checks. More... | |
bool | m_ladderNormalToStrips |
Type of bonding applied to wafer strips of a ladder. More... | |
AxesArray< int > | _nWafersPerPhysLadder |
true if the strips are normal to the ladder More... | |
AxesArray< int > | _nPhysLadders |
Number of wafers in each physical ladder along the three axes. More... | |
Data structure for single silicon layer geometry parameters.
|
strong |
Herd::ScdGeoParams::ScdGeoParams | ( | ) |
Default constructor.
Herd::ScdGeoParams::ScdGeoParams | ( | RefFrame::Side | dside, |
size_t | layerNumber, | ||
RefFrame::Direction | stripMainSegm | ||
) |
Construct a new ScdGeoParams object.
dside | The detector side. |
layerNumber | The number of layers. |
stripMainSegm | The main segmentation direction for strips. |
|
overridedefault |
Virtual destructor
const Parallelepiped & Herd::ScdGeoParams::BoundingBox | ( | ) | const |
Get the layer bounding box for quick geometric checks (intersections and such).
|
private |
Number of physical ladders along the three axes.
|
overridevirtual |
Utility function to get volumeID from a set of coordinates. Reimplemented in derived classes.
position | The coordinates of the point (normal coordinate is ignored). |
Implements Herd::TrackingDetectorGeoParams.
|
overridevirtual |
Get position of a given strip.
volID | The unique ID of the strip. |
Implements Herd::TrackingDetectorGeoParams.
Parallelepiped Herd::ScdGeoParams::ElementShape | ( | size_t | volID | ) | const |
Utility function to get the shape in space of a particular strip.
volID | The volume ID of the requested strip. |
|
inline |
Get distance of first strip from wafer edge.
|
inline |
unsigned int Herd::ScdGeoParams::LadderIDFromStripID | ( | unsigned int | stripID | ) | const |
Retrieves the volume ID of the ladder containing the strip with the given volumeID.
stripID | The volumeID of the strip. |
unsigned int Herd::ScdGeoParams::LadderIDFromWaferID | ( | unsigned int | waferID | ) | const |
Retrieves the volume ID of the ladder containing the wafer with the given volumeID.
waferID | The volumeID of the wafer. |
Point Herd::ScdGeoParams::LadderPosition | ( | unsigned int | ladderID | ) | const |
Get position of a given ladder.
ladderID | The unique ID of the ladder. |
std::pair< RefFrame::Direction, RefFrame::Direction > Herd::ScdGeoParams::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.
std::runtime_error | if the normal direction setting is not valid. |
|
inline |
Get the number of ladders that make up a layer.
This is intended as number of ladders along each direction. Here "ladder" means a set of bonded wafers, which might or might not coincide with a physical ladder (i.e. a set of wafers mounted in the same ladder support) depending on whether the wafers are bonded or not, on the bonding scheme etc. As a convention the number of ladders in the normal plane direction is 1. When the wafers are not bonded the returned number of ladders is equal to the number of wafers, or in other words, each ladder is made of a single wafer.
|
inline |
Get the number of physical ladders that make up a layer.
This is intended as number of ladders along each direction. The difference with #NLadders() is that the latter returns the number of ladder made of bonded wafers (so for unbonded wafers it returns the number of wafers itself, and if a fancy bonding scheme is applied it might return a different value than this method).
|
inline |
Number of strips for each bonded ladder.
|
inline |
Number of strips for each physical ladder.
|
inline |
Number of strips for each wafer.
size_t Herd::ScdGeoParams::NTotElements | ( | ) | const |
Get the total number of strips (sensitive elements) in a single layer.
|
inline |
Get the total number of wafers in a single la_boundingBoxyer.
|
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. Here "ladder" means a set of bonded wafers, which might or might not coincide with a physical ladder (i.e. a set of wafers mounted in the same ladder support) depending on whether the wafers are bonded or not, on the bonding scheme etc. As a convention the number of wafers in the normal plane direction is one. When the wafers are not bonded the returned number of wafers per ladder is 1 in every direction, or in other words, each ladder is made of a single wafer.
|
inline |
Get the number of wafers that make up a physical ladder.
The returned values are the number of wafers which are physically present in a ladder. The difference with #NWafersPerLadder() is that the latter returns the number of wafers that are bonded into a ladder (so for unbonded wafers it returns 1, and if a fancy bonding scheme is applied it might return a different value than this method).
void Herd::ScdGeoParams::SetBondedLadders | ( | const AxesArray< int > & | nLadders, |
const AxesArray< int > & | nWafersPerLadder, | ||
BondingType | bType | ||
) |
Set the ladders bonding.
Must be called after SetPhysLadders. The total number of wafers along each direction as computed from the given parameters must coincide with the same number computed from number of physical ladders and of wafers per physical ladder. The number of ladders must be 1 along the normal axis. The number of wafers must be 1 along the normal and along the strip main segmentation axis.
nLadders | The number of ladders along each axis. |
nWafers | The number of wafers per ladder along each axis. |
bType | The bonding type. |
std::runtime_error | if this method is called before SetPhysLadders. |
std::runtime_error | if BondingType::NONE is set with a number of wafers per ladder different from 1. |
std::runtime_error | if the number of ladders along the orthogonal direction is not 1. |
std::runtime_error | if the number of wafers along the orthogonal axis and along the strip main segmentation axis is not 1. |
std::runtime_error | if the total number of wafers along each axis does not coincide with that computed from physical ladders parameters. |
|
inline |
Sets a flag for ladders normal to strips.
wafer * The segmentation direction for the strips are set by SetSideAndMainSegmDir, and the segmentation directions for the wafers and ladders are derived from strip directions. In the standard case the wafer strips are aligned with the ladder direction, to be bonded straightly, so strip main direction is the wafer and ladder secondary direction, and vice-versa. By calling this method the ladder will be flagged to be orthogonal to the strips, to be then bonded in a crossed fashion, so the ladders and wafers segmentation directions will be equal to the strips segmentation directions.
value | Flag for setting the strips orthogonal to the ladder. |
|
private |
void Herd::ScdGeoParams::SetNStripsPerWafer | ( | int | nStrips | ) |
Set the number of strips per wafer.
Must be called after SetSideAndStripMainSegmDir and SetWaferSize. This method computes and sets also the strip pitch.
nStrips | The number of strips per wafer. |
std::runtime_error | if this method is called before SetSideAndStripMainSegmDir or SetWaferSize. |
|
inline |
Set the number of physical ladders and of wafers per physical ladder along each axis.
Must be called after SetSideAndStripMainSegmDir. The number of ladders must be 1 along the normal axis. The number of wafers must be 1 along the normal and along the strip main segmentation axis. If the given parameters differ from the current values this method resets the information about ladder bonding, setting the bonding type to BondingType::NONE and the number of wafers per bonded ladder to 1.
nLadders | The number of ladders along each axis. |
nWafers | The number of wafers per ladder along each axis. |
std::runtime_error | if this method is called before SetSideAndStripMainSegmDir. |
std::runtime_error | if the number of ladders along the orthogonal direction is not 1. |
std::runtime_error | if the number of wafers along the orthogonal axis and along the strip main segmentation axis is not 1. |
|
overridevirtual |
Set the detector side and the main segmentation direction for channels.
dside | The side. |
segmDir | the main segmentation direction for channels. |
Implements Herd::TrackingDetectorGeoParams.
|
inline |
Set the detector side and the main segmentation direction for strips. Calls SetSideAndMainSegmDir. Kept for backwards compatibility.
dside | The side. |
segmDir | the main segmentation direction for strips. |
void Herd::ScdGeoParams::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.
pitch | the strip pitch [cm]. |
std::runtime_error | if this method is called before SetSideAndStripMainSegmDir or SetWaferSize. |
|
inline |
Set the wafer position for a given wafer.
See the wiki page for the wafer numbering convention.
waferID | |
position |
|
inline |
Set the wafer sizes along the three axes.
Must be called before SetStripPitch and SetNStripsPerWafer.
sizes | the size of the wafer along each axis [cm]. |
|
inline |
Utility function to get stripID from a set of coordinates. Calls ElementID.
This method is just a more descriptive name for ElementID.
position | The coordinates of the point (normal coordinate is ignored). |
unsigned int Herd::ScdGeoParams::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.
stripID | The absolute strip ID. |
std::pair< unsigned int, unsigned int > Herd::ScdGeoParams::StripIDsFromLadderID | ( | unsigned int | ladderID | ) | const |
Retrieves the volume ID of the first and last strip contained in the ladder with the given volumeID.
ladderID | The volumeID of the ladder. |
|
inline |
Get strip pitch.Calls ChannelPitch. Kept for backwards compatibility.
|
inline |
Get position of a given strip.
volID | The unique ID of the strip. |
|
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.
std::runtime_error | if the normal direction setting is not valid. |
|
protected |
std::optional< unsigned int > Herd::ScdGeoParams::WaferID | ( | const Point & | position | ) | const |
Utility function to get waferID from a set of coordinates.
position | The coordinates of the point (normal coordinate is ignored). |
unsigned int Herd::ScdGeoParams::WaferIDFromStripID | ( | unsigned int | stripID | ) | const |
Retrieves the ID of the wafer containing the given unbonded strip.
The stripID argument must be the volume ID of a single wafer strip, not the volume ID of a bonded strip.
stripID | The volumeID of the unbonded strip. |
std::pair< unsigned int, unsigned int > Herd::ScdGeoParams::WaferIDsFromLadderID | ( | unsigned int | ladderID | ) | const |
Retrieves the volume ID of the first and last wafers contained in the ladder with the given volumeID.
ladderID | The volumeID of the ladder. |
|
inline |
std::pair< RefFrame::Direction, RefFrame::Direction > Herd::ScdGeoParams::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.
std::runtime_error | if the normal direction setting is not valid. |
|
inline |
Get the dimensions of the single wafer.
|
mutableprivate |
Position of all the Si wafers.
|
mutableprivate |
Flag to signal Bounding box must be recomputed.
|
private |
|
private |
Number of wafers in each bonded ladder along the three axes.
|
private |
Number of wafers in each physical ladder along the three axes.
|
private |
Position of the first strip w.r.t the left border of the wafer [cm];.
|
private |
Dimensions of a Si wafer along the three axes.
|
private |
true if the strips are normal to the ladder
|
private |
Number of bonded ladders along the three axes.
|
private |
Number of strips in each wafer.
|
private |
Bounding box for this layer, to use for quick intersection checks.
|
private |
Type of bonding applied to wafer strips of a ladder.
|
protected |
! ROOT-transient