]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/UPGRADE/AliITSUMatLUT.h
Fixing a memory leak
[u/mrichter/AliRoot.git] / ITS / UPGRADE / AliITSUMatLUT.h
1 #ifndef ALIITSUMATLUT
2 #define ALIITSUMATLUT
3
4 #include <TObject.h>
5 class TH1;
6
7 class AliITSUMatLUT : public TObject
8 {
9  public:
10   enum {kParX2X0,kParRhoL,kNParTypes};
11   //
12   AliITSUMatLUT();
13   AliITSUMatLUT(Double_t rmin,Double_t rmax,Int_t nbin);
14   AliITSUMatLUT(const AliITSUMatLUT& src);
15   AliITSUMatLUT &operator=(const AliITSUMatLUT& src);
16   //
17   virtual ~AliITSUMatLUT();
18   virtual void Print(Option_t* option = "") const;
19   //
20   void   FillData(Int_t ntest, Double_t zmin,Double_t zmax);
21   TH1*   GetHisto(const Option_t* option="", const Char_t *name=0) const;
22   //
23   Double_t GetMatBudget(const Double_t *pnt0, const Double_t *pnt1, Double_t *ret) const;
24   Double_t GetData(Int_t parTyp, Int_t bin)     const {return fData[parTyp][bin];}
25   Double_t GetDataDiff(Int_t parTyp, Int_t bin) const {return fData[parTyp][bin] - (bin ? fData[parTyp][bin-1] : 0);}  
26   void    GetData(double r, double* dest)        const;
27   //
28  protected:
29   Double_t  fRMin;             // min radius
30   Double_t  fRMax;             // max radius
31   Double_t  fDRInv;            // inverse bin size
32   Double_t  fDR;               // bin size
33   Int_t    fNBins;            // number of bins
34   Double_t* fData[kNParTypes]; //[fNBins] array per type
35   //
36   ClassDef(AliITSUMatLUT,1)
37 };
38
39
40 #endif