LArSoft  v06_85_00
Liquid Argon Software toolkit - http://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 #include "fhiclcpp/ParameterSet.h"
23 
24 // ROOT includes
25 #include "TF1.h"
26 
27 namespace opdet
28 {
30  public:
31 
34 
35  void reconfigure(fhicl::ParameterSet const& p);
36 
38  double SampleFreq() { return fSampleFreq; }
40  double TimeBegin() { return fTimeBegin; }
42  double TimeEnd() { return fTimeEnd; }
43 
48  std::vector<double> WaveformInit(std::string WaveformFile);
49 
54  optdata::TimeSlice_t GetTimeSlice(double time_ns);
55 
57  double QE() const { return fQE; }
59  double DarkRate() const { return fDarkRate; }
61  double PedFlucRate() const { return fPedFlucRate; }
69  double WFTimeConstant() const { return fWFTimeConstant; }
71  double WFPowerFactor() const { return fWFPowerFactor; }
73  double LowGainMean () const { return fLowGainMean; }
75  double HighGainMean () const { return fHighGainMean; }
77  double LowGainMean (optdata::Channel_t ch) const;
79  double HighGainMean (optdata::Channel_t ch) const;
80 
82  double GainSpread () const { return fGainSpread; }
84  double GainSpread_PMT2PMT() const { return fGainSpread_PMT2PMT; }
86  double LowGain(optdata::Channel_t ch) const;
88  double HighGain(optdata::Channel_t ch) const;
89 
91  std::vector<double> SinglePEWaveform() const { return fWaveform; }
93  std::vector<double> HighGainArray() const { return fHighGainArray; }
95  std::vector<double> LowGainArray() const { return fLowGainArray; }
97  std::vector<double> GainSpreadArray() const { return fGainSpreadArray; }
99  std::vector<optdata::ADC_Count_t> PedMeanArray() const {return fPedMeanArray;}
100 
102  double GetSPEArea();
104  double GetSPECumulativeArea();
106  double GetSPEAmplitude();
108  double GetSPECumulativeAmplitude();
109 
110  private:
111 
112  double fSampleFreq;
113  double fTimeBegin;
114  double fTimeEnd;
115  double fPERescale;
116 
117  std::vector<double> GenEmpiricalWF(std::string WaveformFile);
118  std::vector<double> GenAnalyticalWF();
119  void GenerateWaveform();
120  void FillGainArray();
121  void FillPedMeanArray();
122 
125  double fQE;
126  double fPedFlucRate;
128  double fDarkRate;
132  double fLowGainMean;
137  double fWFLength;
138  double fGainSpread;
141 
142  std::string fHighGainFile;
143  std::string fLowGainFile;
144  std::string fWaveformFile;
145  std::string fGainSpreadFile;
146  std::vector<double> fWaveform;
147  std::vector<double> fLowGainArray;
148  std::vector<double> fHighGainArray;
149  std::vector<double> fGainSpreadArray;
150  std::vector<optdata::ADC_Count_t> fPedMeanArray;
152 
153  }; // class OpDigiProperties
154 
155 } //namespace opdet
156 
158 
159 #endif
double HighGainMean() const
Returns set mean gain value for HIGH gain.
std::vector< double > fHighGainArray
void reconfigure(fhicl::ParameterSet const &p)
art::ServiceHandle< geo::Geometry > fGeometry
std::vector< double > GenAnalyticalWF()
double GetSPEAmplitude()
Utility function ... To be verified (Kazu 08/05/13)
std::vector< double > LowGainArray() const
Returns an array of LOW gain.
std::vector< double > SinglePEWaveform() const
Returns a vector of double which represents a binned SPE waveform.
double TimeBegin()
Returns window start time in us ... with respect to MC photon T0.
#define DECLARE_ART_SERVICE(svc, scope)
Definition: ServiceMacros.h:91
double GainSpread() const
Returns set value for intrinsic gain spread (common to HIGH and LOW)
std::vector< double > fLowGainArray
std::vector< optdata::ADC_Count_t > PedMeanArray() const
Returns an array of generated pedestal mean value per channel.
double LowGainMean() const
Returns set mean gain value for LOW gain.
double GetSPECumulativeArea()
Utility function ... To be verified (Kazu 08/05/13)
std::vector< double > HighGainArray() const
Returns an array of HIGH gain.
uint16_t ADC_Count_t
Definition: OpticalTypes.h:16
std::vector< double > WaveformInit(std::string WaveformFile)
double GetSPECumulativeAmplitude()
Utility function ... To be verified (Kazu 08/05/13)
std::vector< double > GenEmpiricalWF(std::string WaveformFile)
double DarkRate() const
Returns rate of dark noise.
optdata::ADC_Count_t SaturationScale() const
Returns the saturation scale of the electronics.
double SampleFreq()
Returns sample frequency in MHz.
std::vector< double > GainSpreadArray() const
Returns an array of gain spread.
OpDigiProperties(fhicl::ParameterSet const &pset, art::ActivityRegistry &reg)
optdata::ADC_Count_t ADCBaseline() const
Returns the ADCBaseline set mean value.
std::vector< double > fWaveform
optdata::ADC_Count_t fPedFlucAmp
double WFTimeConstant() const
Returns WF time constant used in analytical model.
double GainSpread_PMT2PMT() const
Returns set value for PMT-to-PMT gain spread.
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...
double WFPowerFactor() const
Returns WF power factor used in analytical model.
std::vector< optdata::ADC_Count_t > fPedMeanArray
double PedFlucRate() const
Returns rate of pedestal fluctuation.
optdata::TimeSlice_t GetTimeSlice(double time_ns)
std::vector< double > fGainSpreadArray
optdata::ADC_Count_t PedFlucAmp() const
Returns amplitude of pedestal fluctuation.
optdata::ADC_Count_t fADCBaseline
double GetSPEArea()
Utility function ... To be verified (Kazu 08/05/13)
unsigned int Channel_t
Definition: OpticalTypes.h:19
double QE() const
Returns quantum efficiency.
art framework interface to geometry description
optdata::ADC_Count_t fSaturationScale
double TimeEnd()
Returns window end time in us ... with respect to MC photon T0.