]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGCF/EBYE/BalanceFunctions/AliBalancePsi.h
add possibility to do acceptance correction with 2p efficiency obtained from HIJING
[u/mrichter/AliRoot.git] / PWGCF / EBYE / BalanceFunctions / AliBalancePsi.h
1 #ifndef ALIBALANCEPSI_H
2 #define ALIBALANCEPSI_H
3 /*  See cxx source for full Copyright notice */
4
5
6 /* $Id: AliBalancePsi.h 54125 2012-01-24 21:07:41Z miweber $ */
7
8 //-------------------------------------------------------------------------
9 //                          Class AliBalancePsi
10 //   This is the class for the Balance Function writ Psi analysis
11 //
12 //    Origin: Panos Christakoglou, Nikhef, Panos.Christakoglou@cern.ch
13 //-------------------------------------------------------------------------
14
15 #include <vector>
16 #include <TObject.h>
17 #include "TString.h"
18
19 #include "AliTHn.h"
20
21 using std::vector;
22
23 #define ANALYSIS_TYPES  7
24 #define MAXIMUM_NUMBER_OF_STEPS 1024
25 #define MAXIMUM_STEPS_IN_PSI 360
26
27 class TH1D;
28 class TH2D;
29 class TH3D;
30
31 const Int_t kTrackVariablesSingle = 2;       // track variables in histogram (centrality, phi-Psi2, eta, phi, pTtrig)
32 const Int_t kTrackVariablesPair   = 5;       // track variables in histogram (centrality, phi-Psi2, dEta, dPhi, pTtrig, ptAssociated)
33 const TString gBFPsiAnalysisType[ANALYSIS_TYPES] = {"y","eta","qlong","qout","qside","qinv","phi"};
34
35 class AliBalancePsi : public TObject {
36  public:
37   enum EAnalysisType {
38     kRapidity = 0, 
39     kEta      = 1, 
40     kQlong    = 2, 
41     kQout     = 3, 
42     kQside    = 4, 
43     kQinv     = 5, 
44     kPhi      = 6 
45   };
46
47   AliBalancePsi();
48   AliBalancePsi(const AliBalancePsi& balance);
49   ~AliBalancePsi();
50
51   void SetCentralityIdentifier(const char* centralityId) {
52     fCentralityId = centralityId;}
53   
54   void SetAnalysisLevel(const char* analysisLevel) {
55     fAnalysisLevel = analysisLevel;}
56   void SetShuffle(Bool_t shuffle) {fShuffle = shuffle;}
57   void SetCentralityInterval(Double_t cStart, Double_t cStop)  { fCentStart = cStart; fCentStop = cStop;};
58
59   void InitHistograms(void);
60
61   const char* GetAnalysisLevel() {return fAnalysisLevel.Data();}
62   Int_t GetNumberOfAnalyzedEvent() {return fAnalyzedEvents;}
63
64   void CalculateBalance(Double_t gReactionPlane, 
65                         TObjArray* particles,
66                         TObjArray* particlesMixed);
67   
68   TH2D   *GetCorrelationFunctionPN(Double_t psiMin, Double_t psiMax);
69   TH2D   *GetCorrelationFunctionNP(Double_t psiMin, Double_t psiMax);
70   TH2D   *GetCorrelationFunctionPP(Double_t psiMin, Double_t psiMax);
71   TH2D   *GetCorrelationFunctionNN(Double_t psiMin, Double_t psiMax);
72
73   AliTHn *GetHistNp() {return fHistP;}
74   AliTHn *GetHistNn() {return fHistN;}
75   AliTHn *GetHistNpn() {return fHistPN;}
76   AliTHn *GetHistNnp() {return fHistNP;}
77   AliTHn *GetHistNpp() {return fHistPP;}
78   AliTHn *GetHistNnn() {return fHistNN;}
79
80   void SetHistNp(AliTHn *gHist) {
81     fHistP = gHist; }//fHistP->FillParent(); fHistP->DeleteContainers();}
82   void SetHistNn(AliTHn *gHist) {
83     fHistN = gHist; }//fHistN->FillParent(); fHistN->DeleteContainers();}
84   void SetHistNpn(AliTHn *gHist) {
85     fHistPN = gHist; }//fHistPN->FillParent(); fHistPN->DeleteContainers();}
86   void SetHistNnp(AliTHn *gHist) {
87     fHistNP = gHist; }//fHistNP->FillParent(); fHistNP->DeleteContainers();}
88   void SetHistNpp(AliTHn *gHist) {
89     fHistPP = gHist; }//fHistPP->FillParent(); fHistPP->DeleteContainers();}
90   void SetHistNnn(AliTHn *gHist) {
91     fHistNN = gHist; }//fHistNN->FillParent(); fHistNN->DeleteContainers();}
92
93   TH1D *GetBalanceFunctionHistogram(Int_t iVariableSingle,
94                                     Int_t iVariablePair,
95                                     Double_t psiMin, Double_t psiMax);
96
97   TH2D *GetBalanceFunctionDeltaEtaDeltaPhi(Double_t psiMin, Double_t psiMax);
98   
99  private:
100   Bool_t fShuffle; //shuffled balance function object
101   TString fAnalysisLevel; //ESD, AOD or MC
102   Int_t fAnalyzedEvents; //number of events that have been analyzed
103
104   TString fCentralityId;//Centrality identifier to be used for the histo naming
105
106   Double_t fCentStart;
107   Double_t fCentStop;
108
109   AliTHn *fHistP; //N+
110   AliTHn *fHistN; //N-
111   AliTHn *fHistPN; //N+-
112   AliTHn *fHistNP; //N-+
113   AliTHn *fHistPP; //N++
114   AliTHn *fHistNN; //N--
115
116   Double_t fPsiInterval;// interval in Psi-phi1
117
118   AliBalancePsi & operator=(const AliBalancePsi & ) {return *this;}
119
120   ClassDef(AliBalancePsi, 1)
121 };
122
123 #endif