LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
IPhotonLibrary.h
Go to the documentation of this file.
1 #ifndef IPHOTONLIBRARY_H
5 #define IPHOTONLIBRARY_H
6 
7 #include <cstddef> // size_t
8 #include <vector>
9 
10 #include "TF1.h"
11 
12 namespace phot {
15  public:
17  using Counts_t = const float*;
18 
20  using T0s_t = const float*;
21 
24  using Params_t = std::vector<float> const*;
25 
28  using Functions_t = TF1*;
29 
30  virtual ~IPhotonLibrary() = default;
31 
32  virtual float GetCount(size_t Voxel, size_t OpChannel) const = 0;
33  virtual float GetReflCount(size_t Voxel, size_t OpChannel) const = 0;
34  virtual float GetReflT0(size_t Voxel, size_t OpChannel) const = 0;
35 
37  virtual Counts_t GetCounts(size_t Voxel) const = 0;
38  virtual Counts_t GetReflCounts(size_t Voxel) const = 0;
39  virtual T0s_t GetReflT0s(size_t Voxel) const = 0;
40 
42  virtual bool hasReflected() const = 0;
43 
45  virtual bool hasReflectedT0() const = 0;
46 
47  virtual int NOpChannels() const = 0;
48  virtual int NVoxels() const = 0;
49 
50  virtual bool isVoxelValid(size_t Voxel) const { return Voxel < (std::size_t)NVoxels(); }
51 
53  size_t LibrarySize() const { return NVoxels() * NOpChannels(); }
54  };
55 } // namespace
56 
57 #endif
virtual float GetReflT0(size_t Voxel, size_t OpChannel) const =0
virtual float GetReflCount(size_t Voxel, size_t OpChannel) const =0
virtual ~IPhotonLibrary()=default
virtual Counts_t GetReflCounts(size_t Voxel) const =0
virtual float GetCount(size_t Voxel, size_t OpChannel) const =0
virtual Counts_t GetCounts(size_t Voxel) const =0
Returns a pointer to NOpChannels() visibility values, one per channel.
std::vector< float > const * Params_t
virtual bool isVoxelValid(size_t Voxel) const
virtual int NOpChannels() const =0
General LArSoft Utilities.
virtual T0s_t GetReflT0s(size_t Voxel) const =0
virtual bool hasReflectedT0() const =0
Returns whether the current library deals with reflected light timing.
size_t LibrarySize() const
Returns the number of elements in the library.
const float * Counts_t
Type for visibility count per optical channel.
Interface shared by all PhotonLibrary-like classes.
const float * T0s_t
Type for time of arrival per optical channel.
virtual bool hasReflected() const =0
Returns whether the current library deals with reflected light count.
virtual int NVoxels() const =0