LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
LArVoxelCalculator.h
Go to the documentation of this file.
1 
10 
14 
19 
20 #ifndef sim_LArVoxelCalculator_H
21 #define sim_LArVoxelCalculator_H
22 
24 
25 namespace fhicl {
26  class ParameterSet;
27 }
28 
29 #include <vector>
30 
31 namespace sim {
32 
34  public:
36 
38  double VoxelSizeX() const { return m_voxelSize[0]; }
39  double VoxelSizeY() const { return m_voxelSize[1]; }
40  double VoxelSizeZ() const { return m_voxelSize[2]; }
41  double VoxelSizeT() const { return m_voxelSize[3]; }
42  double VoxelOffsetX() const { return m_voxelOffset[0]; }
43  double VoxelOffsetY() const { return m_voxelOffset[1]; }
44  double VoxelOffsetZ() const { return m_voxelOffset[2]; }
45  double VoxelOffsetT() const { return m_voxelOffset[3]; }
46 
49  double EnergyCut() const { return m_energyCut; }
50 
53  double SuggestedStepSize() const;
54 
58  int AxisToBin(const int, const double) const;
59 
62  int XAxisToBin(const double value) const { return AxisToBin(0, value); }
63  int YAxisToBin(const double value) const { return AxisToBin(1, value); }
64  int ZAxisToBin(const double value) const { return AxisToBin(2, value); }
65  int TAxisToBin(const double value) const { return AxisToBin(3, value); }
66 
70  double BinToAxis(const int, const int) const;
71 
74  double XBinToAxis(const int value) const { return BinToAxis(0, value); }
75  double YBinToAxis(const int value) const { return BinToAxis(1, value); }
76  double ZBinToAxis(const int value) const { return BinToAxis(2, value); }
77  double TBinToAxis(const int value) const { return BinToAxis(3, value); }
78 
79  private:
80  typedef std::vector<double> vector_type;
81 
83  vector_type const m_voxelSize;
84 
87  vector_type const m_voxelOffset;
88 
91  double const m_energyCut;
92  };
93 
94 } // namespace sim
95 
97 #endif // sim_LArVoxelCalculator_H
std::vector< double > vector_type
vector_type const m_voxelOffset
double VoxelOffsetT() const
double YBinToAxis(const int value) const
double VoxelSizeX() const
Access to voxel dimensions and offsets.
vector_type const m_voxelSize
The sizes of the voxels in (x,y,z,t). Units are (mm,ns).
int ZAxisToBin(const double value) const
double TBinToAxis(const int value) const
int XAxisToBin(const double value) const
#define DECLARE_ART_SERVICE(svc, scope)
parameter set interface
int TAxisToBin(const double value) const
double VoxelOffsetX() const
Monte Carlo Simulation.
double value
Definition: spectrum.C:18
double VoxelOffsetZ() const
double XBinToAxis(const int value) const
double ZBinToAxis(const int value) const
int YAxisToBin(const double value) const
double VoxelOffsetY() const