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