]>
Commit | Line | Data |
---|---|---|
1 | #ifndef ALITPCPRF2D_H | |
2 | #define ALITPCPRF2D_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ////////////////////////////////////////////////////////////////// | |
8 | // Manager class for AliTPCPRF2D // | |
9 | // This is to generate the 2-dimensional pad-response function // | |
10 | ////////////////////////////////////////////////////////////////// | |
11 | #include "TObject.h" | |
12 | ||
13 | class TF2; | |
14 | class TArrayF; | |
15 | class TH1F; | |
16 | class AliH2F; | |
17 | class TPaveText; | |
18 | ||
19 | class AliTPCPRF2D : public TObject { | |
20 | public : | |
21 | AliTPCPRF2D(); | |
22 | virtual ~AliTPCPRF2D(); | |
23 | virtual void Update(); //recalculate tables for charge calculation | |
24 | Float_t GetGRF(Float_t xin, Float_t yin); | |
25 | //return generic response function in xin | |
26 | virtual TF2 * GetGRF(){return fGRF;} | |
27 | virtual Float_t GetPRF(Float_t xin, Float_t yin); | |
28 | //return PRF in point xin,yin | |
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); | |
32 | //draw two dimensional PRF | |
33 | ||
34 | virtual void DrawDist(Float_t x1, Float_t x2, Float_t y1, Float_t y2, Int_t Nx=20, Int_t Ny=20, | |
35 | Float_t thr=0); | |
36 | //draw distortion of COG method | |
37 | //we suppose threshold equal to thr | |
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); | |
44 | //set base chevron parameters | |
45 | virtual void SetChevron(Float_t hstep, Float_t shifty, Float_t fac); | |
46 | //set chevron parameters | |
47 | virtual void SetChParam(Float_t width, Float_t height, | |
48 | Float_t hstep, Float_t shifty, Float_t fac); | |
49 | //set all geometrical parameters | |
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 | |
52 | //axes | |
53 | virtual void SetCurrentAngle(Float_t /*angle*/){return;} | |
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); | |
57 | //adjust PRF with GAUSIAN as generic GRF | |
58 | //if direct = kTRUE then it does't convolute distribution | |
59 | virtual void SetCosh(Float_t sigmaX,Float_t sigmaY , Float_t kNorm=1); | |
60 | //adjust PRF with 1/Cosh as generic GRF | |
61 | virtual void SetGati(Float_t K3X, Float_t K3Y, | |
62 | Float_t padDistance, | |
63 | Float_t kNorm=1); | |
64 | void SetParam(TF2 * GRF,Float_t kNorm, | |
65 | Float_t sigmaX=0, Float_t sigmaY=0); | |
66 | void SetNdiv(Int_t Ndiv){fNdiv=Ndiv;} | |
67 | virtual Float_t GetSigmaX() const {return fSigmaX;} | |
68 | virtual Float_t GetSigmaY() const {return fSigmaY;} | |
69 | ||
70 | ||
71 | protected: | |
72 | void Update1(); | |
73 | virtual void UpdateSigma(); //recalculate sigma of PRF | |
74 | Float_t GetPRFActiv(Float_t xin); //return PRF in point xin and actual y | |
75 | Float_t * fcharge; //!field with PRF | |
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 | |
79 | Int_t fNChargeArray; //number of charge interpolation points | |
80 | Float_t * fChargeArray; //[fNChargeArray]pointer to array of arrays | |
81 | ||
82 | void DrawComment(TPaveText * comment); //draw comments to picture | |
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 | ||
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 | |
94 | Float_t fKNorm; //normalisation factor of the charge integral | |
95 | Float_t fInteg; //integral of GRF on +- infinity | |
96 | TF2 * fGRF; //charge distribution function | |
97 | ||
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; | |
104 | ||
105 | Float_t fChargeAngle;//'angle' of charge distribution refernce system to pad reference system | |
106 | Float_t fPadAngle; //'angle' of the pad assymetry | |
107 | ||
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 | |
112 | Int_t fInterX; //interpolation in X | |
113 | Int_t fInterY; //interpolation in Y | |
114 | //calculated during update | |
115 | ||
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 | |
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 | |
124 | ||
125 | private: | |
126 | AliTPCPRF2D(const AliTPCPRF2D &prf); | |
127 | AliTPCPRF2D &operator = (const AliTPCPRF2D &/*prf*/) {return *this;} | |
128 | ||
129 | ClassDef(AliTPCPRF2D,1) | |
130 | }; | |
131 | ||
132 | #endif /* ALITPCPRF2D_H */ |