LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
LArVoxelCalculator.h
Go to the documentation of this file.
1 
10 
14 
19 
23 
24 #ifndef sim_LArVoxelCalculator_H
25 #define sim_LArVoxelCalculator_H
26 
27 #include <vector>
28 
29 #include "fhiclcpp/ParameterSet.h"
33 
34 namespace sim {
35 
37  {
38  public:
39 
42 
43  void reconfigure(fhicl::ParameterSet const& pset);
44 
46  double VoxelSizeX() const { return m_voxelSize[0]; }
47  double VoxelSizeY() const { return m_voxelSize[1]; }
48  double VoxelSizeZ() const { return m_voxelSize[2]; }
49  double VoxelSizeT() const { return m_voxelSize[3]; }
50  double VoxelOffsetX() const { return m_voxelOffset[0]; }
51  double VoxelOffsetY() const { return m_voxelOffset[1]; }
52  double VoxelOffsetZ() const { return m_voxelOffset[2]; }
53  double VoxelOffsetT() const { return m_voxelOffset[3]; }
54 
57  double EnergyCut() const { return m_energyCut; }
58 
61  double SuggestedStepSize() const;
62 
66  int AxisToBin( const int, const double ) const;
67 
70  int XAxisToBin( const double value ) const { return AxisToBin(0,value); }
71  int YAxisToBin( const double value ) const { return AxisToBin(1,value); }
72  int ZAxisToBin( const double value ) const { return AxisToBin(2,value); }
73  int TAxisToBin( const double value ) const { return AxisToBin(3,value); }
74 
78  double BinToAxis( const int, const int ) const;
79 
82  double XBinToAxis( const int value ) const { return BinToAxis(0,value); }
83  double YBinToAxis( const int value ) const { return BinToAxis(1,value); }
84  double ZBinToAxis( const int value ) const { return BinToAxis(2,value); }
85  double TBinToAxis( const int value ) const { return BinToAxis(3,value); }
86 
87  private:
88 
89  typedef std::vector<double> vector_type;
90 
92  vector_type m_voxelSize;
93 
96  vector_type m_voxelOffset;
97 
100  double m_energyCut;
101 
102  };
103 
104 } // namespace sim
105 
107 #endif // sim_LArVoxelCalculator_H
std::vector< double > vector_type
double VoxelOffsetT() const
double YBinToAxis(const int value) const
double VoxelSizeX() const
Access to voxel dimensions and offsets.
int ZAxisToBin(const double value) const
#define DECLARE_ART_SERVICE(svc, scope)
Definition: ServiceMacros.h:91
double TBinToAxis(const int value) const
int XAxisToBin(const double value) const
void reconfigure(fhicl::ParameterSet const &pset)
vector_type m_voxelSize
The sizes of the voxels in (x,y,z,t). Units are (mm,ns).
int TAxisToBin(const double value) const
LArVoxelCalculator(fhicl::ParameterSet const &pset, art::ActivityRegistry &reg)
double VoxelOffsetX() const
Monte Carlo Simulation.
double VoxelOffsetZ() const
double XBinToAxis(const int value) const
std::string value(boost::any const &)
int AxisToBin(const int, const double) const
double BinToAxis(const int, const int) const
double ZBinToAxis(const int value) const
int YAxisToBin(const double value) const
double VoxelOffsetY() const