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

#include <PECalib.h>

Public Member Functions

 PECalib ()
 Default constructor. More...
 
 ~PECalib ()
 Default destructor. More...
 
void Configure (const Config_t &pset)
 
double Calibrate (const size_t opdet, const double area) const
 

Protected Attributes

std::vector< double > _spe_area_gain_v
 
std::vector< double > _relative_qe_v
 

Detailed Description

User defined class PECalib ... these comments are used to generate doxygen documentation!

Definition at line 31 of file sbndcode/sbndcode/OpDetReco/OpFlash/FlashFinder/PECalib.h.

Constructor & Destructor Documentation

lightana::PECalib::PECalib ( )

Default constructor.

Definition at line 8 of file sbndcode/sbndcode/OpDetReco/OpFlash/FlashFinder/PECalib.cxx.

9  {}
lightana::PECalib::~PECalib ( )
inline

Default destructor.

Definition at line 39 of file sbndcode/sbndcode/OpDetReco/OpFlash/FlashFinder/PECalib.h.

39 {}

Member Function Documentation

double lightana::PECalib::Calibrate ( const size_t  opdet,
const double  area 
) const

Definition at line 41 of file sbndcode/sbndcode/OpDetReco/OpFlash/FlashFinder/PECalib.cxx.

42  {
43  if( opdet > NOpDets() ) {
44  std::cerr << "OpDet ID " << opdet << " exceeding max # of OpDet (" << NOpDets() << ")" << std::endl;
45  throw std::exception();
46  }
47 
48  double area_pe = area / _spe_area_gain_v[opdet] * _relative_qe_v[opdet];
49 
50  return area_pe;
51  }
BEGIN_PROLOG could also be cerr
void lightana::PECalib::Configure ( const Config_t pset)

Definition at line 11 of file sbndcode/sbndcode/OpDetReco/OpFlash/FlashFinder/PECalib.cxx.

12  {
13 
14  _spe_area_gain_v.clear();
15  _spe_area_gain_v = pset.get<std::vector<double> >("SPEAreaGainList",_spe_area_gain_v);
16 
17  if(_spe_area_gain_v.empty()) {
18  double spe_area_gain = pset.get<double>("SPEAreaGain");
19  _spe_area_gain_v.resize(NOpDets(),spe_area_gain);
20  }
21 
22  if(_spe_area_gain_v.size() != NOpDets()) {
23  std::cerr << "SPEAreaGain array size (" << _spe_area_gain_v.size()
24  << ") != NOpDets (" << NOpDets() << ")..." << std::endl;
25  throw std::exception();
26  }
27 
28  _relative_qe_v.clear();
29  _relative_qe_v = pset.get<std::vector<double> >("RelativeQEList",_relative_qe_v);
30 
31  if(_relative_qe_v.empty())
32  _relative_qe_v.resize(NOpDets(),1.0);
33 
34  if(_relative_qe_v.size() != NOpDets()) {
35  std::cerr << "RelativeQE array size (" << _relative_qe_v.size()
36  << ") != NOpDets (" << NOpDets() << ")..." << std::endl;
37  throw std::exception();
38  }
39  }
BEGIN_PROLOG could also be cerr

Member Data Documentation

std::vector<double> lightana::PECalib::_relative_qe_v
protected
std::vector<double> lightana::PECalib::_spe_area_gain_v
protected

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