All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PedAlgoEdges.h
Go to the documentation of this file.
1 /**
2  * \file PedAlgoEdges.h
3  *
4  * \ingroup PulseReco
5  *
6  * \brief Class definition file of PedAlgoEdges
7  *
8  * @author Kazu - Nevis 2013
9  */
10 
11 /** \addtogroup PulseReco
12 
13 @{*/
14 
15 #ifndef larana_OPTICALDETECTOR_PEDALGOEDGES_H
16 #define larana_OPTICALDETECTOR_PEDALGOEDGES_H
17 
19 
20 #include "PMTPedestalBase.h"
21 namespace fhicl { class ParameterSet; }
22 
23 #include <string>
24 
25 namespace pmtana
26 {
27 
28  /**
29  \class PedAlgoEdges
30  A class that calculates pedestal mean & standard deviation (here and elsewhere called as "RMS").
31  */
32  class PedAlgoEdges : public PMTPedestalBase{
33 
34  public:
35 
36  /// Default constructor
37  PedAlgoEdges(const std::string name="PedEdges");
38 
39  /// Alternative ctor
40  PedAlgoEdges(const fhicl::ParameterSet &pset,const std::string name="PedEdges");
41  //PedAlgoEdges(const ::fcllite::PSet &pset,const std::string name="PedEdges");
42 
43  /// enum to define algorithm options
44  enum PED_METHOD{
45  kHEAD = 0, ///< Use first N samples
46  kTAIL, ///< Use last N samples
47  kBOTH ///< Calculate both and use the one with smaller RMS
48  };
49  protected:
50 
51  /// Method to compute a pedestal of the input waveform using "nsample" ADC samples from "start" index.
52  bool ComputePedestal( const pmtana::Waveform_t& wf,
53  pmtana::PedestalMean_t& mean_v,
54  pmtana::PedestalSigma_t& sigma_v);
55 
56  private:
57  size_t _nsample_front; ///< # ADC sample in front to be used
58  size_t _nsample_tail; ///< # ADC sample in tail to be used
59  PED_METHOD _method; ///< Methods
60 
61  };
62 }
63 #endif
64 
65 /** @} */ // end of doxygen group
Use last N samples.
Definition: PedAlgoEdges.h:46
std::vector< double > PedestalSigma_t
PED_METHOD _method
Methods.
Definition: PedAlgoEdges.h:59
Class definition file of PMTPedestalBase.
PedAlgoEdges(const std::string name="PedEdges")
Default constructor.
std::vector< short > Waveform_t
PED_METHOD
enum to define algorithm options
Definition: PedAlgoEdges.h:44
Calculate both and use the one with smaller RMS.
Definition: PedAlgoEdges.h:47
Use first N samples.
Definition: PedAlgoEdges.h:45
size_t _nsample_tail
ADC sample in tail to be used
Definition: PedAlgoEdges.h:58
then echo fcl name
size_t _nsample_front
ADC sample in front to be used
Definition: PedAlgoEdges.h:57
std::vector< double > PedestalMean_t
bool ComputePedestal(const pmtana::Waveform_t &wf, pmtana::PedestalMean_t &mean_v, pmtana::PedestalSigma_t &sigma_v)
Method to compute a pedestal of the input waveform using &quot;nsample&quot; ADC samples from &quot;start&quot; index...