10 #ifndef HERD_CALOGEOPARAMS_H_ 11 #define HERD_CALOGEOPARAMS_H_ 63 unsigned char begin = defaultValue<unsigned char>;
64 unsigned char end = defaultValue<unsigned char>;
67 unsigned char Size()
const {
return end - begin + 1; }
244 std::vector<std::vector<std::vector<unsigned short>>>
unsigned char end
Definition: CaloGeoParams.h:64
Coo
Aliases for the three space coordinates. RefFrame.h common/RefFrame.h.
Definition: RefFrame.h:26
CssGeoParams.h CssGeoParams class declaration.
Definition: CaloPDCalibrationAlgo.h:24
float LYSODensity() const
Return the LYSO density (g/cm3).
Definition: CaloGeoParams.h:105
CaloCube()
Definition: CaloGeoParams.h:230
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:62
void FillCooId2VolIDMatrix()
Fill the private lookup table which converts indexes into volume ID.
Definition: CaloGeoParams.cpp:18
const CooArray< unsigned char > & CooIndexes(unsigned int volID) const
Return the cube indexes.
Definition: CaloGeoParams.h:58
#define DEFAULT_INIT(x)
Definition: DefaultValues.h:23
std::vector< std::vector< std::vector< unsigned short > > > _cooId2VolIDMatrix
Definition: CaloGeoParams.h:245
CooIndexRange CooIndexesRange(RefFrame::Axis axis, unsigned char index1, unsigned char index2)
Return the CooIndex range for a given row of crystals.
Definition: CaloGeoParams.cpp:208
void SetPosition(unsigned int volID, Point position)
Set the position of the center of the cube.
Definition: CaloGeoParams.h:187
unsigned int VolumeID(const CooArray< unsigned char > &cooIndex)
Return the volume ID starting from the indexes.
Definition: CaloGeoParams.cpp:32
CaloGeoParams()
Default constructor.
Definition: CaloGeoParams.h:41
virtual ~CaloGeoParams()=default
Virtual destructor.
Axis
Aliases for the axes. RefFrame.h common/RefFrame.h.
Definition: RefFrame.h:33
CooArray< unsigned char > _indexes
Indexes of the cube for each coordinate.
Definition: CaloGeoParams.h:227
std::vector< CaloCube > _caloCubes
Vector of CaloCube, which contains the cube position and indexes.
Definition: CaloGeoParams.h:240
A class describing a vector in 3D space.
Definition: Vec3D.h:33
Point _position
Position of the center of the cube.
Definition: CaloGeoParams.h:226
Data structure for the Calo geometry parameters.
Definition: CaloGeoParams.h:29
bool operator==(const CooIndexRange &other) const
Definition: CaloGeoParams.h:66
void SetNCubes(unsigned int nCubes)
Set the number of cubes.
Definition: CaloGeoParams.h:180
const Point & Position(unsigned int volID) const
Return the position of the center of the cube.
Definition: CaloGeoParams.h:51
unsigned char begin
Definition: CaloGeoParams.h:63
Class describing a line in the 3D space.
Definition: Line.h:32
float _cubeSize
The size of the cube, i.e. the side length (cm).
Definition: CaloGeoParams.h:241
CaloGeoParams(unsigned int nCubes)
Constructor.
Definition: CaloGeoParams.h:35
unsigned char Size() const
Definition: CaloGeoParams.h:67
const float & CubeSize() const
Return the cube size, i.e the side length [cm].
Definition: CaloGeoParams.h:99
void SetIsEmpty(unsigned int volID, bool isEmpty)
Set the flag which indicates if the cube is empty.
Definition: CaloGeoParams.h:203
void SetCooIndexes(unsigned int volID, CooArray< unsigned char > indexes)
Set the cube indexes.
Definition: CaloGeoParams.h:194
float LYSORadiationLength() const
Return the radiation length of the LYSO material constituting the cube (cm).
Definition: CaloGeoParams.h:115
void SetCubeSize(float cubeSize)
Set the cube size, i.e the side length [cm].
Definition: CaloGeoParams.h:209
bool _isEmpty
True if the cube is empty, true if it is filled with LYSO.
Definition: CaloGeoParams.h:228
void SetLYSODensity(float density)
Set the LYSO density.
Definition: CaloGeoParams.h:221
float _cubeSlotSize
The size of the cube slot (cm).
Definition: CaloGeoParams.h:242
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.
Definition: CaloGeoParams.cpp:66
float _lysoDensity
The density the cube (g/cm3).
Definition: CaloGeoParams.h:243
This struct is used only inside the object, it is public since Root can not save the object otherwise...
Definition: CaloGeoParams.h:224
bool IsEmpty(unsigned int volID) const
Return true if the cube is empty.
Definition: CaloGeoParams.h:93
void SetCubeSlotSize(float cubeSlotSize)
Set the cube slot size [cm].
Definition: CaloGeoParams.h:215
const float & CubeSlotSize() const
Return the size of the tray slot accommodating a single LYSO cube [cm].
Definition: CaloGeoParams.h:131
unsigned int NCubes() const
Return the total number of cubes.
Definition: CaloGeoParams.h:137