]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/EBYE/AliBalance.h
New classes for the EBYE charge and multiplicity fluctuations - version 0 (Satya)
[u/mrichter/AliRoot.git] / PWG2 / EBYE / AliBalance.h
CommitLineData
6c178944 1#ifndef ALIBALANCE_H
2#define ALIBALANCE_H
3/* See cxx source for full Copyright notice */
4
5
6/* $Id$ */
7
8//-------------------------------------------------------------------------
9// Class AliBalance
10// This is the class for the Balance Function analysis
11//
12// Origin: Panos Christakoglou, UOA-CERN, Panos.Christakoglou@cern.ch
13//-------------------------------------------------------------------------
14
e559055a 15#include <TObject.h>
9d1f0df5 16#include "TString.h"
6c178944 17
18#define MAXIMUM_NUMBER_OF_STEPS 1024
19
6c178944 20class TGraphErrors;
5c33329d 21class TObjArray;
09bb7bf4 22class TH1F;
6c178944 23
5c33329d 24class AliBalance : public TObject {
6c178944 25 public:
e559055a 26 AliBalance();
27 AliBalance(Double_t p2Start, Double_t p2Stop, Int_t p2Steps);
7f0257ea 28 AliBalance(const AliBalance& balance);
6c178944 29 ~AliBalance();
30
6c178944 31 void SetNumberOfBins(Int_t ibins);
9d1f0df5 32 void SetAnalysisLevel(const char* analysisLevel) {fAnalysisLevel = analysisLevel;}
6c178944 33 void SetAnalysisType(Int_t iType);
34 void SetInterval(Double_t p2Start, Double_t p2Stop);
35
898d5b28 36 Int_t GetNumberOfBins() {return fNumberOfBins;}
9d1f0df5 37 const char* GetAnalysisLevel() {return fAnalysisLevel.Data();}
09bb7bf4 38 Int_t GetNumberOfAnalyzedEvent() {return fAnalyzedEvents;}
898d5b28 39
7f0257ea 40 void SetNp(Int_t np) {fNp = np;}
41 void SetNn(Int_t nn) {fNn = nn;}
42 void SetNnn(Double_t *nn);
43 void SetNpp(Double_t *pp);
44 void SetNpn(Double_t *pn);
45
6c178944 46 Double_t GetNp() const { return 1.0*fNp; }
47 Double_t GetNn() const { return 1.0*fNn; }
48 Double_t GetNnn(Int_t p2) const { return 1.0*fNnn[p2]; }
49 Double_t GetNpp(Int_t p2) const { return 1.0*fNpp[p2]; }
50 Double_t GetNpn(Int_t p2) const { return 1.0*fNpn[p2]; }
51
1d8792e7 52 TH1F *GetHistNnn();
53 TH1F *GetHistNpp();
54 TH1F *GetHistNpn();
09bb7bf4 55
5c33329d 56 void CalculateBalance(TObjArray *gTrackArray);
7f0257ea 57
6c178944 58 Double_t GetBalance(Int_t p2);
59 Double_t GetError(Int_t p2);
60
61 TGraphErrors *DrawBalance();
62 void PrintResults();
09bb7bf4 63 void PrintAnalysisSettings();
6c178944 64
898d5b28 65 void Merge(AliBalance *b);
66
6c178944 67 private:
9d1f0df5 68 TString fAnalysisLevel; //ESD, AOD or MC
6c178944 69 Int_t fNumberOfBins; //number of bins of the analyzed interval
70 Int_t fAnalysisType; //0:y - 1:eta - 2:Qlong - 3:Qout - 4:Qside - 5:Qinv - 6:phi
71 Int_t fAnalyzedEvents; //number of events that have been analyzed
72
73 Double_t fP2Start, fP2Stop, fP2Step; //inerval info
74
75 Double_t fNnn[MAXIMUM_NUMBER_OF_STEPS]; //N(--)
76 Double_t fNpp[MAXIMUM_NUMBER_OF_STEPS]; //N(++)
77 Double_t fNpn[MAXIMUM_NUMBER_OF_STEPS]; //N(+-)
78 Double_t fNn, fNp; //number of pos./neg. inside the analyzed interval
79
80 Double_t fB[MAXIMUM_NUMBER_OF_STEPS]; //BF matrix
81 Double_t ferror[MAXIMUM_NUMBER_OF_STEPS]; //error of the BF
09bb7bf4 82
83 TH1F *fHistfNnn; //N(--) in a histo
84 TH1F *fHistfNpp; //N(++) in a histo
85 TH1F *fHistfNpn; //N(+-) in a histo
86
7f0257ea 87 AliBalance & operator=(const AliBalance & ) {return *this;}
88
6c178944 89 ClassDef(AliBalance, 1)
7f0257ea 90};
6c178944 91
92#endif