]>
Commit | Line | Data |
---|---|---|
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> | |
18 | ||
19 | class TH1; | |
20 | class TH1F; | |
21 | class TH2F; | |
22 | class TTree; | |
23 | ||
24 | class AliTreeDraw: public TObject{ | |
25 | public: | |
26 | AliTreeDraw(); | |
27 | ~AliTreeDraw(){;} | |
022044bf | 28 | TTree * T() { return fTree;} |
c92725b7 | 29 | void SetTree(TTree *tree){fTree=tree;} |
30 | const TH1 * GetRes() const{ return (TH1*)fRes;} | |
31 | const TH1 * GetMean() const{ return (TH1*)fMean;} | |
32 | const TObjArray* GetPoints() const {return fPoints;} | |
33 | void ClearHisto(); | |
34 | void ClearPoints(){if (fPoints) fPoints->Clear();} | |
35 | // | |
36 | TH1F * DrawXY(const char * chx, const char *chy, const char* selection, | |
37 | const char * quality,Int_t nbins, Float_t minx, Float_t maxx, | |
38 | Float_t miny, Float_t maxy, Int_t nBinsRes=30); | |
39 | TH1F * DrawLogXY(const char * chx, const char *chy, const char* selection, | |
40 | const char * quality, Int_t nbins,Float_t minx, Float_t maxx, | |
41 | Float_t miny, Float_t maxy, Int_t nBinsRes=30); | |
42 | TH1F * Eff(const char *variable, const char* selection, const char * quality, | |
43 | Int_t nbins,Float_t min, Float_t max); | |
44 | TH1F * EffLog(const char *variable, const char* selection, const char * quality, | |
45 | Int_t nbins,Float_t min, Float_t max); | |
46 | // | |
47 | void GetPoints3D(const char * label, const char * chpoints, const char* selection, TTree * tpoints, Int_t color=6, Float_t rmin=4.); | |
48 | ||
49 | private: | |
50 | static void AliLabelAxes(TH1* histo, const char* xAxisTitle, const char* yAxisTitle); | |
51 | static Double_t* CreateLogBins(Int_t nBins, Double_t xMin, Double_t xMax); | |
52 | static TH1F* CreateEffHisto(TH1F* hGen, TH1F* hRec); | |
53 | static TH1F* CreateResHisto(TH2F* hRes2, TH1F **phMean, | |
54 | Bool_t drawBinFits = kTRUE,Bool_t overflowBinFits = kFALSE); | |
55 | ||
d92975ba | 56 | AliTreeDraw(const AliTreeDraw& t):TObject(),fTree(0),fRes(0),fMean(0),fPoints(0){;} |
022044bf | 57 | AliTreeDraw & operator=(const AliTreeDraw & t){return *this;} |
58 | ||
c92725b7 | 59 | TTree * fTree; //the tree for visualization - NOT OWNER |
60 | TH1F * fRes; //temporary histogram - OWNER | |
61 | TH1F * fMean; //temporary histogram - OWNER | |
62 | TObjArray *fPoints;// - OWNER | |
63 | ClassDef(AliTreeDraw,0) | |
64 | }; | |
65 | ||
66 | #endif |