HerdSoftware
0.3.2
|
Parameters of the prismatic CALO envelope. More...
#include <CaloGeoParams.h>
Public Member Functions | |
PrismaticEnvelope () | |
Default constructor. More... | |
PrismaticEnvelope (Point center, AxesArray< float > sizes, float xFaceYSize, float yFaceXSize) | |
Constructor. More... | |
const Point & | Center () const |
Gets the center of the envelope. More... | |
const DirectionsArray< Rectangle > & | LateralFaces () const |
Gets the lateral faces of the envelope. More... | |
const std::array< Herd::Plane, 2 > & | ZPlanes () const |
Gets the top and bottom planes of the envelope. More... | |
bool | operator== (const PrismaticEnvelope &rhs) |
float | Volume () const |
Gets the total volume of the envelope. More... | |
Private Attributes | |
Point | m_center |
The center of the prism (cm). More... | |
AxesArray< float > | m_sizes |
The size of the prism along each axis (cm). More... | |
float | m_xFaceYSize |
The size along Y of the prism faces on X sides (cm). More... | |
float | m_yFaceXSize |
The size along X of the prism faces on Y sides (cm). More... | |
DirectionsArray< Rectangle > | m_lateralFaces |
Lateral faces of the envelope. More... | |
std::array< Herd::Plane, 2 > | m_zPlanes |
Top (first) and bottom (second) envelope planes. More... | |
Parameters of the prismatic CALO envelope.
A prismatic envelope can be defined for the standard CALO. The envelope consists of a right prism with octagonal-shaped bases.
Herd::CaloGeoParams::PrismaticEnvelope::PrismaticEnvelope | ( | ) |
Default constructor.
Herd::CaloGeoParams::PrismaticEnvelope::PrismaticEnvelope | ( | Point | center, |
AxesArray< float > | sizes, | ||
float | xFaceYSize, | ||
float | yFaceXSize | ||
) |
Constructor.
Builds a prismatic envelope, defined by center, size along each axis, and dimensions of the faces on the X and Y sides. For a prism with octagonal base the face sizes are less than the prism sizes, e.g. xFaceYSize < sizes[RefFrame::Coo::Y], and similarly for X side. For a prism with rectangular base the face sizes are equal than the prism sizes, i.e (xFaceYSize == sizes[RefFrame::Coo::Y]) && (yFaceXSize == sizes[RefFrame::Coo::X]). Just one face size equal to prism size or a face size greater than the corresponding prism size are not allowed.
center | The center of the envelope (cm). |
sizes | The sizes of the envelope along each axis (cm). |
xFaceYSize | The size along Y of the prism faces on X sides (cm). |
yFaceXSize | The size along X of the prism faces on Y sides (cm). |
Herd::Exception | if only one face size is equal to prism size, or if a face size is greater that the corresponding prism size. |
|
inline |
Gets the center of the envelope.
const DirectionsArray< Rectangle > & Herd::CaloGeoParams::PrismaticEnvelope::LateralFaces | ( | ) | const |
Gets the lateral faces of the envelope.
This method returns all the lateral faces of the envelope. For an envelope with rectangular basis the inclined faces are equal to the default Rectangle.
bool Herd::CaloGeoParams::PrismaticEnvelope::operator== | ( | const PrismaticEnvelope & | rhs | ) |
float Herd::CaloGeoParams::PrismaticEnvelope::Volume | ( | ) | const |
Gets the total volume of the envelope.
const std::array< Herd::Plane, 2 > & Herd::CaloGeoParams::PrismaticEnvelope::ZPlanes | ( | ) | const |
Gets the top and bottom planes of the envelope.
The top and bottom faces of the envelope are generally octagons, which currently are not represented by a class. This method returns the planes on which the top and bottom faces lie.
|
private |
The center of the prism (cm).
|
mutableprivate |
Lateral faces of the envelope.
|
private |
The size of the prism along each axis (cm).
|
private |
The size along Y of the prism faces on X sides (cm).
|
private |
The size along X of the prism faces on Y sides (cm).
|
mutableprivate |
Top (first) and bottom (second) envelope planes.