Diffusion.h
Go to the documentation of this file.
1 #ifndef WIRECELL_DIFFUSION
2 #define WIRECELL_DIFFUSION
3 
4 
6 #include "WireCellIface/IDepo.h"
7 
8 #include <boost/multi_array.hpp>
9 
10 namespace WireCell {
11 
12  class Diffusion : public IDiffusion
13  {
15  boost::multi_array<double, 2> array;
16  double lmin, tmin, lmax, tmax, lbin, tbin;
17  public:
18 
20  int nlong, int ntrans, double lmin, double tmin, double lmax, double tmax);
21 
22  Diffusion(const Diffusion& other);
24 
25  virtual ~Diffusion();
26 
27  virtual IDepo::pointer depo() const;
28 
29  // Size of diffusion patch in both directions.
30  virtual int lsize() const;
31  virtual int tsize() const;
32 
33  virtual double get(int lind, int tind) const;
34  virtual double set(int lind, int tind, double value);
35 
36  // Longitudinal position at index with extra offset 0.5 is bin center.
37  virtual double lpos(int ind, double offset=0.0) const;
38  // Transverse position at index with extra offset 0.5 is bin center.
39  virtual double tpos(int ind, double offset=0.0) const;
40 
41  };
42 }
43 #endif
virtual int lsize() const
Helper method to give the array size in longitudinal dimension.
Definition: Diffusion.cxx:43
std::shared_ptr< const IDepo > pointer
Definition: IData.h:19
virtual double tpos(int ind, double offset=0.0) const
Definition: Diffusion.cxx:67
Diffusion(IDepo::pointer depo, int nlong, int ntrans, double lmin, double tmin, double lmax, double tmax)
Definition: Diffusion.cxx:4
virtual ~Diffusion()
Definition: Diffusion.cxx:35
double lbin() const
Return bins size in longitudinal direction.
Definition: IDiffusion.h:52
IDepo::pointer m_depo
Definition: Diffusion.h:14
virtual double lpos(int ind, double offset=0.0) const
Definition: Diffusion.cxx:62
virtual int tsize() const
Helper method to give the array size in transverse dimension.
Definition: Diffusion.cxx:47
virtual IDepo::pointer depo() const
Return the deposition that led to this diffusion.
Definition: Diffusion.cxx:39
Diffusion & operator=(const Diffusion &other)
Definition: Diffusion.cxx:21
Definition: Main.h:22
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1225
boost::multi_array< double, 2 > array
Definition: Diffusion.h:15
double tbin() const
Return bins size in transverse direction.
Definition: IDiffusion.h:54