#include "AliHBTFunction.h"
-//____________________
-//////////////////////////////////////////////////////////////////////
-//
+
+/* $Id: */
+
+//--------------------------------------------------------------------
//AliHBTFunction
//Author: Piotr Krzysztof Skowronski
//Piotr.Skowronski@cern.ch
-/*Base classes for HBT functions
-
+//Base classes for HBT functions
+/*
OnePairFctn Function TwoPairFctn
| \ \ / | \ /|\
| \ \ / | \ / | \
| / \ \| | \ / \ | \ \
| / \ /\ | \ / \ | \ |
| / \ / \ | \ / \ | \ |
- | / \ / \ | \ / \ | \ |
+ | / \ / \ | \ / \ | \ |
| / \/ \ | \/ \ | \ |
OnePair1D OnePair2D OnePair3D TwoPair1D TwoPair2D TwoPair3D
-
four particle functions are intendent to be resolution functions:
it is mecessary to have simulated particle pair corresponding to given
recontructed track pair in order to calculate function simualted value
and recontructed value, to be further histogrammed
-
*/
-///////////////////////////////////////////////////////////////////////
+//---------------------------------------------------------------------
+
+#include <TH2.h>
+#include <TH3.h>
/******************************************************************/
/******************************************************************/
Double_t ratio;
Double_t sum = 0;
- Int_t N = 0;
+ Int_t n = 0;
Int_t offset = nbins - fNBinsToScale - 1;
{
ratio = den->GetBinContent(i)/num->GetBinContent(i);
sum += ratio;
- N++;
+ n++;
}
}
- if(gDebug > 0) Info("Scale","sum=%f fNBinsToScale=%d N=%d",sum,fNBinsToScale,N);
+ if(gDebug > 0) Info("Scale","sum=%f fNBinsToScale=%d n=%d",sum,fNBinsToScale,n);
- if (N == 0) return 0.0;
- Double_t ret = sum/((Double_t)N);
+ if (n == 0) return 0.0;
+ Double_t ret = sum/((Double_t)n);
if(gDebug > 0) Info("Scale","returning %f",ret);
return ret;
// //
///////////////////////////////////////////////////////
-ClassImp( AliHBTFunction1D )
+ClassImp( AliHBTFunction2D )
const Int_t AliHBTFunction2D::fgkDefaultNBinsX = 200;//default number of Bins in X axis in histograms
const Float_t AliHBTFunction2D::fgkDefaultMinX = 0.0;//Default min value of X axis in histograms
void AliHBTFunction2D::BuildHistos(Int_t nxbins, Float_t xmax, Float_t xmin,
Int_t nybins, Float_t ymax, Float_t ymin)
{
+ //Builds numerator and denominator histograms (2d-case)
TString numstr = fName + " Numerator"; //title and name of the
//numerator histogram
TString denstr = fName + " Denominator";//title and name of the
Double_t AliHBTFunction2D::Scale()
{
+ // Calculates the factor that should be used to scale
+ // quatience of fNumerator and fDenominator to 1 at
+ // given region
if (gDebug>0) Info("Scale","Enetered Scale()");
if(!fNumerator)
{
Double_t ratio;
Double_t sum = 0;
- Int_t N = 0;
+ Int_t n = 0;
for (UInt_t j = offsetY; j< nbinsY; j++)
for (UInt_t i = offsetX; i< nbinsX; i++)
{
ratio = fDenominator->GetBinContent(i,j)/fNumerator->GetBinContent(i,j);
sum += ratio;
- N++;
+ n++;
}
}
- if(gDebug > 0) Info("Scale","sum=%f fNBinsToScaleX=%d fNBinsToScaleY=%d N=%d",sum,fNBinsToScaleX,fNBinsToScaleY,N);
+ if(gDebug > 0) Info("Scale","sum=%f fNBinsToScaleX=%d fNBinsToScaleY=%d n=%d",sum,fNBinsToScaleX,fNBinsToScaleY,n);
- if (N == 0) return 0.0;
- Double_t ret = sum/((Double_t)N);
+ if (n == 0) return 0.0;
+ Double_t ret = sum/((Double_t)n);
if(gDebug > 0) Info("Scale","returning %f",ret);
return ret;
Int_t nybins, Float_t ymax, Float_t ymin,
Int_t nzbins, Float_t zmax, Float_t zmin)
{
+ //Builds numerator and denominator histograms (3d-case)
TString numstr = fName + " Numerator"; //title and name of the
//numerator histogram
TString denstr = fName + " Denominator";//title and name of the
Double_t AliHBTFunction3D::Scale()
{
+ // Calculates the factor that should be used to scale
+ // quatience of fNumerator and fDenominator to 1 at
+ // given volume
if (gDebug>0) Info("Scale","Enetered Scale()");
if(!fNumerator)
{
Double_t ratio;
Double_t sum = 0;
- Int_t N = 0;
+ Int_t n = 0;
for (UInt_t k = offsetZ; k<nbinsZ; k++)
for (UInt_t j = offsetY; j<nbinsY; j++)
{
ratio = fDenominator->GetBinContent(i,j,k)/fNumerator->GetBinContent(i,j,k);
sum += ratio;
- N++;
+ n++;
}
}
if(gDebug > 0)
- Info("Scale","sum=%f fNBinsToScaleX=%d fNBinsToScaleY=%d fNBinsToScaleZ=%d N=%d",
- sum,fNBinsToScaleX,fNBinsToScaleY,fNBinsToScaleZ,N);
+ Info("Scale","sum=%f fNBinsToScaleX=%d fNBinsToScaleY=%d fNBinsToScaleZ=%d n=%d",
+ sum,fNBinsToScaleX,fNBinsToScaleY,fNBinsToScaleZ,n);
- if (N == 0) return 0.0;
- Double_t ret = sum/((Double_t)N);
+ if (n == 0) return 0.0;
+ Double_t ret = sum/((Double_t)n);
if(gDebug > 0) Info("Scale","returning %f",ret);
return ret;
void AliHBTOnePairFctn1D::ProcessSameEventParticles(AliHBTPair* pair)
{
- //Fills the numerator
+ //Fills the numerator using pair from the same event
pair = CheckPair(pair);
if(pair) fNumerator->Fill(GetValue(pair));
}
/******************************************************************/
void AliHBTOnePairFctn1D::ProcessDiffEventParticles(AliHBTPair* pair)
{
- //fills denumerator
+ //Fills the denumerator using mixed pairs
pair = CheckPair(pair);
if(pair) fDenominator->Fill(GetValue(pair));
}
void AliHBTOnePairFctn2D::ProcessSameEventParticles(AliHBTPair* pair)
{
+ // Fills the numerator using pairs from the same event
pair = CheckPair(pair);
if(pair)
{
void AliHBTOnePairFctn2D::ProcessDiffEventParticles(AliHBTPair* pair)
{
+ // Fills the denumerator using mixed pairs
pair = CheckPair(pair);
if(pair)
{
void AliHBTTwoPairFctn1D::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
{
+ // Fills the numerator using pairs from the same event
partpair = CheckPair(partpair);
if( partpair )
{
void AliHBTTwoPairFctn1D::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
{
+ // Fills the denumerator usin mixed pairs
partpair = CheckPair(partpair);
if( partpair )
{
void AliHBTTwoPairFctn3D::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
{
+ // Fills th numerator using pairs from the same event
partpair = CheckPair(partpair);
if( partpair )
{
void AliHBTTwoPairFctn3D::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
{
+ // Fills the denumerator using mixed pairs
partpair = CheckPair(partpair);
if( partpair )
{