Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

TGo4FitPeakFinder Class Reference

Output action To add some output to actions, TGo4FitterOutput action class should be used. More...

#include <TGo4FitPeakFinder.h>

Inheritance diagram for TGo4FitPeakFinder:

TGo4FitterAction TGo4FitNamed List of all members.

Public Methods

 TGo4FitPeakFinder ()
 Default constructor. More...

 TGo4FitPeakFinder (const char *Name, const char *DataName=0, Bool_t ClearModels=kFALSE, Int_t PolOrder=-1)
 Creates TGo4FitPeakFinder action with provided name and, , (optionally), DataName, clear models mode. More...

virtual ~TGo4FitPeakFinder ()
 Destroys TGo4FitterOutput object. More...

void SetDataName (const char *name)
const char * GetDataName ()
void SetClearModels (Bool_t clear)
Bool_t GetClearModels ()
void SetupPolynomialBackground (Int_t PolynomOrder)
void SetupForFirst (Double_t MaxAmplFactor, Double_t MinWidth, Double_t MaxWidth)
void SetupForSecond (Double_t LineWidth)
void SetupForThird (Double_t NoiseFactor, Double_t NoiseMinimum, Int_t ChannelSum)
virtual void DoAction (TGo4FitterAbstract *Fitter)
virtual Bool_t CanChangeFitter () const
void SetUsePolynom (Bool_t use)
Bool_t GetUsePolynom ()
void SetPolynomOrder (Int_t order)
Int_t GetPolynomOrder ()
void SetPeakFinderType (Int_t typ)
Int_t GetPeakFinderType ()
void Set0MaxAmplFactor (Double_t factor)
Double_t Get0MaxAmplFactor ()
void Set0MinWidth (Double_t min)
Double_t Get0MinWidth ()
void Set0MaxWidth (Double_t max)
Double_t Get0MaxWidth ()
void Set1LineWidth (Double_t width)
Double_t Get1LineWidth ()
void Set2NoiseFactor (Double_t factor)
Double_t Get2NoiseFactor ()
void Set2NoiseMinimum (Double_t min)
Double_t Get2NoiseMinimum ()
void Set2ChannelSum (Int_t sum)
Int_t Get2ChannelSum ()
virtual void Print (Option_t *option) const
 Print information on standard output. More...


Private Methods

void ROOTPeakFinder (TGo4Fitter *fitter, TGo4FitData *data, Int_t PolynomOrder, Double_t Sigma)
void SergeyLinevPeakFinder (TGo4Fitter *fitter, TGo4FitData *data, Int_t PolOrder, Double_t AmplThreshold, Double_t MinWidth, Double_t MaxWidth)
 Perform simple peak finder algorithm. More...

void HansEsselPeakFinder (TGo4Fitter *fitter, TGo4FitData *data, Int_t MaxNumPeaks=50, Int_t ChannelSum=1, Double_t NoiseFactor=2., Double_t NoiseMinimum=10., Int_t MinimasOrder=-1)
 Hans Essel (c) peak finder. More...


Static Private Methods

void DefinePolynom (Int_t size, Double_t *bins, Double_t *scales, TArrayD &Coef, Double_t *weight=0, Double_t *backgr=0, Char_t *use=0)
void DefinePolynomEx (Int_t size, Double_t *bins, Double_t *scales, Double_t *weight, Double_t *backgr, Int_t lbound, Int_t rbound, TArrayD &Coef)
Double_t CalcPolynom (const TArrayD &Coef, Double_t x)

Private Attributes

Int_t fiPeakFinderType
TString fxDataName
Bool_t fbClearModels
Bool_t fbUsePolynom
Int_t fiPolynomOrder
Double_t fd0MinWidth
Double_t fd0MaxWidth
Double_t fd0MaxAmplFactor
Double_t fd1LineWidth
Double_t fd2NoiseFactor
Double_t fd2NoiseMinimum
Int_t fi2ChannelSum

Detailed Description

Output action To add some output to actions, TGo4FitterOutput action class should be used.

In constructor output command and options (if required) should be specified. Also AddOuputAction() routine of fitter can be used. Now following commands are available: "Print". Possible options are: "*"- print all internal objects, "**" - print also objects in slots, "Pars" - print parameters values, "Ampls" - only amplitude parameters, "Results" - result values. "Draw". Draw of the fitter data and model objects. As option name of data object and its components should be sets up. For instance, "data1,Gauss1,Gauss2". If first character will be "#", Draw command creates new canvas for output.

Definition at line 32 of file TGo4FitPeakFinder.h.


Constructor & Destructor Documentation

TGo4FitPeakFinder::TGo4FitPeakFinder  
 

Default constructor.

Definition at line 29 of file TGo4FitPeakFinder.cxx.

TGo4FitPeakFinder::TGo4FitPeakFinder const char *    Name,
const char *    DataName = 0,
Bool_t    ClearModels = kFALSE,
Int_t    PolOrder = -1
 

Creates TGo4FitPeakFinder action with provided name and, , (optionally), DataName, clear models mode.

Definition at line 33 of file TGo4FitPeakFinder.cxx.

TGo4FitPeakFinder::~TGo4FitPeakFinder   [virtual]
 

Destroys TGo4FitterOutput object.

Definition at line 42 of file TGo4FitPeakFinder.cxx.


Member Function Documentation

void TGo4FitPeakFinder::SetDataName const char *    name [inline]
 

Definition at line 51 of file TGo4FitPeakFinder.h.

References fxDataName.

Referenced by TGo4FitPanelSlots::Button_PeakFinder().

const char* TGo4FitPeakFinder::GetDataName   [inline]
 

Definition at line 52 of file TGo4FitPeakFinder.h.

References fxDataName.

Referenced by DoAction().

void TGo4FitPeakFinder::SetClearModels Bool_t    clear [inline]
 

Definition at line 53 of file TGo4FitPeakFinder.h.

References fbClearModels.

Referenced by TGo4FitPanelSlots::Button_PeakFinder().

Bool_t TGo4FitPeakFinder::GetClearModels   [inline]
 

Definition at line 54 of file TGo4FitPeakFinder.h.

References fbClearModels.

Referenced by DoAction().

void TGo4FitPeakFinder::SetupPolynomialBackground Int_t    PolynomOrder
 

Definition at line 45 of file TGo4FitPeakFinder.cxx.

References SetPolynomOrder(), and SetUsePolynom().

void TGo4FitPeakFinder::SetupForFirst Double_t    MaxAmplFactor,
Double_t    MinWidth,
Double_t    MaxWidth
 

Definition at line 53 of file TGo4FitPeakFinder.cxx.

References Set0MaxAmplFactor(), Set0MaxWidth(), Set0MinWidth(), and SetPeakFinderType().

Referenced by Example11().

void TGo4FitPeakFinder::SetupForSecond Double_t    LineWidth
 

Definition at line 60 of file TGo4FitPeakFinder.cxx.

References Set1LineWidth(), and SetPeakFinderType().

void TGo4FitPeakFinder::SetupForThird Double_t    NoiseFactor,
Double_t    NoiseMinimum,
Int_t    ChannelSum
 

Definition at line 65 of file TGo4FitPeakFinder.cxx.

References Set2ChannelSum(), Set2NoiseFactor(), Set2NoiseMinimum(), and SetPeakFinderType().

void TGo4FitPeakFinder::DoAction TGo4FitterAbstract   Fitter [virtual]
 

Implements TGo4FitterAction.

Definition at line 72 of file TGo4FitPeakFinder.cxx.

References TGo4Fitter::DeleteModelsAssosiatedTo(), TGo4Fitter::FindData(), Get0MaxAmplFactor(), Get0MaxWidth(), Get0MinWidth(), Get1LineWidth(), Get2ChannelSum(), Get2NoiseFactor(), Get2NoiseMinimum(), GetClearModels(), GetDataName(), GetPeakFinderType(), GetPolynomOrder(), GetUsePolynom(), HansEsselPeakFinder(), ROOTPeakFinder(), and SergeyLinevPeakFinder().

virtual Bool_t TGo4FitPeakFinder::CanChangeFitter   const [inline, virtual]
 

Reimplemented from TGo4FitterAction.

Definition at line 67 of file TGo4FitPeakFinder.h.

void TGo4FitPeakFinder::SetUsePolynom Bool_t    use [inline]
 

Definition at line 73 of file TGo4FitPeakFinder.h.

References fbUsePolynom.

Referenced by SetupPolynomialBackground().

Bool_t TGo4FitPeakFinder::GetUsePolynom   [inline]
 

Definition at line 74 of file TGo4FitPeakFinder.h.

References fbUsePolynom.

Referenced by DoAction().

void TGo4FitPeakFinder::SetPolynomOrder Int_t    order [inline]
 

Definition at line 75 of file TGo4FitPeakFinder.h.

References fiPolynomOrder.

Referenced by SetupPolynomialBackground().

Int_t TGo4FitPeakFinder::GetPolynomOrder   [inline]
 

Definition at line 76 of file TGo4FitPeakFinder.h.

References fiPolynomOrder.

Referenced by DoAction().

void TGo4FitPeakFinder::SetPeakFinderType Int_t    typ [inline]
 

Definition at line 78 of file TGo4FitPeakFinder.h.

References fiPeakFinderType.

Referenced by TGo4FitGUIOptions::GetPeakFinder(), SetupForFirst(), SetupForSecond(), and SetupForThird().

Int_t TGo4FitPeakFinder::GetPeakFinderType   [inline]
 

Definition at line 79 of file TGo4FitPeakFinder.h.

References fiPeakFinderType.

Referenced by DoAction().

void TGo4FitPeakFinder::Set0MaxAmplFactor Double_t    factor [inline]
 

Definition at line 81 of file TGo4FitPeakFinder.h.

References fd0MaxAmplFactor.

Referenced by SetupForFirst().

Double_t TGo4FitPeakFinder::Get0MaxAmplFactor   [inline]
 

Definition at line 82 of file TGo4FitPeakFinder.h.

References fd0MaxAmplFactor.

Referenced by DoAction().

void TGo4FitPeakFinder::Set0MinWidth Double_t    min [inline]
 

Definition at line 83 of file TGo4FitPeakFinder.h.

References fd0MinWidth.

Referenced by SetupForFirst().

Double_t TGo4FitPeakFinder::Get0MinWidth   [inline]
 

Definition at line 84 of file TGo4FitPeakFinder.h.

References fd0MinWidth.

Referenced by DoAction().

void TGo4FitPeakFinder::Set0MaxWidth Double_t    max [inline]
 

Definition at line 85 of file TGo4FitPeakFinder.h.

References fd0MaxWidth.

Referenced by SetupForFirst().

Double_t TGo4FitPeakFinder::Get0MaxWidth   [inline]
 

Definition at line 86 of file TGo4FitPeakFinder.h.

References fd0MaxWidth.

Referenced by DoAction().

void TGo4FitPeakFinder::Set1LineWidth Double_t    width [inline]
 

Definition at line 88 of file TGo4FitPeakFinder.h.

References fd1LineWidth.

Referenced by SetupForSecond().

Double_t TGo4FitPeakFinder::Get1LineWidth   [inline]
 

Definition at line 89 of file TGo4FitPeakFinder.h.

References fd1LineWidth.

Referenced by DoAction().

void TGo4FitPeakFinder::Set2NoiseFactor Double_t    factor [inline]
 

Definition at line 91 of file TGo4FitPeakFinder.h.

References fd2NoiseFactor.

Referenced by SetupForThird().

Double_t TGo4FitPeakFinder::Get2NoiseFactor   [inline]
 

Definition at line 92 of file TGo4FitPeakFinder.h.

References fd2NoiseFactor.

Referenced by DoAction().

void TGo4FitPeakFinder::Set2NoiseMinimum Double_t    min [inline]
 

Definition at line 93 of file TGo4FitPeakFinder.h.

References fd2NoiseMinimum.

Referenced by SetupForThird().

Double_t TGo4FitPeakFinder::Get2NoiseMinimum   [inline]
 

Definition at line 94 of file TGo4FitPeakFinder.h.

References fd2NoiseMinimum.

Referenced by DoAction().

void TGo4FitPeakFinder::Set2ChannelSum Int_t    sum [inline]
 

Definition at line 95 of file TGo4FitPeakFinder.h.

References fi2ChannelSum.

Referenced by SetupForThird().

Int_t TGo4FitPeakFinder::Get2ChannelSum   [inline]
 

Definition at line 96 of file TGo4FitPeakFinder.h.

References fi2ChannelSum.

Referenced by DoAction().

void TGo4FitPeakFinder::Print Option_t *    option const [virtual]
 

Print information on standard output.

Reimplemented from TGo4FitNamed.

Definition at line 106 of file TGo4FitPeakFinder.cxx.

References TGo4FitNamed::Print().

void TGo4FitPeakFinder::ROOTPeakFinder TGo4Fitter   fitter,
TGo4FitData   data,
Int_t    PolynomOrder,
Double_t    Sigma
[private]
 

Definition at line 150 of file TGo4FitPeakFinder.cxx.

References TGo4Fitter::AddGauss1(), TGo4Fitter::AddPolynomX(), TGo4FitDataIter::CountPoints(), TGo4Fitter::FindNextName(), TGo4FitComponent::GetAmplValue(), TGo4FitDataIter::HasWidths(), i, TGo4FitData::MakeIter(), n, TGo4FitDataIter::Next(), TGo4FitDataIter::Reset(), TGo4FitDataIter::ScalesSize(), TGo4FitDataIter::Value(), TGo4FitDataIter::Widths(), and TGo4FitDataIter::x().

Referenced by DoAction().

void TGo4FitPeakFinder::SergeyLinevPeakFinder TGo4Fitter   fitter,
TGo4FitData   data,
Int_t    PolOrder,
Double_t    AmplThreshold,
Double_t    MinWidth,
Double_t    MaxWidth
[private]
 

Perform simple peak finder algorithm.

Seeks for gaussians with amplitude more than given threshold (AmplThreshold introduced relative to maximum data value, from 0 to 1), with width in range between MinWidth and MaxWidth. Polynomial approximation can be applied for background appoximation(PolOrder>=0) or not used (PolOrder<0). Only selected by range conditions data part will be used by peak finder. Appropriate number of gaussians will be placed in list of models and associate with data.

Definition at line 274 of file TGo4FitPeakFinder.cxx.

References TGo4Fitter::AddGauss1(), TGo4Fitter::AddPolynomX(), CalcPolynom(), TGo4FitDataIter::CountPoints(), DefinePolynom(), DefinePolynomEx(), TGo4Fitter::FindNextName(), FindValue(), TGo4FitComponent::GetAmplValue(), i, TGo4FitData::MakeIter(), TGo4FitDataIter::Next(), TGo4FitDataIter::Reset(), TGo4FitDataIter::ScalesSize(), sigma, TGo4FitDataIter::StandardDeviation(), usage(), TGo4FitDataIter::Value(), and TGo4FitDataIter::x().

Referenced by DoAction().

void TGo4FitPeakFinder::HansEsselPeakFinder TGo4Fitter   fitter,
TGo4FitData   data,
Int_t    MaxNumPeaks = 50,
Int_t    ChannelSum = 1,
Double_t    NoiseFactor = 2.,
Double_t    NoiseMinimum = 10.,
Int_t    MinimasOrder = -1
[private]
 

Hans Essel (c) peak finder.

Definition at line 408 of file TGo4FitPeakFinder.cxx.

References TGo4Fitter::AddGauss1(), TGo4Fitter::AddPolynomX(), TGo4FitDataIter::CountPoints(), DefinePolynom(), f_find_peaks(), TGo4Fitter::FindNextName(), TGo4FitComponent::GetAmplValue(), TGo4FitData::MakeIter(), n, TGo4FitDataIter::Next(), TGo4FitDataIter::Reset(), TGo4FitDataIter::ScalesSize(), TGo4FitDataIter::Value(), and TGo4FitDataIter::x().

Referenced by DoAction().

void TGo4FitPeakFinder::DefinePolynom Int_t    size,
Double_t *    bins,
Double_t *    scales,
TArrayD &    Coef,
Double_t *    weight = 0,
Double_t *    backgr = 0,
Char_t *    use = 0
[static, private]
 

Definition at line 215 of file TGo4FitPeakFinder.cxx.

References i.

Referenced by DefinePolynomEx(), HansEsselPeakFinder(), and SergeyLinevPeakFinder().

void TGo4FitPeakFinder::DefinePolynomEx Int_t    size,
Double_t *    bins,
Double_t *    scales,
Double_t *    weight,
Double_t *    backgr,
Int_t    lbound,
Int_t    rbound,
TArrayD &    Coef
[static, private]
 

Definition at line 255 of file TGo4FitPeakFinder.cxx.

References DefinePolynom(), and i.

Referenced by SergeyLinevPeakFinder().

Double_t TGo4FitPeakFinder::CalcPolynom const TArrayD &    Coef,
Double_t    x
[static, private]
 

Definition at line 208 of file TGo4FitPeakFinder.cxx.

References n.

Referenced by SergeyLinevPeakFinder().


Member Data Documentation

Int_t TGo4FitPeakFinder::fiPeakFinderType [private]
 

Definition at line 154 of file TGo4FitPeakFinder.h.

Referenced by GetPeakFinderType(), and SetPeakFinderType().

TString TGo4FitPeakFinder::fxDataName [private]
 

Definition at line 156 of file TGo4FitPeakFinder.h.

Referenced by GetDataName(), and SetDataName().

Bool_t TGo4FitPeakFinder::fbClearModels [private]
 

Definition at line 158 of file TGo4FitPeakFinder.h.

Referenced by GetClearModels(), and SetClearModels().

Bool_t TGo4FitPeakFinder::fbUsePolynom [private]
 

Definition at line 160 of file TGo4FitPeakFinder.h.

Referenced by GetUsePolynom(), and SetUsePolynom().

Int_t TGo4FitPeakFinder::fiPolynomOrder [private]
 

Definition at line 161 of file TGo4FitPeakFinder.h.

Referenced by GetPolynomOrder(), and SetPolynomOrder().

Double_t TGo4FitPeakFinder::fd0MinWidth [private]
 

Definition at line 163 of file TGo4FitPeakFinder.h.

Referenced by Get0MinWidth(), and Set0MinWidth().

Double_t TGo4FitPeakFinder::fd0MaxWidth [private]
 

Definition at line 164 of file TGo4FitPeakFinder.h.

Referenced by Get0MaxWidth(), and Set0MaxWidth().

Double_t TGo4FitPeakFinder::fd0MaxAmplFactor [private]
 

Definition at line 165 of file TGo4FitPeakFinder.h.

Referenced by Get0MaxAmplFactor(), and Set0MaxAmplFactor().

Double_t TGo4FitPeakFinder::fd1LineWidth [private]
 

Definition at line 167 of file TGo4FitPeakFinder.h.

Referenced by Get1LineWidth(), and Set1LineWidth().

Double_t TGo4FitPeakFinder::fd2NoiseFactor [private]
 

Definition at line 169 of file TGo4FitPeakFinder.h.

Referenced by Get2NoiseFactor(), and Set2NoiseFactor().

Double_t TGo4FitPeakFinder::fd2NoiseMinimum [private]
 

Definition at line 170 of file TGo4FitPeakFinder.h.

Referenced by Get2NoiseMinimum(), and Set2NoiseMinimum().

Int_t TGo4FitPeakFinder::fi2ChannelSum [private]
 

Definition at line 171 of file TGo4FitPeakFinder.h.

Referenced by Get2ChannelSum(), and Set2ChannelSum().


The documentation for this class was generated from the following files:
Generated on Tue Nov 8 10:56:43 2005 for Go4-v2.10-5 by doxygen1.2.15