33049b0a |
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 | |
b2bca9d4 |
8 | //-- Root headers --- |
9 | #include <TNamed.h> |
33049b0a |
10 | #include <TMatrixD.h> |
11 | #include <TArrayD.h> |
b2bca9d4 |
12 | //------------------- |
33049b0a |
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); |
179c6296 |
29 | AliTPCkineGrid &operator = (const AliTPCkineGrid & param); |
33049b0a |
30 | virtual ~AliTPCkineGrid(); |
31 | void GetArrayEta(Double_t* eta) const; |
32 | void GetArrayPt(Double_t* pt) const; |
33 | Int_t GetBin(Double_t pt,Double_t eta) const; |
34 | Int_t GetBinsEta() const {return fNeta+1;} |
35 | Int_t GetBinsPt() const {return fNpt+1;} |
36 | Double_t GetParam(Int_t i) const; |
37 | Double_t GetParam(Int_t ipt,Int_t ieta) const {return (*fParams)(ipt,ieta);} |
38 | Int_t GetPointsEta() const {return fNeta;} |
39 | Int_t GetPointsPt() const {return fNpt;} |
40 | Int_t GetTotBins() const {return (fNeta+1)*(fNpt+1);} |
41 | Int_t GetTotPoints() const {return fNeta*fNpt;} |
42 | Double_t GetValueAt(Double_t pt,Double_t eta) const; |
43 | void SetParam(Int_t i,Double_t par); |
44 | void SetParam(Int_t ipt,Int_t ieta,Double_t par) { |
45 | (*fParams)(ipt,ieta)=par; return; } |
46 | |
47 | |
48 | private: |
49 | |
50 | Int_t fNpt; // number of points in the grid: pt |
51 | Int_t fNeta; // " eta |
52 | TArrayD* fPt; // grid points in pt |
53 | TArrayD* fEta; // grid points in eta |
54 | TMatrixD* fParams; // matrix of parameters in the grid points |
55 | |
56 | |
57 | ClassDef(AliTPCkineGrid,1) // Parameters used by AliTPCtrackerParam |
58 | }; |
59 | |
60 | |
61 | #endif |
62 | |
63 | |
64 | |
b2bca9d4 |
65 | |