SignalShapingService.h
Go to the documentation of this file.
1 // SignalShapingService
2 
3 // David Adams
4 // January 2017
5 
6 // Interface for the class that performs convolution and deconvolution.
7 //
8 // I have simple adopted the interface used in SignalShapingServiceDUNE.
9 // A method to return the expected size for the signal vector has been added.
10 
11 #ifndef SignalShapingService_H
12 #define SignalShapingService_H
13 
14 #include <vector>
15 
16 namespace detinfo {
17  class DetectorClocksData;
18  class DetectorPropertiesData;
19 }
20 
21 namespace util {
22 class SignalShaping;
23 }
24 
26 public:
27 
28  using Channel = unsigned int;
29  using FloatVector = std::vector<float>;
30  using DoubleVector = std::vector<double>;
31  using DoubleVectorVector = std::vector<DoubleVector>;
32 
33  virtual ~SignalShapingService() { }
34 
35  virtual DoubleVectorVector GetNoiseFactVec() const =0;
36  virtual double GetASICGain(Channel channel) const =0;
37  virtual double GetShapingTime(Channel channel) const =0;
38  virtual double GetRawNoise(Channel channel) const =0;
39  virtual double GetDeconNoise(Channel channel) const =0;
40  virtual double GetDeconNorm() const =0;
41  virtual unsigned int GetSignalSize() const =0; // The number of ticks for convolution.
42 
43  // Accessors.
44  virtual int FieldResponseTOffset(detinfo::DetectorClocksData const& clockData, Channel channel) const =0;
45  virtual const util::SignalShaping& SignalShaping(Channel channel) const =0;
46 
47  // Do convolution calcution (for simulation).
48  virtual void Convolute(detinfo::DetectorClocksData const& clockData, Channel channel, FloatVector& sigs) const =0;
49  virtual void Convolute(detinfo::DetectorClocksData const& clockData, Channel channel, DoubleVector& sigs) const =0;
50 
51  // Do deconvolution calcution (for reconstruction).
52  virtual void Deconvolute(detinfo::DetectorClocksData const& clockData, Channel channel, FloatVector& sigs) const =0;
53  virtual void Deconvolute(detinfo::DetectorClocksData const& clockData, Channel channel, DoubleVector& sigs) const =0;
54 
55 };
56 
57 #endif
Namespace for general, non-LArSoft-specific utilities.
std::vector< float > FloatVector
uint8_t channel
Definition: CRTFragment.hh:201
std::vector< DoubleVector > DoubleVectorVector
General LArSoft Utilities.
std::vector< double > DoubleVector
Contains all timing reference information for the detector.