AliPhysics  db95e02 (db95e02)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliFMDEnergyFitter Class Reference

#include <AliFMDEnergyFitter.h>

Inheritance diagram for AliFMDEnergyFitter:

Classes

struct  RingHistos
 

Public Types

enum  {
  kC = AliLandauGaus::kC, kDelta = AliLandauGaus::kDelta, kXi = AliLandauGaus::kXi, kSigma = AliLandauGaus::kSigma,
  kSigmaN = AliLandauGaus::kSigmaN, kN = AliLandauGaus::kN, kA = AliLandauGaus::kA
}
 
enum  EResidualMethod { kNoResiduals = 0, kResidualDifference, kResidualScaledDifference, kResidualSquareDifference }
 
enum  FMDRingBits {
  kFMD1I =0x01, kFMD1 =kFMD1I, kFMD2I =0x02, kFMD2O =0x04,
  kFMD2 =kFMD2I|kFMD2O, kFMD3I =0x08, kFMD3O =0x10, kFMD3 =kFMD3I|kFMD3O
}
 

Public Member Functions

virtual ~AliFMDEnergyFitter ()
 
 AliFMDEnergyFitter ()
 
 AliFMDEnergyFitter (const char *title)
 
void Print (Option_t *option="") const
 
Bool_t ReadParameters (const TCollection *list)
 
Setters of options and parameters
void SetEtaAxis (Int_t nBins, Double_t etaMin, Double_t etaMax)
 
void SetEtaAxis (const TAxis &etaAxis)
 
void SetCentralityAxis (UShort_t nBins, Double_t *bins)
 
void SetLowCut (Double_t lowCut=0.3)
 
Double_t GetLowCut () const
 
void SetFitRangeBinWidth (UShort_t n=4)
 
void SetDoFits (Bool_t doFit=kTRUE)
 
void SetDoMakeObject (Bool_t doMake=kTRUE)
 
void SetNParticles (UShort_t n)
 
void SetMinEntries (UShort_t n)
 
void SetMaxE (Double_t x)
 
void SetNEbins (Int_t x)
 
void SetMaxRelativeParameterError (Double_t e=0.2)
 
void SetMaxChi2PerNDF (Double_t c=10)
 
void SetMinWeight (Double_t c=1e-7)
 
void SetUseIncreasingBins (Bool_t x)
 
void SetStoreResiduals (EResidualMethod x=kResidualDifference)
 
void SetRegularizationCut (Double_t cut=3e6)
 
void SetSkips (UShort_t skip)
 
void SetDebug (Int_t dbg=1)
 
void SetEnableDeltaShift (Bool_t use=true)
 
Processing
void Init ()
 
virtual void CreateOutputObjects (TList *dir)
 
virtual void SetupForData (const TAxis &etaAxis, UShort_t sys=0)
 
virtual Bool_t Accumulate (const AliESDFMD &input, Double_t cent, Bool_t empty)
 
virtual void Fit (const TList *dir)
 
void MakeCorrectionsObject (TList *dir)
 

Protected Member Functions

 AliFMDEnergyFitter (const AliFMDEnergyFitter &o)
 
AliFMDEnergyFitteroperator= (const AliFMDEnergyFitter &o)
 
virtual RingHistosCreateRingHistos (UShort_t d, Char_t r) const
 
RingHistosGetRingHistos (UShort_t d, Char_t r) const
 
 ClassDef (AliFMDEnergyFitter, 8)
 

Static Protected Member Functions

static Bool_t CheckSkip (UShort_t d, Char_t r, UShort_t skips)
 

Protected Attributes

TList fRingHistos
 
Double_t fLowCut
 
UShort_t fNParticles
 
UShort_t fMinEntries
 
UShort_t fFitRangeBinWidth
 
Bool_t fDoFits
 
Bool_t fDoMakeObject
 
TAxis fEtaAxis
 
TAxis fCentralityAxis
 
Double_t fMaxE
 
Int_t fNEbins
 
Bool_t fUseIncreasingBins
 
Double_t fMaxRelParError
 
Double_t fMaxChi2PerNDF
 
Double_t fMinWeight
 
Int_t fDebug
 
EResidualMethod fResidualMethod
 
UShort_t fSkips
 
Double_t fRegularizationCut
 

Detailed Description

Class to fit the energy distribution.

Input:
Output:
  • Lists of histogram - one per ring. Each list has a number of histograms corresponding to the number of eta bins defined.
Corrections used:
  • None
alice-int-2012-040-eloss_fits.png
Summary of fits

Definition at line 49 of file AliFMDEnergyFitter.h.

Member Enumeration Documentation

anonymous enum

Enumeration of parameters

Enumerator
kC 

Index of pre-constant \( C\)

kDelta 

Index of most probable value \( \Delta_p\)

kXi 

Index of Landau width \( \xi\)

kSigma 

Index of Gaussian width \( \sigma\)

kSigmaN 

Index of Gaussian additional width \( \sigma_n\)

kN 

Index of Number of particles \( N\)

kA 

Base index of particle strengths \( a_i\) for \(i=2,\ldots,N\)

Definition at line 55 of file AliFMDEnergyFitter.h.

Enumeration of residual methods

Enumerator
kNoResiduals 

Do not calculate residuals

kResidualDifference 

The residuals stored are the difference, and the errors are stored in the error bars of the histogram.

kResidualScaledDifference 

The residuals stored are the differences scaled to the error on the data

kResidualSquareDifference 

The residuals stored are the square difference scale to the square error on the data.

Definition at line 75 of file AliFMDEnergyFitter.h.

FMD ring bits for skipping

Enumerator
kFMD1I 

FMD1i

kFMD1 

All of FMD1

kFMD2I 

FMD2i

kFMD2O 

FMD2o

kFMD2 

All of FMD2

kFMD3I 

FMD3i

kFMD3O 

FMD3o

kFMD3 

All of FMD3

Definition at line 92 of file AliFMDEnergyFitter.h.

Constructor & Destructor Documentation

AliFMDEnergyFitter::~AliFMDEnergyFitter ( )
virtual

Destructor

Definition at line 98 of file AliFMDEnergyFitter.cxx.

AliFMDEnergyFitter::AliFMDEnergyFitter ( )

Default Constructor - do not use

Definition at line 32 of file AliFMDEnergyFitter.cxx.

AliFMDEnergyFitter::AliFMDEnergyFitter ( const char *  title)

Constructor

Parameters
titleTitle of object - not significant

Definition at line 62 of file AliFMDEnergyFitter.cxx.

AliFMDEnergyFitter::AliFMDEnergyFitter ( const AliFMDEnergyFitter o)
protected

Copy constructor

Parameters
oObject to copy from

Member Function Documentation

Bool_t AliFMDEnergyFitter::Accumulate ( const AliESDFMD input,
Double_t  cent,
Bool_t  empty 
)
virtual

Fitter the input AliESDFMD object

Parameters
inputInput
centEvent centrality (or < 0 if not valid)
emptyWhether the event is 'empty'
Returns
True on success, false otherwise

Definition at line 303 of file AliFMDEnergyFitter.cxx.

Referenced by AliFMDEnergyFitterTask::Event(), and AliForwardQATask::Event().

Bool_t AliFMDEnergyFitter::CheckSkip ( UShort_t  d,
Char_t  r,
UShort_t  skips 
)
staticprotected

Check if the detector d, ring r is listed in the skips bit mask. If the detector/ring is in the mask, return true.

That is, use case is

for (UShort_t d=1. d<=3, d++) {
UShort_t nr = (d == 1 ? 1 : 2);
for (UShort_t q = 0; q < nr; q++) {
Char_t r = (q == 0 ? 'I' : 'O');
if (CheckSkips(d, r, skips)) continue;
// Process detector/ring
}
}
Parameters
dDetector
rRing
skipsMask of detector/rings to skip
Returns
True if detector d, ring r is in the mask skips

Definition at line 538 of file AliFMDEnergyFitter.cxx.

Referenced by Fit(), and MakeCorrectionsObject().

AliFMDEnergyFitter::ClassDef ( AliFMDEnergyFitter  ,
 
)
protected
void AliFMDEnergyFitter::CreateOutputObjects ( TList dir)
virtual

Define the output histograms. These are put in a sub list of the passed list. The histograms are merged before the parent task calls AliAnalysisTaskSE::Terminate

Parameters
dirDirectory to add to

Reimplemented in AliFMDMCHitEnergyFitter, and AliFMDMCTrackInspector.

Definition at line 161 of file AliFMDEnergyFitter.cxx.

Referenced by AliForwardQATask::Book(), AliFMDEnergyFitterTask::Book(), AliFMDMCTrackInspector::CreateOutputObjects(), and AliFMDMCHitEnergyFitter::CreateOutputObjects().

AliFMDEnergyFitter::RingHistos * AliFMDEnergyFitter::CreateRingHistos ( UShort_t  d,
Char_t  r 
) const
protectedvirtual

Reimplemented in AliFMDMCTrackInspector, and AliFMDMCHitEnergyFitter.

Definition at line 109 of file AliFMDEnergyFitter.cxx.

Referenced by Init().

void AliFMDEnergyFitter::Fit ( const TList dir)
virtual

Scale the histograms to the total number of events

Parameters
dirWhere the histograms are

Definition at line 367 of file AliFMDEnergyFitter.cxx.

Referenced by AliFMDEnergyFitterTask::Finalize(), AliForwardQATask::Finalize(), AliFMDMCTrackInspectorTask::Finalize(), AliFMDMCHitEnergyFitterTask::Finalize(), and RerunTrackELoss().

Double_t AliFMDEnergyFitter::GetLowCut ( ) const
inline

Definition at line 171 of file AliFMDEnergyFitter.h.

AliFMDEnergyFitter::RingHistos * AliFMDEnergyFitter::GetRingHistos ( UShort_t  d,
Char_t  r 
) const
protected

Get the ring histogram container

Parameters
dDetector
rRing
Returns
Ring histogram container

Definition at line 116 of file AliFMDEnergyFitter.cxx.

Referenced by Accumulate(), AliFMDMCHitEnergyFitter::AccumulateHits(), AliFMDMCTrackInspector::PostEvent(), and AliFMDMCHitEnergyFitter::PostEvent().

void AliFMDEnergyFitter::MakeCorrectionsObject ( TList dir)

Generate the corrections object

Parameters
dirList to analyse

Definition at line 436 of file AliFMDEnergyFitter.cxx.

Referenced by Fit().

AliFMDEnergyFitter& AliFMDEnergyFitter::operator= ( const AliFMDEnergyFitter o)
protected

Assignment operator

Parameters
oObject to assign from
Returns
Reference to this
void AliFMDEnergyFitter::Print ( Option_t option = "") const
Bool_t AliFMDEnergyFitter::ReadParameters ( const TCollection list)

Read the parameters from a list - used when re-running the code

Parameters
listInput list
Returns
true if the parameter where read

Definition at line 497 of file AliFMDEnergyFitter.cxx.

Referenced by RerunTrackELoss().

void AliFMDEnergyFitter::SetCentralityAxis ( UShort_t  nBins,
Double_t bins 
)

Set the centrality bins. E.g.,

UShort_t n = 12;
Double_t bins[] = { 0., 5., 10., 15., 20., 30.,
40., 50., 60., 70., 80., 100. };
task->GetFitter().SetCentralityBins(n, bins);
Parameters
nBinsSize of bins
binsBin limits.

Definition at line 290 of file AliFMDEnergyFitter.cxx.

Referenced by SetupForData().

void AliFMDEnergyFitter::SetDebug ( Int_t  dbg = 1)

Set the debug level. The higher the value the more output

Parameters
dbgDebug level

Definition at line 468 of file AliFMDEnergyFitter.cxx.

Referenced by RerunTrackELoss(), AliFMDMCTrackInspectorTask::SetDebug(), AliFMDMCHitEnergyFitterTask::SetDebug(), AliFMDEnergyFitterTask::SetDebug(), and AliForwardQATask::SetDebug().

void AliFMDEnergyFitter::SetDoFits ( Bool_t  doFit = kTRUE)
inline

Whether or not to enable fitting of the final merged result. Note, fitting takes quite a while and one should be careful not to do this needlessly

Parameters
doFitWhether to do the fits or not

Definition at line 185 of file AliFMDEnergyFitter.h.

Referenced by AddTaskFMDMCHit(), AddTaskFMDMCTracks(), AddTaskForwardQA(), AliForwardQATask::AliForwardQATask(), elossFitConfig(), and RerunTrackELoss().

void AliFMDEnergyFitter::SetDoMakeObject ( Bool_t  doMake = kTRUE)
inline

Set whether to make the corrections object on the output. Note, fits should be enable for this to have any effect.

Parameters
doMakeIf true (false is default), do make the corrections object.

Definition at line 192 of file AliFMDEnergyFitter.h.

Referenced by AddTaskForwardQA(), AliForwardQATask::AliForwardQATask(), elossFitConfig(), and RerunTrackELoss().

void AliFMDEnergyFitter::SetEnableDeltaShift ( Bool_t  use = true)

Whether to enable the extra shift in the MPV from \( \sigma/\xi\)

Parameters
useIf true, enable extra shift \(\delta\Delta_p(\sigma/\xi)\)

Definition at line 296 of file AliFMDEnergyFitter.cxx.

Referenced by RerunTrackELoss().

void AliFMDEnergyFitter::SetEtaAxis ( Int_t  nBins,
Double_t  etaMin,
Double_t  etaMax 
)

Set the eta axis to use. This will force the code to use this eta axis definition - irrespective of whatever axis is passed to the Init member function. Therefore, this member function can be used to force another eta axis than one found in the correction objects.

Parameters
nBinsNumber of bins
etaMinMinimum of the eta axis
etaMaxMaximum of the eta axis

Definition at line 272 of file AliFMDEnergyFitter.cxx.

Referenced by AddTaskFMDMCHit(), AddTaskFMDMCTracks(), AddTaskForwardQA(), elossFitConfig(), RerunTrackELoss(), SetEtaAxis(), and SetupForData().

void AliFMDEnergyFitter::SetEtaAxis ( const TAxis etaAxis)

Set the eta axis to use. This will force the code to use this eta axis definition - irrespective of whatever axis is passed to the Init member function. Therefore, this member function can be used to force another eta axis than one found in the correction objects.

Parameters
etaAxisEta axis to use

Definition at line 256 of file AliFMDEnergyFitter.cxx.

void AliFMDEnergyFitter::SetFitRangeBinWidth ( UShort_t  n = 4)
inline

Set the number of bins to subtract

Parameters
n

Definition at line 177 of file AliFMDEnergyFitter.h.

Referenced by AddTaskFMDMCHit(), AddTaskFMDMCTracks(), AddTaskForwardQA(), AliForwardQATask::AliForwardQATask(), elossFitConfig(), and RerunTrackELoss().

void AliFMDEnergyFitter::SetLowCut ( Double_t  lowCut = 0.3)
inline

Set the low cut used for energy

Parameters
lowCutLow cut

Definition at line 170 of file AliFMDEnergyFitter.h.

Referenced by AddTaskFMDELoss(), AddTaskFMDMCHit(), AddTaskFMDMCTracks(), AddTaskForwardQA(), AliForwardQATask::AliForwardQATask(), elossFitConfig(), and RerunTrackELoss().

void AliFMDEnergyFitter::SetMaxChi2PerNDF ( Double_t  c = 10)
inline

Set the maximum \( \chi^2/\nu\)

Parameters
cMaximum \( \chi^2/\nu\)

Definition at line 229 of file AliFMDEnergyFitter.h.

void AliFMDEnergyFitter::SetMaxE ( Double_t  x)
inline

Set maximum energy loss to consider

Parameters
xMaximum energy loss to consider

Definition at line 211 of file AliFMDEnergyFitter.h.

Referenced by AddTaskFMDMCHit(), AddTaskFMDMCTracks(), AddTaskForwardQA(), elossFitConfig(), and RerunTrackELoss().

void AliFMDEnergyFitter::SetMaxRelativeParameterError ( Double_t  e = 0.2)
inline

Set the maximum relative error

Parameters
eMaximum relative error

Definition at line 223 of file AliFMDEnergyFitter.h.

void AliFMDEnergyFitter::SetMinEntries ( UShort_t  n)
inline

Set the minimum number of entries each histogram must have before we try to fit our response function to it

Parameters
nMinimum number of entries

Definition at line 205 of file AliFMDEnergyFitter.h.

Referenced by AddTaskFMDMCHit(), AddTaskFMDMCTracks(), AddTaskForwardQA(), AliForwardQATask::AliForwardQATask(), elossFitConfig(), and RerunTrackELoss().

void AliFMDEnergyFitter::SetMinWeight ( Double_t  c = 1e-7)
inline

Set the least weight

Parameters
cLeast weight

Definition at line 235 of file AliFMDEnergyFitter.h.

void AliFMDEnergyFitter::SetNEbins ( Int_t  x)
inline

Set number of energy loss bins

Parameters
xNumber of energy loss bins

Definition at line 217 of file AliFMDEnergyFitter.h.

Referenced by AddTaskFMDMCHit(), AddTaskFMDMCTracks(), AddTaskForwardQA(), elossFitConfig(), and RerunTrackELoss().

void AliFMDEnergyFitter::SetNParticles ( UShort_t  n)
inline

Set how many particles we will try to fit at most to the data

Parameters
nMax number of particle to try to fit

Definition at line 198 of file AliFMDEnergyFitter.h.

Referenced by AddTaskFMDMCHit(), AddTaskFMDMCTracks(), AddTaskForwardQA(), AliForwardQATask::AliForwardQATask(), elossFitConfig(), and RerunTrackELoss().

void AliFMDEnergyFitter::SetRegularizationCut ( Double_t  cut = 3e6)
inline

Set the regularization cut \(c_{R}\). If a \(\Delta\) distribution has more entries \( N_{dist}\) than \(c_{R}\), then we modify the errors of the the distribution with the factor

\[ \sqrt{N_{dist}/c_{R}} \]

to keep the \(\chi^2/\nu\) within resonable limits.

The large residuals \(chi_i^2=(h_i - f(x_i))^2/\delta_i^2\) (see also SetStoreResiduals) comes about on the boundary between the \(N\) and \(N+1\) particle contributions, and seems to fall off for larger \(N\). This may indicate that there's a component in the distributions that the function

\[ f(\Delta;\Delta_p,\xi,\sigma,\mathbf{a}) = \sum_i=1^{n} a_i\int d\Delta' L(\Delta;\Delta',\xi) G(\Delta';\Delta_p,\sigma) \]

does not capture.

Parameters
cut

Definition at line 285 of file AliFMDEnergyFitter.h.

Referenced by AddTaskForwardQA(), elossFitConfig(), and RerunTrackELoss().

void AliFMDEnergyFitter::SetSkips ( UShort_t  skip)
inline

Definition at line 289 of file AliFMDEnergyFitter.h.

void AliFMDEnergyFitter::SetStoreResiduals ( EResidualMethod  x = kResidualDifference)
inline

Set whether to make residuals, and in that case how.

  • Square difference: \(chi_i^2=(h_i - f(x_i))^2/\delta_i^2\)
  • Scaled difference: \((h_i - f(x_i))/\delta_i\)
  • Difference: \((h_i - f(x_i)) \pm\delta_i\)

where \(h_i, x_i, \delta_i\) is the bin content, bin center, and bin error for bin \(i\) respectively, and \( f\) is the fitted function.

Parameters
xResidual method

Definition at line 255 of file AliFMDEnergyFitter.h.

Referenced by elossFitConfig(), and RerunTrackELoss().

void AliFMDEnergyFitter::SetupForData ( const TAxis etaAxis,
UShort_t  sys = 0 
)
virtual

Initialise the task

Parameters
etaAxisThe eta axis to use. Note, that if the eta axis has already been set (using SetEtaAxis), then this parameter will be ignored
sysCollision system identifier. If set, then it will define how many MIP peaks we will fit. For pp we do 3, for pA, Ap, and AA we do 5.

Definition at line 220 of file AliFMDEnergyFitter.cxx.

Referenced by AliForwardQATask::PreData(), AliFMDEnergyFitterTask::PreData(), AliFMDMCTrackInspectorTask::PreData(), and AliFMDMCHitEnergyFitterTask::PreData().

void AliFMDEnergyFitter::SetUseIncreasingBins ( Bool_t  x)
inline

Set wheter to use increasing bin sizes

Parameters
xWheter to use increasing bin sizes

Definition at line 241 of file AliFMDEnergyFitter.h.

Referenced by AddTaskFMDMCHit(), AddTaskFMDMCTracks(), AddTaskForwardQA(), AliForwardQATask::AliForwardQATask(), and elossFitConfig().

Member Data Documentation

TAxis AliFMDEnergyFitter::fCentralityAxis
protected
TAxis AliFMDEnergyFitter::fEtaAxis
protected
UShort_t AliFMDEnergyFitter::fFitRangeBinWidth
protected
Double_t AliFMDEnergyFitter::fLowCut
protected
Double_t AliFMDEnergyFitter::fMaxChi2PerNDF
protected
Double_t AliFMDEnergyFitter::fMaxE
protected
Double_t AliFMDEnergyFitter::fMaxRelParError
protected
UShort_t AliFMDEnergyFitter::fMinEntries
protected

Definition at line 737 of file AliFMDEnergyFitter.h.

Referenced by CreateOutputObjects(), Fit(), Print(), ReadParameters(), and SetMinEntries().

Double_t AliFMDEnergyFitter::fMinWeight
protected

Definition at line 748 of file AliFMDEnergyFitter.h.

Referenced by CreateOutputObjects(), Fit(), Print(), ReadParameters(), and SetMinWeight().

Int_t AliFMDEnergyFitter::fNEbins
protected
UShort_t AliFMDEnergyFitter::fNParticles
protected
Double_t AliFMDEnergyFitter::fRegularizationCut
protected
UShort_t AliFMDEnergyFitter::fSkips
protected

Definition at line 751 of file AliFMDEnergyFitter.h.

Referenced by Fit(), MakeCorrectionsObject(), and SetSkips().


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