![]() |
AliRoot Core
3dc7879 (3dc7879)
|
Procedure of fast altro fitting. More...
#include <AliCaloFastAltroFitv0.h>
Public Member Functions | |
AliCaloFastAltroFitv0 () | |
Default constructor. More... | |
AliCaloFastAltroFitv0 (const char *name, const char *title, const Double_t sig=1.3, const Double_t tau=2.35, const Double_t n=2.) | |
Constructor. More... | |
virtual | ~AliCaloFastAltroFitv0 () |
Destructor. More... | |
virtual void | FastFit (Int_t *t, Int_t *y, Int_t nPoints, Double_t sig, Double_t tau, Double_t n, Double_t ped, Double_t tMax) |
Fast fit. More... | |
void | FastFit (TH1F *h, Double_t sig, Double_t tau, Double_t n, Double_t ped, Double_t tMax) |
void | Reset () |
Reset variables. More... | |
void | SetSig (const Double_t sig) |
void | SetTau (const Double_t tau) |
void | SetN (const Double_t n) |
void | SetParameters (const Double_t sig, const Double_t tau, const Double_t n) |
Double_t | GetSig () const |
Double_t | GetTau () const |
Double_t | GetN () const |
Double_t | GetPed () const |
Double_t | GetEnergy () const |
Double_t | GetAmp () const |
Double_t | GetAmpErr () const |
Double_t | GetTime () const |
Double_t | GetT0 () const |
Double_t | GetT0Err () const |
Double_t | GetChi2 () const |
Int_t | GetNDF () const |
Int_t | GetNfit () const |
Int_t | GetNoFit () const |
void | GetFitResult (Double_t &, Double_t &eamp, Double_t &t0, Double_t &et0, Double_t &chi2, Int_t &ndf) const |
void | GetFittedPoints (Int_t &nfit, Double_t *ar[2]) const |
TCanvas * | DrawFastFunction () |
Static Public Member Functions | |
static Double_t | StdResponseFunction (const Double_t *x, const Double_t *par) |
static void | CutRightPart (Int_t *t, Int_t *y, Int_t nPoints, Double_t tMax, Int_t &ii) |
Cut right part of altro sample : static function. More... | |
static void | DeductPedestal (Int_t *t, Int_t *y, Int_t nPointsIn, Double_t ped, Double_t tau, Double_t *tn, Double_t *yn, Int_t &nPointsOut) |
static void | FastFit (const Double_t *t, const Double_t *y, const Int_t nPoints, const Double_t sig, const Double_t tau, Double_t &, Double_t &eamp, Double_t &t0, Double_t &et0, Double_t &chi2) |
static Bool_t | QuadraticRoots (const Double_t a, const Double_t b, const Double_t c, Double_t &x1, Double_t &x2) |
Resolve quadratic equations a*x**2 + b*x + c. More... | |
static void | Amplitude (const Double_t *t, const Double_t *y, const Int_t nPoints, const Double_t sig, const Double_t tau, Double_t t0, Double_t &, Double_t &chi2) |
static void | CalculateParsErrors (const Double_t *t, const Double_t *y, const Int_t nPoints, const Double_t sig, const Double_t tau, Double_t &, Double_t &t0, Double_t &eamp, Double_t &et0) |
Protected Attributes | |
Double_t | fSig |
Error in amplitude - used in chi2 calculation. More... | |
Double_t | fTau |
First fixed parameter od fitting function (should be - filter time response. More... | |
Double_t | fN |
Second fixed parameter od fitting function (should be positive) More... | |
Double_t | fPed |
Pedestal. More... | |
Double_t | fAmp |
Amplitude. More... | |
Double_t | fAmpErr |
Amplitude error. More... | |
Double_t | fT0 |
Time. More... | |
Double_t | fT0Err |
Time error. More... | |
Double_t | fChi2 |
Chi square. More... | |
Int_t | fNDF |
Number degree of freedom. More... | |
Int_t | fNoFit |
No solution for square equation. More... | |
Int_t | fNfit |
! Number points for fit More... | |
Double_t * | fTfit |
! Points for fit after selection - time bins More... | |
Double_t * | fAmpfit |
! Points for fit after selection - amplitudes More... | |
TF1 * | fStdFun |
! Function for drawing More... | |
Private Member Functions | |
AliCaloFastAltroFitv0 (const AliCaloFastAltroFitv0 &obj) | |
Copy Constructor. More... | |
AliCaloFastAltroFitv0 & | operator= (const AliCaloFastAltroFitv0 &obj) |
Assignment operator. More... | |
Procedure of fast altro fitting.
Implementation of fit procedure from ALICE-INT-2008-026: "Time and amplitude reconstruction from sampling measurements of the PHOS signal profile" M.Yu.Bogolyubsky and ..
Fit by function en*x*x*exp(-2.*x): x = (t-t0)/tau. The main goal is fast estimation of amplitude and t0.///
Definition at line 30 of file AliCaloFastAltroFitv0.h.
AliCaloFastAltroFitv0::AliCaloFastAltroFitv0 | ( | ) |
Default constructor.
Definition at line 36 of file AliCaloFastAltroFitv0.cxx.
AliCaloFastAltroFitv0::AliCaloFastAltroFitv0 | ( | const char * | name, |
const char * | title, | ||
const Double_t | sig = 1.3 , |
||
const Double_t | tau = 2.35 , |
||
const Double_t | n = 2. |
||
) |
Constructor.
Definition at line 46 of file AliCaloFastAltroFitv0.cxx.
|
virtual |
Destructor.
Definition at line 69 of file AliCaloFastAltroFitv0.cxx.
|
private |
Copy Constructor.
Definition at line 59 of file AliCaloFastAltroFitv0.cxx.
|
static |
Get amplitude Calculate parameters error too. sig is independent from points
Definition at line 436 of file AliCaloFastAltroFitv0.cxx.
Referenced by FastFit(), and GetNoFit().
|
static |
Evaluate errors Remember that fmax = exp(-n); fmax_nk = (n/k)**n*exp(-n) => n=k=2 => exp(-n) = exp(-2.)
Definition at line 476 of file AliCaloFastAltroFitv0.cxx.
Referenced by FastFit(), and GetNoFit().
|
static |
Cut right part of altro sample : static function.
Definition at line 220 of file AliCaloFastAltroFitv0.cxx.
Referenced by FastFit(), and GetNoFit().
|
static |
Pedestal deduction if ped is positive : static function Discard part od samle if it is not compact.
Definition at line 241 of file AliCaloFastAltroFitv0.cxx.
Referenced by FastFit(), and GetNoFit().
TCanvas * AliCaloFastAltroFitv0::DrawFastFunction | ( | ) |
Drawing QA of fitting
Definition at line 508 of file AliCaloFastAltroFitv0.cxx.
Referenced by GetNoFit().
|
virtual |
Fast fit.
Definition at line 86 of file AliCaloFastAltroFitv0.cxx.
Referenced by AliCaloRawAnalyzerFastFit::Evaluate(), FastFit(), and GetNoFit().
void AliCaloFastAltroFitv0::FastFit | ( | TH1F * | h, |
Double_t | sig, | ||
Double_t | tau, | ||
Double_t | n, | ||
Double_t | ped, | ||
Double_t | tMax | ||
) |
Service method for convinience only h - histogram with altro response, could have empty bin and center of bin could be different from bin number
Definition at line 137 of file AliCaloFastAltroFitv0.cxx.
|
static |
Fast fit main algorithm. Static function
It is case of n=k=2 : fnn = x*x*exp(2 - 2*x)
Input:
t | - array of time bins |
y | - array of amplitudes after pedestal subtractions; |
nPoints | - number of points |
sig | - error of amplitude measurement (one value for all channels) |
tau | - filter time response (in timebin units) Output: |
amp | - amplitude at t0; |
eamp | - error of amplitude; |
t0 | - time of max amplitude; |
et0 | - error of t0; |
chi2 | - chi2 |
Definition at line 321 of file AliCaloFastAltroFitv0.cxx.
|
inline |
Definition at line 60 of file AliCaloFastAltroFitv0.h.
|
inline |
Definition at line 61 of file AliCaloFastAltroFitv0.h.
|
inline |
Definition at line 65 of file AliCaloFastAltroFitv0.h.
Referenced by DrawFastFunction().
|
inline |
Definition at line 59 of file AliCaloFastAltroFitv0.h.
Referenced by DrawFastFunction(), and GetAmp().
void AliCaloFastAltroFitv0::GetFitResult | ( | Double_t & | amp, |
Double_t & | eamp, | ||
Double_t & | t0, | ||
Double_t & | et0, | ||
Double_t & | chi2, | ||
Int_t & | ndf | ||
) | const |
Definition at line 192 of file AliCaloFastAltroFitv0.cxx.
Referenced by GetNoFit().
void AliCaloFastAltroFitv0::GetFittedPoints | ( | Int_t & | nfit, |
Double_t * | ar[2] | ||
) | const |
Definition at line 206 of file AliCaloFastAltroFitv0.cxx.
Referenced by GetNoFit().
|
inline |
Definition at line 56 of file AliCaloFastAltroFitv0.h.
Referenced by DrawFastFunction().
|
inline |
Definition at line 66 of file AliCaloFastAltroFitv0.h.
Referenced by DrawFastFunction().
|
inline |
Definition at line 67 of file AliCaloFastAltroFitv0.h.
|
inline |
Definition at line 68 of file AliCaloFastAltroFitv0.h.
|
inline |
Definition at line 57 of file AliCaloFastAltroFitv0.h.
|
inline |
Definition at line 54 of file AliCaloFastAltroFitv0.h.
|
inline |
Definition at line 63 of file AliCaloFastAltroFitv0.h.
|
inline |
Definition at line 64 of file AliCaloFastAltroFitv0.h.
|
inline |
Definition at line 55 of file AliCaloFastAltroFitv0.h.
Referenced by DrawFastFunction().
|
inline |
Definition at line 62 of file AliCaloFastAltroFitv0.h.
Referenced by DrawFastFunction(), and GetT0().
|
private |
Assignment operator.
Definition at line 78 of file AliCaloFastAltroFitv0.cxx.
|
static |
Resolve quadratic equations a*x**2 + b*x + c.
Definition at line 392 of file AliCaloFastAltroFitv0.cxx.
Referenced by FastFit(), and GetNoFit().
void AliCaloFastAltroFitv0::Reset | ( | void | ) |
|
inline |
Definition at line 50 of file AliCaloFastAltroFitv0.h.
|
inline |
Definition at line 51 of file AliCaloFastAltroFitv0.h.
|
inline |
Definition at line 48 of file AliCaloFastAltroFitv0.h.
|
inline |
Definition at line 49 of file AliCaloFastAltroFitv0.h.
|
static |
Static Standard Response Function : look to Double_t AliEMCALRawUtils::RawResponseFunction(Double_t *x, Double_t *par) Used for drawing only.
Shape of the electronics raw reponse: It is a semi-gaussian, 2nd order Gamma function (n=2) of the general form
t' = (t - t0 + tau) / tau F = A * t**N * exp( N * ( 1 - t) ) for t >= 0 F = 0 for t < 0
parameters: A: par[0] // Amplitude = peak value t0: par[1] tau: par[2] N: par[3] ped: par[4]
Definition at line 578 of file AliCaloFastAltroFitv0.cxx.
Referenced by DrawFastFunction(), and GetNoFit().
|
protected |
Amplitude.
Definition at line 106 of file AliCaloFastAltroFitv0.h.
Referenced by FastFit(), GetEnergy(), GetFitResult(), and Reset().
|
protected |
Amplitude error.
Definition at line 107 of file AliCaloFastAltroFitv0.h.
Referenced by FastFit(), GetAmpErr(), GetFitResult(), and Reset().
|
protected |
! Points for fit after selection - amplitudes
Definition at line 117 of file AliCaloFastAltroFitv0.h.
Referenced by DrawFastFunction(), FastFit(), GetFittedPoints(), Reset(), and ~AliCaloFastAltroFitv0().
|
protected |
Chi square.
Definition at line 110 of file AliCaloFastAltroFitv0.h.
Referenced by FastFit(), GetChi2(), GetFitResult(), and Reset().
|
protected |
Second fixed parameter od fitting function (should be positive)
Definition at line 103 of file AliCaloFastAltroFitv0.h.
Referenced by GetN(), SetN(), and SetParameters().
|
protected |
Number degree of freedom.
Definition at line 111 of file AliCaloFastAltroFitv0.h.
Referenced by FastFit(), GetFitResult(), GetNDF(), and Reset().
|
protected |
! Number points for fit
Definition at line 115 of file AliCaloFastAltroFitv0.h.
Referenced by DrawFastFunction(), FastFit(), GetFittedPoints(), GetNfit(), and Reset().
|
protected |
No solution for square equation.
Definition at line 112 of file AliCaloFastAltroFitv0.h.
Referenced by FastFit(), and GetNoFit().
|
protected |
Pedestal.
Definition at line 104 of file AliCaloFastAltroFitv0.h.
|
protected |
Error in amplitude - used in chi2 calculation.
Definition at line 101 of file AliCaloFastAltroFitv0.h.
Referenced by DrawFastFunction(), FastFit(), GetSig(), Reset(), SetParameters(), and SetSig().
|
protected |
! Function for drawing
Definition at line 119 of file AliCaloFastAltroFitv0.h.
Referenced by DrawFastFunction().
|
protected |
Time.
Definition at line 108 of file AliCaloFastAltroFitv0.h.
Referenced by FastFit(), GetFitResult(), GetTime(), and Reset().
|
protected |
Time error.
Definition at line 109 of file AliCaloFastAltroFitv0.h.
Referenced by FastFit(), GetFitResult(), GetT0Err(), and Reset().
|
protected |
First fixed parameter od fitting function (should be - filter time response.
Definition at line 102 of file AliCaloFastAltroFitv0.h.
Referenced by FastFit(), GetTau(), Reset(), SetParameters(), and SetTau().
|
protected |
! Points for fit after selection - time bins
Definition at line 116 of file AliCaloFastAltroFitv0.h.
Referenced by DrawFastFunction(), FastFit(), GetFittedPoints(), Reset(), and ~AliCaloFastAltroFitv0().