]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/AliTPCkineGrid.h
Replacing the friend declarations by setters and getters (Federico)
[u/mrichter/AliRoot.git] / TPC / AliTPCkineGrid.h
1 #ifndef ALITPCKINEGRID_H
2 #define ALITPCKINEGRID_H
3 /* Copyright(c) 2001-2002, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7
8 //-- Root headers ---
9 #include <TNamed.h>
10 #include <TMatrixD.h>
11 #include <TArrayD.h>
12 //-------------------
13
14 class AliTPCkineGrid : public TNamed {
15   ////////////////////////////////////////////////////////////////////////
16   // Class used by TPC tracking parameterization to handle the tracking
17   // parameters (efficiencies, etc...) on a kinematic grid [pt,eta].
18   // User has to provide the grid steps and the values of the parameter
19   // in the points of the grid. The function GetValueAt(pt,eta) returns
20   // the result of a linear interpolation at the point [pt,eta].
21   //
22   //  Origin: Andrea Dainese, Padova - e-mail: andrea.dainese@pd.infn.it
23   ////////////////////////////////////////////////////////////////////////
24  public:
25   
26   AliTPCkineGrid();
27   AliTPCkineGrid(Int_t npt,Int_t neta,Double_t* pt,Double_t* eta);
28   AliTPCkineGrid(const AliTPCkineGrid& grid);
29   virtual ~AliTPCkineGrid();
30   void     GetArrayEta(Double_t* eta) const;
31   void     GetArrayPt(Double_t* pt) const;
32   Int_t    GetBin(Double_t pt,Double_t eta) const;
33   Int_t    GetBinsEta() const {return fNeta+1;}
34   Int_t    GetBinsPt() const {return fNpt+1;}
35   Double_t GetParam(Int_t i) const;
36   Double_t GetParam(Int_t ipt,Int_t ieta) const {return (*fParams)(ipt,ieta);}
37   Int_t    GetPointsEta() const {return fNeta;}
38   Int_t    GetPointsPt() const {return fNpt;}
39   Int_t    GetTotBins() const {return (fNeta+1)*(fNpt+1);}
40   Int_t    GetTotPoints() const {return fNeta*fNpt;}
41   Double_t GetValueAt(Double_t pt,Double_t eta) const;
42   void     SetParam(Int_t i,Double_t par);
43   void     SetParam(Int_t ipt,Int_t ieta,Double_t par) {
44                                  (*fParams)(ipt,ieta)=par; return; }
45   
46
47  private:
48
49   Int_t     fNpt;    // number of points in the grid:   pt
50   Int_t     fNeta;   //               "                 eta
51   TArrayD*  fPt;     // grid points in pt
52   TArrayD*  fEta;    // grid points in eta
53   TMatrixD* fParams; // matrix of parameters in the grid points  
54
55
56   ClassDef(AliTPCkineGrid,1) // Parameters used by AliTPCtrackerParam 
57 };
58
59
60 #endif
61
62
63
64