![]() |
AliPhysics
80ccde44 (80ccde44)
|
#include <AliPoissonCalculator.h>
Protected Member Functions | |
Int_t | CheckLumping (char which, Int_t nBins, Int_t lumping) const |
void | CleanUp () |
Double_t | CalculateMean (Double_t empty, Double_t total) const |
Double_t | CalculateCorrection (Double_t empty, Double_t total) const |
Protected Attributes | |
UShort_t | fXLumping |
UShort_t | fYLumping |
TH2D * | fTotal |
TH2D * | fEmpty |
TH2D * | fBasic |
TH2D * | fEmptyVsTotal |
TH1D * | fMean |
TH1D * | fOcc |
TH2D * | fCorr |
A class to calculate the multiplicity in \((\eta,\varphi)\) bins using Poisson statistics.
The input is assumed to be binned in \((\eta,\varphi)\) as described by the 2D histogram passwd to the Reset member function.
The data is grouped in to regions as defined by the parameters fXLumping and fYLumping. The total number of cells and number of empty cells is then calculate in each region. The mean multiplicity over the region is then determined as
\[ \langle m\rangle = -\log\left(\frac{e}{t}\right) \]
where \( e\) is the number of empty cells and \(t\) is the total number of cells in the region. A correction for counting statistics, is then applied
\begin{eqnarray*} c &=& \frac{1}{1 - \exp{-\langle m\rangle}}\\ &=& \frac{1}{1 - \frac{e}{t}} \end{eqnarray*}
and the final number in each cell is then \(h_i c \langle m\rangle\) where \(h_i\) is the number of hits in the cell \(i\)
Definition at line 36 of file AliPoissonCalculator.h.
AliPoissonCalculator::AliPoissonCalculator | ( | ) |
Constructor
Definition at line 54 of file AliPoissonCalculator.cxx.
AliPoissonCalculator::AliPoissonCalculator | ( | const char * | ) |
Constructor
Definition at line 72 of file AliPoissonCalculator.cxx.
AliPoissonCalculator::AliPoissonCalculator | ( | const AliPoissonCalculator & | o | ) |
Copy constructor
o | Object to copy from |
Definition at line 89 of file AliPoissonCalculator.cxx.
|
virtual |
Destructor
Definition at line 106 of file AliPoissonCalculator.cxx.
void AliPoissonCalculator::Browse | ( | TBrowser * | b | ) |
Browse this object
b | Object to browse |
Definition at line 451 of file AliPoissonCalculator.cxx.
|
protected |
The mean \(\lambda\) calculated above is not the full story. In addition it needs to be corrected using the expression
\[ \frac{1}{1-e^{\lambda}} = \frac{1}{1-\frac{N_{empty}}{N_{total}}} \]
Note the boundary conditions
empty | Number of empty bins |
total | Total number of bins |
Definition at line 335 of file AliPoissonCalculator.cxx.
Referenced by FillDiagnostics(), and Result().
Calculate the mean
This is based on the fact that for a Poisson
\[ P(n;\lambda) = \frac{-\lambda^n e^{-\lambda}}{n!} \]
we have the probability for 0 observation
\[ P(0;\lambda) = e^{-\lambda} = \frac{N_{empty}}{N_{total}} \]
and so we get that the mean is the defined region is
\[ \lambda = -\log\left(\frac{N_{empty}}{N_{total}}\right) \]
Note the boundary conditions
empty | Number of empty bins |
total | Total number of bins |
Definition at line 327 of file AliPoissonCalculator.cxx.
Referenced by FillDiagnostics(), and Result().
check that the lumping parameter makes sense
which | Which axis |
nBins | Number of bins |
lumping | Lumping |
Definition at line 247 of file AliPoissonCalculator.cxx.
Referenced by Reset().
|
protected |
Clean up allocated space
Definition at line 113 of file AliPoissonCalculator.cxx.
Referenced by operator=(), and SetLumping().
Initialize this object.
Also book the cache histograms
xaxis | The X-axis |
yaxis | The Y-axis |
Definition at line 154 of file AliPoissonCalculator.cxx.
Fill in an observation
strip | X axis bin number |
sec | Y axis bin number |
hit | True if hit |
weight | Weight if this |
Definition at line 309 of file AliPoissonCalculator.cxx.
Referenced by AliFMDDensityCalculator::Calculate(), and TestPoisson().
void AliPoissonCalculator::FillDiagnostics | ( | ) |
After calculating the results, fill the diagnostics histograms
Definition at line 414 of file AliPoissonCalculator.cxx.
Referenced by AliFMDDensityCalculator::Calculate().
|
inline |
Get the correction histogram
Definition at line 182 of file AliPoissonCalculator.h.
Referenced by TestPoisson().
|
inline |
Get the empty versus total histogram
Definition at line 164 of file AliPoissonCalculator.h.
|
inline |
Get the histogram of the means
Definition at line 170 of file AliPoissonCalculator.h.
Referenced by TestPoisson().
|
inline |
Get the occupancy histogram
Definition at line 176 of file AliPoissonCalculator.h.
Referenced by TestPoisson().
Get the X bin in the reduced historgam
ix | X bin in full histogram |
Definition at line 344 of file AliPoissonCalculator.cxx.
Referenced by Result().
Get the X bin in the reduced historgam
x | X value |
Definition at line 352 of file AliPoissonCalculator.cxx.
Get the Y bin in the reduced historgam
iy | Y bin in full histogram |
Definition at line 359 of file AliPoissonCalculator.cxx.
Referenced by Result().
Get the Y bin in the reduced historgam
y | Y value |
Definition at line 367 of file AliPoissonCalculator.cxx.
Intialize this object
xLumping | If larger than 0, set the eta lumping to this |
yLumping | If larger than 0, set the phi lumping to this |
Definition at line 139 of file AliPoissonCalculator.cxx.
Referenced by AliPoissonCalculator(), operator=(), SetLumping(), and TestPoisson().
|
inline |
Definition at line 145 of file AliPoissonCalculator.h.
void AliPoissonCalculator::MakeOutput | ( | ) |
Make output stuff for the passed list
Definition at line 182 of file AliPoissonCalculator.cxx.
AliPoissonCalculator & AliPoissonCalculator::operator= | ( | const AliPoissonCalculator & | o | ) |
Assignment operator
o | Object to assign from |
Definition at line 125 of file AliPoissonCalculator.cxx.
void AliPoissonCalculator::Output | ( | TList * | d | ) |
Output stuff to the passed list
d | List to add output histograms to |
Definition at line 223 of file AliPoissonCalculator.cxx.
void AliPoissonCalculator::Print | ( | const Option_t * | option = "" | ) | const |
Print information
option | Not used |
Definition at line 432 of file AliPoissonCalculator.cxx.
void AliPoissonCalculator::Reset | ( | const TH2D * | base | ) |
Reset the cache histogram
base | Base histogram |
Definition at line 261 of file AliPoissonCalculator.cxx.
Referenced by AliPoissonCalculator(), AliFMDDensityCalculator::Calculate(), Define(), operator=(), and TestPoisson().
Calculate result and store in output
correct | Whether to apply correction or not |
Definition at line 377 of file AliPoissonCalculator.cxx.
Referenced by AliFMDDensityCalculator::Calculate(), and TestPoisson().
Set the number of eta bins to group into a region
nx | Number of \(\eta\) bins per region |
ny | Number of \(\phi\) bins per region |
Definition at line 235 of file AliPoissonCalculator.cxx.
Referenced by AliFMDDensityCalculator::CreateOutputObjects(), SetXLumping(), and SetYLumping().
|
inline |
Set the number of X bins to group into a region
nx | Number of eta bins per region |
Definition at line 79 of file AliPoissonCalculator.h.
|
inline |
Set the number of Y bins to group into a region
ny | Number of eta bins per region |
Definition at line 85 of file AliPoissonCalculator.h.
|
protected |
Definition at line 282 of file AliPoissonCalculator.h.
Referenced by AliPoissonCalculator(), Browse(), CleanUp(), Define(), Fill(), GetReducedXBin(), GetReducedYBin(), operator=(), Reset(), and Result().
|
protected |
Definition at line 286 of file AliPoissonCalculator.h.
Referenced by Browse(), CleanUp(), FillDiagnostics(), GetCorrection(), MakeOutput(), and Output().
|
protected |
Definition at line 281 of file AliPoissonCalculator.h.
Referenced by Browse(), CleanUp(), Fill(), FillDiagnostics(), GetReducedXBin(), GetReducedYBin(), Reset(), and Result().
|
protected |
Definition at line 283 of file AliPoissonCalculator.h.
Referenced by Browse(), CleanUp(), FillDiagnostics(), GetEmptyVsTotal(), Init(), MakeOutput(), Output(), and SetLumping().
|
protected |
Definition at line 284 of file AliPoissonCalculator.h.
Referenced by Browse(), CleanUp(), FillDiagnostics(), GetMean(), MakeOutput(), and Output().
|
protected |
Definition at line 285 of file AliPoissonCalculator.h.
Referenced by Browse(), CleanUp(), FillDiagnostics(), GetOccupancy(), MakeOutput(), and Output().
|
protected |
Definition at line 280 of file AliPoissonCalculator.h.
Referenced by Browse(), CleanUp(), Fill(), FillDiagnostics(), Reset(), Result(), and SetLumping().
|
protected |
Definition at line 278 of file AliPoissonCalculator.h.
Referenced by Init(), MakeOutput(), operator=(), Print(), Reset(), and SetLumping().
|
protected |
Definition at line 279 of file AliPoissonCalculator.h.
Referenced by Init(), MakeOutput(), operator=(), Print(), Reset(), SetLumping(), SetXLumping(), and SetYLumping().