All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
pmtana::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 icaruscode/icaruscode/PMT/OpReco/FlashFinder/PECalib.h.

Constructor & Destructor Documentation

pmtana::PECalib::PECalib ( )

Default constructor.

Definition at line 8 of file icaruscode/icaruscode/PMT/OpReco/FlashFinder/PECalib.cxx.

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

Default destructor.

Definition at line 39 of file icaruscode/icaruscode/PMT/OpReco/FlashFinder/PECalib.h.

39 {}

Member Function Documentation

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

Definition at line 38 of file icaruscode/icaruscode/PMT/OpReco/FlashFinder/PECalib.cxx.

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

Definition at line 11 of file icaruscode/icaruscode/PMT/OpReco/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  if(_spe_area_gain_v.empty()) {
17  double spe_area_gain = pset.get<double>("SPEAreaGain");
18  _spe_area_gain_v.resize(NOpDets(),spe_area_gain);
19  }
20  if(_spe_area_gain_v.size() != NOpDets()) {
21  std::cerr << "SPEAreaGain array size (" << _spe_area_gain_v.size()
22  << ") != NOpDets (" << NOpDets() << ")..." << std::endl;
23  throw std::exception();
24  }
25 
26  _relative_qe_v.clear();
27  _relative_qe_v = pset.get<std::vector<double> >("RelativeQEList",_relative_qe_v);
28  if(_relative_qe_v.empty())
29  _relative_qe_v.resize(NOpDets(),1.0);
30 
31  if(_relative_qe_v.size() != NOpDets()) {
32  std::cerr << "RelativeQE array size (" << _relative_qe_v.size()
33  << ") != NOpDets (" << NOpDets() << ")..." << std::endl;
34  throw std::exception();
35  }
36  }
BEGIN_PROLOG could also be cerr

Member Data Documentation

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

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