#include <TAPAlgorithms.h>
Public Member Functions | |
IntegralRatio (int begin, int tail, int end, int trig_pol, double ped=0.) | |
double | operator() (const TPulseIsland *tpi) |
double | GetRatio () const |
double | GetTotal () const |
double | GetTail () const |
void | SetTailStart (int v) |
void | SetPedestal (double v) |
void | SetPedestalToMinimum (const TPulseIsland *tpi) |
Private Attributes | |
Algorithm::SimpleIntegral | fTailIntegrator |
Algorithm::SimpleIntegral | fHeadIntegrator |
double | fTail |
double | fHead |
Definition at line 86 of file TAPAlgorithms.h.
Algorithm::IntegralRatio::IntegralRatio | ( | int | begin, | |
int | tail, | |||
int | end, | |||
int | trig_pol, | |||
double | ped = 0. | |||
) | [inline] |
Definition at line 87 of file TAPAlgorithms.h.
00088 :fTailIntegrator(ped,trig_pol,tail,end) 00089 ,fHeadIntegrator(ped,trig_pol,begin,tail){ 00090 }
double Algorithm::IntegralRatio::GetRatio | ( | ) | const [inline] |
Definition at line 93 of file TAPAlgorithms.h.
Referenced by operator()(), TemplateFitAPGenerator::PassesIntegralRatio(), TemplateConvolveAPGenerator::PassesIntegralRatio(), and IntegralRatioAPGenerator::ProcessPulses().
double Algorithm::IntegralRatio::GetTail | ( | ) | const [inline] |
Definition at line 95 of file TAPAlgorithms.h.
References fTail.
Referenced by IntegralRatioAPGenerator::ProcessPulses().
00095 {return fTail;}
double Algorithm::IntegralRatio::GetTotal | ( | ) | const [inline] |
Definition at line 94 of file TAPAlgorithms.h.
Referenced by TemplateFitAPGenerator::PassesIntegralRatio(), TemplateConvolveAPGenerator::PassesIntegralRatio(), and IntegralRatioAPGenerator::ProcessPulses().
double Algorithm::IntegralRatio::operator() | ( | const TPulseIsland * | tpi | ) |
Definition at line 90 of file TAPAlgorithms.cpp.
References fHead, fHeadIntegrator, fTail, fTailIntegrator, and GetRatio().
00090 { 00091 fHead=fHeadIntegrator(tpi); 00092 fTail=fTailIntegrator(tpi); 00093 return GetRatio(); 00094 }
void Algorithm::IntegralRatio::SetPedestal | ( | double | v | ) | [inline] |
Definition at line 98 of file TAPAlgorithms.h.
References fHeadIntegrator, fTailIntegrator, and Algorithm::SimpleIntegral::SetPedestal().
Referenced by SetPedestalToMinimum().
00098 { fTailIntegrator.SetPedestal(v); fHeadIntegrator.SetPedestal(v);}
void Algorithm::IntegralRatio::SetPedestalToMinimum | ( | const TPulseIsland * | tpi | ) |
Definition at line 86 of file TAPAlgorithms.cpp.
References TPulseIsland::GetSamples(), and SetPedestal().
Referenced by TemplateFitAPGenerator::PassesIntegralRatio(), TemplateConvolveAPGenerator::PassesIntegralRatio(), and IntegralRatioAPGenerator::ProcessPulses().
00086 { 00087 SetPedestal(*std::min_element(tpi->GetSamples().begin(), tpi->GetSamples().end())); 00088 }
void Algorithm::IntegralRatio::SetTailStart | ( | int | v | ) | [inline] |
Definition at line 97 of file TAPAlgorithms.h.
References fHeadIntegrator, fTailIntegrator, Algorithm::SimpleIntegral::SetStart(), and Algorithm::SimpleIntegral::SetStop().
Referenced by IntegralRatioAPGenerator::ProcessPulses().
00097 { fTailIntegrator.SetStart(v); fHeadIntegrator.SetStop(v);}
double Algorithm::IntegralRatio::fHead [private] |
Definition at line 105 of file TAPAlgorithms.h.
Referenced by GetRatio(), GetTotal(), and operator()().
Definition at line 103 of file TAPAlgorithms.h.
Referenced by operator()(), SetPedestal(), and SetTailStart().
double Algorithm::IntegralRatio::fTail [private] |
Definition at line 104 of file TAPAlgorithms.h.
Referenced by GetRatio(), GetTail(), GetTotal(), and operator()().
Definition at line 102 of file TAPAlgorithms.h.
Referenced by operator()(), SetPedestal(), and SetTailStart().