LArSoft  v10_04_05
Liquid Argon Software toolkit - https://larsoft.org/
OpDigiProperties.h
Go to the documentation of this file.
1 // \file OpDigiProperties.h
3 //
4 // \brief service containing information about optical digitization
5 //
6 // \author bjpjones@mit.edu
7 // \author kazuhiro@nevis.columbia.edu
8 //
10 
11 #ifndef OPDET_OPDIGIPROPERTIES_H
12 #define OPDET_OPDIGIPROPERTIES_H
13 
14 // LArSoft includes
16 
17 // ART includes
20 #include "fhiclcpp/fwd.h"
21 
22 // ROOT includes
23 class TF1;
24 
25 #include <string>
26 #include <vector>
27 
28 namespace opdet {
30  public:
32 
34  double SampleFreq() const noexcept { return fSampleFreq; }
36  double TimeBegin() const noexcept { return fTimeBegin; }
38  double TimeEnd() const noexcept { return fTimeEnd; }
39 
44  std::vector<double> WaveformInit(std::string WaveformFile);
45 
50  optdata::TimeSlice_t GetTimeSlice(double time_ns);
51 
53  double QE() const noexcept { return fQE; }
55  double DarkRate() const noexcept { return fDarkRate; }
57  double PedFlucRate() const noexcept { return fPedFlucRate; }
59  optdata::ADC_Count_t PedFlucAmp() const noexcept { return fPedFlucAmp; }
63  optdata::ADC_Count_t ADCBaseline() const noexcept { return fADCBaseline; }
65  double WFTimeConstant() const noexcept { return fWFTimeConstant; }
67  double WFPowerFactor() const noexcept { return fWFPowerFactor; }
69  double LowGainMean() const noexcept { return fLowGainMean; }
71  double HighGainMean() const noexcept { return fHighGainMean; }
73  double LowGainMean(optdata::Channel_t ch) const;
75  double HighGainMean(optdata::Channel_t ch) const;
76 
78  double GainSpread() const noexcept { return fGainSpread; }
80  double GainSpread_PMT2PMT() const noexcept { return fGainSpread_PMT2PMT; }
82  double LowGain(optdata::Channel_t ch) const;
84  double HighGain(optdata::Channel_t ch) const;
85 
87  std::vector<double> const& SinglePEWaveform() const noexcept { return fWaveform; }
89  std::vector<double> const& HighGainArray() const noexcept { return fHighGainArray; }
91  std::vector<double> const& LowGainArray() const noexcept { return fLowGainArray; }
93  std::vector<double> const& GainSpreadArray() const noexcept { return fGainSpreadArray; }
95  std::vector<optdata::ADC_Count_t> const& PedMeanArray() const noexcept { return fPedMeanArray; }
96 
98  double GetSPEArea() const;
99  double GetSPECumulativeArea() const;
100  double GetSPEAmplitude() const;
101  double GetSPECumulativeAmplitude() const;
102 
103  private:
104  double fSampleFreq;
105  double fTimeBegin;
106  double fTimeEnd;
107  double fPERescale;
108 
109  std::vector<double> GenEmpiricalWF(std::string WaveformFile);
110  std::vector<double> GenAnalyticalWF();
111  void GenerateWaveform();
112  void FillGainArray();
113  void FillPedMeanArray();
114 
117  double fQE;
118  double fPedFlucRate;
120  double fDarkRate;
124  double fLowGainMean;
129  double fWFLength;
130  double fGainSpread;
133 
134  std::string fHighGainFile;
135  std::string fLowGainFile;
136  std::string fWaveformFile;
137  std::string fGainSpreadFile;
138  std::vector<double> fWaveform;
140  std::vector<double> fLowGainArray;
141  std::vector<double> fHighGainArray;
142  std::vector<double> fGainSpreadArray;
143  std::vector<optdata::ADC_Count_t> fPedMeanArray;
144  unsigned int fNOpChannels;
145  }; // class OpDigiProperties
146 
147 } //namespace opdet
148 
150 
151 #endif
std::vector< double > const & GainSpreadArray() const noexcept
Returns an array of gain spread.
double TimeEnd() const noexcept
Returns window end time in us ... with respect to MC photon T0.
std::vector< double > fHighGainArray
OpDigiProperties(fhicl::ParameterSet const &pset)
double DarkRate() const noexcept
Returns rate of dark noise.
std::vector< double > GenAnalyticalWF()
double GetSPECumulativeAmplitude() const
std::vector< double > fLowGainArray
double LowGainMean() const noexcept
Returns set mean gain value for LOW gain.
double GainSpread() const noexcept
Returns set value for intrinsic gain spread (common to HIGH and LOW)
uint16_t ADC_Count_t
Definition: OpticalTypes.h:16
double SampleFreq() const noexcept
Returns sample frequency in MHz.
std::vector< double > WaveformInit(std::string WaveformFile)
double QE() const noexcept
Returns quantum efficiency.
std::vector< optdata::ADC_Count_t > const & PedMeanArray() const noexcept
Returns an array of generated pedestal mean value per channel.
std::vector< double > GenEmpiricalWF(std::string WaveformFile)
#define DECLARE_ART_SERVICE(svc, scope)
std::vector< double > const & HighGainArray() const noexcept
Returns an array of HIGH gain.
std::vector< double > const & LowGainArray() const noexcept
Returns an array of LOW gain.
std::vector< double > fWaveform
std::vector< double > const & SinglePEWaveform() const noexcept
Returns a vector of double which represents a binned SPE waveform.
double PedFlucRate() const noexcept
Returns rate of pedestal fluctuation.
double GetSPEArea() const
Utility functions.
optdata::ADC_Count_t ADCBaseline() const noexcept
Returns the ADCBaseline set mean value.
optdata::ADC_Count_t fPedFlucAmp
double WFPowerFactor() const noexcept
Returns WF power factor used in analytical model.
double TimeBegin() const noexcept
Returns window start time in us ... with respect to MC photon T0.
double GetSPEAmplitude() const
unsigned int TimeSlice_t
Definition: OpticalTypes.h:20
double LowGain(optdata::Channel_t ch) const
Generate & return LOW gain value for an input channel using mean & spread for this channel...
double HighGain(optdata::Channel_t ch) const
Generate & return HIGH gain value for an input channel using mean & spread for this channel...
optdata::ADC_Count_t PedFlucAmp() const noexcept
Returns amplitude of pedestal fluctuation.
std::vector< optdata::ADC_Count_t > fPedMeanArray
optdata::ADC_Count_t SaturationScale() const noexcept
Returns the saturation scale of the electronics.
double GetSPECumulativeArea() const
optdata::TimeSlice_t GetTimeSlice(double time_ns)
std::vector< double > fGainSpreadArray
optdata::ADC_Count_t fADCBaseline
double GainSpread_PMT2PMT() const noexcept
Returns set value for PMT-to-PMT gain spread.
unsigned int Channel_t
Definition: OpticalTypes.h:19
double WFTimeConstant() const noexcept
Returns WF time constant used in analytical model.
optdata::ADC_Count_t fSaturationScale
double HighGainMean() const noexcept
Returns set mean gain value for HIGH gain.