|
| 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 Indexes & | 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 masked. 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 Indexes &cooIndex) const |
| Return the volume ID starting from the indexes. More...
|
|
unsigned int | VolumeID (const Point &point) const |
| Returns the ID of the cube containing the given point. More...
|
|
std::pair< Point, Point > | CubeIntersections (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...
|
|
float | SphericalRadius () const |
| Gets the radius of the spherical CALO. More...
|
|
const EllipsoidalEnvelope & | SphericalCaloEnvelope () const |
| Returns the parameters of the ellipsoidal envelope of the spherical CALO. More...
|
|
const PrismaticEnvelope & | PrismaticCaloEnvelope () const |
| Returns the parameters of the prismatic envelope of the standard CALO. More...
|
|
const AxesArray< float > & | Gaps () const |
| Gets the gaps sizes. More...
|
|
const AxesArray< float > & | Wells () const |
| Gets the wells sizes. More...
|
|
void | SetCubes (std::vector< Point > positions, std::vector< Indexes > indexes, float cubeSize, float cubeSlotSize=defaultValue< float >, std::vector< bool > mask={}) |
| Set the cubes. More...
|
|
void | SetLYSODensity (float density) |
| Set the LYSO density. More...
|
|
void | SetSphericalRadius (float radius) |
| Sets the radius of the spherical CALO. More...
|
|
Data structure for the Calo geometry parameters.
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).
- Parameters
-
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 |
- Returns
- The CooIndex range for the selected row
void Herd::CaloGeoParams::SetCubes |
( |
std::vector< Point > |
positions, |
|
|
std::vector< Indexes > |
indexes, |
|
|
float |
cubeSize, |
|
|
float |
cubeSlotSize = defaultValue<float> , |
|
|
std::vector< bool > |
mask = {} |
|
) |
| |
Set the cubes.
This method sets the positions, indexes and size of each cube; optionally also the slot size and the cubes mask can be specified. The element ID in the vector arguments corresponds to the cube ID. The positions and indexes vectors must have the same number of elements, corresponding to the total number of cubes. The mask vector can be either empty (in this case no mask is applied) or have the same number of elements as the other arguments. The slot size must be greater or equal to the cube size; if the default value is used then it is automatically set equal to the cube size.
This method also computes the sizes of the gaps between the cube slots and of the wells, by computing the distance between two consecutive cubes along the axes for which the indexes differ by 1 (this defines two neighboring cubes along that axis). No more than two values (i.e. for gap and for well) for each axis are expected; if more than one is found then an exception is thrown. If two values are found then the smallest one is assigned to the gap and the other one to the well. If just one value is found it is assigned to both gap and well; if no value is found (e.g. for the transverse axis of a single-layer CALO) then 0 is assigned to both gap and well.
Calling this function resets the CALO type, so SetSphericalRadius must be called after if the set geometry is spherical.
- Parameters
-
positions | The positions of the cubes (cm). |
indexes | The indexes of the cubes. |
cubeSize | The size of the cube (cm). |
cubeSlotSize | The size of the cube slot (cm). |
mask | The cubes mask (true: masked, false: not masked). |
- Exceptions
-
Herd::Exception | if the sizes of the argument vectors do not exactly match (but mask size can be zero), if the cube size is less or equal than 0 or if the slot size is less than the cube size, or if more than two values of cube-to-cube distance are found along an axis. |
unsigned int Herd::CaloGeoParams::VolumeID |
( |
const Indexes & |
cooIndex | ) |
const |
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.
- Parameters
-
cooIndex | indexes of this crystal |
- Returns
- unsigned int volume ID of this crystal. If indexes don't point to any cube returns defaultValue<unsigned int>="">.