]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/AliTPCkineGrid.h
Added cross-talk from the wires beyond the first and the last rows
[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 #include <TMatrixD.h>
9 #include <TArrayD.h>
10 #include <TNamed.h>
11
12
13 class AliTPCkineGrid : public TNamed {
14   ////////////////////////////////////////////////////////////////////////
15   // Class used by TPC tracking parameterization to handle the tracking
16   // parameters (efficiencies, etc...) on a kinematic grid [pt,eta].
17   // User has to provide the grid steps and the values of the parameter
18   // in the points of the grid. The function GetValueAt(pt,eta) returns
19   // the result of a linear interpolation at the point [pt,eta].
20   //
21   //  Origin: Andrea Dainese, Padova - e-mail: andrea.dainese@pd.infn.it
22   ////////////////////////////////////////////////////////////////////////
23  public:
24   
25   AliTPCkineGrid();
26   AliTPCkineGrid(Int_t npt,Int_t neta,Double_t* pt,Double_t* eta);
27   AliTPCkineGrid(const AliTPCkineGrid& grid);
28   virtual ~AliTPCkineGrid();
29   void     GetArrayEta(Double_t* eta) const;
30   void     GetArrayPt(Double_t* pt) const;
31   Int_t    GetBin(Double_t pt,Double_t eta) const;
32   Int_t    GetBinsEta() const {return fNeta+1;}
33   Int_t    GetBinsPt() const {return fNpt+1;}
34   Double_t GetParam(Int_t i) const;
35   Double_t GetParam(Int_t ipt,Int_t ieta) const {return (*fParams)(ipt,ieta);}
36   Int_t    GetPointsEta() const {return fNeta;}
37   Int_t    GetPointsPt() const {return fNpt;}
38   Int_t    GetTotBins() const {return (fNeta+1)*(fNpt+1);}
39   Int_t    GetTotPoints() const {return fNeta*fNpt;}
40   Double_t GetValueAt(Double_t pt,Double_t eta) const;
41   void     SetParam(Int_t i,Double_t par);
42   void     SetParam(Int_t ipt,Int_t ieta,Double_t par) {
43                                  (*fParams)(ipt,ieta)=par; return; }
44   
45
46  private:
47
48   Int_t     fNpt;    // number of points in the grid:   pt
49   Int_t     fNeta;   //               "                 eta
50   TArrayD*  fPt;     // grid points in pt
51   TArrayD*  fEta;    // grid points in eta
52   TMatrixD* fParams; // matrix of parameters in the grid points  
53
54
55   ClassDef(AliTPCkineGrid,1) // Parameters used by AliTPCtrackerParam 
56 };
57
58
59 #endif
60
61
62