Line data Source code
1 : #ifndef ALITPCCHEBDIST_H
2 : #define ALITPCCHEBDIST_H
3 :
4 :
5 : /*****************************************************************************
6 : * Wrapper for 2D->ND Chebishev parameterizations in TPC volume *
7 : * *
8 : * Class is similar to its base class AliTPCChebCorr, but the evaluation *
9 : * is obtained as a linear interpolation of the evaluations on the slices *
10 : * encompassing the queried X (in sector coordinates). These slices are *
11 : * are not the TPC rows but just a grid for evaluation, their number *
12 : * should be in general > kNRows of the TPC *
13 : * *
14 : * Author: ruben.shahoyan@cern.ch *
15 : *****************************************************************************/
16 :
17 : #include <TNamed.h>
18 : #include "AliTPCChebCorr.h"
19 :
20 : class AliTPCChebDist : public AliTPCChebCorr
21 : {
22 : public:
23 : //
24 : public:
25 : //
26 : AliTPCChebDist();
27 : AliTPCChebDist(const char* name, const char* title, int nps=1,int nzs=1, float zmaxAbs=250);
28 0 : virtual ~AliTPCChebDist() {}
29 : //
30 0 : Float_t GetXMin() const {return fXMin;}
31 0 : Float_t GetXMax() const {return fXMax;}
32 : //
33 : void Eval(int sector, float x, float y2x, float z,float *distortion) const;
34 : void Eval(int sector, float xtz[3], float *distortion) const;
35 : //
36 0 : virtual Bool_t IsCorrection() const {return kFALSE;}
37 0 : virtual Bool_t IsDistorttion() const {return kTRUE;}
38 : //
39 : protected:
40 : Int_t X2Slice(float x) const;
41 : Float_t Slice2X(int ix) const;
42 : //
43 : protected:
44 : //
45 : Float_t fXMin; // min X
46 : Float_t fXMax; // max X
47 : Float_t fDX; // X step
48 : Float_t fDXInv; // inverse of X step
49 : //
50 : static Float_t fgRMinTPC; // def. min radius
51 : static Float_t fgRMaxTPC; // def. max radius
52 : static Int_t fgNSlices; // def. number of slices in X
53 : private:
54 : AliTPCChebDist(const AliTPCChebDist& src); // dummy
55 : AliTPCChebDist& operator=(const AliTPCChebDist& rhs); // dummy
56 : //
57 24 : ClassDef(AliTPCChebDist,1)
58 : };
59 :
60 : //_________________________________________________________________
61 : inline Float_t AliTPCChebDist::Slice2X(Int_t ix) const
62 : {
63 : // get the lower slice encompacing given X, except if the X is outside of the fid. range
64 0 : return fXMin + ix*fDX;
65 : }
66 :
67 : //_________________________________________________________________
68 : inline Int_t AliTPCChebDist::X2Slice(float x) const
69 : {
70 : // get the lower slize covering given X
71 0 : int ix = (x-fXMin)*fDXInv;
72 0 : if (ix<0) ix = 0;
73 0 : else if (ix>=fNRows) ix = fNRows-1;
74 0 : return ix;
75 : }
76 :
77 : //____________________________________________________________________
78 : inline void AliTPCChebDist::Eval(int sector, float xtz[3], float *distortion) const
79 : {
80 : // Calculate distortion for point with x,y,z sector corrdinates
81 : // Sector is in 0-71 ROC convention, to check Zs outlying from the sector
82 0 : Eval(xtz[0],&xtz[1],distortion);
83 : //
84 0 : }
85 :
86 :
87 : #endif
|