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