10 #ifndef HERD_CALOGEOPARAMS_H_ 11 #define HERD_CALOGEOPARAMS_H_ 61 unsigned char begin = defaultValue<unsigned char>;
62 unsigned char end = defaultValue<unsigned char>;
65 unsigned char Size()
const {
return end - begin + 1; }
93 bool IsEmpty(
unsigned int volID)
const {
return (
_mask.size() == 0 ? false :
_mask[volID]); };
198 float Volume()
const;
261 const std::array<Herd::Plane, 2> &ZPlanes()
const;
269 float Volume()
const;
335 void SetCubes(std::vector<Point> positions, std::vector<Indexes> indexes,
float cubeSize,
336 float cubeSlotSize = defaultValue<float>, std::vector<bool> mask = {});
371 std::vector<std::vector<std::vector<unsigned short>>>
unsigned char end
Definition: CaloGeoParams.h:62
AxesArray< float > _gaps
The gaps between the cubes (cm).
Definition: CaloGeoParams.h:364
const Point & Center() const
Gets the center of the envelope.
Definition: CaloGeoParams.h:243
Coo
Aliases for the three space coordinates. RefFrame.h common/RefFrame.h.
Definition: RefFrame.h:26
const AxesArray< float > & Gaps() const
Gets the gaps sizes.
Definition: CaloGeoParams.h:296
CssGeoParams.h CssGeoParams class declaration.
Definition: CaloPDCalibrationAlgo.h:24
float m_yFaceXSize
The size along X of the prism faces on Y sides (cm).
Definition: CaloGeoParams.h:275
void SetSphericalRadius(float radius)
Sets the radius of the spherical CALO.
Definition: CaloGeoParams.cpp:343
float LYSODensity() const
Return the LYSO density (g/cm3).
Definition: CaloGeoParams.h:105
AxesArray< float > halfSizes
The half axes of the full ellipsoid along each axis (cm).
Definition: CaloGeoParams.h:195
float LYSONuclearInteractionLength() const
Return the nuclear interaction length of the LYSO material constituting the cube (cm).
Definition: CaloGeoParams.h:125
Helper struct to hold a CooIndex range.
Definition: CaloGeoParams.h:60
EllipsoidalEnvelope _ellipsoidalEnvelopeParams
Parameters of the ellipsoidal envelope of the spherical CALO.
Definition: CaloGeoParams.h:368
float _sphericalRadius
The radius of the spherical CALO expressed in cube ID units.
Definition: CaloGeoParams.h:366
void FillCooId2VolIDMatrix()
Fill the private lookup table which converts indexes into volume ID.
Definition: CaloGeoParams.cpp:22
std::vector< std::vector< std::vector< unsigned short > > > _cooId2VolIDMatrix
Definition: CaloGeoParams.h:372
CooIndexRange CooIndexesRange(RefFrame::Axis axis, unsigned char index1, unsigned char index2)
Return the CooIndex range for a given row of crystals.
Definition: CaloGeoParams.cpp:224
const PrismaticEnvelope & PrismaticCaloEnvelope() const
Returns the parameters of the prismatic envelope of the standard CALO.
Definition: CaloGeoParams.cpp:525
const EllipsoidalEnvelope & SphericalCaloEnvelope() const
Returns the parameters of the ellipsoidal envelope of the spherical CALO.
Definition: CaloGeoParams.cpp:373
AxesArray< float > _wells
The sizes of the wells (cm).
Definition: CaloGeoParams.h:365
CaloGeoParams()
Default constructor.
Definition: CaloGeoParams.cpp:18
AxesArray< float > halfAxes
The center of the ellipsoid (cm).
Definition: CaloGeoParams.h:194
virtual ~CaloGeoParams()=default
Virtual destructor.
Axis
Aliases for the axes. RefFrame.h common/RefFrame.h.
Definition: RefFrame.h:36
unsigned int _nMaxCubesPerSide
Matrix which contains the cooIndexes -> volumeID conversion.
Definition: CaloGeoParams.h:373
AxesArray< float > m_sizes
The size of the prism along each axis (cm).
Definition: CaloGeoParams.h:273
std::vector< Indexes > _indexes
The indexes of each cube.
Definition: CaloGeoParams.h:359
Point center
Definition: CaloGeoParams.h:193
Point m_center
The center of the prism (cm).
Definition: CaloGeoParams.h:272
A class describing a vector in 3D space.
Definition: Vec3D.h:33
Data structure for the Calo geometry parameters.
Definition: CaloGeoParams.h:34
bool operator==(const CooIndexRange &other) const
Definition: CaloGeoParams.h:64
Parameters of the ellipsoidal CALO envelope.
Definition: CaloGeoParams.h:192
std::array< Herd::Plane, 2 > m_zPlanes
Top (first) and bottom (second) envelope planes.
Definition: CaloGeoParams.h:277
const Point & Position(unsigned int volID) const
Return the position of the center of the cube.
Definition: CaloGeoParams.h:47
unsigned char begin
Definition: CaloGeoParams.h:61
Class describing a line in the 3D space.
Definition: Line.h:34
float _cubeSize
The size of the cube, i.e. the side length (cm).
Definition: CaloGeoParams.h:361
void SetCubes(std::vector< Point > positions, std::vector< Indexes > indexes, float cubeSize, float cubeSlotSize=defaultValue< float >, std::vector< bool > mask={})
Set the cubes.
Definition: CaloGeoParams.cpp:267
std::vector< Point > _positions
The positions of each cube.
Definition: CaloGeoParams.h:358
unsigned char Size() const
Definition: CaloGeoParams.h:65
const float & CubeSize() const
Return the cube size, i.e the side length [cm].
Definition: CaloGeoParams.h:99
DirectionsArray< Rectangle > m_lateralFaces
Lateral faces of the envelope.
Definition: CaloGeoParams.h:276
An array that accepts directions as subscripts.
Definition: DirectionsArray.h:71
float m_xFaceYSize
The size along Y of the prism faces on X sides (cm).
Definition: CaloGeoParams.h:274
float LYSORadiationLength() const
Return the radiation length of the LYSO material constituting the cube (cm).
Definition: CaloGeoParams.h:115
std::vector< bool > _mask
The mask flag of each cube.
Definition: CaloGeoParams.h:360
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.
Definition: CaloGeoParams.cpp:82
void SetLYSODensity(float density)
Set the LYSO density.
Definition: CaloGeoParams.h:342
float _cubeSlotSize
The size of the cube slot (cm).
Definition: CaloGeoParams.h:362
float _lysoDensity
The density the cube (g/cm3).
Definition: CaloGeoParams.h:363
const AxesArray< float > & Wells() const
Gets the wells sizes.
Definition: CaloGeoParams.h:305
float SphericalRadius() const
Gets the radius of the spherical CALO.
Definition: CaloGeoParams.h:179
bool IsEmpty(unsigned int volID) const
Return true if the cube is masked.
Definition: CaloGeoParams.h:93
const float & CubeSlotSize() const
Return the size of the tray slot accommodating a single LYSO cube [cm].
Definition: CaloGeoParams.h:131
unsigned int VolumeID(const Indexes &cooIndex) const
Return the volume ID starting from the indexes.
Definition: CaloGeoParams.cpp:45
Parameters of the prismatic CALO envelope.
Definition: CaloGeoParams.h:216
unsigned int NCubes() const
Return the total number of cubes.
Definition: CaloGeoParams.h:137
PrismaticEnvelope _prismaticEnvelopeParams
Parameters of the prismatic envelope of the standard CALO.
Definition: CaloGeoParams.h:369
const Indexes & CooIndexes(unsigned int volID) const
Return the cube indexes.
Definition: CaloGeoParams.h:56