Balance function analysis (P.Christakoglou)
[u/mrichter/AliRoot.git] / ANALYSIS / AliBalance.h
CommitLineData
cd286c84 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
15#include <TROOT.h>
16#include <TObject.h>
17#include <TLorentzVector.h>
18
19#define MAXIMUM_NUMBER_OF_STEPS 1024
20
21class AliBalance : public TObject
22{
23 private:
24 Double_t *fCharge; //matrix with the charge of each track
25 Int_t fNtrack; //number of tracks to compute the BF
26
27 TLorentzVector *fV; //4-momentum vector - info for tracks used to compute the BF
28
29 Int_t fNumberOfBins; //number of bins of the analyzed interval
30 Int_t fAnalysisType; //0:y - 1:eta - 2:Qlong - 3:Qout - 4:Qside - 5:Qinv - 6:phi
31 Int_t fAnalyzedEvents; //number of events that have been analyzed
32
33 Double_t fP2_Start, fP2_Stop, fP2_Step; //inerval info
34
35 Double_t fNnn[MAXIMUM_NUMBER_OF_STEPS]; //N(--)
36 Double_t fNpp[MAXIMUM_NUMBER_OF_STEPS]; //N(++)
37 Double_t fNpn[MAXIMUM_NUMBER_OF_STEPS]; //N(+-)
38 Double_t fNn, fNp; //number of pos./neg. inside the analyzed interval
39
40 Double_t fB[MAXIMUM_NUMBER_OF_STEPS]; //BF matrix
41 Double_t ferror[MAXIMUM_NUMBER_OF_STEPS]; //error of the BF
42
43 public:
44 AliBalance();
45
46 AliBalance(Double_t P2_Start, Double_t P2_Stop, Int_t P2_Steps);
47
48 ~AliBalance();
49
50 void SetParticles(TLorentzVector *P, Double_t *charge, Int_t dim);
51 void SetNumberOfBins(Int_t ibins);
52 void SetAnalysisType(Int_t iType);
53 void SetInterval(Double_t P2_Start, Double_t P2_Stop);
54
55 void CalculateBalance() ;
56
57 Double_t GetNp() { return 1.0*fNp; }
58 Double_t GetNn() { return 1.0*fNn; }
59 Double_t GetNnn(Int_t p2) { return 1.0*fNnn[p2]; }
60 Double_t GetNpp(Int_t p2) { return 1.0*fNpp[p2]; }
61 Double_t GetNpn(Int_t p2) { return 1.0*fNpn[p2]; }
62
63 Double_t GetBalance(Int_t p2);
64 Double_t GetError(Int_t p2);
65
66 void PrintResults();
67
68 ClassDef(AliBalance, 1)
69} ;
70
71#endif