1 //-------------------------------------------------------------------------
3 // This class is included into LRC library for Long-Range Correlation analysis
4 // it is base class for NN, PtN, PtPt
5 // implements base methods for thees classes
6 // Origin: Petr Naumenko, SPbSU-CERN, Petr.Naoumenko@cern.ch,
7 // Andrey Ivanov (SPbSU-CERN), Igor Altsebeev (SPbSU-CERN)
8 //-------------------------------------------------------------------------
10 #ifndef ALILRCANALYSIS_H
11 #define ALILRCANALYSIS_H
13 /* See cxx source for full Copyright notice */
25 class AliLRCAnalysis :public TObject{
28 void DrawAbs(const int * const mas );
29 void DrawAbsPure( const int * const mas, bool drawPaveLabel );
31 void DrawRel( const int * const mas );
32 void DrawRelPure( const int * const mas, bool drawPaveLabel );
33 void DrawHist( const int * const mDrawArray, bool drawPaveLabel, double aCoef, double bCoef
34 , double aCoefError, double bCoefError, TH1D* profToDraw, int histType );
36 void SetXmin(double xMin);
37 void SetXmax(double xMax);
38 void SetNsigma(double nSigma);
39 void SetBinsRange(int binMin, int binMax);
40 double GetArel() const;
41 double GetBrel() const;
42 double GetArelError() const;
43 double GetBrelError() const;
44 double GetXi2rel() const;
45 double GetAabs() const;
46 double GetBabs() const;
47 double GetAabsError() const;
48 double GetBabsError() const;
49 double GetXi2abs() const;
50 double GetFitXmin() const;
51 double GetFitXmax() const;
53 bool SetFitRange(double xMin, double xMax);
54 bool SetFitRangeMin(double xMin);
55 bool SetFitRangeMax(double xMax);
56 void SetFullFitRange();
57 void SetFitMethod(int id);
59 double GetRoundWithError( double value, double error ) const ;
60 double GetRoundWithError( double value, double error, int pres ) const;
61 double GetRoundWithPrecision( double value, int pres ) const;
63 double GetRoundValueErrorPrecision( double value, double error, int pres ) const;
64 TH1D* GetAbsHisto() const;
65 TH1D* GetRelHisto() const;
66 TH1D* GetForwardValueDist() const;
67 TH1D* GetBackwardValueDist() const;
70 AliLRCAnalysis(const AliLRCAnalysis& a);
71 AliLRCAnalysis& operator= (const AliLRCAnalysis& a);
72 virtual ~AliLRCAnalysis();
75 TH1D* fPrAbs; //Work 1d histogramm in absolute var
76 TH1D* fPrRel; //Work 1d histogramm in rellation var
77 TH1D* fPrf; //Forward distribution
78 TH1D* fPrb; //Backward distribution
79 TFile* fileHist; // File with histrogramms
80 double fdptb; //Work var for error calculation
81 int fEntries; //Number of bins
82 double Integral(TH2D* source, int nbin) const;
83 //Creating profile from histogramm
84 void CreateHist(char *name, char *nameAbs, char *nameRel, char *atitleF, char *atitleB,char *rtitleF, char *rtitleB,TH2D* sourceHist);
85 void SetGraphics() const;
86 void SetErrors(TH2D* source, const char *name);
87 void SetErrors(TH2D* source, const char *name, double ptd, TH2D* nb);
88 void SetErrors(TH2D* source, const char *name, double ptd, const TProfile* nb);
91 static const int fgkPlotFlags = 10; // Size of flags array used to chouse vat variables should be shown on a plot
92 char* fSx; // Title of x axis
93 char* fSy; // Title of y axis
94 double fxFitMin; // FitMin minimum of fit baundary
95 double fxFitMax; // FitMax maximum of fit baundary
96 double fNsigma; // N sigma for fit range
97 double farel; // ax = b the a relative
98 double fbrel; // ax = b the b reletive
99 double farelError; // a relative error
100 double fbrelError; // b reletive error
101 double fXi2rel; // chi square reletive
102 double faabs; // ax = b the a absolut
103 double fbabs; // ax = b the b absolut
104 double faabsError; // a absolut error
105 double fbabsError; // b absolut error
106 double fXi2abs; // chi square absolut
107 int fFitMethod; // 0 - 1st variant, 1 - 2nd variant
109 ClassDef(AliLRCAnalysis,0) // macro for rootcint