Representation of a region of space diced into voxels. More...
#include <PhotonVoxels.h>
Classes | |
struct | NeiInfo |
Public Member Functions | |
PhotonVoxelDef ()=default | |
PhotonVoxelDef (double xMin, double xMax, int xN, double yMin, double yMax, int yN, double zMin, double zMax, int zN) | |
template<typename Point = DefaultPoint> | |
decltype(auto) | GetRegionLowerCorner () const |
Returns the volume vertex (type Point ) with the lowest coordinates. More... | |
template<typename Point = DefaultPoint> | |
decltype(auto) | GetRegionUpperCorner () const |
Returns the volume vertex (type Point ) with the highest coordinates. More... | |
std::array< unsigned int, 3U > | GetSteps () const |
Returns the number of voxels along each of the three dimensions. More... | |
template<typename Vector = DefaultVector> | |
Vector | GetVoxelSize () const |
Returns a vector describing the span of a single voxel in x, y an z [cm]. More... | |
template<typename Vector = DefaultVector, typename Point = DefaultPoint> | |
Vector | GetVolumeSize () const |
Returns a vector describing the full span in x, y an z [cm]. More... | |
unsigned int | GetNVoxels () const |
Returns the total number of voxels in the volume. More... | |
template<typename Point > | |
int | GetVoxelID (Point const &p) const |
Returns the ID of the voxel containing p , or -1 if none. More... | |
int | GetVoxelID (double const *) const |
bool | IsLegalVoxelID (int) const |
template<typename Point > | |
std::optional< std::array < NeiInfo, 8U > > | GetNeighboringVoxelIDs (Point const &v) const |
Returns IDs of the eight neighboring voxels around v . More... | |
PhotonVoxel | GetPhotonVoxel (int ID) const |
std::array< int, 3U > | GetVoxelCoords (int ID) const |
bool | isInside (geo::Point_t const &p) const |
Returns whether point p is inside the region (upper border excluded). More... | |
bool | operator== (const PhotonVoxelDef &rhs) const |
bool | operator!= (const PhotonVoxelDef &rhs) const |
PhotonVoxelDef (double xMin, double xMax, int xN, double yMin, double yMax, int yN, double zMin, double zMax, int z) | |
PhotonVoxelDef () | |
TVector3 | GetRegionUpperCorner () const |
TVector3 | GetRegionLowerCorner () const |
TVector3 | GetSteps () const |
TVector3 | GetVoxelSize () const |
int | GetNVoxels () const |
int | GetVoxelID (TVector3) const |
int | GetVoxelID (double *) const |
int | GetVoxelID (double x, double y, double z) const |
bool | IsLegalVoxelID (int) const |
PhotonVoxel | GetPhotonVoxel (int ID) const |
std::vector< int > | GetVoxelCoords (int ID) const |
bool | operator== (const PhotonVoxelDef &rhs) const |
bool | operator!= (const PhotonVoxelDef &rhs) const |
template<typename Point > | |
std::optional< std::array < sim::PhotonVoxelDef::NeiInfo, 8U > > | GetNeighboringVoxelIDs (Point const &v) const |
Private Types | |
using | DefaultPoint = geo::Point_t |
using | DefaultVector = geo::Vector_t |
Private Member Functions | |
int | GetVoxelIDImpl (geo::Point_t const &p) const |
std::optional< std::array < NeiInfo, 8U > > | GetNeighboringVoxelIDsImpl (geo::Point_t const &v) const |
std::array< double, 3U > | GetVoxelStepCoordsUnchecked (geo::Point_t const &p) const |
Returns the coordinates of the cvoxel containing p in step units. More... | |
bool | isInsideImpl (geo::Point_t const &point) const |
Returns whether the specified point is within the volume. More... | |
Static Private Member Functions | |
static bool | isInsideVolume (geo::Point_t const &point, geo::Point_t const &lower, geo::Point_t const &upper) |
static bool | isInsideRange (double value, double lower, double upper) |
Private Attributes | |
geo::Point_t | fLowerCorner |
geo::Point_t | fUpperCorner |
unsigned int | fxSteps = 1U |
unsigned int | fySteps = 1U |
unsigned int | fzSteps = 1U |
TVector3 | fLowerCorner |
TVector3 | fUpperCorner |
int | fxSteps |
int | fySteps |
int | fzSteps |
Representation of a region of space diced into voxels.
Definition at line 58 of file larsim/larsim/Simulation/PhotonVoxels.h.
|
private |
Definition at line 59 of file larsim/larsim/Simulation/PhotonVoxels.h.
|
private |
Definition at line 60 of file larsim/larsim/Simulation/PhotonVoxels.h.
|
default |
Definition at line 80 of file sbncode/sbncode/OpT0Finder/flashmatch/Base/FMWKTools/PhotonVoxels.cxx.
sim::PhotonVoxelDef::PhotonVoxelDef | ( | double | xMin, |
double | xMax, | ||
int | xN, | ||
double | yMin, | ||
double | yMax, | ||
int | yN, | ||
double | zMin, | ||
double | zMax, | ||
int | zN | ||
) |
Definition at line 22 of file larsim/larsim/Simulation/PhotonVoxels.cxx.
sim::PhotonVoxelDef::PhotonVoxelDef | ( | double | xMin, |
double | xMax, | ||
int | xN, | ||
double | yMin, | ||
double | yMax, | ||
int | yN, | ||
double | zMin, | ||
double | zMax, | ||
int | z | ||
) |
sim::PhotonVoxelDef::PhotonVoxelDef | ( | ) |
std::optional<std::array<NeiInfo, 8U> > sim::PhotonVoxelDef::GetNeighboringVoxelIDs | ( | Point const & | v | ) | const |
Returns IDs of the eight neighboring voxels around v
.
v | location within the mapped volume |
If v
is not inside the mapped volume, no list is returned (the optional return value evaluates to false
). Otherwise, each of the eight voxels with the center closest to v
are returned, each with a weight proportional to the distance of v
from that center.
std::optional<std::array<sim::PhotonVoxelDef::NeiInfo, 8U> > sim::PhotonVoxelDef::GetNeighboringVoxelIDs | ( | Point const & | v | ) | const |
Definition at line 242 of file larsim/larsim/Simulation/PhotonVoxels.h.
|
private |
Definition at line 72 of file larsim/larsim/Simulation/PhotonVoxels.cxx.
int sim::PhotonVoxelDef::GetNVoxels | ( | ) | const |
int sim::PhotonVoxelDef::GetNVoxels | ( | ) | const |
Returns the total number of voxels in the volume.
Definition at line 58 of file larsim/larsim/Simulation/PhotonVoxels.cxx.
PhotonVoxel sim::PhotonVoxelDef::GetPhotonVoxel | ( | int | ID | ) | const |
PhotonVoxel sim::PhotonVoxelDef::GetPhotonVoxel | ( | int | ID | ) | const |
Definition at line 139 of file larsim/larsim/Simulation/PhotonVoxels.cxx.
sim::PhotonVoxelDef::GetRegionLowerCorner | ( | ) | const |
Definition at line 209 of file larsim/larsim/Simulation/PhotonVoxels.h.
TVector3 sim::PhotonVoxelDef::GetRegionLowerCorner | ( | ) | const |
Returns the volume vertex (type Point
) with the lowest coordinates.
Definition at line 85 of file sbncode/sbncode/OpT0Finder/flashmatch/Base/FMWKTools/PhotonVoxels.cxx.
sim::PhotonVoxelDef::GetRegionUpperCorner | ( | ) | const |
Definition at line 216 of file larsim/larsim/Simulation/PhotonVoxels.h.
TVector3 sim::PhotonVoxelDef::GetRegionUpperCorner | ( | ) | const |
Returns the volume vertex (type Point
) with the highest coordinates.
Definition at line 91 of file sbncode/sbncode/OpT0Finder/flashmatch/Base/FMWKTools/PhotonVoxels.cxx.
TVector3 sim::PhotonVoxelDef::GetSteps | ( | ) | const |
TVector3 sim::PhotonVoxelDef::GetSteps | ( | ) | const |
Returns the number of voxels along each of the three dimensions.
Definition at line 40 of file larsim/larsim/Simulation/PhotonVoxels.cxx.
|
inline |
Returns a vector describing the full span in x, y an z [cm].
Definition at line 98 of file larsim/larsim/Simulation/PhotonVoxels.h.
std::vector<int> sim::PhotonVoxelDef::GetVoxelCoords | ( | int | ID | ) | const |
std::vector< int > sim::PhotonVoxelDef::GetVoxelCoords | ( | int | ID | ) | const |
Definition at line 168 of file larsim/larsim/Simulation/PhotonVoxels.cxx.
int sim::PhotonVoxelDef::GetVoxelID | ( | TVector3 | Position | ) | const |
Definition at line 118 of file sbncode/sbncode/OpT0Finder/flashmatch/Base/FMWKTools/PhotonVoxels.cxx.
int sim::PhotonVoxelDef::GetVoxelID | ( | double * | Position | ) | const |
Definition at line 179 of file sbncode/sbncode/OpT0Finder/flashmatch/Base/FMWKTools/PhotonVoxels.cxx.
int sim::PhotonVoxelDef::GetVoxelID | ( | double | x, |
double | y, | ||
double | z | ||
) | const |
Definition at line 149 of file sbncode/sbncode/OpT0Finder/flashmatch/Base/FMWKTools/PhotonVoxels.cxx.
int sim::PhotonVoxelDef::GetVoxelID | ( | Point const & | p | ) | const |
Returns the ID of the voxel containing p
, or -1
if none.
Definition at line 234 of file larsim/larsim/Simulation/PhotonVoxels.h.
int sim::PhotonVoxelDef::GetVoxelID | ( | double const * | Position | ) | const |
Definition at line 65 of file larsim/larsim/Simulation/PhotonVoxels.cxx.
|
private |
Definition at line 195 of file larsim/larsim/Simulation/PhotonVoxels.cxx.
TVector3 sim::PhotonVoxelDef::GetVoxelSize | ( | ) | const |
TVector3 sim::PhotonVoxelDef::GetVoxelSize | ( | ) | const |
Returns a vector describing the span of a single voxel in x, y an z [cm].
Definition at line 224 of file larsim/larsim/Simulation/PhotonVoxels.h.
|
private |
Returns the coordinates of the cvoxel containing p
in step units.
Definition at line 180 of file larsim/larsim/Simulation/PhotonVoxels.cxx.
|
inline |
Returns whether point p
is inside the region (upper border excluded).
Definition at line 139 of file larsim/larsim/Simulation/PhotonVoxels.h.
|
inlineprivate |
Returns whether the specified point is within the volume.
Definition at line 161 of file larsim/larsim/Simulation/PhotonVoxels.h.
|
staticprivate |
Definition at line 223 of file larsim/larsim/Simulation/PhotonVoxels.cxx.
|
staticprivate |
Definition at line 213 of file larsim/larsim/Simulation/PhotonVoxels.cxx.
bool sim::PhotonVoxelDef::IsLegalVoxelID | ( | int | ) | const |
bool sim::PhotonVoxelDef::IsLegalVoxelID | ( | int | ID | ) | const |
Definition at line 162 of file larsim/larsim/Simulation/PhotonVoxels.cxx.
|
inline |
Definition at line 82 of file sbncode/sbncode/OpT0Finder/flashmatch/Base/FMWKTools/PhotonVoxels.h.
|
inline |
Definition at line 146 of file larsim/larsim/Simulation/PhotonVoxels.h.
bool sim::PhotonVoxelDef::operator== | ( | const PhotonVoxelDef & | rhs | ) | const |
bool sim::PhotonVoxelDef::operator== | ( | const PhotonVoxelDef & | rhs | ) | const |
Definition at line 49 of file larsim/larsim/Simulation/PhotonVoxels.cxx.
|
private |
Definition at line 54 of file sbncode/sbncode/OpT0Finder/flashmatch/Base/FMWKTools/PhotonVoxels.h.
|
private |
Definition at line 62 of file larsim/larsim/Simulation/PhotonVoxels.h.
|
private |
Definition at line 55 of file sbncode/sbncode/OpT0Finder/flashmatch/Base/FMWKTools/PhotonVoxels.h.
|
private |
Definition at line 63 of file larsim/larsim/Simulation/PhotonVoxels.h.
|
private |
Definition at line 56 of file sbncode/sbncode/OpT0Finder/flashmatch/Base/FMWKTools/PhotonVoxels.h.
|
private |
Definition at line 64 of file larsim/larsim/Simulation/PhotonVoxels.h.
|
private |
Definition at line 57 of file sbncode/sbncode/OpT0Finder/flashmatch/Base/FMWKTools/PhotonVoxels.h.
|
private |
Definition at line 65 of file larsim/larsim/Simulation/PhotonVoxels.h.
|
private |
Definition at line 58 of file sbncode/sbncode/OpT0Finder/flashmatch/Base/FMWKTools/PhotonVoxels.h.
|
private |
Definition at line 66 of file larsim/larsim/Simulation/PhotonVoxels.h.