Line data Source code
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 : /// \class AliTPCPRF2D
7 : /// \brief Manager class for AliTPCPRF2D
8 : ///
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 12 : 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 0 : virtual void SetChargeAngle(Float_t angle){fChargeAngle = angle;} //set angle of pad and charge distribution
52 : //axes
53 0 : virtual void SetCurrentAngle(Float_t /*angle*/){return;}
54 0 : virtual void SetPadAngle(Float_t angle){fPadAngle = angle;} //set pad angle
55 6 : 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 *const GRF,Float_t kNorm,
65 : Float_t sigmaX=0, Float_t sigmaY=0);
66 0 : void SetNdiv(Int_t Ndiv){fNdiv=Ndiv;}
67 0 : virtual Float_t GetSigmaX() const {return fSigmaX;}
68 0 : 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 : /// pointer to array of arrays
81 : Float_t * fChargeArray; //[fNChargeArray]
82 :
83 : void DrawComment(TPaveText * comment); //draw comments to picture
84 : //chevron parameters
85 : Float_t fHeightFull; ///< height of the full pad
86 : Float_t fHeightS; ///< height of the one step
87 : Float_t fShiftY; ///< shift of the step
88 : Float_t fWidth; ///< width of the pad
89 : Float_t fK; ///< k factor of the chewron
90 :
91 : Double_t funParam[5];///< parameters of used charge function
92 : Int_t fNPRF; ///< number of interpolations point
93 : Int_t fNdiv; ///< number of division to calculate integral
94 : Float_t fDStep; ///< element step for point
95 : Float_t fKNorm; ///< normalisation factor of the charge integral
96 : Float_t fInteg; ///< integral of GRF on +- infinity
97 : TF2 * fGRF; ///< charge distribution function
98 :
99 : Float_t fK3X; ///< KX parameter (only for Gati parametrization)
100 : Float_t fK3Y; ///< KY parameter (only for Gati parametrisation)
101 : Float_t fPadDistance; ///< pad anode distnce (only for Gati parametrisation)
102 :
103 : Float_t fOrigSigmaX; ///< sigma of original distribution;
104 : Float_t fOrigSigmaY; ///< sigma of original distribution;
105 :
106 : Float_t fChargeAngle;///< 'angle' of charge distribution refernce system to pad reference system
107 : Float_t fPadAngle; ///< 'angle' of the pad assymetry
108 :
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
113 : Int_t fInterX; ///< interpolation in X
114 : Int_t fInterY; ///< interpolation in Y
115 : //calculated during update
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
121 : //
122 : static const Double_t fgkDegtoRad; ///< numeric constant
123 : static const Double_t fgkSQRT12; ///< numeric constant
124 : static const Int_t fgkNPRF; ///< default number of division
125 :
126 : private:
127 : AliTPCPRF2D(const AliTPCPRF2D &prf);
128 : AliTPCPRF2D &operator = (const AliTPCPRF2D &/*prf*/) {return *this;}
129 :
130 : /// \cond CLASSIMP
131 44 : ClassDef(AliTPCPRF2D,1)
132 : /// \endcond
133 : };
134 :
135 : #endif /* ALITPCPRF2D_H */
|