AliPhysics  e6d2b2b (e6d2b2b)
AliFMDCorrELossFit::ELossFit Struct Reference

#include <AliFMDCorrELossFit.h>

Inheritance diagram for AliFMDCorrELossFit::ELossFit:

Public Member Functions

 ELossFit ()
 
 ELossFit (Int_t quality, const TF1 &f)
 
 ELossFit (Int_t quality, UShort_t n, Double_t chi2, UShort_t nu, Double_t c, Double_t ec, Double_t delta, Double_t edelta, Double_t xi, Double_t exi, Double_t sigma, Double_t esigma, Double_t sigman, Double_t esigman, const Double_t *a, const Double_t *ea)
 
 ELossFit (const ELossFit &o)
 
ELossFitoperator= (const ELossFit &o)
 
 ~ELossFit ()
 
Access to parameters
Int_t GetN () const
 
UShort_t GetNu () const
 
Double_t GetChi2 () const
 
Double_t GetC () const
 
Double_t GetDelta () const
 
Double_t GetXi () const
 
Double_t GetSigma () const
 
Double_t GetSigmaN () const
 
Double_tGetAs () const
 
Double_t GetA (UShort_t i) const
 
Double_t GetEC () const
 
Double_t GetEDelta () const
 
Double_t GetEXi () const
 
Double_t GetESigma () const
 
Double_t GetESigmaN () const
 
Double_tGetEAs () const
 
Double_t GetEA (UShort_t i) const
 
Int_t GetQuality () const
 
UShort_t GetDet () const
 
Char_t GetRing () const
 
UShort_t GetBin () const
 
Evaluation
Double_t Evaluate (Double_t x, UShort_t maxN=999) const
 
Double_t EvaluateWeighted (Double_t x, UShort_t maxN=9999) const
 
Int_t FindMaxWeight (Double_t maxRelError=2 *fgMaxRelError, Double_t leastWeight=fgLeastWeight, UShort_t maxN=999) const
 
TF1 * GetF1 (Int_t i=0, Double_t max=20) const
 
Finding cuts
Double_t GetMpvCut (Double_t f) const
 
Double_t GetXiCut (Double_t f) const
 
Double_t GetXiSigmaCut (Double_t f) const
 
Double_t GetAvgXiSigmaCut (Double_t f) const
 
Double_t FindProbabilityCut (Double_t low) const
 
TObject Sortable interface
Bool_t IsSortable () const
 
Int_t Compare (const TObject *o) const
 
void Print (Option_t *option) const
 
void Draw (Option_t *option="comp")
 
void Browse (TBrowser *b)
 
const Char_tGetName () const
 
void CalculateQuality (Double_t maxChi2nu=fgMaxChi2nu, Double_t maxRelError=fgMaxRelError, Double_t leastWeight=fgLeastWeight)
 

Public Attributes

Int_t fN
 
UShort_t fNu
 
Double_t fChi2
 
Double_t fC
 
Double_t fDelta
 
Double_t fXi
 
Double_t fSigma
 
Double_t fSigmaN
 
Double_tfA
 
Double_t fEC
 
Double_t fEDelta
 
Double_t fEXi
 
Double_t fESigma
 
Double_t fESigmaN
 
Double_tfEA
 
Int_t fQuality
 
UShort_t fDet
 
Char_t fRing
 
UShort_t fBin
 
UShort_t fMaxWeight
 

Static Public Attributes

static Double_t fgMaxRelError = .25
 Cached maximum weight. More...
 
static Double_t fgLeastWeight = 1e-7
 
static Double_t fgMaxChi2nu = 20
 

Detailed Description

POD structure to hold data from fits

Definition at line 69 of file AliFMDCorrELossFit.h.

Constructor & Destructor Documentation

AliFMDCorrELossFit::ELossFit::ELossFit ( )

Default constructor

Definition at line 31 of file AliFMDCorrELossFit.cxx.

AliFMDCorrELossFit::ELossFit::ELossFit ( Int_t  quality,
const TF1 &  f 
)

Construct from a function

Parameters
qualityQuality flag
fFunction

Definition at line 59 of file AliFMDCorrELossFit.cxx.

AliFMDCorrELossFit::ELossFit::ELossFit ( Int_t  quality,
UShort_t  n,
Double_t  chi2,
UShort_t  nu,
Double_t  c,
Double_t  ec,
Double_t  delta,
Double_t  edelta,
Double_t  xi,
Double_t  exi,
Double_t  sigma,
Double_t  esigma,
Double_t  sigman,
Double_t  esigman,
const Double_t a,
const Double_t ea 
)

Constructor with full parameter set

Parameters
qualityQuality flag
n\( N\) - Number of fitted peaks
chi2\( \chi^2 \)
nu\( \nu \) - number degrees of freedom
c\( C\) - scale constant
ec\( \delta C\) - error on \( C\)
delta\( \Delta\) - Most probable value
edelta\( \delta\Delta\) - error on \(\Delta\)
xi\( \xi\) - width
exi\( \delta\xi\) - error on \(\xi\)
sigma\( \sigma\) - Width of Gaussian
esigma\( \delta\sigma\) - error on \(\sigma\)
sigman\( \sigma_n\) - Noise width
esigman\( \delta\sigma_n\) - error on \(\sigma_n\)
aArray of \( N-1\) weights \( a_i\) for \( i=2,\ldots\)
eaArray of \( N-1\) error on the weights \( a_i\) for \( i=2,\ldots\)

Definition at line 102 of file AliFMDCorrELossFit.cxx.

AliFMDCorrELossFit::ELossFit::ELossFit ( const ELossFit o)

Copy constructor

Parameters
oObject to copy from

Definition at line 165 of file AliFMDCorrELossFit.cxx.

AliFMDCorrELossFit::ELossFit::~ELossFit ( )

Destructor

Definition at line 254 of file AliFMDCorrELossFit.cxx.

Member Function Documentation

void AliFMDCorrELossFit::ELossFit::Browse ( TBrowser *  b)

Browse this object

Parameters
bBrowser

Definition at line 474 of file AliFMDCorrELossFit.cxx.

Referenced by AliFMDCorrELossFit::IsFolder(), and IsSortable().

void AliFMDCorrELossFit::ELossFit::CalculateQuality ( Double_t  maxChi2nu = fgMaxChi2nu,
Double_t  maxRelError = fgMaxRelError,
Double_t  leastWeight = fgLeastWeight 
)

Calculate the quality

Parameters
maxChi2nuMaximum reduced \(\chi^2\)
maxRelErrorMaximum relative error
leastWeightLeast weight to use

Definition at line 713 of file AliFMDCorrELossFit.cxx.

Referenced by AliFMDCorrELossFit::CacheBins(), MakeELossFit::FindBestFit(), AliFMDEnergyFitter::RingHistos::FindBestFit(), AliFMDEnergyFitter::RingHistos::FitHist(), IsSortable(), and Trending2ELoss().

Int_t AliFMDCorrELossFit::ELossFit::Compare ( const TObject o) const

Compare to another ELossFit object.

  • +1, if this quality is better (larger) than other objects quality
  • -1, if this quality is worse (smaller) than other objects quality
  • +1, if this \(|\chi^2/\nu-1|\) is smaller than the same for other
  • -1, if this \(|\chi^2/\nu-1|\) is larger than the same for other
  • 0 otherwise
Parameters
oOther object to compare to
Returns
See above

Definition at line 379 of file AliFMDCorrELossFit.cxx.

Referenced by IsSortable().

void AliFMDCorrELossFit::ELossFit::Draw ( Option_t option = "comp")

Draw this fit

Parameters
optionOptions
  • COMP Draw components too

Definition at line 489 of file AliFMDCorrELossFit.cxx.

Referenced by Browse(), AliFMDCorrELossFit::IsFolder(), and IsSortable().

Double_t AliFMDCorrELossFit::ELossFit::Evaluate ( Double_t  x,
UShort_t  maxN = 999 
) const

Evaluate

\[ f_N(x;\Delta,\xi,\sigma') = \sum_{i=1}^{n} a_i f(x;\Delta_i,\xi_i,\sigma_i') \]

(see AliForwardUtil::NLandauGaus) for the maximum \( N \) that fulfills the requirements

Parameters
xWhere to evaluate
maxN\( \max{N}\)
Returns
\( f_N(x;\Delta,\xi,\sigma')\)

Definition at line 301 of file AliFMDCorrELossFit.cxx.

Referenced by AliFMDEnergyFitter::RingHistos::CalculateResiduals(), and GetBin().

Double_t AliFMDCorrELossFit::ELossFit::EvaluateWeighted ( Double_t  x,
UShort_t  maxN = 9999 
) const

Evaluate

\[ f_W(x;\Delta,\xi,\sigma') = \frac{\sum_{i=1}^{n} i a_i f_i(x;\Delta,\xi,\sigma')}{ f_N(x;\Delta,\xi,\sigma')} = \frac{\sum_{i=1}^{n} i a_i f(x;\Delta_i,\xi_i,\sigma_i')}{ \sum_{i=1}^{n} a_i f(x;\Delta_i,\xi_i,\sigma_i')} \]

where \( n\) fulfills the requirements (see FindMaxWeight).

If the denominator is zero, then 1 is returned.

See also AliForwardUtil::ILandauGaus and AliForwardUtil::NLandauGaus for more information on the evaluated functions.

Parameters
xWhere to evaluate
maxN\( \max{N}\)
Returns
\( f_W(x;\Delta,\xi,\sigma')\).

Definition at line 327 of file AliFMDCorrELossFit.cxx.

Referenced by GetBin(), and AliFMDDensityCalculator::NParticles().

Int_t AliFMDCorrELossFit::ELossFit::FindMaxWeight ( Double_t  maxRelError = 2*fgMaxRelError,
Double_t  leastWeight = fgLeastWeight,
UShort_t  maxN = 999 
) const

Find the maximum weight to use. The maximum weight is the largest i for which

  • \( i \leq \max{N}\)
  • \( a_i > \min{a}\)
  • \( \delta a_i/a_i > \delta_{max}\)
Parameters
maxRelError\( \min{a}\)
leastWeight\( \delta_{max}\)
maxN\( \max{N}\)
Returns
The largest index \( i\) for which the above conditions hold. Will never return less than 1.

Definition at line 263 of file AliFMDCorrELossFit.cxx.

Referenced by CalculateQuality(), Draw(), AliFMDDensityCalculator::FindMaxWeight(), GetBin(), GetF1(), Print(), and AliFMDCorrELossFit::UpdateStackHist().

Double_t AliFMDCorrELossFit::ELossFit::FindProbabilityCut ( Double_t  low) const

Find the x value that corresponds to a (normalized) probability of low or less. That is, we can use this to say: "Give me the x value under which it is unlikely that a particle gave a signal".

Parameters
lowThreshold (between 0 and 1)
Returns
Cut value, or 1000 in case of problems

Definition at line 677 of file AliFMDCorrELossFit.cxx.

Referenced by GetBin(), and AliFMDCorrELossFit::GetProbabilityCut().

Double_t AliFMDCorrELossFit::ELossFit::GetA ( UShort_t  i) const
inline
Parameters
iWhich weight to get
Returns
Weights

Definition at line 879 of file AliFMDCorrELossFit.h.

Referenced by AliFMDEnergyFitter::RingHistos::FitSlices(), and GetAs().

Double_t* AliFMDCorrELossFit::ELossFit::GetAs ( ) const
inline
Returns
Weights

Definition at line 195 of file AliFMDCorrELossFit.h.

Double_t AliFMDCorrELossFit::ELossFit::GetAvgXiSigmaCut ( Double_t  f) const

Get average Xi and sigma width cut, like \( \Delta - f\left(\frac{\xi/\delta^2_{\xi}+\sigma/\delta^2_{\sigma}}{1/\delta^2_{\xi}+1/\delta^2_{\sigma}})\)

  • that is, the average of \(\xi\) and \(\sigma\) weighted by the uncertainties.
Parameters
fscalar

Definition at line 668 of file AliFMDCorrELossFit.cxx.

Referenced by AliFMDCorrELossFit::GetAvgXiSigmaCut(), GetBin(), and AliFMDCorrELossFit::GetLowCut().

UShort_t AliFMDCorrELossFit::ELossFit::GetBin ( ) const
inline
Returns
Eta bin

Definition at line 247 of file AliFMDCorrELossFit.h.

Referenced by CorrDrawer::DrawELossFits().

Double_t AliFMDCorrELossFit::ELossFit::GetC ( ) const
inline
Double_t AliFMDCorrELossFit::ELossFit::GetChi2 ( ) const
inline
Returns
Chi square from fit

Definition at line 171 of file AliFMDCorrELossFit.h.

Referenced by CorrDrawer::DrawELossFits(), and AliFMDEnergyFitter::RingHistos::FitSlices().

Double_t AliFMDCorrELossFit::ELossFit::GetDelta ( ) const
inline
Returns
Most probable value

Definition at line 179 of file AliFMDCorrELossFit.h.

Referenced by AliFMDEnergyFitter::RingHistos::FitSlices().

UShort_t AliFMDCorrELossFit::ELossFit::GetDet ( ) const
inline
Returns
Detector

Definition at line 239 of file AliFMDCorrELossFit.h.

Double_t AliFMDCorrELossFit::ELossFit::GetEA ( UShort_t  i) const
inline
Parameters
iWhich weight to get
Returns
Error on weights

Definition at line 888 of file AliFMDCorrELossFit.h.

Referenced by AliFMDEnergyFitter::RingHistos::FitSlices(), and GetEAs().

Double_t* AliFMDCorrELossFit::ELossFit::GetEAs ( ) const
inline
Returns
Error on weights

Definition at line 225 of file AliFMDCorrELossFit.h.

Double_t AliFMDCorrELossFit::ELossFit::GetEC ( ) const
inline
Returns
Error on C

Definition at line 205 of file AliFMDCorrELossFit.h.

Referenced by AliFMDEnergyFitter::RingHistos::FitSlices().

Double_t AliFMDCorrELossFit::ELossFit::GetEDelta ( ) const
inline
Returns
Error on Delta

Definition at line 209 of file AliFMDCorrELossFit.h.

Referenced by AliFMDEnergyFitter::RingHistos::FitSlices().

Double_t AliFMDCorrELossFit::ELossFit::GetESigma ( ) const
inline
Returns
Error on sigma

Definition at line 217 of file AliFMDCorrELossFit.h.

Referenced by AliFMDEnergyFitter::RingHistos::FitSlices().

Double_t AliFMDCorrELossFit::ELossFit::GetESigmaN ( ) const
inline
Returns
Error on sigma (noise)

Definition at line 221 of file AliFMDCorrELossFit.h.

Referenced by AliFMDEnergyFitter::RingHistos::FitSlices().

Double_t AliFMDCorrELossFit::ELossFit::GetEXi ( ) const
inline
Returns
Error on Xi

Definition at line 213 of file AliFMDCorrELossFit.h.

Referenced by AliFMDEnergyFitter::RingHistos::FitSlices().

TF1 * AliFMDCorrELossFit::ELossFit::GetF1 ( Int_t  i = 0,
Double_t  max = 20 
) const

Get a function that expresses this fit.

\[ f_N(x;\Delta,\xi,\sigma') = \sum_{i=1}^{n} a_i f(x;\Delta_i,\xi_i,\sigma_i') \]

(see AliForwardUtil::NLandauGaus) or, if i is 1 or larger

\[ f_i(x;\Delta,\xi,\sigma') = a_i f(x;\Delta_i,\xi_i,\sigma_i') \]

(see AliForwardUtil::ILandauGaus).

Parameters
iComponent to get. If i is 0 or less, then the full function is returned, otherwise the specified component (if valid).
maxUpper bound on function
Returns
Pointer to newly allocated function. The caller owns this object, and must clean it up.

Definition at line 439 of file AliFMDCorrELossFit.cxx.

Referenced by FindProbabilityCut(), and GetBin().

Double_t AliFMDCorrELossFit::ELossFit::GetMpvCut ( Double_t  f) const

Get MPV fraction cut, like \( f \Delta\)

Parameters
fFraction

Definition at line 649 of file AliFMDCorrELossFit.cxx.

Referenced by GetBin(), AliFMDCorrELossFit::GetLowCut(), and AliFMDCorrELossFit::GetMpvCut().

Int_t AliFMDCorrELossFit::ELossFit::GetN ( ) const
inline
Returns
Number of peaks fitted

Definition at line 163 of file AliFMDCorrELossFit.h.

Referenced by AliFMDEnergyFitter::RingHistos::CalculateResiduals(), and AliFMDEnergyFitter::RingHistos::FitSlices().

const Char_t * AliFMDCorrELossFit::ELossFit::GetName ( ) const

Get the name of this object

Returns

Definition at line 460 of file AliFMDCorrELossFit.cxx.

Referenced by Draw(), FindProbabilityCut(), IsSortable(), and Print().

UShort_t AliFMDCorrELossFit::ELossFit::GetNu ( ) const
inline
Returns
Number degrees of freedom

Definition at line 167 of file AliFMDCorrELossFit.h.

Referenced by CorrDrawer::DrawELossFits(), and AliFMDEnergyFitter::RingHistos::FitSlices().

Int_t AliFMDCorrELossFit::ELossFit::GetQuality ( ) const
inline
Returns
Assigned quality

Definition at line 235 of file AliFMDCorrELossFit.h.

Referenced by CorrDrawer::DrawELossFits(), AliFMDCorrELossFit::IsGood(), and Trending2ELoss().

Char_t AliFMDCorrELossFit::ELossFit::GetRing ( ) const
inline
Returns
Ring

Definition at line 243 of file AliFMDCorrELossFit.h.

Double_t AliFMDCorrELossFit::ELossFit::GetSigma ( ) const
inline
Returns
Sigma on folded gaussian

Definition at line 187 of file AliFMDCorrELossFit.h.

Referenced by AliFMDEnergyFitter::RingHistos::FitSlices().

Double_t AliFMDCorrELossFit::ELossFit::GetSigmaN ( ) const
inline
Returns
Sigma of detector noise

Definition at line 191 of file AliFMDCorrELossFit.h.

Referenced by AliFMDEnergyFitter::RingHistos::FitSlices().

Double_t AliFMDCorrELossFit::ELossFit::GetXi ( ) const
inline
Returns
Width parameter of Landau

Definition at line 183 of file AliFMDCorrELossFit.h.

Referenced by AliFMDEnergyFitter::RingHistos::FitSlices().

Double_t AliFMDCorrELossFit::ELossFit::GetXiCut ( Double_t  f) const

Get Xi width cut, like \( \Delta - f\xi\)

Parameters
fscalar

Definition at line 655 of file AliFMDCorrELossFit.cxx.

Referenced by GetBin(), AliFMDCorrELossFit::GetLowCut(), and AliFMDCorrELossFit::GetXiCut().

Double_t AliFMDCorrELossFit::ELossFit::GetXiSigmaCut ( Double_t  f) const

Get Xi and sigma width cut, like \( \Delta - f(\xi+\sigma)\)

Parameters
fscalar

Definition at line 661 of file AliFMDCorrELossFit.cxx.

Referenced by GetBin(), AliFMDCorrELossFit::GetLowCut(), and AliFMDCorrELossFit::GetXiSigmaCut().

Bool_t AliFMDCorrELossFit::ELossFit::IsSortable ( ) const
inline

Declare this object as sortable

Returns
Always true

Definition at line 387 of file AliFMDCorrELossFit.h.

AliFMDCorrELossFit::ELossFit & AliFMDCorrELossFit::ELossFit::operator= ( const ELossFit o)

Assignment operator

Parameters
oObject to assign from
Returns
Reference to this object

Definition at line 207 of file AliFMDCorrELossFit.cxx.

Referenced by IsSortable().

void AliFMDCorrELossFit::ELossFit::Print ( Option_t option) const

name Auxiliary member functions Information to standard output

Parameters
optionNot used

Definition at line 409 of file AliFMDCorrELossFit.cxx.

Referenced by AliFMDEnergyFitter::RingHistos::FindBestFit(), AliFMDEnergyFitter::RingHistos::FindBestFits(), AliFMDCorrELossFit::IsFolder(), IsSortable(), AliFMDCorrELossFit::Print(), and MakeELossFit::Run().

Member Data Documentation

Double_t AliFMDCorrELossFit::ELossFit::fC
Double_t AliFMDCorrELossFit::ELossFit::fEC
Double_t AliFMDCorrELossFit::ELossFit::fESigmaN
Double_t AliFMDCorrELossFit::ELossFit::fgLeastWeight = 1e-7
static
Double_t AliFMDCorrELossFit::ELossFit::fgMaxChi2nu = 20
static

Definition at line 95 of file AliFMDCorrELossFit.h.

Referenced by AliFMDCorrELossFit::CacheBins().

Double_t AliFMDCorrELossFit::ELossFit::fgMaxRelError = .25
static

Cached maximum weight.

Definition at line 93 of file AliFMDCorrELossFit.h.

Referenced by AliFMDCorrELossFit::CacheBins(), and AliFMDDensityCalculator::FindMaxWeight().

UShort_t AliFMDCorrELossFit::ELossFit::fMaxWeight
mutable

Definition at line 91 of file AliFMDCorrELossFit.h.

Referenced by FindMaxWeight(), and operator=().


The documentation for this struct was generated from the following files: