|
HerdSoftware
0.2.3
|
Data structure for the Calo geometry parameters. More...
#include <dataobjects/CaloGeoParams.h>
Classes | |
| struct | CaloCube |
| This struct is used only inside the object, it is public since Root can not save the object otherwise. More... | |
| struct | CooIndexRange |
| Helper struct to hold a CooIndex range. More... | |
Public Member Functions | |
| CaloGeoParams (unsigned int nCubes) | |
| Constructor. More... | |
| CaloGeoParams () | |
| Default constructor. More... | |
| virtual | ~CaloGeoParams ()=default |
| Virtual destructor. More... | |
| const Point & | Position (unsigned int volID) const |
| Return the position of the center of the cube. More... | |
| const CooArray< unsigned char > & | CooIndexes (unsigned int volID) const |
| Return the cube indexes. More... | |
| CooIndexRange | CooIndexesRange (RefFrame::Axis axis, unsigned char index1, unsigned char index2) |
| Return the CooIndex range for a given row of crystals. More... | |
| bool | IsEmpty (unsigned int volID) const |
| Return true if the cube is empty. More... | |
| const float & | CubeSize () const |
| Return the cube size, i.e the side length [cm]. More... | |
| float | LYSODensity () const |
| Return the LYSO density (g/cm3). More... | |
| float | LYSORadiationLength () const |
| Return the radiation length of the LYSO material constituting the cube (cm). More... | |
| float | LYSONuclearInteractionLength () const |
| Return the nuclear interaction length of the LYSO material constituting the cube (cm). More... | |
| const float & | CubeSlotSize () const |
| Return the size of the tray slot accommodating a single LYSO cube [cm]. More... | |
| unsigned int | NCubes () const |
| Return the total number of cubes. More... | |
| unsigned int | VolumeID (const CooArray< unsigned char > &cooIndex) |
| Return the volume ID starting from the indexes. More... | |
| unsigned int | VolumeID (const Point &position) |
| Return the volume ID given a position. More... | |
| std::pair< Point, Point > | GetCubeIntersections (const Line &track, const unsigned int volID, const Herd::RefFrame::Coo sort_by_coo=Herd::RefFrame::Coo::NONE) const |
| Return the two intersection points between a line and a given cube. More... | |
| void | SetNCubes (unsigned int nCubes) |
| Set the number of cubes. More... | |
| void | SetPosition (unsigned int volID, Point position) |
| Set the position of the center of the cube. More... | |
| void | SetCooIndexes (unsigned int volID, CooArray< unsigned char > indexes) |
| Set the cube indexes. More... | |
| void | SetIsEmpty (unsigned int volID, bool isEmpty) |
| Set the flag which indicates if the cube is empty. More... | |
| void | SetCubeSize (float cubeSize) |
| Set the cube size, i.e the side length [cm]. More... | |
| void | SetCubeSlotSize (float cubeSlotSize) |
| Set the cube slot size [cm]. More... | |
| void | SetLYSODensity (float density) |
| Set the LYSO density. More... | |
Private Member Functions | |
| void | FillCooId2VolIDMatrix () |
| Fill the private lookup table which converts indexes into volume ID. More... | |
Private Attributes | |
| std::vector< CaloCube > | _caloCubes |
| Vector of CaloCube, which contains the cube position and indexes. More... | |
| float | _cubeSize |
| The size of the cube, i.e. the side length (cm). More... | |
| float | _cubeSlotSize |
| The size of the cube slot (cm). More... | |
| float | _lysoDensity |
| The density the cube (g/cm3). More... | |
| std::vector< std::vector< std::vector< unsigned short > > > | _cooId2VolIDMatrix |
Data structure for the Calo geometry parameters.
|
inline |
Constructor.
| nCubes | Number of cubes |
|
inline |
Default constructor.
|
virtualdefault |
Virtual destructor.
|
inline |
Return the cube indexes.
| volID | Volume identifier. |
| CaloGeoParams::CooIndexRange Herd::CaloGeoParams::CooIndexesRange | ( | RefFrame::Axis | axis, |
| unsigned char | index1, | ||
| unsigned char | index2 | ||
| ) |
Return the CooIndex range for a given row of crystals.
This method computes the IDs of the first and last cubes in a given row. The row direction is specified by an axis, which identifies an orthogonal view: in this view the coordinates of a cube are given, and this routine identifies the first and last cubes along the axis on the row identified by the given coordinates. For example:
CooIndexRange(RefFrame::Axis::X, 5, 2)
will return the first and last cubes on the cube row along X identified by the cube with ID_Y=5 and ID_Z=2 on YZ (since the view orthogonal to X is YZ, with Y abscissa and Z ordinate).
| axis | The axis along which the crystals are aligned |
| index1 | The CooIndex in the abscissa of the view ortoghonal to the specified axis |
| index2 | The CooIndex in the ordinate of the view ortoghonal to the specified axis |
|
inline |
Return the cube size, i.e the side length [cm].
|
inline |
Return the size of the tray slot accommodating a single LYSO cube [cm].
|
private |
Fill the private lookup table which converts indexes into volume ID.
| std::pair< Point, Point > Herd::CaloGeoParams::GetCubeIntersections | ( | const Line & | track, |
| const unsigned int | volID, | ||
| const Herd::RefFrame::Coo | sort_by_coo = Herd::RefFrame::Coo::NONE |
||
| ) | const |
Return the two intersection points between a line and a given cube.
| sort_by_coo | if specified, determines the order in which points are stored in the output based on increasing coordinate |
|
inline |
Return true if the cube is empty.
| volID | Volume identifier. |
|
inline |
Return the LYSO density (g/cm3).
|
inline |
Return the nuclear interaction length of the LYSO material constituting the cube (cm).
The returned radiation length is computed by scaling 20.589 cm, i.e. the n. i. length of a LYSO cube of density 7.4 g/cm3 as given by Geant4, by the ratio of the reference 7.4 g/cm3 density and the the actual LYSO density.
|
inline |
Return the radiation length of the LYSO material constituting the cube (cm).
The returned radiation length is computed by scaling 1.172 cm, i.e. the radiation length of a LYSO cube of density 7.4 g/cm3 as given by Geant4, by the ratio of the reference 7.4 g/cm3 density and the the actual LYSO density.
|
inline |
Return the total number of cubes.
|
inline |
Return the position of the center of the cube.
| volID | Volume identifier. |
|
inline |
Set the cube indexes.
| volID | Volume identifier. |
| indexes | The indexes of the cube. |
|
inline |
Set the cube size, i.e the side length [cm].
| cubeSize | The cube size [cm]. |
|
inline |
Set the cube slot size [cm].
| cubeSize | The slot size [cm]. |
|
inline |
Set the flag which indicates if the cube is empty.
When CaloGeoParams is constructed, the default value of isEmpty is false for each crystals.
| volID | Volume identifier. |
| indexes | true if the cube is empty, false if it is filled with LYSO. |
|
inline |
Set the LYSO density.
| density | the LYSO density (g/cm3). |
|
inline |
Set the number of cubes.
| nCubes | Number of cubes |
|
inline |
Set the position of the center of the cube.
| volID | Volume identifier. |
| position | The position of the center of the cube. |
| unsigned int Herd::CaloGeoParams::VolumeID | ( | const CooArray< unsigned char > & | cooIndex | ) |
Return the volume ID starting from the indexes.
This method use a private lookup table which stores the conversion between each combination of indexes and volume IDs. This table is filled after the first request by this method. If one index is >=21 an runtime_error exception is thrown. If the indexes are < 21 but not related with a true crystals, (e.g. (20,20,20)) std::numeric_limits<unsigned int>::max() is returned.
| cooIndex | indexes of this crystal |
| unsigned int Herd::CaloGeoParams::VolumeID | ( | const Point & | position | ) |
Return the volume ID given a position.
This method returns the volume ID of the cube containing the given point.
| cooIndex | indexes of this crystal |
|
private |
Vector of CaloCube, which contains the cube position and indexes.
|
private |
|
private |
The size of the cube, i.e. the side length (cm).
|
private |
The size of the cube slot (cm).
|
private |
The density the cube (g/cm3).
1.8.13