]>
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 | ||
7f0257ea | 15 | #include <TNamed.h> |
6c178944 | 16 | |
17 | #define MAXIMUM_NUMBER_OF_STEPS 1024 | |
18 | ||
19 | class TLorentzVector; | |
20 | class TGraphErrors; | |
21 | ||
7f0257ea | 22 | class AliBalance : public TNamed |
6c178944 | 23 | { |
24 | public: | |
7f0257ea | 25 | AliBalance(const char* name, const char* title); |
26 | AliBalance(const char* name, const char* title, Double_t p2Start, Double_t p2Stop, Int_t p2Steps); | |
27 | AliBalance(const AliBalance& balance); | |
6c178944 | 28 | ~AliBalance(); |
29 | ||
30 | void SetParticles(TLorentzVector *P, Double_t *charge, Int_t dim); | |
31 | void SetNumberOfBins(Int_t ibins); | |
32 | void SetAnalysisType(Int_t iType); | |
33 | void SetInterval(Double_t p2Start, Double_t p2Stop); | |
34 | ||
7f0257ea | 35 | void SetNp(Int_t np) {fNp = np;} |
36 | void SetNn(Int_t nn) {fNn = nn;} | |
37 | void SetNnn(Double_t *nn); | |
38 | void SetNpp(Double_t *pp); | |
39 | void SetNpn(Double_t *pn); | |
40 | ||
6c178944 | 41 | Double_t GetNp() const { return 1.0*fNp; } |
42 | Double_t GetNn() const { return 1.0*fNn; } | |
43 | Double_t GetNnn(Int_t p2) const { return 1.0*fNnn[p2]; } | |
44 | Double_t GetNpp(Int_t p2) const { return 1.0*fNpp[p2]; } | |
45 | Double_t GetNpn(Int_t p2) const { return 1.0*fNpn[p2]; } | |
46 | ||
7f0257ea | 47 | void CalculateBalance(); |
48 | ||
6c178944 | 49 | Double_t GetBalance(Int_t p2); |
50 | Double_t GetError(Int_t p2); | |
51 | ||
52 | TGraphErrors *DrawBalance(); | |
53 | void PrintResults(); | |
54 | ||
55 | private: | |
56 | Double_t *fCharge; //matrix with the charge of each track | |
57 | Int_t fNtrack; //number of tracks to compute the BF | |
58 | ||
59 | TLorentzVector *fV; //4-momentum vector - info for tracks used to compute the BF | |
60 | ||
61 | Int_t fNumberOfBins; //number of bins of the analyzed interval | |
62 | Int_t fAnalysisType; //0:y - 1:eta - 2:Qlong - 3:Qout - 4:Qside - 5:Qinv - 6:phi | |
63 | Int_t fAnalyzedEvents; //number of events that have been analyzed | |
64 | ||
65 | Double_t fP2Start, fP2Stop, fP2Step; //inerval info | |
66 | ||
67 | Double_t fNnn[MAXIMUM_NUMBER_OF_STEPS]; //N(--) | |
68 | Double_t fNpp[MAXIMUM_NUMBER_OF_STEPS]; //N(++) | |
69 | Double_t fNpn[MAXIMUM_NUMBER_OF_STEPS]; //N(+-) | |
70 | Double_t fNn, fNp; //number of pos./neg. inside the analyzed interval | |
71 | ||
72 | Double_t fB[MAXIMUM_NUMBER_OF_STEPS]; //BF matrix | |
73 | Double_t ferror[MAXIMUM_NUMBER_OF_STEPS]; //error of the BF | |
74 | ||
7f0257ea | 75 | AliBalance & operator=(const AliBalance & ) {return *this;} |
76 | ||
6c178944 | 77 | ClassDef(AliBalance, 1) |
7f0257ea | 78 | }; |
6c178944 | 79 | |
80 | #endif |