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

#include <PedAlgoUB.h>

Inheritance diagram for pmtana::PedAlgoUB:
pmtana::PMTPedestalBase

Public Member Functions

 PedAlgoUB (const std::string name="PedCD")
 Default constructor. More...
 
 PedAlgoUB (const fhicl::ParameterSet &pset, const std::string name="PedAlgoUB")
 Alternative ctor. More...
 
- Public Member Functions inherited from pmtana::PMTPedestalBase
 PMTPedestalBase (std::string name="noname")
 Default constructor. More...
 
virtual ~PMTPedestalBase ()
 Default destructor. More...
 
const std::string & Name () const
 Name getter. More...
 
bool Evaluate (const pmtana::Waveform_t &wf)
 Method to compute a pedestal. More...
 
double Mean (size_t i) const
 Getter of the pedestal mean value. More...
 
double Sigma (size_t i) const
 Getter of the pedestal standard deviation. More...
 
const pmtana::PedestalMean_tMean () const
 Getter of the pedestal mean value. More...
 
const pmtana::PedestalSigma_tSigma () const
 Getter of the pedestal standard deviation. More...
 

Protected Member Functions

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 "nsample" ADC samples from "start" index. More...
 
- Protected Member Functions inherited from pmtana::PMTPedestalBase
virtual bool ComputePedestal (const ::pmtana::Waveform_t &wf, pmtana::PedestalMean_t &mean_v, pmtana::PedestalSigma_t &sigma_v)=0
 

Private Attributes

PedAlgoRmsSlider _beamgatealgo
 
unsigned int _beam_gate_samples
 

Detailed Description

A class that calculates pedestal mean & standard deviation (here and elsewhere called as "RMS").

Definition at line 32 of file PedAlgoUB.h.

Constructor & Destructor Documentation

pmtana::PedAlgoUB::PedAlgoUB ( const std::string  name = "PedCD")

Default constructor.

Definition at line 14 of file PedAlgoUB.cxx.

17  //************************************************
18  {}
PedAlgoRmsSlider _beamgatealgo
Definition: PedAlgoUB.h:54
PMTPedestalBase(std::string name="noname")
Default constructor.
then echo fcl name
pmtana::PedAlgoUB::PedAlgoUB ( const fhicl::ParameterSet &  pset,
const std::string  name = "PedAlgoUB" 
)

Alternative ctor.

Definition at line 21 of file PedAlgoUB.cxx.

25  //, _beamgatealgo(pset.get_pset("BeamGateAlgo"),"BeamGateAlgo")
26  , _beamgatealgo(pset,"BeamGateAlgo")
27  //*************************************************************
28  {
29  _beam_gate_samples = pset.get<unsigned int>("BeamGateSamples");
30  }
PedAlgoRmsSlider _beamgatealgo
Definition: PedAlgoUB.h:54
PMTPedestalBase(std::string name="noname")
Default constructor.
unsigned int _beam_gate_samples
Definition: PedAlgoUB.h:55
then echo fcl name

Member Function Documentation

bool pmtana::PedAlgoUB::ComputePedestal ( const pmtana::Waveform_t wf,
pmtana::PedestalMean_t mean_v,
pmtana::PedestalSigma_t sigma_v 
)
protected

Method to compute a pedestal of the input waveform using "nsample" ADC samples from "start" index.

Definition at line 33 of file PedAlgoUB.cxx.

37  {
38 
39  if ( wf.size() < _beam_gate_samples ) {
40 
41  double ped_mean = wf.front(); //first sample
42  double ped_sigma = 0;
43 
44  for( auto &v : mean_v ) v = ped_mean;
45  for( auto &v : sigma_v ) v = ped_sigma;
46 
47  return true;
48 
49  }
50 
51  else {
52 
54  mean_v = _beamgatealgo.Mean();
55  sigma_v = _beamgatealgo.Sigma();
56 
57  return true;
58  }
59 
60  }
double Mean(size_t i) const
Getter of the pedestal mean value.
PedAlgoRmsSlider _beamgatealgo
Definition: PedAlgoUB.h:54
unsigned int _beam_gate_samples
Definition: PedAlgoUB.h:55
bool Evaluate(const pmtana::Waveform_t &wf)
Method to compute a pedestal.
double Sigma(size_t i) const
Getter of the pedestal standard deviation.

Member Data Documentation

unsigned int pmtana::PedAlgoUB::_beam_gate_samples
private

Definition at line 55 of file PedAlgoUB.h.

PedAlgoRmsSlider pmtana::PedAlgoUB::_beamgatealgo
private

Definition at line 54 of file PedAlgoUB.h.


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