#ifndef ALILRCANALYSIS_H
#define ALILRCANALYSIS_H
#include "TObject.h"
class TFile;
class TProfile;
class TH1D;
class TH2D;
class AliLRCAnalysis :public TObject{
public:
void DrawAbs();
void DrawAbs(const int * const mas );
void DrawAbsPure( const int * const mas, bool drawPaveLabel );
void DrawRel();
void DrawRel( const int * const mas );
void DrawRelPure( const int * const mas, bool drawPaveLabel );
void DrawHist( const int * const mDrawArray, bool drawPaveLabel, double aCoef, double bCoef
, double aCoefError, double bCoefError, TH1D* profToDraw, int histType );
void SetXmin(double xMin);
void SetXmax(double xMax);
void SetNsigma(double nSigma);
void SetBinsRange(int binMin, int binMax);
double GetArel() const;
double GetBrel() const;
double GetArelError() const;
double GetBrelError() const;
double GetXi2rel() const;
double GetAabs() const;
double GetBabs() const;
double GetAabsError() const;
double GetBabsError() const;
double GetXi2abs() const;
double GetFitXmin() const;
double GetFitXmax() const;
void Calculate();
bool SetFitRange(double xMin, double xMax);
bool SetFitRangeMin(double xMin);
bool SetFitRangeMax(double xMax);
void SetFullFitRange();
void SetFitMethod(int id);
double GetRoundWithError( double value, double error ) const ;
double GetRoundWithError( double value, double error, int pres ) const;
double GetRoundWithPrecision( double value, int pres ) const;
double GetRoundValueErrorPrecision( double value, double error, int pres ) const;
TH1D* GetAbsHisto() const;
TH1D* GetRelHisto() const;
TH1D* GetForwardValueDist() const;
TH1D* GetBackwardValueDist() const;
AliLRCAnalysis();
AliLRCAnalysis(const AliLRCAnalysis& a);
AliLRCAnalysis& operator= (const AliLRCAnalysis& a);
virtual ~AliLRCAnalysis();
protected:
TH1D* fPrAbs;
TH1D* fPrRel;
TH1D* fPrf;
TH1D* fPrb;
TFile* fileHist;
double fdptb;
int fEntries;
double Integral(TH2D* source, int nbin) const;
void CreateHist(char *name, char *nameAbs, char *nameRel, char *atitleF, char *atitleB,char *rtitleF, char *rtitleB,TH2D* sourceHist);
void SetGraphics() const;
void SetErrors(TH2D* source, const char *name);
void SetErrors(TH2D* source, const char *name, double ptd, TH2D* nb);
void SetErrors(TH2D* source, const char *name, double ptd, const TProfile* nb);
private:
static const int fgkPlotFlags = 10;
char* fSx;
char* fSy;
double fxFitMin;
double fxFitMax;
double fNsigma;
double farel;
double fbrel;
double farelError;
double fbrelError;
double fXi2rel;
double faabs;
double fbabs;
double faabsError;
double fbabsError;
double fXi2abs;
int fFitMethod;
ClassDef(AliLRCAnalysis,0)
};
#endif