]>
Commit | Line | Data |
---|---|---|
8c555625 | 1 | #ifndef ALITPCPRF2D_H |
2 | #define ALITPCPRF2D_H | |
3da30618 | 3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
8c555625 | 7 | //////////////////////////////////////////////// |
cc80f89e | 8 | // Manager class for AliTPCPRF2D // |
8c555625 | 9 | //////////////////////////////////////////////// |
10 | ||
11 | ||
12 | // include files and class forward declarations | |
13 | //DSTEP in cm | |
14 | //NPRF in number of interpolation points | |
15 | ||
16 | ||
17 | #include "TObject.h" | |
18 | #include "TMath.h" | |
19 | class TF2; | |
cc80f89e | 20 | class TArrayF; |
8c555625 | 21 | |
22 | class AliTPCPRF2D : public TObject { | |
23 | public : | |
24 | AliTPCPRF2D(); | |
73042f01 | 25 | AliTPCPRF2D(const AliTPCPRF2D &prf); |
26 | AliTPCPRF2D & operator = (const AliTPCPRF2D &prf); | |
8c555625 | 27 | ~AliTPCPRF2D(); |
cc80f89e | 28 | void Update(); //recalculate tables for charge calculation |
8c555625 | 29 | Float_t GetGRF(Float_t xin, Float_t yin); |
30 | //return generic response function in xin | |
31 | Float_t GetPRF(Float_t xin, Float_t yin, Bool_t inter=kFALSE); | |
32 | //return PRF in point xin,yin | |
8c555625 | 33 | void DrawX(Float_t x1, Float_t x2,Float_t y, Bool_t inter=kFALSE); |
34 | //draw one dimensional response for | |
35 | //fixed y | |
36 | // void DrawY(Float_t y1, Float_t y2,Float_t x); | |
37 | //draw one dimensional response for fixed x | |
73042f01 | 38 | void DrawPRF(Float_t x1, Float_t x2, Float_t y1, Float_t y2, |
8c555625 | 39 | Bool_t inter=kFALSE, Int_t Nx=20, Int_t Ny=20); |
40 | //draw two dimensional PRF | |
41 | ||
42 | void DrawDist(Float_t x1, Float_t x2, Float_t y1, Float_t y2, | |
43 | Bool_t inter=kFALSE, Int_t Nx=20, Int_t Ny=20, | |
44 | Float_t thr=0); | |
45 | //draw distortion of COG method | |
46 | //we suppose threshold equal to thr | |
cc80f89e | 47 | |
48 | void SetPad(Float_t width, Float_t height); | |
49 | //set base chevron parameters | |
50 | void SetChevron(Float_t hstep, Float_t shifty, Float_t fac); | |
51 | //set chevron parameters | |
52 | void SetChParam(Float_t width, Float_t height, | |
53 | Float_t hstep, Float_t shifty, Float_t fac); | |
54 | //set all geometrical parameters | |
55 | void SetY(Float_t y1, Float_t y2, Int_t nYdiv) ; | |
56 | void SetChargeAngle(Float_t angle){fChargeAngle = angle;} //set angle of pad and charge distribution | |
57 | //axes | |
8c555625 | 58 | void SetGauss(Float_t sigmaX,Float_t sigmaY , Float_t kNorm=1); |
59 | //adjust PRF with GAUSIAN as generic GRF | |
60 | //if direct = kTRUE then it does't convolute distribution | |
61 | void SetCosh(Float_t sigmaX,Float_t sigmaY , Float_t kNorm=1); | |
62 | //adjust PRF with 1/Cosh as generic GRF | |
63 | void SetGati(Float_t K3X, Float_t K3Y, | |
64 | Float_t padDistance, | |
65 | Float_t kNorm=1); | |
66 | void SetParam(TF2 * GRF,Float_t kNorm, | |
67 | Float_t sigmaX=0, Float_t sigmaY=0); | |
8c555625 | 68 | void SetNdiv(Int_t Ndiv){fNdiv=Ndiv;} |
cc80f89e | 69 | Float_t GetSigmaX() const {return fSigmaX;} |
70 | Float_t GetSigmaY() const {return fSigmaY;} | |
71 | ||
72 | ||
8c555625 | 73 | protected: |
cc80f89e | 74 | void Update1(); |
75 | void UpdateSigma(); //recalculate sigma of PRF | |
8c555625 | 76 | Float_t GetPRFActiv(Float_t xin); //return PRF in point xin and actual y |
cc80f89e | 77 | Float_t * fcharge; //field with PRF |
78 | Float_t fY1; //position of first "virtual" vire | |
79 | Float_t fY2; //position of last virtual vire | |
80 | Int_t fNYdiv; //number of wires | |
8c555625 | 81 | Float_t * ffcharge; //pointer to array of arrays |
82 | ||
83 | private: | |
cc80f89e | 84 | |
85 | //chevron parameters | |
86 | Float_t fHeightFull; //height of the full pad | |
87 | Float_t fHeightS; //height of the one step | |
88 | Float_t fShiftY; //shift of the step | |
89 | Float_t fWidth; //width of the pad | |
90 | Float_t fK; //k factor of the chewron | |
91 | ||
8c555625 | 92 | Double_t funParam[5];//parameters of used charge function |
93 | Int_t fNPRF; //number of interpolations point | |
94 | Int_t fNdiv; //number of division to calculate integral | |
95 | Float_t fDStep; //element step for point | |
96 | Float_t fkNorm; //normalisation factor of the charge integral | |
97 | Float_t fInteg; //integral of GRF on +- infinity | |
98 | TF2 * fGRF; //charge distribution function | |
99 | ||
cc80f89e | 100 | Float_t fK3X; //KX parameter (only for Gati parametrization) |
101 | Float_t fK3Y; //KY parameter (only for Gati parametrisation) | |
102 | Float_t fPadDistance; //pad anode distnce (only for Gati parametrisation) | |
103 | ||
104 | Float_t fOrigSigmaX; //sigma of original distribution; | |
105 | Float_t fOrigSigmaY; //sigma of original distribution; | |
106 | Float_t fChargeAngle;//'angle' of charge distribution refernce system to pad reference system | |
107 | Float_t fCosAngle; //'angle' of the pad assymetry | |
8c555625 | 108 | |
cc80f89e | 109 | Float_t fSigmaX; //sigma X of PAD response function |
110 | Float_t fSigmaY; //sigma Y of PAD response function | |
111 | Float_t fMeanX; //mean X value | |
112 | Float_t fMeanY; //mean Y value | |
8c555625 | 113 | //calculated during update |
114 | ||
cc80f89e | 115 | |
116 | ||
117 | char fType[5]; //charge type | |
118 | Float_t fCurrentY; //in reality we calculate PRF only for one fixed y | |
119 | Float_t fDYtoWire; //! used to make PRF calculation faster in GetPRF | |
120 | Float_t fDStepM1; //! used in GetPRFActiv to make calculation faster | |
73042f01 | 121 | |
122 | static const Float_t fgSQRT12; //numeric constant | |
123 | static const Int_t fgNPRF; //default number of division | |
124 | ||
8c555625 | 125 | ClassDef(AliTPCPRF2D,1) |
126 | }; | |
127 | ||
128 | #endif /* ALITPCPRF2D_H */ | |
129 |