Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGeoVoxelGrid< T, S > Class Template Reference

template<typename T, typename S = float>
class TGeoVoxelGrid< T, S >

A finite 3D grid structure, mapping/binning arbitrary 3D cartesian points onto discrete "voxels".

Each such voxel can store an object of type T. The precision of the voxel binning is done with S (float or double).

Definition at line 29 of file TGeoVoxelGrid.h.

Public Member Functions

 TGeoVoxelGrid (S xmin, S ymin, S zmin, S xmax, S ymax, S zmax, S Lx_, S Ly_, S Lz_)
 
T & at (int i, int j, int k)
 
T & at (std::array< S, 3 > const &P)
 
T * at (TGeoVoxelGridIndex const &vi)
 
getDiagonalLength () const
 
int getVoxelCountX () const
 
int getVoxelCountY () const
 
int getVoxelCountZ () const
 
std::array< S, 3 > getVoxelMidpoint (TGeoVoxelGridIndex const &vi) const
 
size_t index (int i, int j, int k) const
 
void indexToIndices (size_t idx, int &i, int &j, int &k) const
 
bool inside (std::array< S, 3 > const &p) const
 
TGeoVoxelGridIndex pointToVoxelIndex (S x, S y, S z) const
 
TGeoVoxelGridIndex pointToVoxelIndex (std::array< S, 3 > const &p) const
 
void pointToVoxelIndex (std::array< S, 3 > const &p, int &i, int &j, int &k) const
 
void set (int i, int j, int k, const T &value)
 
void set (std::array< S, 3 > const &p, const T &value)
 
void set (TGeoVoxelGridIndex const &vi, const T &value)
 

Public Attributes

std::vector< T > fGrid
 
fHalfDiag
 
finvLx
 
finvLy
 
finvLz
 
fLx
 
fLy
 
fLz
 
std::array< S, 3 > fMaxBound
 
std::array< S, 3 > fMinBound
 
int fNx
 
int fNy
 
int fNz
 

#include <TGeoVoxelGrid.h>

Constructor & Destructor Documentation

◆ TGeoVoxelGrid()

template<typename T , typename S = float>
TGeoVoxelGrid< T, S >::TGeoVoxelGrid ( xmin,
ymin,
zmin,
xmax,
ymax,
zmax,
Lx_,
Ly_,
Lz_ 
)
inline

Definition at line 31 of file TGeoVoxelGrid.h.

Member Function Documentation

◆ at() [1/3]

template<typename T , typename S = float>
T & TGeoVoxelGrid< T, S >::at ( int  i,
int  j,
int  k 
)
inline

Definition at line 50 of file TGeoVoxelGrid.h.

◆ at() [2/3]

template<typename T , typename S = float>
T & TGeoVoxelGrid< T, S >::at ( std::array< S, 3 > const &  P)
inline

Definition at line 64 of file TGeoVoxelGrid.h.

◆ at() [3/3]

template<typename T , typename S = float>
T * TGeoVoxelGrid< T, S >::at ( TGeoVoxelGridIndex const &  vi)
inline

Definition at line 71 of file TGeoVoxelGrid.h.

◆ getDiagonalLength()

template<typename T , typename S = float>
S TGeoVoxelGrid< T, S >::getDiagonalLength ( ) const
inline

Definition at line 110 of file TGeoVoxelGrid.h.

◆ getVoxelCountX()

template<typename T , typename S = float>
int TGeoVoxelGrid< T, S >::getVoxelCountX ( ) const
inline

Definition at line 96 of file TGeoVoxelGrid.h.

◆ getVoxelCountY()

template<typename T , typename S = float>
int TGeoVoxelGrid< T, S >::getVoxelCountY ( ) const
inline

Definition at line 97 of file TGeoVoxelGrid.h.

◆ getVoxelCountZ()

template<typename T , typename S = float>
int TGeoVoxelGrid< T, S >::getVoxelCountZ ( ) const
inline

Definition at line 98 of file TGeoVoxelGrid.h.

◆ getVoxelMidpoint()

template<typename T , typename S = float>
std::array< S, 3 > TGeoVoxelGrid< T, S >::getVoxelMidpoint ( TGeoVoxelGridIndex const &  vi) const
inline

Definition at line 101 of file TGeoVoxelGrid.h.

◆ index()

template<typename T , typename S = float>
size_t TGeoVoxelGrid< T, S >::index ( int  i,
int  j,
int  k 
) const
inline

Definition at line 155 of file TGeoVoxelGrid.h.

◆ indexToIndices()

template<typename T , typename S = float>
void TGeoVoxelGrid< T, S >::indexToIndices ( size_t  idx,
int i,
int j,
int k 
) const
inline

Definition at line 157 of file TGeoVoxelGrid.h.

◆ inside()

template<typename T , typename S = float>
bool TGeoVoxelGrid< T, S >::inside ( std::array< S, 3 > const &  p) const
inline

Definition at line 53 of file TGeoVoxelGrid.h.

◆ pointToVoxelIndex() [1/3]

template<typename T , typename S = float>
TGeoVoxelGridIndex TGeoVoxelGrid< T, S >::pointToVoxelIndex ( x,
y,
z 
) const
inline

Definition at line 152 of file TGeoVoxelGrid.h.

◆ pointToVoxelIndex() [2/3]

template<typename T , typename S = float>
TGeoVoxelGridIndex TGeoVoxelGrid< T, S >::pointToVoxelIndex ( std::array< S, 3 > const &  p) const
inline

Definition at line 134 of file TGeoVoxelGrid.h.

◆ pointToVoxelIndex() [3/3]

template<typename T , typename S = float>
void TGeoVoxelGrid< T, S >::pointToVoxelIndex ( std::array< S, 3 > const &  p,
int i,
int j,
int k 
) const
inline

Definition at line 114 of file TGeoVoxelGrid.h.

◆ set() [1/3]

template<typename T , typename S = float>
void TGeoVoxelGrid< T, S >::set ( int  i,
int  j,
int  k,
const T &  value 
)
inline

Definition at line 88 of file TGeoVoxelGrid.h.

◆ set() [2/3]

template<typename T , typename S = float>
void TGeoVoxelGrid< T, S >::set ( std::array< S, 3 > const &  p,
const T &  value 
)
inline

Definition at line 80 of file TGeoVoxelGrid.h.

◆ set() [3/3]

template<typename T , typename S = float>
void TGeoVoxelGrid< T, S >::set ( TGeoVoxelGridIndex const &  vi,
const T &  value 
)
inline

Definition at line 93 of file TGeoVoxelGrid.h.

Member Data Documentation

◆ fGrid

template<typename T , typename S = float>
std::vector<T> TGeoVoxelGrid< T, S >::fGrid

Definition at line 173 of file TGeoVoxelGrid.h.

◆ fHalfDiag

template<typename T , typename S = float>
S TGeoVoxelGrid< T, S >::fHalfDiag

Definition at line 170 of file TGeoVoxelGrid.h.

◆ finvLx

template<typename T , typename S = float>
S TGeoVoxelGrid< T, S >::finvLx

Definition at line 169 of file TGeoVoxelGrid.h.

◆ finvLy

template<typename T , typename S = float>
S TGeoVoxelGrid< T, S >::finvLy

Definition at line 169 of file TGeoVoxelGrid.h.

◆ finvLz

template<typename T , typename S = float>
S TGeoVoxelGrid< T, S >::finvLz

Definition at line 169 of file TGeoVoxelGrid.h.

◆ fLx

template<typename T , typename S = float>
S TGeoVoxelGrid< T, S >::fLx

Definition at line 168 of file TGeoVoxelGrid.h.

◆ fLy

template<typename T , typename S = float>
S TGeoVoxelGrid< T, S >::fLy

Definition at line 168 of file TGeoVoxelGrid.h.

◆ fLz

template<typename T , typename S = float>
S TGeoVoxelGrid< T, S >::fLz

Definition at line 168 of file TGeoVoxelGrid.h.

◆ fMaxBound

template<typename T , typename S = float>
std::array<S, 3> TGeoVoxelGrid< T, S >::fMaxBound

Definition at line 167 of file TGeoVoxelGrid.h.

◆ fMinBound

template<typename T , typename S = float>
std::array<S, 3> TGeoVoxelGrid< T, S >::fMinBound

Definition at line 166 of file TGeoVoxelGrid.h.

◆ fNx

template<typename T , typename S = float>
int TGeoVoxelGrid< T, S >::fNx

Definition at line 172 of file TGeoVoxelGrid.h.

◆ fNy

template<typename T , typename S = float>
int TGeoVoxelGrid< T, S >::fNy

Definition at line 172 of file TGeoVoxelGrid.h.

◆ fNz

template<typename T , typename S = float>
int TGeoVoxelGrid< T, S >::fNz

Definition at line 172 of file TGeoVoxelGrid.h.

  • geom/geom/inc/TGeoVoxelGrid.h