#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>
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)
{
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)
{
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 )
{
#ifndef ALIHBTFUNCTION_H
#define ALIHBTFUNCTION_H
-//____________________
+
+/* Id: $ */
+
///////////////////////////////////////////////////////
// //
// AliHBTFunction //
AliHBTFunction(const char* name,const char* title);
virtual ~AliHBTFunction();
+ AliHBTFunction(const AliHBTFunction & source) {
+ // Copy constructor needed by the coding conventions byt not used
+ Fatal("AliHBTFunction(const AliHBTFunction & source)",
+ "not implemented");
+ }
+
+ AliHBTFunction & operator= (const AliHBTFunction & source) {
+ // Assignment needed by the coding conventions byt not used
+ Fatal("Assignment operator","not implemented");
+ return * this;
+ }
+
virtual TH1* GetNumerator() const = 0;
virtual TH1* GetDenominator() const = 0;
virtual TH1* GetResult() = 0;
virtual void BuildHistos() = 0;//builds default histograms
AliHBTPairCut* fPairCut; //pair cut
- public:
ClassDef(AliHBTFunction,2)
};
/******************************************************************/
virtual void Init() = 0;
virtual void Write() = 0;
- protected:
- public:
ClassDef(AliHBTOnePairFctn,2)
};
/******************************************************************/
virtual void Init() = 0;
virtual void Write() = 0;
- protected:
- public:
ClassDef(AliHBTTwoPairFctn,2)
};
class AliHBTFunction1D: public AliHBTFunction
{
- private:
- //this must be declared before constructors because they are used as a default arguments
- static const Int_t fgkDefaultNBins;//default number of Bins in histograms
- static const Float_t fgkDefaultMin;//Default min value of histograms
- static const Float_t fgkDefaultMax;//Default max value of histograms
- static const UInt_t fgkDefaultNBinsToScale;//Default number of bins used for scaling to tale
-
public:
AliHBTFunction1D();//default conmstructor
AliHBTFunction1D(Int_t nbins, Float_t maxXval, Float_t minXval);
AliHBTFunction1D(const Char_t *name, const Char_t *title);
AliHBTFunction1D(const Char_t *name, const Char_t *title,
Int_t nbins, Float_t maxXval, Float_t minXval);
+ AliHBTFunction1D(const AliHBTFunction1D & source) {
+ // Copy constructor needed by the coding conventions byt not used
+ Fatal("AliHBTFunction1D(const AliHBTFunction1D & source)",
+ "not implemented");
+ }
+ AliHBTFunction1D & operator= (const AliHBTFunction1D & source) {
+ // Assignment needed by the coding conventions byt not used
+ Fatal("Assignment operator","not implemented");
+ return * this;
+ }
+
virtual ~AliHBTFunction1D();
TH1* GetNumerator() const {return fNumerator;}//returns numerator histogram
void SetNumberOfBinsToScale(Int_t n = fgkDefaultNBinsToScale){fNBinsToScale = n;}
protected:
- //retruns velue to be histogrammed
+ //returns value to be histogrammed
virtual void BuildHistos(Int_t nbins, Float_t max, Float_t min);
virtual void BuildHistos();
Double_t Scale(TH1D* num,TH1D* den);
- TH1D* fNumerator;
- TH1D* fDenominator;
- UInt_t fNBinsToScale;
+ TH1D* fNumerator; // Numerator histogram
+ TH1D* fDenominator; // Denumerator histogram
+ UInt_t fNBinsToScale; // Number of bins to scale
+
+ private:
+ //this must be declared before constructors because they are used as a default arguments
+ static const Int_t fgkDefaultNBins;//default number of Bins in histograms
+ static const Float_t fgkDefaultMin;//Default min value of histograms
+ static const Float_t fgkDefaultMax;//Default max value of histograms
+ static const UInt_t fgkDefaultNBinsToScale;//Default number of bins used for scaling to tale
- public:
ClassDef(AliHBTFunction1D,2)
};
class AliHBTFunction2D: public AliHBTFunction
{
- private:
- //this must be declared before constructors because they are used as a default arguments
- static const Int_t fgkDefaultNBinsX;//default number of Bins in X axis in histograms
- static const Float_t fgkDefaultMinX;//Default min value of X axis in histograms
- static const Float_t fgkDefaultMaxX;//Default max value of X axis inhistograms
- static const Int_t fgkDefaultNBinsY;//default number of Bins in histograms
- static const Float_t fgkDefaultMinY;//Default min value of histograms
- static const Float_t fgkDefaultMaxY;//Default max value of histograms
-
- static const UInt_t fgkDefaultNBinsToScaleX;//Default number of X bins used for scaling to tale
- static const UInt_t fgkDefaultNBinsToScaleY;//Default number of bins used for scaling to tale
-
public:
AliHBTFunction2D();
Int_t nXbins, Double_t maxXval, Double_t minXval,
Int_t nYbins, Double_t maxYval, Double_t minYval);
+ AliHBTFunction2D(const AliHBTFunction2D & source) {
+ // Copy constructor needed by the coding conventions byt not used
+ Fatal("AliHBTFunction2D(const AliHBTFunction2D & source)",
+ "not implemented");
+ }
+
+ AliHBTFunction2D & operator= (const AliHBTFunction2D & source) {
+ // Assignment needed by the coding conventions byt not used
+ Fatal("Assignment operator","not implemented");
+ return * this;
+ }
+
virtual ~AliHBTFunction2D();
TH1* GetNumerator() const {return fNumerator;}
Int_t nybins, Float_t ymax, Float_t ymin);
virtual void BuildHistos();
- TH2D* fNumerator;
- TH2D* fDenominator;
+ TH2D* fNumerator; // Numerator histogram
+ TH2D* fDenominator; // Denominator histogram
//definition of area used for scaling -> Scale is calculated this
//way that after division tale is on 1
UInt_t fNBinsToScaleX;//number of bins on X axis
UInt_t fNBinsToScaleY;//number of bins on Y axis
- public:
+ private:
+ //this must be declared before constructors because they are used as a default arguments
+ static const Int_t fgkDefaultNBinsX;//default number of Bins in X axis in histograms
+ static const Float_t fgkDefaultMinX;//Default min value of X axis in histograms
+ static const Float_t fgkDefaultMaxX;//Default max value of X axis inhistograms
+ static const Int_t fgkDefaultNBinsY;//default number of Bins in histograms
+ static const Float_t fgkDefaultMinY;//Default min value of histograms
+ static const Float_t fgkDefaultMaxY;//Default max value of histograms
+
+ static const UInt_t fgkDefaultNBinsToScaleX;//Default number of X bins used for scaling to tale
+ static const UInt_t fgkDefaultNBinsToScaleY;//Default number of bins used for scaling to tale
+
ClassDef(AliHBTFunction2D,2)
};
/******************************************************************/
class AliHBTFunction3D: public AliHBTFunction
{
- private:
- //this must be declared before constructors because they are used as a default arguments
- static const Int_t fgkDefaultNBinsX;//default number of Bins in X axis in histograms
- static const Float_t fgkDefaultMinX;//Default min value of X axis in histograms
- static const Float_t fgkDefaultMaxX;//Default max value of X axis inhistograms
- static const Int_t fgkDefaultNBinsY;//default number of Bins in Y axis in histograms
- static const Float_t fgkDefaultMinY;//Default min value of Y axis in histograms
- static const Float_t fgkDefaultMaxY;//Default max value of Y axis inhistograms
- static const Int_t fgkDefaultNBinsZ;//default number of Bins in Z axis in histograms
- static const Float_t fgkDefaultMinZ;//Default min value of Z axis in histograms
- static const Float_t fgkDefaultMaxZ;//Default max value of Z axis inhistograms
-
- static const UInt_t fgkDefaultNBinsToScaleX;//Default number of X bins used for scaling to tale
- static const UInt_t fgkDefaultNBinsToScaleY;//Default number of Y bins used for scaling to tale
- static const UInt_t fgkDefaultNBinsToScaleZ;//Default number of Z bins used for scaling to tale
-
public:
AliHBTFunction3D();
Int_t nXbins, Double_t maxXval, Double_t minXval,
Int_t nYbins, Double_t maxYval, Double_t minYval,
Int_t nZbins, Double_t maxZval, Double_t minZval);
-
+
+ AliHBTFunction3D(const AliHBTFunction3D & source) {
+ // Copy constructor needed by the coding conventions byt not used
+ Fatal("AliHBTFunction3D(const AliHBTFunction3D & source)",
+ "not implemented");
+ }
+
+ AliHBTFunction3D & operator= (const AliHBTFunction3D & source) {
+ // Assignment needed by the coding conventions byt not used
+ Fatal("Assignment operator","not implemented");
+ return * this;
+ }
+
virtual ~AliHBTFunction3D();//destructor
TH1* GetNumerator() const {return fNumerator;}
Int_t nzbins, Float_t zmax, Float_t zmin);
virtual void BuildHistos();
- TH3D* fNumerator;
- TH3D* fDenominator;
+ TH3D* fNumerator; // Numerator histogram
+ TH3D* fDenominator; // Denominator histogram
//definition of area used for scaling -> Scale is calculated this
//way that after division tale is on 1
UInt_t fNBinsToScaleY;//number of bins on Y axis
UInt_t fNBinsToScaleZ;//number of bins on Z axis
- public:
+ private:
+ //this must be declared before constructors because they are used as a default arguments
+ static const Int_t fgkDefaultNBinsX;//default number of Bins in X axis in histograms
+ static const Float_t fgkDefaultMinX;//Default min value of X axis in histograms
+ static const Float_t fgkDefaultMaxX;//Default max value of X axis inhistograms
+ static const Int_t fgkDefaultNBinsY;//default number of Bins in Y axis in histograms
+ static const Float_t fgkDefaultMinY;//Default min value of Y axis in histograms
+ static const Float_t fgkDefaultMaxY;//Default max value of Y axis inhistograms
+ static const Int_t fgkDefaultNBinsZ;//default number of Bins in Z axis in histograms
+ static const Float_t fgkDefaultMinZ;//Default min value of Z axis in histograms
+ static const Float_t fgkDefaultMaxZ;//Default max value of Z axis inhistograms
+
+ static const UInt_t fgkDefaultNBinsToScaleX;//Default number of X bins used for scaling to tale
+ static const UInt_t fgkDefaultNBinsToScaleY;//Default number of Y bins used for scaling to tale
+ static const UInt_t fgkDefaultNBinsToScaleZ;//Default number of Z bins used for scaling to tale
+
ClassDef(AliHBTFunction3D,2)
};
/******************************************************************/
void Init(){AliHBTFunction::Init();}
protected:
virtual Double_t GetValue(AliHBTPair* trackpair, AliHBTPair* partpair) = 0;
- public:
+
ClassDef(AliHBTTwoPairFctn1D,2)
};
/******************************************************************/
protected:
virtual void GetValues(AliHBTPair* trackpair, AliHBTPair* partpair, Double_t& x, Double_t& y) = 0;
- public:
ClassDef(AliHBTTwoPairFctn2D,2)
};
/******************************************************************/
protected:
virtual void GetValues(AliHBTPair* trackpair, AliHBTPair* partpair, Double_t& x, Double_t& y, Double_t& z) = 0;
- public:
ClassDef(AliHBTTwoPairFctn3D,2)
};