First attempt to use AliAnalisysTask (Marian)
[u/mrichter/AliRoot.git] / PWG1 / AliTreeDraw.h
CommitLineData
c92725b7 1#ifndef ALITREEDRAW_H
2#define ALITREEDRAW_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6
7
8//////////////////////////////////////////////////////////////////////////////
9// Class AliTreeDraw //
10// //
11// marian.ivanov@cern.ch //
12//////////////////////////////////////////////////////////////////////////////
13
14
15
16#include <TObject.h>
17#include <TObjArray.h>
a36eadd7 18#include "TLinearFitter.h"
c92725b7 19
20class TH1;
21class TH1F;
22class TH2F;
23class TTree;
a36eadd7 24class TString;
c92725b7 25
26class AliTreeDraw: public TObject{
27public:
28 AliTreeDraw();
29 ~AliTreeDraw(){;}
022044bf 30 TTree * T() { return fTree;}
c92725b7 31 void SetTree(TTree *tree){fTree=tree;}
32 const TH1 * GetRes() const{ return (TH1*)fRes;}
33 const TH1 * GetMean() const{ return (TH1*)fMean;}
34 const TObjArray* GetPoints() const {return fPoints;}
35 void ClearHisto();
36 void ClearPoints(){if (fPoints) fPoints->Clear();}
a36eadd7 37 TString* FitPlane(const char* drawCommand, const char* formula, const char* cuts, Double_t & chi2, TVectorD &fitParam, TMatrixD &covMatrix, Int_t start=0, Int_t stop=10000000);
38
39
c92725b7 40 //
41 TH1F * DrawXY(const char * chx, const char *chy, const char* selection,
42 const char * quality,Int_t nbins, Float_t minx, Float_t maxx,
43 Float_t miny, Float_t maxy, Int_t nBinsRes=30);
44 TH1F * DrawLogXY(const char * chx, const char *chy, const char* selection,
45 const char * quality, Int_t nbins,Float_t minx, Float_t maxx,
46 Float_t miny, Float_t maxy, Int_t nBinsRes=30);
47 TH1F * Eff(const char *variable, const char* selection, const char * quality,
48 Int_t nbins,Float_t min, Float_t max);
49 TH1F * EffLog(const char *variable, const char* selection, const char * quality,
50 Int_t nbins,Float_t min, Float_t max);
51 //
52 void GetPoints3D(const char * label, const char * chpoints, const char* selection, TTree * tpoints, Int_t color=6, Float_t rmin=4.);
52bbef74 53
c92725b7 54 static void AliLabelAxes(TH1* histo, const char* xAxisTitle, const char* yAxisTitle);
55 static Double_t* CreateLogBins(Int_t nBins, Double_t xMin, Double_t xMax);
56 static TH1F* CreateEffHisto(TH1F* hGen, TH1F* hRec);
57 static TH1F* CreateResHisto(TH2F* hRes2, TH1F **phMean,
c1a02aa0 58 Bool_t drawBinFits = kTRUE,Bool_t overflowBinFits = kFALSE);
59
60 static TH1F* CreateResHistoI(TH2F* hRes2, TH1F **phMean, Int_t integ=0,
61 Bool_t drawBinFits = kTRUE);
62
63
c92725b7 64
52bbef74 65private:
c1a02aa0 66 AliTreeDraw(const AliTreeDraw& /*t*/):TObject(),fTree(0),fRes(0),fMean(0),fPoints(0){;}
67 AliTreeDraw & operator=(const AliTreeDraw & /*t*/){return *this;}
022044bf 68
c92725b7 69 TTree * fTree; //the tree for visualization - NOT OWNER
70 TH1F * fRes; //temporary histogram - OWNER
71 TH1F * fMean; //temporary histogram - OWNER
72 TObjArray *fPoints;// - OWNER
73 ClassDef(AliTreeDraw,0)
74};
75
76#endif