All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
opdet::OpDigiProperties Class Reference

#include <OpDigiProperties.h>

Public Member Functions

 OpDigiProperties (fhicl::ParameterSet const &pset)
 
double SampleFreq () const noexcept
 Returns sample frequency in MHz. More...
 
double TimeBegin () const noexcept
 Returns window start time in us ... with respect to MC photon T0. More...
 
double TimeEnd () const noexcept
 Returns window end time in us ... with respect to MC photon T0. More...
 
std::vector< double > WaveformInit (std::string WaveformFile)
 
optdata::TimeSlice_t GetTimeSlice (double time_ns)
 
double QE () const noexcept
 Returns quantum efficiency. More...
 
double DarkRate () const noexcept
 Returns rate of dark noise. More...
 
double PedFlucRate () const noexcept
 Returns rate of pedestal fluctuation. More...
 
optdata::ADC_Count_t PedFlucAmp () const noexcept
 Returns amplitude of pedestal fluctuation. More...
 
optdata::ADC_Count_t SaturationScale () const noexcept
 Returns the saturation scale of the electronics. More...
 
optdata::ADC_Count_t ADCBaseline () const noexcept
 Returns the ADCBaseline set mean value. More...
 
double WFTimeConstant () const noexcept
 Returns WF time constant used in analytical model. More...
 
double WFPowerFactor () const noexcept
 Returns WF power factor used in analytical model. More...
 
double LowGainMean () const noexcept
 Returns set mean gain value for LOW gain. More...
 
double HighGainMean () const noexcept
 Returns set mean gain value for HIGH gain. More...
 
double LowGainMean (optdata::Channel_t ch) const
 Returns generated LOW gain value for input channel (PMT-to-PMT spread applied) More...
 
double HighGainMean (optdata::Channel_t ch) const
 Returns generated HIGH gain value for input channel (PMT-to-PMT spread applied) More...
 
double GainSpread () const noexcept
 Returns set value for intrinsic gain spread (common to HIGH and LOW) More...
 
double GainSpread_PMT2PMT () const noexcept
 Returns set value for PMT-to-PMT gain spread. More...
 
double LowGain (optdata::Channel_t ch) const
 Generate & return LOW gain value for an input channel using mean & spread for this channel. More...
 
double HighGain (optdata::Channel_t ch) const
 Generate & return HIGH gain value for an input channel using mean & spread for this channel. More...
 
std::vector< double > const & SinglePEWaveform () const noexcept
 Returns a vector of double which represents a binned SPE waveform. More...
 
std::vector< double > const & HighGainArray () const noexcept
 Returns an array of HIGH gain. More...
 
std::vector< double > const & LowGainArray () const noexcept
 Returns an array of LOW gain. More...
 
std::vector< double > const & GainSpreadArray () const noexcept
 Returns an array of gain spread. More...
 
std::vector
< optdata::ADC_Count_t > const & 
PedMeanArray () const noexcept
 Returns an array of generated pedestal mean value per channel. More...
 
double GetSPEArea ()
 Utility function ... To be verified (Kazu 08/05/13) More...
 
double GetSPECumulativeArea ()
 Utility function ... To be verified (Kazu 08/05/13) More...
 
double GetSPEAmplitude ()
 Utility function ... To be verified (Kazu 08/05/13) More...
 
double GetSPECumulativeAmplitude ()
 Utility function ... To be verified (Kazu 08/05/13) More...
 

Private Member Functions

std::vector< double > GenEmpiricalWF (std::string WaveformFile)
 
std::vector< double > GenAnalyticalWF ()
 
void GenerateWaveform ()
 
void FillGainArray ()
 
void FillPedMeanArray ()
 

Private Attributes

double fSampleFreq
 
double fTimeBegin
 
double fTimeEnd
 
double fPERescale
 
bool fUseEmpiricalGain
 
bool fUseEmpiricalShape
 
double fQE
 
double fPedFlucRate
 
optdata::ADC_Count_t fPedFlucAmp
 
double fDarkRate
 
optdata::ADC_Count_t fSaturationScale
 
optdata::ADC_Count_t fADCBaseline
 
double fADCBaseSpread
 
double fLowGainMean
 
double fHighGainMean
 
double fVoltageAmpForSPE
 
double fWFTimeConstant
 
double fWFPowerFactor
 
double fWFLength
 
double fGainSpread
 
double fGainSpread_PMT2PMT
 
TF1 * fAnalyticalSPE
 
std::string fHighGainFile
 
std::string fLowGainFile
 
std::string fWaveformFile
 
std::string fGainSpreadFile
 
std::vector< double > fWaveform
 
bool fChargeNormalized
 
std::vector< double > fLowGainArray
 
std::vector< double > fHighGainArray
 
std::vector< double > fGainSpreadArray
 
std::vector< optdata::ADC_Count_tfPedMeanArray
 
art::ServiceHandle
< geo::Geometry const > 
fGeometry
 

Detailed Description

Definition at line 30 of file OpDigiProperties.h.

Constructor & Destructor Documentation

opdet::OpDigiProperties::OpDigiProperties ( fhicl::ParameterSet const &  pset)

Definition at line 25 of file OpDigiProperties.cc.

26  : fAnalyticalSPE(0)
27  {
28  fSampleFreq = p.get< double >("SampleFreq" );
29  fTimeBegin = p.get< double >("TimeBegin" );
30  fTimeEnd = p.get< double >("TimeEnd" );
31  fWaveformFile = p.get< std::string >("WaveformFile" );
32  fPERescale = p.get< double >("PERescale" );
33 
34  // PMT properties
35  fQE = p.get<double>("QE");
36  fDarkRate = p.get<double>("DarkRate");
37  fSaturationScale = p.get<optdata::ADC_Count_t>("SaturationScale");
38 
39  // Shaper properties
40  fUseEmpiricalGain= p.get<bool >("UseEmpiricalGain");
41  fHighGainFile = p.get<std::string >("HighGainFile");
42  fLowGainFile = p.get<std::string >("LowGainFile");
43  fGainSpreadFile = p.get<std::string >("GainSpreadFile");
44 
45  fHighGainMean = p.get<double >("HighGainMean");
46  fLowGainMean = p.get<double >("LowGainMean");
47  fGainSpread = p.get<double >("GainSpread");
48  fGainSpread_PMT2PMT = p.get<double >("GainSpread_PMT2PMT");
49 
50  // Digitization ped fluc
51  fPedFlucRate = p.get<double>("PedFlucRate");
52  fPedFlucAmp = p.get<optdata::ADC_Count_t>("PedFlucAmp");
53  fADCBaseline = p.get<optdata::ADC_Count_t>("ADCBaseline");
54  fADCBaseSpread = p.get<double>("ADCBaseSpread");
55 
56  // WF related stuff
57  fUseEmpiricalShape = p.get< bool >("UseEmpiricalShape");
58  fWFLength = p.get< double >("WFLength" );
59 
60  fWaveformFile = p.get< std::string >("WaveformFile" );
61  fChargeNormalized = p.get< bool >("WaveformChargeNormalized", false);
62 
63  // Option 2: WF from analytical function
64  fWFPowerFactor = p.get< double >("WFPowerFactor" );
65  fWFTimeConstant = p.get< double >("WFTimeConstant" );
66  fVoltageAmpForSPE = p.get< double >("VoltageAmpForSPE" );
67 
68  // Generate the SPE waveform (i.e. fWaveform)
70 
71  // Fill gain array
72  FillGainArray();
73 
74  // Fill baseline mean
76 
77  // Report
78  std::string msg(Form("%-10s ... %-10s ... %-10s ... %-10s\n","Ch. Number","Pedestal","High Gain","Low Gain"));
79  for(unsigned int i=0;i<fGeometry->NOpChannels();++i) {
80  msg+=Form("%-10d ... %-10d ... %-10g ... %-10g\n",i,fPedMeanArray[i],fHighGainArray[i],fLowGainArray[i]);
81  }
82  mf::LogInfo(__FUNCTION__)<<msg.c_str();
83  }
std::vector< double > fHighGainArray
art::ServiceHandle< geo::Geometry const > fGeometry
pdgs p
Definition: selectors.fcl:22
std::vector< double > fLowGainArray
uint16_t ADC_Count_t
Definition: OpticalTypes.h:16
optdata::ADC_Count_t fPedFlucAmp
std::vector< optdata::ADC_Count_t > fPedMeanArray
optdata::ADC_Count_t fADCBaseline
optdata::ADC_Count_t fSaturationScale

Member Function Documentation

optdata::ADC_Count_t opdet::OpDigiProperties::ADCBaseline ( ) const
inlinenoexcept

Returns the ADCBaseline set mean value.

Definition at line 65 of file OpDigiProperties.h.

65 { return fADCBaseline; }
optdata::ADC_Count_t fADCBaseline
double opdet::OpDigiProperties::DarkRate ( ) const
inlinenoexcept

Returns rate of dark noise.

Definition at line 57 of file OpDigiProperties.h.

57 { return fDarkRate; }
void opdet::OpDigiProperties::FillGainArray ( )
private

Definition at line 193 of file OpDigiProperties.cc.

193  {
195  {
196  // Fill fron user's text files.
197  mf::LogWarning("OpDigiProperties")<<"Using empirical table of gain for each PMT...";
198  std::string FullPath;
199  cet::search_path sp("FW_SEARCH_PATH");
200 
201  if( !sp.find_file(fHighGainFile, FullPath) )
202  throw cet::exception("OpDigiProperties") << "Unable to find high gain spread file in " << sp.to_string() << "\n";
203 
204  mf::LogWarning("OpDigiProperties")<<"OpDigiProperties opening high gain spread file at " << FullPath.c_str();
205  std::ifstream HighGainFile(FullPath.c_str());
206  if(HighGainFile.is_open()) {
207  std::string line;
208  while ( HighGainFile.good() ){
209  getline(HighGainFile, line);
210  fHighGainArray.push_back(strtod(line.c_str(),NULL));
211  }
212  }else throw cet::exception("OpDigiProperties")<<"Unable to open file!\n";
213 
214  FullPath="";
215  if( !sp.find_file(fLowGainFile, FullPath) )
216  throw cet::exception("OpDigiProperties") << "Unable to find low gain spread file in " << sp.to_string() << "\n";
217 
218  mf::LogWarning("OpDigiProperties")<<"OpDigiProperties opening low gain spread file at " << FullPath.c_str();
219  std::ifstream LowGainFile(FullPath.c_str());
220  if(LowGainFile.is_open()) {
221  std::string line;
222  while ( LowGainFile.good() ){
223  getline(LowGainFile, line);
224  fLowGainArray.push_back(strtod(line.c_str(),NULL));
225  }
226  }else throw cet::exception("OpDigiProperties")<<"Unable to open file!\n";
227 
228  FullPath="";
229  if( !sp.find_file(fGainSpreadFile, FullPath) )
230  throw cet::exception("OpDigiProperties") << "Unable to find low gain spread file in " << sp.to_string() << "\n";
231 
232  mf::LogWarning("OpDigiProperties")<<"OpDigiProperties opening low gain spread file at " << FullPath.c_str();
233  std::ifstream GainSpreadFile(FullPath.c_str());
234  if(GainSpreadFile.is_open()) {
235  std::string line;
236  while ( GainSpreadFile.good() ){
237  getline(GainSpreadFile, line);
238  fGainSpreadArray.push_back(strtod(line.c_str(),NULL));
239  }
240  }else throw cet::exception("OpDigiProperties")<<"Unable to open file!\n";
241 
242  }
243  else{
244  // Generate a set of gake gain mean & spread.
245  std::string txt;
246  txt+= " Generating gain for each pmt.\n";
247  txt+=Form(" High gain mean: %g ADC/p.e.\n", fHighGainMean);
248  txt+=Form(" Low gain mean: %g ADC/p.e.\n", fLowGainMean);
249  txt+=Form(" PMT-to-PMT gain spread : %g \n", fGainSpread_PMT2PMT);
250  txt+=Form(" Intrinsic gain spread : %g \n", fGainSpread);
251  mf::LogWarning("OpDigiProperties")<<txt.c_str();
252  for(unsigned int i=0;i<fGeometry->NOpChannels();++i) {
253  fLowGainArray.push_back(CLHEP::RandGauss::shoot(fLowGainMean,fLowGainMean*fGainSpread_PMT2PMT));
254  fHighGainArray.push_back(CLHEP::RandGauss::shoot(fHighGainMean,fHighGainMean*fGainSpread_PMT2PMT));
255  fGainSpreadArray.push_back(fGainSpread);
256  }
257  }
258 
259  //
260  // Note:
261  // Check for # entries. These exceptions ensures we have enough # of elements.
262  // When a user access the elements by a channel number using LowGainMean(Channel_t ch) etc.,
263  // those functions do not check if the given channel number is valid or not to keep a high
264  // performance of the code. If there's an invalid memory access error in run-time, then
265  // it must mean the user provided an invalid channel number and not due to insufficient
266  // vector elements filled in this function.
267  //
268  if(fLowGainArray.size()<fGeometry->NOpChannels())
269  throw cet::exception("OpDigiProperties")<<"Low gain missing for some channels!\n";
270  if(fHighGainArray.size()<fGeometry->NOpChannels())
271  throw cet::exception("OpDigiProperties")<<"High gain missing for some channels!\n";
272  if(fGainSpreadArray.size()<fGeometry->NOpChannels())
273  throw cet::exception("OpDigiProperties")<<"Gain spread missing for some channels!\n";
274  }
std::vector< double > fHighGainArray
art::ServiceHandle< geo::Geometry const > fGeometry
std::vector< double > fLowGainArray
std::vector< double > fGainSpreadArray
void opdet::OpDigiProperties::FillPedMeanArray ( )
private

Definition at line 187 of file OpDigiProperties.cc.

187  {
188  for(unsigned int i=0;i<fGeometry->NOpChannels();++i)
189  fPedMeanArray.push_back((optdata::ADC_Count_t)(CLHEP::RandGauss::shoot((double)fADCBaseline,fADCBaseSpread)+0.5));
190  }
art::ServiceHandle< geo::Geometry const > fGeometry
uint16_t ADC_Count_t
Definition: OpticalTypes.h:16
std::vector< optdata::ADC_Count_t > fPedMeanArray
optdata::ADC_Count_t fADCBaseline
double opdet::OpDigiProperties::GainSpread ( ) const
inlinenoexcept

Returns set value for intrinsic gain spread (common to HIGH and LOW)

Definition at line 80 of file OpDigiProperties.h.

80 { return fGainSpread; }
double opdet::OpDigiProperties::GainSpread_PMT2PMT ( ) const
inlinenoexcept

Returns set value for PMT-to-PMT gain spread.

Definition at line 82 of file OpDigiProperties.h.

82 { return fGainSpread_PMT2PMT; }
std::vector<double> const& opdet::OpDigiProperties::GainSpreadArray ( ) const
inlinenoexcept

Returns an array of gain spread.

Definition at line 95 of file OpDigiProperties.h.

95 { return fGainSpreadArray; }
std::vector< double > fGainSpreadArray
std::vector< double > opdet::OpDigiProperties::GenAnalyticalWF ( )
private

Definition at line 326 of file OpDigiProperties.cc.

326  {
327  mf::LogWarning("OpDigiProperties")<<" OpDigiProperties using analytical function for WF generation.";
328  //
329  // Generate waveform from analytical form
330  //
331  if(!fAnalyticalSPE) {// Create analytical function if not yet created
332  fAnalyticalSPE = new TF1("_analyticalSPE",
333  "10^(22)*x^[1]*[0]*exp(-x/[2])/TMath::Factorial([1])",
334  0,fWFLength*2); // x is time in micro-seconds
335  fAnalyticalSPE->SetParameter(0,fVoltageAmpForSPE); // voltage amplitude for s.p.e.
336  fAnalyticalSPE->SetParameter(1,fWFPowerFactor); // power factor (no unit)
337  fAnalyticalSPE->SetParameter(2,fWFTimeConstant); // time constant in us
338  }
339  //
340  // Define a waveform vector
341  //
342  // Size of WF = time width [us] * frequency [MHz]
343  std::vector<double> PEWaveform(int( fWFLength * fSampleFreq), 0.0);
344  double SamplingDuration = 1./fSampleFreq; // in micro seconds
345  double MaxAmp=0;
346  double Charge=0;
347  for(unsigned short i = 0; i<PEWaveform.size(); ++i){
348  double Value=fAnalyticalSPE->Integral( i * SamplingDuration,
349  (i+1) * SamplingDuration) / SamplingDuration;
350  PEWaveform[i]=Value;
351  if(PEWaveform[i]>MaxAmp) MaxAmp=PEWaveform[i];
352  Charge+=Value;
353  }
354 
355  // rescale
356  if(MaxAmp<=0) throw cet::exception("OpDigiProperties_module")<<"Waveform amplitude <=0!\n";
357 
358  if(!fChargeNormalized) {
359  for(unsigned short i=0; i<PEWaveform.size(); i++) {
360  PEWaveform[i]=PEWaveform[i]/MaxAmp;
361  if(PEWaveform[i]<1.e-4) PEWaveform[i]=0;
362  }
363  }
364  else for(unsigned short i=0; i<PEWaveform.size(); i++){ PEWaveform[i]=PEWaveform[i]/Charge; }
365 
366  return PEWaveform;
367  }
do i e
std::vector< double > opdet::OpDigiProperties::GenEmpiricalWF ( std::string  WaveformFile)
private

Definition at line 291 of file OpDigiProperties.cc.

292  {
293  // Read in waveform vector from text file
294  std::ifstream WaveformFile (fWaveformFile.c_str());
295  std::string line;
296 
297  mf::LogWarning("OpDigiProperties")<<"OpDigiProperties opening OpDet waveform at " << fWaveformFile.c_str();
298 
299  // Read in each line and place into waveform vector
300  std::vector<double> PEWaveform;
301  if (WaveformFile.is_open())
302  {
303  double MaxAmp=0;
304  double Charge=0;
305  int NSample=0;
306  while ( WaveformFile.good() && NSample<int(fWFLength*fSampleFreq))
307  {
308  getline (WaveformFile, line);
309  double Amp=strtod(line.c_str(),NULL);
310  PEWaveform.push_back(Amp);
311  if(Amp>MaxAmp) MaxAmp=Amp;
312  NSample++;
313  Charge+=Amp;
314  }
315  // rescale
316  if(MaxAmp<=0) throw cet::exception("OpDigiProperties_module")<<"Waveform amplitude <=0!\n";
317  if(!fChargeNormalized)for(unsigned short i=0; i<PEWaveform.size(); i++){ PEWaveform[i]=PEWaveform[i]/MaxAmp; }
318  else for(unsigned short i=0; i<PEWaveform.size(); i++){ PEWaveform[i]=PEWaveform[i]/Charge; }
319  }
320  else throw cet::exception("No Waveform File") << "Unable to open file\n";
321 
322  WaveformFile.close();
323  return(PEWaveform);
324  }
void opdet::OpDigiProperties::GenerateWaveform ( )
private

Definition at line 276 of file OpDigiProperties.cc.

277  {
278  std::string FullPath;
279 
280  if(fUseEmpiricalShape){
281  cet::search_path sp("FW_SEARCH_PATH");
282  if( !sp.find_file(fWaveformFile, FullPath) )
283 
284  throw cet::exception("OpDigiProperties") << "Unable to find PMT waveform file in " << sp.to_string() << "\n";
285 
286  fWaveform = GenEmpiricalWF(FullPath);
287 
288  }else fWaveform = GenAnalyticalWF();
289  }
std::vector< double > GenAnalyticalWF()
std::vector< double > GenEmpiricalWF(std::string WaveformFile)
std::vector< double > fWaveform
double opdet::OpDigiProperties::GetSPEAmplitude ( )

Utility function ... To be verified (Kazu 08/05/13)

Definition at line 95 of file OpDigiProperties.cc.

96  {
97  double AmpSoFar=0;
98  for(size_t i=0; i!=fWaveform.size(); ++i)
99  if(fWaveform.at(i)>AmpSoFar) AmpSoFar=fWaveform.at(i);
100  return AmpSoFar;
101  }
std::vector< double > fWaveform
double opdet::OpDigiProperties::GetSPEArea ( )

Utility function ... To be verified (Kazu 08/05/13)

Definition at line 86 of file OpDigiProperties.cc.

87  {
88  double SPEArea=0;
89  for(size_t i=0; i!=fWaveform.size(); ++i)
90  SPEArea+=fWaveform.at(i);
91  return SPEArea;
92  }
BEGIN_PROLOG xarapuca_vuv SBNDDecoOpHitFinderXArapuca SPEArea
std::vector< double > fWaveform
double opdet::OpDigiProperties::GetSPECumulativeAmplitude ( )

Utility function ... To be verified (Kazu 08/05/13)

Definition at line 116 of file OpDigiProperties.cc.

117  {
118  double AmpSoFar=0, Cumulative=0;
119  for(size_t i=0; i!=fWaveform.size(); ++i)
120  {
121  Cumulative += fWaveform.at(i);
122  if(Cumulative>AmpSoFar) AmpSoFar=Cumulative;
123  }
124  return AmpSoFar;
125  }
std::vector< double > fWaveform
double opdet::OpDigiProperties::GetSPECumulativeArea ( )

Utility function ... To be verified (Kazu 08/05/13)

Definition at line 104 of file OpDigiProperties.cc.

105  {
106  double Cumulative=0, SPEArea=0;
107  for(size_t i=0; i!=fWaveform.size(); ++i)
108  {
109  Cumulative += fWaveform.at(i);
110  SPEArea += Cumulative;
111  }
112  return SPEArea;
113  }
BEGIN_PROLOG xarapuca_vuv SBNDDecoOpHitFinderXArapuca SPEArea
std::vector< double > fWaveform
optdata::TimeSlice_t opdet::OpDigiProperties::GetTimeSlice ( double  time_ns)

Convert the given time into time-slice number. Input time should be in ns unit and measurd w.r.t. MC photon T0

Definition at line 151 of file OpDigiProperties.cc.

152  {
153  if( time_ns/1.e3 > (fTimeEnd-fTimeBegin)) return std::numeric_limits<optdata::TimeSlice_t>::max();
154 
155  else return optdata::TimeSlice_t((time_ns/1.e3-fTimeBegin)*fSampleFreq);
156  }
unsigned int TimeSlice_t
Definition: OpticalTypes.h:20
double opdet::OpDigiProperties::HighGain ( optdata::Channel_t  ch) const

Generate & return HIGH gain value for an input channel using mean & spread for this channel.

Definition at line 146 of file OpDigiProperties.cc.

147  {
148  return CLHEP::RandGauss::shoot(fHighGainArray[ch],fGainSpreadArray[ch]*fHighGainArray[ch]);
149  }
std::vector< double > fHighGainArray
std::vector< double > fGainSpreadArray
std::vector<double> const& opdet::OpDigiProperties::HighGainArray ( ) const
inlinenoexcept

Returns an array of HIGH gain.

Definition at line 91 of file OpDigiProperties.h.

91 { return fHighGainArray; }
std::vector< double > fHighGainArray
double opdet::OpDigiProperties::HighGainMean ( ) const
inlinenoexcept

Returns set mean gain value for HIGH gain.

Definition at line 73 of file OpDigiProperties.h.

73 { return fHighGainMean; }
double opdet::OpDigiProperties::HighGainMean ( optdata::Channel_t  ch) const

Returns generated HIGH gain value for input channel (PMT-to-PMT spread applied)

Definition at line 136 of file OpDigiProperties.cc.

137  {
138  return fHighGainArray[ch];
139  }
std::vector< double > fHighGainArray
double opdet::OpDigiProperties::LowGain ( optdata::Channel_t  ch) const

Generate & return LOW gain value for an input channel using mean & spread for this channel.

Definition at line 141 of file OpDigiProperties.cc.

142  {
143  return CLHEP::RandGauss::shoot(fLowGainArray[ch],fGainSpreadArray[ch]*fLowGainArray[ch]);
144  }
std::vector< double > fLowGainArray
std::vector< double > fGainSpreadArray
std::vector<double> const& opdet::OpDigiProperties::LowGainArray ( ) const
inlinenoexcept

Returns an array of LOW gain.

Definition at line 93 of file OpDigiProperties.h.

93 { return fLowGainArray; }
std::vector< double > fLowGainArray
double opdet::OpDigiProperties::LowGainMean ( ) const
inlinenoexcept

Returns set mean gain value for LOW gain.

Definition at line 71 of file OpDigiProperties.h.

71 { return fLowGainMean; }
double opdet::OpDigiProperties::LowGainMean ( optdata::Channel_t  ch) const

Returns generated LOW gain value for input channel (PMT-to-PMT spread applied)

Definition at line 130 of file OpDigiProperties.cc.

131  {
132  return fLowGainArray[ch];
133  }
std::vector< double > fLowGainArray
optdata::ADC_Count_t opdet::OpDigiProperties::PedFlucAmp ( ) const
inlinenoexcept

Returns amplitude of pedestal fluctuation.

Definition at line 61 of file OpDigiProperties.h.

61 { return fPedFlucAmp; }
optdata::ADC_Count_t fPedFlucAmp
double opdet::OpDigiProperties::PedFlucRate ( ) const
inlinenoexcept

Returns rate of pedestal fluctuation.

Definition at line 59 of file OpDigiProperties.h.

59 { return fPedFlucRate; }
std::vector<optdata::ADC_Count_t> const& opdet::OpDigiProperties::PedMeanArray ( ) const
inlinenoexcept

Returns an array of generated pedestal mean value per channel.

Definition at line 97 of file OpDigiProperties.h.

97 {return fPedMeanArray;}
std::vector< optdata::ADC_Count_t > fPedMeanArray
double opdet::OpDigiProperties::QE ( ) const
inlinenoexcept

Returns quantum efficiency.

Definition at line 55 of file OpDigiProperties.h.

55 { return fQE; }
double opdet::OpDigiProperties::SampleFreq ( ) const
inlinenoexcept

Returns sample frequency in MHz.

Definition at line 36 of file OpDigiProperties.h.

36 { return fSampleFreq; }
optdata::ADC_Count_t opdet::OpDigiProperties::SaturationScale ( ) const
inlinenoexcept

Returns the saturation scale of the electronics.

Definition at line 63 of file OpDigiProperties.h.

63 { return fSaturationScale; }
optdata::ADC_Count_t fSaturationScale
std::vector<double> const& opdet::OpDigiProperties::SinglePEWaveform ( ) const
inlinenoexcept

Returns a vector of double which represents a binned SPE waveform.

Definition at line 89 of file OpDigiProperties.h.

89 { return fWaveform; }
std::vector< double > fWaveform
double opdet::OpDigiProperties::TimeBegin ( ) const
inlinenoexcept

Returns window start time in us ... with respect to MC photon T0.

Definition at line 38 of file OpDigiProperties.h.

38 { return fTimeBegin; }
double opdet::OpDigiProperties::TimeEnd ( ) const
inlinenoexcept

Returns window end time in us ... with respect to MC photon T0.

Definition at line 40 of file OpDigiProperties.h.

40 { return fTimeEnd; }
std::vector< double > opdet::OpDigiProperties::WaveformInit ( std::string  WaveformFile)

DEPRECATED as far as Kazu is concerned for UBooNE PMT simulation. Any comment? –Kazu 08/05/2013

Definition at line 162 of file OpDigiProperties.cc.

163  {
164  // Read in waveform vector from text file
165  std::ifstream WaveformFile (fWaveformFile.c_str());
166  std::string line;
167 
168  mf::LogInfo("OpDigiProperties")<<"OpDigiProperties opening OpDet waveform at " << fWaveformFile.c_str();
169 
170  // Read in each line and place into waveform vector
171  std::vector<double> PEWaveform;
172  if (WaveformFile.is_open())
173  {
174  while ( WaveformFile.good() )
175  {
176  getline (WaveformFile, line);
177  PEWaveform.push_back( fPERescale * strtod( line.c_str(), NULL ) );
178  }
179  }
180  else throw cet::exception("OpDigiProperties") << "No Waveform File: Unable to open file\n";
181 
182  WaveformFile.close();
183  return(PEWaveform);
184  }
double opdet::OpDigiProperties::WFPowerFactor ( ) const
inlinenoexcept

Returns WF power factor used in analytical model.

Definition at line 69 of file OpDigiProperties.h.

69 { return fWFPowerFactor; }
double opdet::OpDigiProperties::WFTimeConstant ( ) const
inlinenoexcept

Returns WF time constant used in analytical model.

Definition at line 67 of file OpDigiProperties.h.

67 { return fWFTimeConstant; }

Member Data Documentation

optdata::ADC_Count_t opdet::OpDigiProperties::fADCBaseline
private

Definition at line 128 of file OpDigiProperties.h.

double opdet::OpDigiProperties::fADCBaseSpread
private

Definition at line 129 of file OpDigiProperties.h.

TF1* opdet::OpDigiProperties::fAnalyticalSPE
private

Definition at line 138 of file OpDigiProperties.h.

bool opdet::OpDigiProperties::fChargeNormalized
private

Definition at line 145 of file OpDigiProperties.h.

double opdet::OpDigiProperties::fDarkRate
private

Definition at line 126 of file OpDigiProperties.h.

double opdet::OpDigiProperties::fGainSpread
private

Definition at line 136 of file OpDigiProperties.h.

double opdet::OpDigiProperties::fGainSpread_PMT2PMT
private

Definition at line 137 of file OpDigiProperties.h.

std::vector<double> opdet::OpDigiProperties::fGainSpreadArray
private

Definition at line 148 of file OpDigiProperties.h.

std::string opdet::OpDigiProperties::fGainSpreadFile
private

Definition at line 143 of file OpDigiProperties.h.

art::ServiceHandle<geo::Geometry const> opdet::OpDigiProperties::fGeometry
private

Definition at line 150 of file OpDigiProperties.h.

std::vector<double> opdet::OpDigiProperties::fHighGainArray
private

Definition at line 147 of file OpDigiProperties.h.

std::string opdet::OpDigiProperties::fHighGainFile
private

Definition at line 140 of file OpDigiProperties.h.

double opdet::OpDigiProperties::fHighGainMean
private

Definition at line 131 of file OpDigiProperties.h.

std::vector<double> opdet::OpDigiProperties::fLowGainArray
private

Definition at line 146 of file OpDigiProperties.h.

std::string opdet::OpDigiProperties::fLowGainFile
private

Definition at line 141 of file OpDigiProperties.h.

double opdet::OpDigiProperties::fLowGainMean
private

Definition at line 130 of file OpDigiProperties.h.

optdata::ADC_Count_t opdet::OpDigiProperties::fPedFlucAmp
private

Definition at line 125 of file OpDigiProperties.h.

double opdet::OpDigiProperties::fPedFlucRate
private

Definition at line 124 of file OpDigiProperties.h.

std::vector<optdata::ADC_Count_t> opdet::OpDigiProperties::fPedMeanArray
private

Definition at line 149 of file OpDigiProperties.h.

double opdet::OpDigiProperties::fPERescale
private

Definition at line 113 of file OpDigiProperties.h.

double opdet::OpDigiProperties::fQE
private

Definition at line 123 of file OpDigiProperties.h.

double opdet::OpDigiProperties::fSampleFreq
private

Definition at line 110 of file OpDigiProperties.h.

optdata::ADC_Count_t opdet::OpDigiProperties::fSaturationScale
private

Definition at line 127 of file OpDigiProperties.h.

double opdet::OpDigiProperties::fTimeBegin
private

Definition at line 111 of file OpDigiProperties.h.

double opdet::OpDigiProperties::fTimeEnd
private

Definition at line 112 of file OpDigiProperties.h.

bool opdet::OpDigiProperties::fUseEmpiricalGain
private

Definition at line 121 of file OpDigiProperties.h.

bool opdet::OpDigiProperties::fUseEmpiricalShape
private

Definition at line 122 of file OpDigiProperties.h.

double opdet::OpDigiProperties::fVoltageAmpForSPE
private

Definition at line 132 of file OpDigiProperties.h.

std::vector<double> opdet::OpDigiProperties::fWaveform
private

Definition at line 144 of file OpDigiProperties.h.

std::string opdet::OpDigiProperties::fWaveformFile
private

Definition at line 142 of file OpDigiProperties.h.

double opdet::OpDigiProperties::fWFLength
private

Definition at line 135 of file OpDigiProperties.h.

double opdet::OpDigiProperties::fWFPowerFactor
private

Definition at line 134 of file OpDigiProperties.h.

double opdet::OpDigiProperties::fWFTimeConstant
private

Definition at line 133 of file OpDigiProperties.h.


The documentation for this class was generated from the following files: