#ifndef ALIHBTFUNCTION_H
#define ALIHBTFUNCTION_H
-
+
/* Id: $ */
///////////////////////////////////////////////////////
// Abstract Base Calss for all the function classes //
// //
// Piotr.Skowronski@cern.ch //
-// http://alisoft.cern.ch/people/skowron/analyzer //
+// http://aliweb.cern.ch/people/skowron/analyzer //
// //
///////////////////////////////////////////////////////
#include <TH2D.h>
#include <TH3D.h>
-#include "AliHBTPairCut.h"
+#include "AliAODPairCut.h"
#include "AliHBTPair.h"
class AliHBTAnalysis;
-class AliHBTParticleCut;
+class AliVAODParticleCut;
class AliHBTFunction: public TNamed
{
virtual TH1* GetDenominator() const = 0;
virtual TH1* GetResult() = 0;
- virtual void WriteFunction();
+ virtual Int_t WriteFunction();
virtual void InitFunction();
TH1* GetRatio(Double_t normfactor = 1.0);
void Rename(const Char_t * name); //renames the function and histograms ==title is the same that name
void Rename(const Char_t * name, const Char_t * title); //renames and retitle the function and histograms
- void SetPairCut(AliHBTPairCut* cut);
+ void SetPairCut(AliAODPairCut* cut);
+ void UseAbsoluteValues(Bool_t flag){fAbs = flag;}
virtual AliHBTPair* CheckPair(AliHBTPair* pair);
-
+ void SetWriteNumAndDen(Bool_t flag = kFALSE){fWriteNumAndDen = flag;}
protected:
virtual void BuildHistos() = 0;//builds default histograms
- AliHBTPairCut* fPairCut; //pair cut
+ AliAODPairCut* fPairCut; //pair cut
+ Bool_t fWriteNumAndDen; //flag indicating whether numerator and denominator should be writted together with a result
+ Bool_t fAbs;//flag indicating if absolute values of qout, qside and qlong should be histogrammed
- ClassDef(AliHBTFunction,2)
+ ClassDef(AliHBTFunction,3)
};
/******************************************************************/
inline AliHBTPair* AliHBTFunction::CheckPair(AliHBTPair* pair)
{
//check if pair and both particles meets the cut criteria
- if(fPairCut->Pass(pair)) //if the pair is BAD
- {//it is BAD
- pair = pair->GetSwapedPair();
- if(pair)
- if(fPairCut->Pass(pair)) //so try reverse combination
- {
- return 0x0;//it is BAD as well - so return
- }
- }
+ if(fPairCut->Rejected(pair)) return 0x0; //if the pair is BAD
+
+// It is not allowed to change the order here beacause analysis enforce the order
+
+// {//it is BAD
+// pair = pair->GetSwappedPair();
+// if(pair)
+// if(fPairCut->Rejected(pair)) //so try reverse combination
+// {
+// return 0x0;//it is BAD as well - so return
+// }
+// }
+
return pair;
}
+/******************************************************************/
+/******************************************************************/
+/******************************************************************/
+class AliHBTCorrelFunction
+{
+ public:
+ AliHBTCorrelFunction():fRatio(0x0){}
+ AliHBTCorrelFunction(const AliHBTCorrelFunction& in):fRatio((in.fRatio)?(TH1*)in.fRatio->Clone():0x0){}
+ virtual ~AliHBTCorrelFunction(){delete fRatio;}
+
+ AliHBTCorrelFunction& operator=(const AliHBTCorrelFunction& in);
+
+ protected:
+ TH1* fRatio;//!pointer to the ratio(result)
+
+ ClassDef(AliHBTCorrelFunction,1)
+};
+
/******************************************************************/
/******************************************************************/
/******************************************************************/
// one pair to fill function //
// //
// Piotr.Skowronski@cern.ch //
-// http://alisoft.cern.ch/people/skowron/analyzer //
+// http://aliweb.cern.ch/people/skowron/analyzer //
// //
///////////////////////////////////////////////////////
virtual void ProcessDiffEventParticles(AliHBTPair* pair) = 0;
virtual void Init() = 0;
- virtual void Write() = 0;
+ virtual Int_t Write(const char* /*x1*/ = 0,Int_t /*x2*/ = 0, Int_t /*x3*/ = 0) = 0;
+ virtual const char* Name() = 0;
ClassDef(AliHBTOnePairFctn,2)
};
// Lednicky's algorithm uses that as well //
// //
// Piotr.Skowronski@cern.ch //
-// http://alisoft.cern.ch/people/skowron/analyzer //
+// http://aliweb.cern.ch/people/skowron/analyzer //
// //
///////////////////////////////////////////////////////
ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair) = 0;
virtual void Init() = 0;
- virtual void Write() = 0;
+ virtual Int_t Write(const char* /*x1*/ = 0,Int_t /*x2*/ = 0, Int_t /*x3*/ = 0) = 0;
+ virtual const char* Name() = 0;
ClassDef(AliHBTTwoPairFctn,2)
// Base Calss for 1-dimensinal Functions //
// //
// Piotr.Skowronski@cern.ch //
-// http://alisoft.cern.ch/people/skowron/analyzer //
+// http://aliweb.cern.ch/people/skowron/analyzer //
// //
///////////////////////////////////////////////////////
// Base Calss for 2-dimensinal Functions //
// //
// Piotr.Skowronski@cern.ch //
-// http://alisoft.cern.ch/people/skowron/analyzer //
+// http://aliweb.cern.ch/people/skowron/analyzer //
// //
///////////////////////////////////////////////////////
// one pair to fill function //
// //
// Piotr.Skowronski@cern.ch //
-// http://alisoft.cern.ch/people/skowron/analyzer //
+// http://aliweb.cern.ch/people/skowron/analyzer //
// //
///////////////////////////////////////////////////////
Int_t nzbins, Float_t zmax, Float_t zmin);
virtual void BuildHistos();
- TH3D* fNumerator; // Numerator histogram
- TH3D* fDenominator; // Denominator histogram
+ TH3F* fNumerator; // Numerator histogram
+ TH3F* fDenominator; // Denominator histogram
//definition of area used for scaling -> Scale is calculated this
//way that after division tale is on 1
// one pair to fill function //
// //
// Piotr.Skowronski@cern.ch //
-// http://alisoft.cern.ch/people/skowron/analyzer //
+// http://aliweb.cern.ch/people/skowron/analyzer //
// //
///////////////////////////////////////////////////////
void ProcessSameEventParticles(AliHBTPair* pair);
void ProcessDiffEventParticles(AliHBTPair* pair);
- void Write(){WriteFunction();}
+ Int_t Write(const char* /*x1*/ = 0,Int_t /*x2*/ = 0, Int_t /*x3*/ = 0){return WriteFunction();}
+ Int_t Write(const char* x1 = "",Int_t x2 = 0, Int_t x3 = 0) const {return TObject::Write(x1,x2,x3);}
void Init(){InitFunction();}
+ const char* Name(){return GetName();}
+
protected:
//retruns velue to be histogrammed
- virtual Double_t GetValue(AliHBTPair* pair) = 0;
+ virtual Double_t GetValue(AliHBTPair* pair) const = 0;
ClassDef(AliHBTOnePairFctn1D,2)
};
/******************************************************************/
// one pair to fill function //
// //
// Piotr.Skowronski@cern.ch //
-// http://alisoft.cern.ch/people/skowron/analyzer //
+// http://aliweb.cern.ch/people/skowron/analyzer //
// //
///////////////////////////////////////////////////////
void ProcessSameEventParticles(AliHBTPair* pair);
void ProcessDiffEventParticles(AliHBTPair* pair);
- void Write(){WriteFunction();}
+ Int_t Write(const char* /*x1*/ = 0,Int_t /*x2*/ = 0, Int_t /*x3*/ = 0){return WriteFunction();}
+ Int_t Write(const char* x1 = "",Int_t x2 = 0, Int_t x3 = 0) const {return TObject::Write(x1,x2,x3);}
void Init(){InitFunction();}
+ const char* Name(){return GetName();}
protected:
- virtual void GetValues(AliHBTPair* pair, Double_t& x, Double_t& y) = 0;
+ virtual void GetValues(AliHBTPair* pair, Double_t& x, Double_t& y) const = 0;
ClassDef(AliHBTOnePairFctn2D,2)
};
/******************************************************************/
// one pair to fill function //
// //
// Piotr.Skowronski@cern.ch //
-// http://alisoft.cern.ch/people/skowron/analyzer //
+// http://aliweb.cern.ch/people/skowron/analyzer //
// //
///////////////////////////////////////////////////////
void ProcessSameEventParticles(AliHBTPair* pair);
void ProcessDiffEventParticles(AliHBTPair* pair);
- void Write(){WriteFunction();}
+ Int_t Write(const char* /*x1*/ = 0,Int_t /*x2*/ = 0, Int_t /*x3*/ = 0){return WriteFunction();}
+ Int_t Write(const char* x1 = "",Int_t x2 = 0, Int_t x3 = 0) const {return TObject::Write(x1,x2,x3);}
void Init(){InitFunction();}
+ const char* Name(){return GetName();}
protected:
- virtual void GetValues(AliHBTPair* pair, Double_t& x, Double_t& y, Double_t& z) = 0;
+ virtual void GetValues(AliHBTPair* pair, Double_t& x, Double_t& y, Double_t& z) const = 0;
ClassDef(AliHBTOnePairFctn3D,2)
};
/******************************************************************/
// to fill function //
// //
// Piotr.Skowronski@cern.ch //
-// http://alisoft.cern.ch/people/skowron/analyzer //
+// http://aliweb.cern.ch/people/skowron/analyzer //
// //
///////////////////////////////////////////////////////
void ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair);
void ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair);
- void Write(){WriteFunction();}
+ Int_t Write(const char* /*x1*/ = 0,Int_t /*x2*/ = 0, Int_t /*x3*/ = 0){return WriteFunction();}
+ Int_t Write(const char* x1 = "",Int_t x2 = 0, Int_t x3 = 0) const {return TObject::Write(x1,x2,x3);}
void Init(){InitFunction();}
+ const char* Name(){return GetName();}
protected:
- virtual Double_t GetValue(AliHBTPair* trackpair, AliHBTPair* partpair) = 0;
+ virtual Double_t GetValue(AliHBTPair* trackpair, AliHBTPair* partpair) const = 0;
ClassDef(AliHBTTwoPairFctn1D,2)
};
// to fill function //
// //
// Piotr.Skowronski@cern.ch //
-// http://alisoft.cern.ch/people/skowron/analyzer //
+// http://aliweb.cern.ch/people/skowron/analyzer //
// //
///////////////////////////////////////////////////////
void ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair);
void ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair);
- void Write(){WriteFunction();}
+ Int_t Write(const char* /*x1*/ = 0,Int_t /*x2*/ = 0, Int_t /*x3*/ = 0){return WriteFunction();}
+ Int_t Write(const char* x1 = "",Int_t x2 = 0, Int_t x3 = 0) const {return TObject::Write(x1,x2,x3);}
void Init(){InitFunction();}
+ const char* Name(){return GetName();}
protected:
- virtual void GetValues(AliHBTPair* trackpair, AliHBTPair* partpair, Double_t& x, Double_t& y) = 0;
+ virtual void GetValues(AliHBTPair* trackpair, AliHBTPair* partpair, Double_t& x, Double_t& y) const = 0;
ClassDef(AliHBTTwoPairFctn2D,2)
};
// to fill function //
// //
// Piotr.Skowronski@cern.ch //
-// http://alisoft.cern.ch/people/skowron/analyzer //
+// http://aliweb.cern.ch/people/skowron/analyzer //
// //
///////////////////////////////////////////////////////
void ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair);
void ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair);
- void Write(){WriteFunction();}
+ Int_t Write(const char* /*x1*/ = 0,Int_t /*x2*/ = 0, Int_t /*x3*/ = 0){return WriteFunction();}
+ Int_t Write(const char* x1 = "",Int_t x2 = 0, Int_t x3 = 0) const {return TObject::Write(x1,x2,x3);}
void Init(){InitFunction();}
+ const char* Name(){return GetName();}
protected:
- virtual void GetValues(AliHBTPair* trackpair, AliHBTPair* partpair, Double_t& x, Double_t& y, Double_t& z) = 0;
+ virtual void GetValues(AliHBTPair* trackpair, AliHBTPair* partpair, Double_t& x, Double_t& y, Double_t& z) const = 0;
ClassDef(AliHBTTwoPairFctn3D,2)
};