ROOT  6.06/09
Reference Guide
TSpectrum2Fit.h
Go to the documentation of this file.
1 // @(#)root/spectrum:$Id$
2 // Author: Miroslav Morhac 25/09/06
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2006, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 #ifndef ROOT_TSpectrum2Fit
12 #define ROOT_TSpectrum2Fit
13 
14 //////////////////////////////////////////////////////////////////////////
15 // //
16 // TSpectrum2Fit //
17 // //
18 // Class for fitting 2D spectra using AWMI (algorithm without matrix //
19 // inversion) and conjugate gradient algorithms for symmetrical //
20 // matrices (Stiefel-Hestens method). AWMI method allows to fit //
21 // simulaneously 100s up to 1000s peaks. Stiefel method is very stable, //
22 // it converges faster, but is more time consuming //
23 // //
24 //////////////////////////////////////////////////////////////////////////
25 
26 #ifndef ROOT_TNamed
27 #include "TNamed.h"
28 #endif
29 
30 class TSpectrum2Fit : public TNamed {
31 protected:
32  Int_t fNPeaks; //number of peaks present in fit, input parameter, it should be > 0
33  Int_t fNumberIterations; //number of iterations in fitting procedure, input parameter, it should be > 0
34  Int_t fXmin; //first fitted channel in x direction
35  Int_t fXmax; //last fitted channel in x direction
36  Int_t fYmin; //first fitted channel in y direction
37  Int_t fYmax; //last fitted channel in y direction
38  Int_t fStatisticType; //type of statistics, possible values kFitOptimChiCounts (chi square statistics with counts as weighting coefficients), kFitOptimChiFuncValues (chi square statistics with function values as weighting coefficients),kFitOptimMaxLikelihood
39  Int_t fAlphaOptim; //optimization of convergence algorithm, possible values kFitAlphaHalving, kFitAlphaOptimal
40  Int_t fPower; //possible values kFitPower2,4,6,8,10,12, for details see references. It applies only for Awmi fitting function.
41  Int_t fFitTaylor; //order of Taylor expansion, possible values kFitTaylorOrderFirst, kFitTaylorOrderSecond. It applies only for Awmi fitting function.
42  Double_t fAlpha; //convergence coefficient, input parameter, it should be positive number and <=1, for details see references
43  Double_t fChi; //here the fitting functions return resulting chi square
44  Double_t *fPositionInitX; //[fNPeaks] array of initial values of x positions of 2D peaks, input parameters
45  Double_t *fPositionCalcX; //[fNPeaks] array of calculated values of x positions of 2D peaks, output parameters
46  Double_t *fPositionErrX; //[fNPeaks] array of error values of x positions of 2D peaks, output parameters
47  Double_t *fPositionInitY; //[fNPeaks] array of initial values of y positions of 2D peaks, input parameters
48  Double_t *fPositionCalcY; //[fNPeaks] array of calculated values of y positions of 2D peaks, output parameters
49  Double_t *fPositionErrY; //[fNPeaks] array of error values of y positions of 2D peaks, output parameters
50  Double_t *fPositionInitX1; //[fNPeaks] array of initial x positions of 1D ridges, input parameters
51  Double_t *fPositionCalcX1; //[fNPeaks] array of calculated x positions of 1D ridges, output parameters
52  Double_t *fPositionErrX1; //[fNPeaks] array of x positions errors of 1D ridges, output parameters
53  Double_t *fPositionInitY1; //[fNPeaks] array of initial y positions of 1D ridges, input parameters
54  Double_t *fPositionCalcY1; //[fNPeaks] array of calculated y positions of 1D ridges, output parameters
55  Double_t *fPositionErrY1; //[fNPeaks] array of y positions errors of 1D ridges, output parameters
56  Double_t *fAmpInit; //[fNPeaks] array of initial values of amplitudes of 2D peaks, input parameters
57  Double_t *fAmpCalc; //[fNPeaks] array of calculated values of amplitudes of 2D peaks, output parameters
58  Double_t *fAmpErr; //[fNPeaks] array of amplitudes errors of 2D peaks, output parameters
59  Double_t *fAmpInitX1; //[fNPeaks] array of initial values of amplitudes of 1D ridges in x direction, input parameters
60  Double_t *fAmpCalcX1; //[fNPeaks] array of calculated values of amplitudes of 1D ridges in x direction, output parameters
61  Double_t *fAmpErrX1; //[fNPeaks] array of amplitudes errors of 1D ridges in x direction, output parameters
62  Double_t *fAmpInitY1; //[fNPeaks] array of initial values of amplitudes of 1D ridges in y direction, input parameters
63  Double_t *fAmpCalcY1; //[fNPeaks] array of calculated values of amplitudes of 1D ridges in y direction, output parameters
64  Double_t *fAmpErrY1; //[fNPeaks] array of amplitudes errors of 1D ridges in y direction, output parameters
65  Double_t *fVolume; //[fNPeaks] array of calculated volumes of 2D peaks, output parameters
66  Double_t *fVolumeErr; //[fNPeaks] array of volumes errors of 2D peaks, output parameters
67  Double_t fSigmaInitX; //initial value of sigma x parameter
68  Double_t fSigmaCalcX; //calculated value of sigma x parameter
69  Double_t fSigmaErrX; //error value of sigma x parameter
70  Double_t fSigmaInitY; //initial value of sigma y parameter
71  Double_t fSigmaCalcY; //calculated value of sigma y parameter
72  Double_t fSigmaErrY; //error value of sigma y parameter
73  Double_t fRoInit; //initial value of correlation coefficient
74  Double_t fRoCalc; //calculated value of correlation coefficient
75  Double_t fRoErr; //error value of correlation coefficient
76  Double_t fTxyInit; //initial value of t parameter for 2D peaks (relative amplitude of tail), for details see html manual and references
77  Double_t fTxyCalc; //calculated value of t parameter for 2D peaks
78  Double_t fTxyErr; //error value of t parameter for 2D peaks
79  Double_t fSxyInit; //initial value of s parameter for 2D peaks (relative amplitude of step), for details see html manual and references
80  Double_t fSxyCalc; //calculated value of s parameter for 2D peaks
81  Double_t fSxyErr; //error value of s parameter for 2D peaks
82  Double_t fTxInit; //initial value of t parameter for 1D ridges in x direction (relative amplitude of tail), for details see html manual and references
83  Double_t fTxCalc; //calculated value of t parameter for 1D ridges in x direction
84  Double_t fTxErr; //error value of t parameter for 1D ridges in x direction
85  Double_t fTyInit; //initial value of t parameter for 1D ridges in y direction (relative amplitude of tail), for details see html manual and references
86  Double_t fTyCalc; //calculated value of t parameter for 1D ridges in y direction
87  Double_t fTyErr; //error value of t parameter for 1D ridges in y direction
88  Double_t fSxInit; //initial value of s parameter for 1D ridges in x direction (relative amplitude of step), for details see html manual and references
89  Double_t fSxCalc; //calculated value of s parameter for 1D ridges in x direction
90  Double_t fSxErr; //error value of s parameter for 1D ridges in x direction
91  Double_t fSyInit; //initial value of s parameter for 1D ridges in y direction (relative amplitude of step), for details see html manual and references
92  Double_t fSyCalc; //calculated value of s parameter for 1D ridges in y direction
93  Double_t fSyErr; //error value of s parameter for 1D ridges in y direction
94  Double_t fBxInit; //initial value of b parameter for 1D ridges in x direction (slope), for details see html manual and references
95  Double_t fBxCalc; //calculated value of b parameter for 1D ridges in x direction
96  Double_t fBxErr; //error value of b parameter for 1D ridges in x direction
97  Double_t fByInit; //initial value of b parameter for 1D ridges in y direction (slope), for details see html manual and references
98  Double_t fByCalc; //calculated value of b parameter for 1D ridges in y direction
99  Double_t fByErr; //error value of b parameter for 1D ridges in y direction
100  Double_t fA0Init; //initial value of background a0 parameter(backgroud is estimated as a0+ax*x+ay*y)
101  Double_t fA0Calc; //calculated value of background a0 parameter
102  Double_t fA0Err; //error value of background a0 parameter
103  Double_t fAxInit; //initial value of background ax parameter(backgroud is estimated as a0+ax*x+ay*y)
104  Double_t fAxCalc; //calculated value of background ax parameter
105  Double_t fAxErr; //error value of background ax parameter
106  Double_t fAyInit; //initial value of background ay parameter(backgroud is estimated as a0+ax*x+ay*y)
107  Double_t fAyCalc; //calculated value of background ay parameter
108  Double_t fAyErr; //error value of background ay parameter
109  Bool_t *fFixPositionX; //[fNPeaks] array of logical values which allow to fix appropriate x positions of 2D peaks (not fit). However they are present in the estimated functional
110  Bool_t *fFixPositionY; //[fNPeaks] array of logical values which allow to fix appropriate y positions of 2D peaks (not fit). However they are present in the estimated functional
111  Bool_t *fFixPositionX1; //[fNPeaks] array of logical values which allow to fix appropriate x positions of 1D ridges (not fit). However they are present in the estimated functional
112  Bool_t *fFixPositionY1; //[fNPeaks] array of logical values which allow to fix appropriate y positions of 1D ridges (not fit). However they are present in the estimated functional
113  Bool_t *fFixAmp; //[fNPeaks] array of logical values which allow to fix appropriate amplitudes of 2D peaks (not fit). However they are present in the estimated functional
114  Bool_t *fFixAmpX1; //[fNPeaks] array of logical values which allow to fix appropriate amplitudes of 1D ridges in x direction (not fit). However they are present in the estimated functional
115  Bool_t *fFixAmpY1; //[fNPeaks] array of logical values which allow to fix appropriate amplitudes of 1D ridges in y direction (not fit). However they are present in the estimated functional
116  Bool_t fFixSigmaX; //logical value of sigma x parameter, which allows to fix the parameter (not to fit).
117  Bool_t fFixSigmaY; //logical value of sigma y parameter, which allows to fix the parameter (not to fit).
118  Bool_t fFixRo; //logical value of correlation coefficient, which allows to fix the parameter (not to fit).
119  Bool_t fFixTxy; //logical value of t parameter for 2D peaks, which allows to fix the parameter (not to fit).
120  Bool_t fFixSxy; //logical value of s parameter for 2D peaks, which allows to fix the parameter (not to fit).
121  Bool_t fFixTx; //logical value of t parameter for 1D ridges in x direction, which allows to fix the parameter (not to fit).
122  Bool_t fFixTy; //logical value of t parameter for 1D ridges in y direction, which allows to fix the parameter (not to fit).
123  Bool_t fFixSx; //logical value of s parameter for 1D ridges in x direction, which allows to fix the parameter (not to fit).
124  Bool_t fFixSy; //logical value of s parameter for 1D ridges in y direction, which allows to fix the parameter (not to fit).
125  Bool_t fFixBx; //logical value of b parameter for 1D ridges in x direction, which allows to fix the parameter (not to fit).
126  Bool_t fFixBy; //logical value of b parameter for 1D ridges in y direction, which allows to fix the parameter (not to fit).
127  Bool_t fFixA0; //logical value of a0 parameter, which allows to fix the parameter (not to fit).
128  Bool_t fFixAx; //logical value of ax parameter, which allows to fix the parameter (not to fit).
129  Bool_t fFixAy; //logical value of ay parameter, which allows to fix the parameter (not to fit).
130 public:
131  enum {
146  };
147  TSpectrum2Fit(void); //default constructor
148  TSpectrum2Fit(Int_t numberPeaks);
149  virtual ~TSpectrum2Fit();
150  //auxiliary functions for 2. parameter fit functions
151 protected:
154  Double_t Derbx(Int_t numOfFittedPeaks,Double_t x,Double_t y,const Double_t *parameter,Double_t sigmax,Double_t sigmay,Double_t txy,Double_t tx,Double_t bx,Double_t by);
155  Double_t Derby(Int_t numOfFittedPeaks,Double_t x,Double_t y,const Double_t *parameter,Double_t sigmax,Double_t sigmay,Double_t txy,Double_t ty,Double_t bx,Double_t by);
159  Double_t Derdersigmax(Int_t numOfFittedPeaks,Double_t x,Double_t y,const Double_t *parameter,Double_t sigmax,Double_t sigmay,Double_t ro);
160  Double_t Derdersigmay(Int_t numOfFittedPeaks,Double_t x,Double_t y,const Double_t *parameter,Double_t sigmax,Double_t sigmay,Double_t ro);
169  Double_t Derro(Int_t numOfFittedPeaks,Double_t x,Double_t y,const Double_t *parameter,Double_t sx,Double_t sy,Double_t r);
170  Double_t Dersigmax(Int_t numOfFittedPeaks,Double_t x,Double_t y,const Double_t *parameter,Double_t sigmax,Double_t sigmay,Double_t ro,Double_t txy,Double_t sxy,Double_t tx,Double_t sx,Double_t bx,Double_t by);
171  Double_t Dersigmay(Int_t numOfFittedPeaks,Double_t x,Double_t y,const Double_t *parameter,Double_t sigmax,Double_t sigmay,Double_t ro,Double_t txy,Double_t sxy,Double_t ty,Double_t sy,Double_t bx,Double_t by);
172  Double_t Dersx(Int_t numOfFittedPeaks,Double_t x,const Double_t *parameter,Double_t sigmax);
173  Double_t Dersxy(Int_t numOfFittedPeaks,Double_t x,Double_t y,const Double_t *parameter,Double_t sigmax,Double_t sigmay);
174  Double_t Dersy(Int_t numOfFittedPeaks,Double_t x,const Double_t *parameter,Double_t sigmax);
175  Double_t Dertx(Int_t numOfFittedPeaks,Double_t x,const Double_t *parameter,Double_t sigmax,Double_t bx);
176  Double_t Dertxy(Int_t numOfFittedPeaks,Double_t x,Double_t y,const Double_t *parameter,Double_t sigmax,Double_t sigmay,Double_t bx,Double_t by);
177  Double_t Derty(Int_t numOfFittedPeaks,Double_t x,const Double_t *parameter,Double_t sigmax,Double_t bx);
180  Double_t Shape2(Int_t numOfFittedPeaks,Double_t x,Double_t y,const Double_t *parameter,Double_t sigmax,Double_t sigmay,Double_t ro,Double_t a0,Double_t ax,Double_t ay,Double_t txy,Double_t sxy,Double_t tx,Double_t ty,Double_t sx,Double_t sy,Double_t bx,Double_t by);
181  void StiefelInversion(Double_t **a,Int_t size);
183 
184 public:
185  void FitAwmi(Double_t **source);
186  void FitStiefel(Double_t **source);
187  void GetAmplitudes(Double_t *amplitudes, Double_t *amplitudesX1, Double_t *amplitudesY1);
188  void GetAmplitudeErrors(Double_t *amplitudeErrors, Double_t *amplitudeErrorsX1, Double_t *amplitudeErrorsY1);
189  void GetBackgroundParameters(Double_t &a0, Double_t &a0Err, Double_t &ax, Double_t &axErr, Double_t &ay, Double_t &ayErr);
190  Double_t GetChi() const {return fChi;}
191  void GetPositions(Double_t *positionsX, Double_t *positionsY, Double_t *positionsX1, Double_t *positionsY1);
192  void GetPositionErrors(Double_t *positionErrorsX, Double_t *positionErrorsY, Double_t *positionErrorsX1, Double_t *positionErrorsY1);
193  void GetRo(Double_t &ro, Double_t &roErr);
194  void GetSigmaX(Double_t &sigmaX, Double_t &sigmaErrX);
195  void GetSigmaY(Double_t &sigmaY, Double_t &sigmaErrY);
196  void GetTailParameters(Double_t &txy, Double_t &txyErr, Double_t &tx, Double_t &txErr, Double_t &ty, Double_t &tyErr, Double_t &bx, Double_t &bxErr, Double_t &by, Double_t &byErr, Double_t &sxy, Double_t &sxyErr, Double_t &sx, Double_t &sxErr, Double_t &sy, Double_t &syErr);
197  void GetVolumes(Double_t *volumes);
198  void GetVolumeErrors(Double_t *volumeErrors);
199  void SetBackgroundParameters(Double_t a0Init, Bool_t fixA0, Double_t axInit, Bool_t fixAx, Double_t ayInit, Bool_t fixAy);
200  void SetFitParameters(Int_t xmin,Int_t xmax,Int_t ymin,Int_t ymax, Int_t numberIterations, Double_t alpha, Int_t statisticType, Int_t alphaOptim, Int_t power, Int_t fitTaylor);
201  void SetPeakParameters(Double_t sigmaX, Bool_t fixSigmaX, Double_t sigmaY, Bool_t fixSigmaY, Double_t ro, Bool_t fixRo, const Double_t *positionInitX, const Bool_t *fixPositionX, const Double_t *positionInitY, const Bool_t *fixPositionY, const Double_t *positionInitX1, const Bool_t *fixPositionX1, const Double_t *positionInitY1, const Bool_t *fixPositionY1, const Double_t *ampInit, const Bool_t *fixAmp, const Double_t *ampInitX1, const Bool_t *fixAmpX1, const Double_t *ampInitY1, const Bool_t *fixAmpY1);
202  void SetTailParameters(Double_t tInitXY, Bool_t fixTxy, Double_t tInitX, Bool_t fixTx, Double_t tInitY, Bool_t fixTy, Double_t bInitX, Bool_t fixBx, Double_t bInitY, Bool_t fixBy, Double_t sInitXY, Bool_t fixSxy, Double_t sInitX, Bool_t fixSx, Double_t sInitY, Bool_t fixSy);
203 
204  ClassDef(TSpectrum2Fit,1) //Spectrum2 Fitter using algorithm without matrix inversion and conjugate gradient method for symmetrical matrices (Stiefel-Hestens method)
205 };
206 
207 #endif
208 
Bool_t * fFixAmp
Double_t Derpsigmay(Double_t a, Double_t sx, Double_t ro)
AUXILIARY FUNCTION // // This function calculates derivative of the volume of a peak // according to ...
Double_t Derpa2(Double_t sx, Double_t sy, Double_t ro)
AUXILIARY FUNCTION // // This function calculates derivative of the volume of a peak // according to ...
Double_t fByCalc
Definition: TSpectrum2Fit.h:98
Double_t Derampx(Double_t x, Double_t x0, Double_t sigmax, Double_t tx, Double_t sx, Double_t bx)
AUXILIARY FUNCTION // // This function calculates derivative of 2D peaks shape function (see manual) ...
Double_t Dersigmay(Int_t numOfFittedPeaks, Double_t x, Double_t y, const Double_t *parameter, Double_t sigmax, Double_t sigmay, Double_t ro, Double_t txy, Double_t sxy, Double_t ty, Double_t sy, Double_t bx, Double_t by)
AUXILIARY FUNCTION // // This function calculates derivative of peaks shape function (see manual) // ...
Double_t * fAmpCalcY1
Definition: TSpectrum2Fit.h:63
float xmin
Definition: THbookFile.cxx:93
Double_t Dertx(Int_t numOfFittedPeaks, Double_t x, const Double_t *parameter, Double_t sigmax, Double_t bx)
AUXILIARY FUNCTION // // This function calculates derivative of peaks shape function (see manual) // ...
Double_t * fPositionErrY1
Definition: TSpectrum2Fit.h:55
Double_t Deri01(Double_t x, Double_t ax, Double_t x0, Double_t sigmax, Double_t tx, Double_t sx, Double_t bx)
AUXILIARY FUNCTION // // This function calculates derivative of 2D peaks shape function (see manual) ...
Advanced 2-dimentional spectra fitting functions.
Definition: TSpectrum2Fit.h:30
Double_t * fPositionCalcX1
Definition: TSpectrum2Fit.h:51
Bool_t * fFixPositionY1
Bool_t * fFixAmpY1
Double_t fAxErr
Double_t fSxInit
Definition: TSpectrum2Fit.h:88
Double_t fTxInit
Definition: TSpectrum2Fit.h:82
float ymin
Definition: THbookFile.cxx:93
Double_t * fPositionInitY
Definition: TSpectrum2Fit.h:47
void GetBackgroundParameters(Double_t &a0, Double_t &a0Err, Double_t &ax, Double_t &axErr, Double_t &ay, Double_t &ayErr)
GETTER FUNCTION.
Double_t Derpsigmax(Double_t a, Double_t sy, Double_t ro)
AUXILIARY FUNCTION // // This function calculates derivative of the volume of a peak // according to ...
Bool_t * fFixAmpX1
Double_t fSyErr
Definition: TSpectrum2Fit.h:93
void GetTailParameters(Double_t &txy, Double_t &txyErr, Double_t &tx, Double_t &txErr, Double_t &ty, Double_t &tyErr, Double_t &bx, Double_t &bxErr, Double_t &by, Double_t &byErr, Double_t &sxy, Double_t &sxyErr, Double_t &sx, Double_t &sxErr, Double_t &sy, Double_t &syErr)
GETTER FUNCTION.
Bool_t * fFixPositionX
Double_t fByInit
Definition: TSpectrum2Fit.h:97
Double_t Derfc(Double_t x)
AUXILIARY FUNCTION // // This function calculates derivative of error function of x...
Double_t fA0Init
Double_t Derpro(Double_t a, Double_t sx, Double_t sy, Double_t ro)
AUXILIARY FUNCTION // // This function calculates derivative of the volume of a peak // according to ...
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
Double_t Deri02(Double_t x, Double_t y, Double_t a, Double_t x0, Double_t y0, Double_t sigmax, Double_t sigmay, Double_t ro, Double_t txy, Double_t sxy, Double_t bx, Double_t by)
AUXILIARY FUNCTION // // This function calculates derivative of 2D peaks shape function (see manual) ...
TArc * a
Definition: textangle.C:12
Double_t fSigmaCalcY
Definition: TSpectrum2Fit.h:71
Double_t * fPositionCalcY1
Definition: TSpectrum2Fit.h:54
Double_t * fPositionInitY1
Definition: TSpectrum2Fit.h:53
void GetAmplitudes(Double_t *amplitudes, Double_t *amplitudesX1, Double_t *amplitudesY1)
GETTER FUNCTION.
Double_t * fPositionErrY
Definition: TSpectrum2Fit.h:49
Double_t Derty(Int_t numOfFittedPeaks, Double_t x, const Double_t *parameter, Double_t sigmax, Double_t bx)
AUXILIARY FUNCTION // // This function calculates derivative of peaks shape function (see manual) // ...
TSpectrum2Fit(void)
Double_t fTxyErr
Definition: TSpectrum2Fit.h:78
Double_t * fPositionInitX
Definition: TSpectrum2Fit.h:44
void FitStiefel(Double_t **source)
void GetPositions(Double_t *positionsX, Double_t *positionsY, Double_t *positionsX1, Double_t *positionsY1)
GETTER FUNCTION.
Double_t Derdersigmay(Int_t numOfFittedPeaks, Double_t x, Double_t y, const Double_t *parameter, Double_t sigmax, Double_t sigmay, Double_t ro)
AUXILIARY FUNCTION // // This function calculates second derivative of peaks shape function // (see m...
Double_t * fAmpCalc
Definition: TSpectrum2Fit.h:57
Double_t fTxErr
Definition: TSpectrum2Fit.h:84
Double_t * fAmpCalcX1
Definition: TSpectrum2Fit.h:60
Double_t Derby(Int_t numOfFittedPeaks, Double_t x, Double_t y, const Double_t *parameter, Double_t sigmax, Double_t sigmay, Double_t txy, Double_t ty, Double_t bx, Double_t by)
AUXILIARY FUNCTION // // This function calculates derivative of peaks shape function (see manual) // ...
Double_t fSigmaInitY
Definition: TSpectrum2Fit.h:70
Double_t Derderi01(Double_t x, Double_t ax, Double_t x0, Double_t sigmax)
AUXILIARY FUNCTION // // This function calculates second derivative of 2D peaks shape function // (se...
Double_t fAyInit
Double_t fRoErr
Definition: TSpectrum2Fit.h:75
Double_t Dersx(Int_t numOfFittedPeaks, Double_t x, const Double_t *parameter, Double_t sigmax)
AUXILIARY FUNCTION // // This function calculates derivative of peaks shape function (see manual) // ...
Double_t Shape2(Int_t numOfFittedPeaks, Double_t x, Double_t y, const Double_t *parameter, Double_t sigmax, Double_t sigmay, Double_t ro, Double_t a0, Double_t ax, Double_t ay, Double_t txy, Double_t sxy, Double_t tx, Double_t ty, Double_t sx, Double_t sy, Double_t bx, Double_t by)
AUXILIARY FUNCTION // // This function calculates 2D peaks shape function (see manual) // Function pa...
Double_t fAxCalc
Double_t * fPositionErrX1
Definition: TSpectrum2Fit.h:52
Double_t x[n]
Definition: legend1.C:17
#define ClassDef(name, id)
Definition: Rtypes.h:254
Double_t * fAmpInitX1
Definition: TSpectrum2Fit.h:59
Double_t * fAmpErrY1
Definition: TSpectrum2Fit.h:64
void FitAwmi(Double_t **source)
TWO-DIMENSIONAL FIT FUNCTION ALGORITHM WITHOUT MATRIX INVERSION This function fits the source spectru...
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:33
Double_t * fAmpInit
Definition: TSpectrum2Fit.h:56
Double_t Deramp2(Double_t x, Double_t y, Double_t x0, Double_t y0, Double_t sigmax, Double_t sigmay, Double_t ro, Double_t txy, Double_t sxy, Double_t bx, Double_t by)
AUXILIARY FUNCTION // // This function calculates derivative of 2D peaks shape function (see manual) ...
Double_t Ourpowl(Double_t a, Int_t pw)
power function
Double_t GetChi() const
Double_t fSxCalc
Definition: TSpectrum2Fit.h:89
Double_t fSyInit
Definition: TSpectrum2Fit.h:91
Double_t * fAmpErrX1
Definition: TSpectrum2Fit.h:61
Double_t fBxErr
Definition: TSpectrum2Fit.h:96
void GetSigmaX(Double_t &sigmaX, Double_t &sigmaErrX)
GETTER FUNCTION.
void SetBackgroundParameters(Double_t a0Init, Bool_t fixA0, Double_t axInit, Bool_t fixAx, Double_t ayInit, Bool_t fixAy)
SETTER FUNCTION.
float ymax
Definition: THbookFile.cxx:93
void GetVolumes(Double_t *volumes)
GETTER FUNCTION.
Double_t * fPositionCalcY
Definition: TSpectrum2Fit.h:48
void SetPeakParameters(Double_t sigmaX, Bool_t fixSigmaX, Double_t sigmaY, Bool_t fixSigmaY, Double_t ro, Bool_t fixRo, const Double_t *positionInitX, const Bool_t *fixPositionX, const Double_t *positionInitY, const Bool_t *fixPositionY, const Double_t *positionInitX1, const Bool_t *fixPositionX1, const Double_t *positionInitY1, const Bool_t *fixPositionY1, const Double_t *ampInit, const Bool_t *fixAmp, const Double_t *ampInitX1, const Bool_t *fixAmpX1, const Double_t *ampInitY1, const Bool_t *fixAmpY1)
SETTER FUNCTION.
ROOT::R::TRInterface & r
Definition: Object.C:4
Double_t fTxyInit
Definition: TSpectrum2Fit.h:76
Double_t fAyCalc
void GetPositionErrors(Double_t *positionErrorsX, Double_t *positionErrorsY, Double_t *positionErrorsX1, Double_t *positionErrorsY1)
GETTER FUNCTION.
Double_t * fVolumeErr
Definition: TSpectrum2Fit.h:66
Int_t fNumberIterations
Definition: TSpectrum2Fit.h:33
Bool_t * fFixPositionX1
Double_t Derj02(Double_t x, Double_t y, Double_t a, Double_t x0, Double_t y0, Double_t sigmax, Double_t sigmay, Double_t ro, Double_t txy, Double_t sxy, Double_t bx, Double_t by)
Double_t fTyCalc
Definition: TSpectrum2Fit.h:86
void GetAmplitudeErrors(Double_t *amplitudeErrors, Double_t *amplitudeErrorsX1, Double_t *amplitudeErrorsY1)
GETTER FUNCTION.
void SetTailParameters(Double_t tInitXY, Bool_t fixTxy, Double_t tInitX, Bool_t fixTx, Double_t tInitY, Bool_t fixTy, Double_t bInitX, Bool_t fixBx, Double_t bInitY, Bool_t fixBy, Double_t sInitXY, Bool_t fixSxy, Double_t sInitX, Bool_t fixSx, Double_t sInitY, Bool_t fixSy)
SETTER FUNCTION.
float xmax
Definition: THbookFile.cxx:93
void GetSigmaY(Double_t &sigmaY, Double_t &sigmaErrY)
GETTER FUNCTION.
Double_t fSxyErr
Definition: TSpectrum2Fit.h:81
void GetRo(Double_t &ro, Double_t &roErr)
GETTER FUNCTION.
Int_t fStatisticType
Definition: TSpectrum2Fit.h:38
Double_t Derdersigmax(Int_t numOfFittedPeaks, Double_t x, Double_t y, const Double_t *parameter, Double_t sigmax, Double_t sigmay, Double_t ro)
AUXILIARY FUNCTION // // This function calculates second derivative of peaks shape function // (see m...
Double_t fByErr
Definition: TSpectrum2Fit.h:99
Double_t Dertxy(Int_t numOfFittedPeaks, Double_t x, Double_t y, const Double_t *parameter, Double_t sigmax, Double_t sigmay, Double_t bx, Double_t by)
AUXILIARY FUNCTION // // This function calculates derivative of peaks shape function (see manual) // ...
Double_t fA0Calc
Double_t fTxyCalc
Definition: TSpectrum2Fit.h:77
Double_t Derderi02(Double_t x, Double_t y, Double_t a, Double_t x0, Double_t y0, Double_t sigmax, Double_t sigmay, Double_t ro)
AUXILIARY FUNCTION // // This function calculates second derivative of 2D peaks shape function // (se...
void GetVolumeErrors(Double_t *volumeErrors)
GETTER FUNCTION.
Double_t fSigmaCalcX
Definition: TSpectrum2Fit.h:68
Double_t fAyErr
Double_t fTxCalc
Definition: TSpectrum2Fit.h:83
Double_t fSxyCalc
Definition: TSpectrum2Fit.h:80
Double_t fA0Err
Double_t * fAmpErr
Definition: TSpectrum2Fit.h:58
double Double_t
Definition: RtypesCore.h:55
Double_t * fVolume
Definition: TSpectrum2Fit.h:65
Double_t fBxInit
Definition: TSpectrum2Fit.h:94
Double_t fSyCalc
Definition: TSpectrum2Fit.h:92
Double_t Derro(Int_t numOfFittedPeaks, Double_t x, Double_t y, const Double_t *parameter, Double_t sx, Double_t sy, Double_t r)
AUXILIARY FUNCTION // // This function calculates derivative of peaks shape function (see manual) // ...
Bool_t * fFixPositionY
Double_t y[n]
Definition: legend1.C:17
Double_t Dersxy(Int_t numOfFittedPeaks, Double_t x, Double_t y, const Double_t *parameter, Double_t sigmax, Double_t sigmay)
AUXILIARY FUNCTION // // This function calculates derivative of peaks shape function (see manual) // ...
Double_t fRoCalc
Definition: TSpectrum2Fit.h:74
Double_t Erfc(Double_t x)
AUXILIARY FUNCTION // // This function calculates error function of x.
Double_t Derderj02(Double_t x, Double_t y, Double_t a, Double_t x0, Double_t y0, Double_t sigmax, Double_t sigmay, Double_t ro)
AUXILIARY FUNCTION // // This function calculates second derivative of 2D peaks shape function // (se...
Double_t * fPositionErrX
Definition: TSpectrum2Fit.h:46
Double_t fSigmaErrX
Definition: TSpectrum2Fit.h:69
void StiefelInversion(Double_t **a, Int_t size)
Double_t * fPositionCalcX
Definition: TSpectrum2Fit.h:45
void SetFitParameters(Int_t xmin, Int_t xmax, Int_t ymin, Int_t ymax, Int_t numberIterations, Double_t alpha, Int_t statisticType, Int_t alphaOptim, Int_t power, Int_t fitTaylor)
Double_t fBxCalc
Definition: TSpectrum2Fit.h:95
Double_t fSigmaInitX
Definition: TSpectrum2Fit.h:67
Double_t fSxyInit
Definition: TSpectrum2Fit.h:79
Double_t fAxInit
Double_t Volume(Double_t a, Double_t sx, Double_t sy, Double_t ro)
AUXILIARY FUNCTION // // This function calculates volume of a peak // Function parameters: // -a-ampl...
Double_t * fPositionInitX1
Definition: TSpectrum2Fit.h:50
Double_t fSigmaErrY
Definition: TSpectrum2Fit.h:72
Double_t fAlpha
Definition: TSpectrum2Fit.h:42
virtual ~TSpectrum2Fit()
destructor
Double_t fTyInit
Definition: TSpectrum2Fit.h:85
Double_t Dersigmax(Int_t numOfFittedPeaks, Double_t x, Double_t y, const Double_t *parameter, Double_t sigmax, Double_t sigmay, Double_t ro, Double_t txy, Double_t sxy, Double_t tx, Double_t sx, Double_t bx, Double_t by)
AUXILIARY FUNCTION // // This function calculates derivative of peaks shape function (see manual) // ...
Double_t fRoInit
Definition: TSpectrum2Fit.h:73
Double_t fTyErr
Definition: TSpectrum2Fit.h:87
Double_t Derbx(Int_t numOfFittedPeaks, Double_t x, Double_t y, const Double_t *parameter, Double_t sigmax, Double_t sigmay, Double_t txy, Double_t tx, Double_t bx, Double_t by)
AUXILIARY FUNCTION // // This function calculates derivative of peaks shape function (see manual) // ...
Double_t * fAmpInitY1
Definition: TSpectrum2Fit.h:62
Double_t fChi
Definition: TSpectrum2Fit.h:43
Double_t fSxErr
Definition: TSpectrum2Fit.h:90
Double_t Dersy(Int_t numOfFittedPeaks, Double_t x, const Double_t *parameter, Double_t sigmax)
AUXILIARY FUNCTION // // This function calculates derivative of peaks shape function (see manual) // ...