155 Error (
"TSpectrum2Fit",
"Invalid number of peaks, must be > than 0");
339 c = (-1.) *
dap *
c * t * t * (
da1 + t * (2. *
da2 + t * 3. *
da3)) -
357 if (
pw > 10)
c *=
a2;
358 if (
pw > 12)
c *=
a2;
383 for (i = 0; i <
size; i++) {
397 for (i = 0; i <
size; i++) {
403 for (i = 0; i <
size; i++) {
414 for (i = 0; i <
size; i++)
445 Double_t r,
p,
r1,
e,
ex,
ey,
vx,
s2, px, py, rx, ry,
erx,
ery;
467 r1 += 0.5 *
txy * px * py;
471 r1 += 0.5 *
sxy * rx * ry;
547 Double_t p,
r,
r1 = 0,
e,
ex,
ey, px, py, rx, ry,
erx,
ery,
s2;
567 r1 += 0.5 *
txy * px * py;
571 r1 += 0.5 *
sxy * rx * ry;
642 Double_t p,
r,
r1 = 0,
e,
ex,
ey, px, py, rx, ry,
erx,
ery,
s2;
667 r1 += 0.5 *
txy * px * py;
671 r1 += 0.5 *
sxy * rx * ry;
737 Double_t p,
r,
r1 = 0,
e,
ex,
ey, px, py, rx, ry,
erx,
ery,
s2;
762 r1 += 0.5 *
txy * px * py;
766 r1 += 0.5 *
sxy * rx * ry;
907 0,
e,
a,
b,
x0,
y0,
s2, px, py, rx, ry,
erx,
ery,
ex,
ey;
936 e += 0.5 *
txy * px * py;
940 e += 0.5 *
sxy * rx * ry;
1054 0,
e,
a,
b,
x0,
y0,
s2, px, py, rx, ry,
erx,
ery,
ex,
ey;
1083 e += 0.5 *
txy * px * py;
1087 e += 0.5 *
sxy * rx * ry;
1206 rx = (px * px - 2 *
r * px *
qx +
qx *
qx);
1207 ex = rx / (2 * (1 -
r *
r));
1214 tx = px *
qx / (1 -
r *
r);
1215 tx =
tx -
r * rx / ((1 -
r *
r) * (1 -
r *
r));
1238 Double_t p,
r,
r1 = 0,
ex,
ey, px, py,
erx,
ery,
s2,
x0,
y0,
a;
1254 r1 += 0.5 *
a * px * py;
1284 r1 += 0.5 *
a * rx * ry;
1317 r1 += 0.5 *
ax * px;
1350 r1 += 0.5 *
ax * px;
1377 r1 += 0.5 *
ax * rx;
1404 r1 += 0.5 *
ax * rx;
1427 Double_t p,
r,
r1 = 0,
a,
x0,
y0,
s2, px, py,
erx,
ery,
ex,
ey;
1446 r1 += 0.5 *
a *
txy * px * py;
1459 r1 += 0.5 *
a *
tx * px;
1483 Double_t p,
r,
r1 = 0,
a,
x0,
y0,
s2, px, py,
erx,
ery,
ex,
ey;
1502 r1 += 0.5 *
a *
txy * px * py;
1515 r1 += 0.5 *
a *
ty * py;
1561 r = 2 * pi *
sx *
sy *
r;
1584 r =
a * 2 * pi *
sy *
r;
1607 r =
a * 2 * pi *
sx *
r;
1856 Double_t a,
b,
c,
d = 0, alpha,
chi_opt,
yw,
ywm,
f,
chi2,
chi_min,
chi =
1859 for (i = 0,
j = 0; i <
fNPeaks; i++) {
2077 if (((
a +
d) <= 0 &&
a >= 0) || ((
a +
d) >= 0
2126 if (((
a +
d) <= 0 &&
a >= 0) || ((
a +
d) >= 0
2214 if (((
a +
d) <= 0 &&
a >= 0) || ((
a +
d) >= 0
2254 if (((
a +
d) <= 0 &&
a >= 0) || ((
a +
d) >= 0
2301 if (((
a +
d) <= 0 &&
a >= 0) || ((
a +
d) >= 0 &&
a <= 0))
2346 if (((
a +
d) <= 0 &&
a >= 0) || ((
a +
d) >= 0 &&
a <= 0))
2379 if (((
a +
d) <= 0 &&
a >= 0) || ((
a +
d) >= 0 &&
a <= 0))
2673 for (pi = 0.1;
flag == 0 && pi <= 100; pi += 0.1) {
2677 for (i = 0,
j = 0; i <
fNPeaks; i++) {
2863 for (i = 0,
j = 0; i <
fNPeaks; i++) {
3003 for (i = 0,
j = 0; i <
fNPeaks; i++) {
3178 alpha = alpha / 10.0;
3523 for (i = 0,
j = 0; i <
fNPeaks; i++) {
3950 Double_t a,
b,
c, alpha,
chi_opt,
yw,
ywm,
f,
chi2,
chi_min,
chi = 0
3953 for (i = 0,
j = 0; i <
fNPeaks; i++) {
4063 for (i = 0; i <
size; i++)
4068 for (k = 0; k < (
size + 4); k++) {
4317 for (k = 0; k <
size; k++) {
4339 for (i = 0; i <
size; i++) {
4343 for (i = 0; i <
size; i++) {
4365 for (pi = 0.1;
flag == 0 && pi <= 100; pi += 0.1) {
4369 for (i = 0,
j = 0; i <
fNPeaks; i++) {
4555 for (i = 0,
j = 0; i <
fNPeaks; i++) {
4695 for (i = 0,
j = 0; i <
fNPeaks; i++) {
4870 alpha = alpha / 10.0;
5194 for (i = 0,
j = 0; i <
fNPeaks; i++) {
5528 Error(
"SetFitParameters",
"Wrong range");
5532 Error(
"SetFitParameters",
"Invalid number of iterations, must be positive");
5536 Error (
"SetFitParameters",
"Invalid step coefficient alpha, must be > than 0 and <=1");
5542 Error(
"SetFitParameters",
"Wrong type of statistic");
5547 Error(
"SetFitParameters",
"Wrong optimization algorithm");
5553 Error(
"SetFitParameters",
"Wrong power");
5558 Error(
"SetFitParameters",
"Wrong order of Taylor development");
5583void TSpectrum2Fit::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)
5586 Error (
"SetPeakParameters",
"Invalid sigma, must be > than 0");
5590 Error (
"SetPeakParameters",
"Invalid ro, must be from region <-1,1>");
5596 Error (
"SetPeakParameters",
"Invalid peak position, must be in the range fXmin, fXmax");
5600 Error (
"SetPeakParameters",
"Invalid peak position, must be in the range fYmin, fYmax");
5604 Error (
"SetPeakParameters",
"Invalid ridge position, must be in the range fXmin, fXmax");
5608 Error (
"SetPeakParameters",
"Invalid ridge position, must be in the range fYmin, fYmax");
5612 Error (
"SetPeakParameters",
"Invalid peak amplitude, must be > than 0");
5616 Error (
"SetPeakParameters",
"Invalid x ridge amplitude, must be > than 0");
5620 Error (
"SetPeakParameters",
"Invalid y ridge amplitude, must be > than 0");
5681void TSpectrum2Fit::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)
5858void TSpectrum2Fit::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)
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
The TNamed class is the base class for all named ROOT classes.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Advanced 2-dimensional spectra fitting functions.
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)
This function calculates derivative of peaks shape function (see manual) according to slope bx.
Double_t Dersxy(Int_t numOfFittedPeaks, Double_t x, Double_t y, const Double_t *parameter, Double_t sigmax, Double_t sigmay)
This function calculates derivative of peaks shape function (see manual) according to relative amplit...
Bool_t fFixBx
logical value of b parameter for 1D ridges in x direction, which allows to fix the parameter (not to ...
Bool_t * fFixPositionY
[fNPeaks] array of logical values which allow to fix appropriate y positions of 2D peaks (not fit)....
Double_t fSigmaErrY
error value of sigma y parameter
Bool_t * fFixAmpY1
[fNPeaks] array of logical values which allow to fix appropriate amplitudes of 1D ridges in y directi...
Double_t * fAmpCalcX1
[fNPeaks] array of calculated values of amplitudes of 1D ridges in x direction, output parameters
Double_t Volume(Double_t a, Double_t sx, Double_t sy, Double_t ro)
This function calculates volume of a peak.
Bool_t fFixSxy
logical value of s parameter for 2D peaks, which allows to fix the parameter (not to fit).
Double_t fTxErr
error value of t parameter for 1D ridges in x direction
Double_t Deri01(Double_t x, Double_t ax, Double_t x0, Double_t sigmax, Double_t tx, Double_t sx, Double_t bx)
This function calculates derivative of 2D peaks shape function (see manual) according to x position o...
Double_t * fAmpErrY1
[fNPeaks] array of amplitudes errors of 1D ridges in y direction, output parameters
Double_t fBxInit
initial value of b parameter for 1D ridges in x direction (slope), for details see html manual and re...
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)
This function calculates 2D peaks shape function (see manual)
Double_t fA0Err
error value of background a0 parameter
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)
This function sets the following fitting parameters of peaks:
Double_t fSigmaCalcX
calculated value of sigma x parameter
Bool_t * fFixAmpX1
[fNPeaks] array of logical values which allow to fix appropriate amplitudes of 1D ridges in x directi...
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)
This function calculates second derivative of 2D peaks shape function (see manual) according to x pos...
Bool_t fFixRo
logical value of correlation coefficient, which allows to fix the parameter (not to fit).
Double_t * fAmpErr
[fNPeaks] array of amplitudes errors of 2D peaks, output parameters
Bool_t fFixSx
logical value of s parameter for 1D ridges in x direction, which allows to fix the parameter (not to ...
Double_t * fAmpInit
[fNPeaks] array of initial values of amplitudes of 2D peaks, input parameters
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)
This function gets the tail parameters and their errors.
Double_t * fVolume
[fNPeaks] array of calculated volumes of 2D peaks, output parameters
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)
This function calculates second derivative of peaks shape function (see manual) according to sigmax o...
Double_t * fPositionCalcY
[fNPeaks] array of calculated values of y positions of 2D peaks, output parameters
Int_t fFitTaylor
order of Taylor expansion, possible values kFitTaylorOrderFirst, kFitTaylorOrderSecond....
Double_t fSxyErr
error value of s parameter for 2D peaks
Double_t * fPositionErrY1
[fNPeaks] array of y positions errors of 1D ridges, output parameters
Double_t fBxCalc
calculated value of b parameter for 1D ridges in x direction
Double_t fRoErr
error value of correlation coefficient
Double_t fTxCalc
calculated value of t parameter for 1D ridges in x direction
Double_t fRoCalc
calculated value of correlation coefficient
Bool_t fFixBy
logical value of b parameter for 1D ridges in y direction, which allows to fix the parameter (not to ...
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)
This function calculates derivative of peaks shape function (see manual) according to slope by.
Double_t fTxyInit
initial value of t parameter for 2D peaks (relative amplitude of tail), for details see html manual a...
Bool_t fFixSigmaY
logical value of sigma y parameter, which allows to fix the parameter (not to fit).
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)
This function calculates derivative of 2D peaks shape function (see manual) according to amplitude of...
void GetRo(Double_t &ro, Double_t &roErr)
This function gets the ro parameter and its error.
Int_t fXmax
last fitted channel in x direction
Double_t fChi
here the fitting functions return resulting chi square
void GetVolumes(Double_t *volumes)
This function gets the volumes of fitted 2D peaks.
Double_t fByErr
error value of b parameter for 1D ridges in y direction
Double_t fA0Init
initial value of background a0 parameter(backgroud is estimated as a0+ax*x+ay*y)
Double_t fRoInit
initial value of correlation coefficient
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)
This function calculates derivative of 2D peaks shape function (see manual) according to x position o...
Double_t fSigmaInitX
initial value of sigma x parameter
void GetBackgroundParameters(Double_t &a0, Double_t &a0Err, Double_t &ax, Double_t &axErr, Double_t &ay, Double_t &ayErr)
This function gets the background parameters and their errors.
Double_t Derampx(Double_t x, Double_t x0, Double_t sigmax, Double_t tx, Double_t sx, Double_t bx)
This function calculates derivative of 2D peaks shape function (see manual) according to amplitude of...
Double_t * fPositionInitY1
[fNPeaks] array of initial y positions of 1D ridges, input parameters
Bool_t fFixSy
logical value of s parameter for 1D ridges in y direction, which allows to fix the parameter (not to ...
Bool_t * fFixAmp
[fNPeaks] array of logical values which allow to fix appropriate amplitudes of 2D peaks (not fit)....
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)
This function calculates second derivative of 2D peaks shape function (see manual) according to y pos...
Double_t fAyErr
error value of background ay parameter
Double_t fSxyCalc
calculated value of s parameter for 2D peaks
Double_t * fPositionInitX1
[fNPeaks] array of initial x positions of 1D ridges, input parameters
Double_t fTyCalc
calculated value of t parameter for 1D ridges in y direction
Double_t * fPositionErrX1
[fNPeaks] array of x positions errors of 1D ridges, output parameters
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)
This function calculates derivative of peaks shape function (see manual) according to relative amplit...
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)
This function calculates derivative of 2D peaks shape function (see manual) according to y position o...
Double_t * fPositionInitY
[fNPeaks] array of initial values of y positions of 2D peaks, input parameters
Double_t fSxCalc
calculated value of s parameter for 1D ridges in x direction
void GetAmplitudeErrors(Double_t *amplitudeErrors, Double_t *amplitudeErrorsX1, Double_t *amplitudeErrorsY1)
This function gets the amplitudes of fitted 2D peaks and 1D ridges.
Double_t fAxCalc
calculated value of background ax parameter
Double_t fSyErr
error value of s parameter for 1D ridges in y direction
Int_t fStatisticType
type of statistics, possible values kFitOptimChiCounts (chi square statistics with counts as weightin...
Int_t fYmax
last fitted channel in y direction
Double_t * fPositionErrY
[fNPeaks] array of error values of y positions of 2D peaks, output parameters
Double_t Dersx(Int_t numOfFittedPeaks, Double_t x, const Double_t *parameter, Double_t sigmax)
This function calculates derivative of peaks shape function (see manual) according to relative amplit...
Double_t fByCalc
calculated value of b parameter for 1D ridges in y direction
Double_t fTyInit
initial value of t parameter for 1D ridges in y direction (relative amplitude of tail),...
Double_t fTxyCalc
calculated value of t parameter for 2D peaks
Double_t Derpa2(Double_t sx, Double_t sy, Double_t ro)
This function calculates derivative of the volume of a peak according to amplitude.
Double_t fByInit
initial value of b parameter for 1D ridges in y direction (slope), for details see html manual and re...
Double_t fSigmaCalcY
calculated value of sigma y parameter
Double_t * fAmpErrX1
[fNPeaks] array of amplitudes errors of 1D ridges in x direction, output parameters
Double_t Dertx(Int_t numOfFittedPeaks, Double_t x, const Double_t *parameter, Double_t sigmax, Double_t bx)
This function calculates derivative of peaks shape function (see manual) according to relative amplit...
Int_t fNumberIterations
number of iterations in fitting procedure, input parameter, it should be > 0
Bool_t fFixTx
logical value of t parameter for 1D ridges in x direction, which allows to fix the parameter (not to ...
Double_t * fPositionCalcY1
[fNPeaks] array of calculated y positions of 1D ridges, output parameters
Bool_t fFixTxy
logical value of t parameter for 2D peaks, which allows to fix the parameter (not to fit).
void FitAwmi(Double_t **source)
This function fits the source spectrum.
Bool_t fFixTy
logical value of t parameter for 1D ridges in y direction, which allows to fix the parameter (not to ...
Double_t fAlpha
convergence coefficient, input parameter, it should be positive number and <=1, for details see refer...
void GetPositions(Double_t *positionsX, Double_t *positionsY, Double_t *positionsX1, Double_t *positionsY1)
This function gets the positions of fitted 2D peaks and 1D ridges.
Bool_t fFixAx
logical value of ax parameter, which allows to fix the parameter (not to fit).
Double_t fTyErr
error value of t parameter for 1D ridges in y direction
Double_t fSyCalc
calculated value of s parameter for 1D ridges in y direction
Int_t fXmin
first fitted channel in x direction
Double_t fTxyErr
error value of t parameter for 2D peaks
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)
This function sets the following fitting parameters:
void GetSigmaX(Double_t &sigmaX, Double_t &sigmaErrX)
This function gets the sigma x parameter and its error.
Double_t Derderi01(Double_t x, Double_t ax, Double_t x0, Double_t sigmax)
This function calculates second derivative of 2D peaks shape function (see manual) according to x pos...
Double_t Erfc(Double_t x)
This function calculates error function of x.
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)
This function calculates derivative of peaks shape function (see manual) according to correlation coe...
Bool_t * fFixPositionX1
[fNPeaks] array of logical values which allow to fix appropriate x positions of 1D ridges (not fit)....
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)
This function calculates derivative of peaks shape function (see manual) according to sigmax of peaks...
Double_t Ourpowl(Double_t a, Int_t pw)
power function
Double_t * fAmpInitY1
[fNPeaks] array of initial values of amplitudes of 1D ridges in y direction, input parameters
Double_t fAxErr
error value of background ax parameter
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)
This function calculates second derivative of peaks shape function (see manual) according to sigmay o...
Double_t fAyCalc
calculated value of background ay parameter
Double_t fSigmaInitY
initial value of sigma y parameter
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)
This function sets the following fitting parameters of tails of peaks.
Double_t * fPositionErrX
[fNPeaks] array of error values of x positions of 2D peaks, output parameters
Double_t * fAmpInitX1
[fNPeaks] array of initial values of amplitudes of 1D ridges in x direction, input parameters
Bool_t * fFixPositionY1
[fNPeaks] array of logical values which allow to fix appropriate y positions of 1D ridges (not fit)....
void GetVolumeErrors(Double_t *volumeErrors)
This function gets errors of the volumes of fitted 2D peaks.
Double_t Dersy(Int_t numOfFittedPeaks, Double_t x, const Double_t *parameter, Double_t sigmax)
This function calculates derivative of peaks shape function (see manual) according to relative amplit...
~TSpectrum2Fit() override
Destructor.
Double_t Derpsigmay(Double_t a, Double_t sx, Double_t ro)
This function calculates derivative of the volume of a peak according to sigmay.
Double_t Derty(Int_t numOfFittedPeaks, Double_t x, const Double_t *parameter, Double_t sigmax, Double_t bx)
This function calculates derivative of peaks shape function (see manual) according to relative amplit...
Double_t fTxInit
initial value of t parameter for 1D ridges in x direction (relative amplitude of tail),...
Double_t fSyInit
initial value of s parameter for 1D ridges in y direction (relative amplitude of step),...
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)
This function calculates derivative of peaks shape function (see manual) according to sigmax of peaks...
Double_t * fAmpCalc
[fNPeaks] array of calculated values of amplitudes of 2D peaks, output parameters
void GetSigmaY(Double_t &sigmaY, Double_t &sigmaErrY)
This function gets the sigma y parameter and its error.
TSpectrum2Fit(void)
Default constructor.
Double_t fA0Calc
calculated value of background a0 parameter
Double_t * fPositionInitX
[fNPeaks] array of initial values of x positions of 2D peaks, input parameters
Int_t fAlphaOptim
optimization of convergence algorithm, possible values kFitAlphaHalving, kFitAlphaOptimal
Bool_t fFixSigmaX
logical value of sigma x parameter, which allows to fix the parameter (not to fit).
Double_t fSxErr
error value of s parameter for 1D ridges in x direction
Int_t fNPeaks
number of peaks present in fit, input parameter, it should be > 0
void SetBackgroundParameters(Double_t a0Init, Bool_t fixA0, Double_t axInit, Bool_t fixAx, Double_t ayInit, Bool_t fixAy)
This function sets the following fitting parameters of background:
Double_t Derpro(Double_t a, Double_t sx, Double_t sy, Double_t ro)
This function calculates derivative of the volume of a peak according to ro.
Double_t * fAmpCalcY1
[fNPeaks] array of calculated values of amplitudes of 1D ridges in y direction, output parameters
Bool_t fFixAy
logical value of ay parameter, which allows to fix the parameter (not to fit).
void FitStiefel(Double_t **source)
This function fits the source spectrum.
Double_t Derfc(Double_t x)
This function calculates derivative of error function of x.
Double_t fSxInit
initial value of s parameter for 1D ridges in x direction (relative amplitude of step),...
Double_t fSigmaErrX
error value of sigma x parameter
Int_t fYmin
first fitted channel in y direction
Double_t * fPositionCalcX1
[fNPeaks] array of calculated x positions of 1D ridges, output parameters
void GetAmplitudes(Double_t *amplitudes, Double_t *amplitudesX1, Double_t *amplitudesY1)
This function gets the amplitudes of fitted 2D peaks and 1D ridges.
Double_t fBxErr
error value of b parameter for 1D ridges in x direction
Double_t Derpsigmax(Double_t a, Double_t sy, Double_t ro)
This function calculates derivative of the volume of a peak according to sigmax.
Double_t * fPositionCalcX
[fNPeaks] array of calculated values of x positions of 2D peaks, output parameters
Double_t fAxInit
initial value of background ax parameter(backgroud is estimated as a0+ax*x+ay*y)
Bool_t * fFixPositionX
[fNPeaks] array of logical values which allow to fix appropriate x positions of 2D peaks (not fit)....
void GetPositionErrors(Double_t *positionErrorsX, Double_t *positionErrorsY, Double_t *positionErrorsX1, Double_t *positionErrorsY1)
This function gets the errors of positions of fitted 2D peaks and 1D ridges.
void StiefelInversion(Double_t **a, Int_t size)
This function calculates solution of the system of linear equations.
Double_t fSxyInit
initial value of s parameter for 2D peaks (relative amplitude of step), for details see html manual a...
Int_t fPower
possible values kFitPower2,4,6,8,10,12, for details see references. It applies only for Awmi fitting ...
Bool_t fFixA0
logical value of a0 parameter, which allows to fix the parameter (not to fit).
Double_t fAyInit
initial value of background ay parameter(backgroud is estimated as a0+ax*x+ay*y)
Double_t * fVolumeErr
[fNPeaks] array of volumes errors of 2D peaks, output parameters
Double_t Log(Double_t x)
Returns the natural logarithm of x.
Double_t Sqrt(Double_t x)
Returns the square root of x.
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.