All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PMTPedestalBase.h
Go to the documentation of this file.
1 /**
2  * \file PMTPedestalBase.h
3  *
4  * \ingroup PulseReco
5  *
6  * \brief Class definition file of PMTPedestalBase
7  *
8  * @author Kazu - Nevis 2013
9  */
10 
11 /** \addtogroup PulseReco
12 
13 @{*/
14 #ifndef larana_OPTICALDETECTOR_PMTPEDESTALBASE_H
15 #define larana_OPTICALDETECTOR_PMTPEDESTALBASE_H
16 
17 // STL
18 #include "OpticalRecoTypes.h"
19 #include <string>
20 
21 namespace pmtana
22 {
23 
24  /**
25  \class PMTPedestalBase
26  A base class for pedestal calculation
27  */
29 
30  public:
31 
32  /// Default constructor
33  PMTPedestalBase(std::string name="noname");
34 
35  /// Default destructor
36  virtual ~PMTPedestalBase();
37 
38  /// Name getter
39  const std::string& Name() const;
40 
41  /// Method to compute a pedestal
42  bool Evaluate(const pmtana::Waveform_t& wf);
43 
44  /// Getter of the pedestal mean value
45  double Mean(size_t i) const;
46 
47  /// Getter of the pedestal standard deviation
48  double Sigma(size_t i) const;
49 
50  /// Getter of the pedestal mean value
51  const pmtana::PedestalMean_t& Mean() const;
52 
53  /// Getter of the pedestal standard deviation
54  const pmtana::PedestalSigma_t& Sigma() const;
55 
56  protected:
57 
58  /**
59  Method to compute pedestal: mean and sigma array should be filled per ADC.
60  The length of each array is guaranteed to be same.
61  */
63  pmtana::PedestalMean_t& mean_v,
64  pmtana::PedestalSigma_t& sigma_v) = 0;
65 
66  private:
67 
68  /// Name
69  std::string _name;
70 
71  /// A variable holder for pedestal mean value
73 
74  /// A variable holder for pedestal standard deviation
76  };
77 }
78 #endif
79 
80 /** @} */ // end of doxygen group
std::string _name
Name.
std::vector< double > PedestalSigma_t
PMTPedestalBase(std::string name="noname")
Default constructor.
const std::string & Name() const
Name getter.
pmtana::PedestalMean_t _mean_v
A variable holder for pedestal mean value.
virtual ~PMTPedestalBase()
Default destructor.
bool Evaluate(const pmtana::Waveform_t &wf)
Method to compute a pedestal.
virtual bool ComputePedestal(const ::pmtana::Waveform_t &wf, pmtana::PedestalMean_t &mean_v, pmtana::PedestalSigma_t &sigma_v)=0
std::vector< short > Waveform_t
then echo fcl name
pmtana::PedestalSigma_t _sigma_v
A variable holder for pedestal standard deviation.
const pmtana::PedestalSigma_t & Sigma() const
Getter of the pedestal standard deviation.
std::vector< double > PedestalMean_t
const pmtana::PedestalMean_t & Mean() const
Getter of the pedestal mean value.