]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG3/dielectron/AliDielectronHistos.h
Add AliEMCALRecoUtils pointer to remove bad or exotic clusters for cluster histograms...
[u/mrichter/AliRoot.git] / PWG3 / dielectron / AliDielectronHistos.h
CommitLineData
b2a297fa 1#ifndef ALIDIELECTRONHISTOS_H
2#define ALIDIELECTRONHISTOS_H
3/* Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6///////////////////////////////////////////////////////////////////////////////////////////
7// //
8// Generic Histogram container with support for groups and filling of groups by passing //
9// a vector of data //
10// //
11// Authors: //
12// Jens Wiechula <Jens.Wiechula@cern.ch> //
13// //
14///////////////////////////////////////////////////////////////////////////////////////////
15
16
17#include <TNamed.h>
18// #include <TCollection.h>
19#include <THashList.h>
ffbede40 20#include <TVectorDfwd.h>
b2a297fa 21
22class TH1;
23class TString;
164bfb53 24class TList;
b2a297fa 25// class TVectorT<double>;
26
27class AliDielectronHistos : public TNamed {
28public:
29 AliDielectronHistos();
30 AliDielectronHistos(const char* name, const char* title);
31 virtual ~AliDielectronHistos();
32
33
34 void UserHistogram(const char* histClass,const char *name, const char* title,
35 Int_t nbinsX, Double_t xmin, Double_t xmax,
572b0139 36 UInt_t valTypeX=kNoAutoFill, Bool_t logBinX=kFALSE);
b2a297fa 37 void UserHistogram(const char* histClass,const char *name, const char* title,
38 Int_t nbinsX, Double_t xmin, Double_t xmax,
39 Int_t nbinsY, Double_t ymin, Double_t ymax,
572b0139 40 UInt_t valTypeX=kNoAutoFill, UInt_t valTypeY=0,
41 Bool_t logBinX=kFALSE, Bool_t logBinY=kFALSE);
b2a297fa 42 void UserHistogram(const char* histClass,const char *name, const char* title,
43 Int_t nbinsX, Double_t xmin, Double_t xmax,
44 Int_t nbinsY, Double_t ymin, Double_t ymax,
45 Int_t nbinsZ, Double_t zmin, Double_t zmax,
572b0139 46 UInt_t valTypeX=kNoAutoFill, UInt_t valTypeY=0, UInt_t valTypeZ=0,
47 Bool_t logBinX=kFALSE, Bool_t logBinY=kFALSE, Bool_t logBinZ=kFALSE);
b2a297fa 48
ffbede40 49 void UserHistogram(const char* histClass,const char *name, const char* title,
50 const char* binning,
51 UInt_t valTypeX=kNoAutoFill);
52
53 void UserHistogram(const char* histClass,const char *name, const char* title,
54 const TVectorD * const binsX,
55 UInt_t valTypeX=kNoAutoFill);
56 void UserHistogram(const char* histClass,const char *name, const char* title,
57 const TVectorD * const binsX, const TVectorD * const binsY,
58 UInt_t valTypeX=kNoAutoFill, UInt_t valTypeY=0);
59 void UserHistogram(const char* histClass,const char *name, const char* title,
60 const TVectorD * const binsX, const TVectorD * const binsY, const TVectorD * const binsZ,
61 UInt_t valTypeX=kNoAutoFill, UInt_t valTypeY=0, UInt_t valTypeZ=0);
62
b2a297fa 63 void UserHistogram(const char* histClass, TH1* hist, UInt_t valTypes=kNoAutoFill);
64
65
66 void Fill(const char* histClass, const char* name, Double_t xval);
67 void Fill(const char* histClass, const char* name, Double_t xval, Double_t yval);
68 void Fill(const char* histClass, const char* name, Double_t xval, Double_t yval, Double_t zval);
69
70// void FillClass(const char* histClass, const TVectorD &vals);
71 void FillClass(const char* histClass, Int_t nValues, const Double_t *values);
72
73
74 TH1* GetHistogram(const char* histClass, const char* name) const;
164bfb53 75 TH1* GetHistogram(const char* cutClass, const char* histClass, const char* name) const;
76
77 void SetHistogramList(THashList &list, Bool_t setOwner=kTRUE);
572b0139 78 void ResetHistogramList(){fHistoList.Clear();}
b2a297fa 79 const THashList* GetHistogramList() const {return &fHistoList;}
164bfb53 80
81 void SetList(TList * const list) { fList=list; }
82 TList *GetList() const { return fList; }
83
b2a297fa 84 void AddClass(const char* histClass);
85
86 void DumpToFile(const char* file="histos.root");
87 void ReadFromFile(const char* file="histos.root");
88
89 virtual void Print(const Option_t* option = "") const;
90 virtual void Draw(const Option_t* option = "");
91 virtual void DrawSame(const char* histName, const Option_t *opt="leg can");
92
93 void SetReservedWords(const char* words);
94// virtual void Add(TObject *obj) {};
95// virtual void Clear(Option_t *option="") {};
96// virtual void Delete(Option_t *option="") {};
97// virtual TObject **GetObjectRef(const TObject *obj) const { return 0; }
98// virtual TIterator *MakeIterator(Bool_t dir = kIterForward) const ;
99// virtual TObject *Remove(TObject *obj) { return 0; }
572b0139 100
164bfb53 101 Bool_t SetCutClass(const char* cutClass);
102
b2a297fa 103private:
104 THashList fHistoList; //-> list of histograms
164bfb53 105 TList *fList; //! List of list of histograms
b2a297fa 106
107 TString *fReservedWords; //! list of reserved words
ffbede40 108 void UserHistogramReservedWords(const char* histClass, const TH1 *hist, UInt_t valTypes);
b2a297fa 109 void FillClass(THashTable *classTable, Int_t nValues, Double_t *values);
110
111 void PrintPDF(Option_t* opt);
112 void PrintStructure() const;
113
114 Bool_t IsHistogramOk(const char* classTable, const char* name);
115
116 enum {kNoAutoFill=1000000000};
117
118 AliDielectronHistos(const AliDielectronHistos &hist);
119 AliDielectronHistos& operator = (const AliDielectronHistos &hist);
120
164bfb53 121 ClassDef(AliDielectronHistos,2)
b2a297fa 122};
123
124#endif
125