All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
sbncode/sbncode/OpT0Finder/flashmatch/Base/FMWKTools/PhotonVoxels.h
Go to the documentation of this file.
1 #ifndef PhotonVoxels_h
2 #define PhotonVoxels_h 1
3 
4 #include "TVector3.h"
5 
6 namespace sim {
7 
8 
9  class PhotonVoxel{
10  public:
11  PhotonVoxel(double xMin,
12  double xMax,
13  double yMin,
14  double yMax,
15  double zMin,
16  double zMax,
17  int N = 0) ;
18  PhotonVoxel();
19 
20  private:
21  double xVoxelMin;
22  double xVoxelMax;
23  double yVoxelMin;
24  double yVoxelMax;
25  double zVoxelMin;
26  double zVoxelMax;
27 
28  int NPhotons;
29 
30  public:
31 
32  TVector3 GetLowerCorner() const;
33  TVector3 GetUpperCorner() const;
34  TVector3 GetCenter() const;
35 
36  };
37 
38 
39  class PhotonVoxelDef
40  {
41  public:
42  PhotonVoxelDef(double xMin,
43  double xMax,
44  int xN,
45  double yMin,
46  double yMax,
47  int yN,
48  double zMin,
49  double zMax,
50  int z);
52 
53  private:
54  TVector3 fLowerCorner;
55  TVector3 fUpperCorner;
56  int fxSteps;
57  int fySteps;
58  int fzSteps;
59 
60 #ifndef __GCCXML__
61  public:
62 
63  TVector3 GetRegionUpperCorner() const;
64  TVector3 GetRegionLowerCorner() const;
65  TVector3 GetSteps() const;
66 
67 
68  TVector3 GetVoxelSize()const;
69 
70  int GetNVoxels() const;
71 
72  int GetVoxelID(TVector3) const;
73  int GetVoxelID(double*) const;
74  int GetVoxelID(double x, double y, double z) const;
75  bool IsLegalVoxelID(int) const;
76 
77  PhotonVoxel GetPhotonVoxel(int ID) const;
78  std::vector<int> GetVoxelCoords(int ID) const;
79  //PhotonVoxel GetContainingVoxel(TVector3) const{};
80 
81  bool operator==(const PhotonVoxelDef &rhs) const;
82  bool operator!=(const PhotonVoxelDef &rhs) const
83  { return ! ((*this)==rhs); }
84 
85 #endif
86 
87  };
88 }
89 
90 #endif
process_name opflash particleana ie ie ie z
Vector GetVoxelSize() const
Returns a vector describing the span of a single voxel in x, y an z [cm].
process_name opflash particleana ie x
std::array< unsigned int, 3U > GetSteps() const
Returns the number of voxels along each of the three dimensions.
bool operator==(const PhotonVoxelDef &rhs) const
Representation of a region of space diced into voxels.
int GetVoxelID(Point const &p) const
Returns the ID of the voxel containing p, or -1 if none.
unsigned int GetNVoxels() const
Returns the total number of voxels in the volume.
process_name opflash particleana ie ie y
decltype(auto) GetRegionLowerCorner() const
Returns the volume vertex (type Point) with the lowest coordinates.
Point GetCenter() const
Returns the center of the voxel (type Point).
decltype(auto) GetLowerCorner() const
Returns the voxel vertex (type Point) with the lowest coordinates.
decltype(auto) GetRegionUpperCorner() const
Returns the volume vertex (type Point) with the highest coordinates.
std::array< int, 3U > GetVoxelCoords(int ID) const
Representation of a single small volume (voxel).
process_name largeant stream1 can override from command line with o or output physics producers generator N
decltype(auto) GetUpperCorner() const
Returns the voxel vertex (type Point) with the highest coordinates.