]>
Commit | Line | Data |
---|---|---|
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 | 20 | class TGraphErrors; |
5c33329d | 21 | class TObjArray; |
9d1f0df5 | 22 | //class TString; |
6c178944 | 23 | |
5c33329d | 24 | class 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;} |
37 | const char* GetAnalysisType(); | |
9d1f0df5 | 38 | const char* GetAnalysisLevel() {return fAnalysisLevel.Data();} |
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 | ||
5c33329d | 52 | void CalculateBalance(TObjArray *gTrackArray); |
7f0257ea | 53 | |
6c178944 | 54 | Double_t GetBalance(Int_t p2); |
55 | Double_t GetError(Int_t p2); | |
56 | ||
57 | TGraphErrors *DrawBalance(); | |
58 | void PrintResults(); | |
59 | ||
898d5b28 | 60 | void Merge(AliBalance *b); |
61 | ||
6c178944 | 62 | private: |
9d1f0df5 | 63 | TString fAnalysisLevel; //ESD, AOD or MC |
6c178944 | 64 | Int_t fNumberOfBins; //number of bins of the analyzed interval |
65 | Int_t fAnalysisType; //0:y - 1:eta - 2:Qlong - 3:Qout - 4:Qside - 5:Qinv - 6:phi | |
66 | Int_t fAnalyzedEvents; //number of events that have been analyzed | |
67 | ||
68 | Double_t fP2Start, fP2Stop, fP2Step; //inerval info | |
69 | ||
70 | Double_t fNnn[MAXIMUM_NUMBER_OF_STEPS]; //N(--) | |
71 | Double_t fNpp[MAXIMUM_NUMBER_OF_STEPS]; //N(++) | |
72 | Double_t fNpn[MAXIMUM_NUMBER_OF_STEPS]; //N(+-) | |
73 | Double_t fNn, fNp; //number of pos./neg. inside the analyzed interval | |
74 | ||
75 | Double_t fB[MAXIMUM_NUMBER_OF_STEPS]; //BF matrix | |
76 | Double_t ferror[MAXIMUM_NUMBER_OF_STEPS]; //error of the BF | |
77 | ||
7f0257ea | 78 | AliBalance & operator=(const AliBalance & ) {return *this;} |
79 | ||
6c178944 | 80 | ClassDef(AliBalance, 1) |
7f0257ea | 81 | }; |
6c178944 | 82 | |
83 | #endif |