LArSoft  v09_90_00
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
17 
18 // ART includes
19 namespace fhicl {
20  class ParameterSet;
21 }
23 
24 // ROOT includes
25 class TF1;
26 
27 #include <string>
28 #include <vector>
29 
30 namespace opdet {
32  public:
34 
36  double SampleFreq() const noexcept { return fSampleFreq; }
38  double TimeBegin() const noexcept { return fTimeBegin; }
40  double TimeEnd() const noexcept { return fTimeEnd; }
41 
46  std::vector<double> WaveformInit(std::string WaveformFile);
47 
52  optdata::TimeSlice_t GetTimeSlice(double time_ns);
53 
55  double QE() const noexcept { return fQE; }
57  double DarkRate() const noexcept { return fDarkRate; }
59  double PedFlucRate() const noexcept { return fPedFlucRate; }
61  optdata::ADC_Count_t PedFlucAmp() const noexcept { return fPedFlucAmp; }
63  optdata::ADC_Count_t SaturationScale() const noexcept { return fSaturationScale; }
65  optdata::ADC_Count_t ADCBaseline() const noexcept { return fADCBaseline; }
67  double WFTimeConstant() const noexcept { return fWFTimeConstant; }
69  double WFPowerFactor() const noexcept { return fWFPowerFactor; }
71  double LowGainMean() const noexcept { return fLowGainMean; }
73  double HighGainMean() const noexcept { return fHighGainMean; }
75  double LowGainMean(optdata::Channel_t ch) const;
77  double HighGainMean(optdata::Channel_t ch) const;
78 
80  double GainSpread() const noexcept { return fGainSpread; }
82  double GainSpread_PMT2PMT() const noexcept { return fGainSpread_PMT2PMT; }
84  double LowGain(optdata::Channel_t ch) const;
86  double HighGain(optdata::Channel_t ch) const;
87 
89  std::vector<double> const& SinglePEWaveform() const noexcept { return fWaveform; }
91  std::vector<double> const& HighGainArray() const noexcept { return fHighGainArray; }
93  std::vector<double> const& LowGainArray() const noexcept { return fLowGainArray; }
95  std::vector<double> const& GainSpreadArray() const noexcept { return fGainSpreadArray; }
97  std::vector<optdata::ADC_Count_t> const& PedMeanArray() const noexcept { return fPedMeanArray; }
98 
100  double GetSPEArea();
102  double GetSPECumulativeArea();
104  double GetSPEAmplitude();
106  double GetSPECumulativeAmplitude();
107 
108  private:
109  double fSampleFreq;
110  double fTimeBegin;
111  double fTimeEnd;
112  double fPERescale;
113 
114  std::vector<double> GenEmpiricalWF(std::string WaveformFile);
115  std::vector<double> GenAnalyticalWF();
116  void GenerateWaveform();
117  void FillGainArray();
118  void FillPedMeanArray();
119 
122  double fQE;
123  double fPedFlucRate;
125  double fDarkRate;
129  double fLowGainMean;
134  double fWFLength;
135  double fGainSpread;
138 
139  std::string fHighGainFile;
140  std::string fLowGainFile;
141  std::string fWaveformFile;
142  std::string fGainSpreadFile;
143  std::vector<double> fWaveform;
145  std::vector<double> fLowGainArray;
146  std::vector<double> fHighGainArray;
147  std::vector<double> fGainSpreadArray;
148  std::vector<optdata::ADC_Count_t> fPedMeanArray;
150 
151  }; // class OpDigiProperties
152 
153 } //namespace opdet
154 
156 
157 #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
art::ServiceHandle< geo::Geometry const > fGeometry
double DarkRate() const noexcept
Returns rate of dark noise.
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.
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.
#define DECLARE_ART_SERVICE(svc, scope)
std::vector< double > const & HighGainArray() const noexcept
Returns an array of HIGH gain.
parameter set interface
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.
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.
unsigned int TimeSlice_t
Definition: OpticalTypes.h:20
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.
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.
art framework interface to geometry description
optdata::ADC_Count_t fSaturationScale
double HighGainMean() const noexcept
Returns set mean gain value for HIGH gain.