]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/TPCbase/AliTPCPRF2D.h
doxy: TPC/TPCbase converted
[u/mrichter/AliRoot.git] / TPC / TPCbase / AliTPCPRF2D.h
CommitLineData
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
7d855b04 6/// \class AliTPCPRF2D
7/// \brief Manager class for AliTPCPRF2D
8///
9/// This is to generate the 2-dimensional pad-response function
10
8c555625 11#include "TObject.h"
c3c63118 12
8c555625 13class TF2;
cc80f89e 14class TArrayF;
6e7b5431 15class TH1F;
16class AliH2F;
17class TPaveText;
8c555625 18
19class AliTPCPRF2D : public TObject {
7d855b04 20public :
8c555625 21 AliTPCPRF2D();
7d855b04 22 virtual ~AliTPCPRF2D();
6e7b5431 23 virtual void Update(); //recalculate tables for charge calculation
7d855b04 24 Float_t GetGRF(Float_t xin, Float_t yin);
8c555625 25 //return generic response function in xin
6e7b5431 26 virtual TF2 * GetGRF(){return fGRF;}
7d855b04 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
7d855b04 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
7d855b04 38 TH1F * GenerDrawXHisto(Float_t x1, Float_t x2,Float_t y);
6e7b5431 39 AliH2F * GenerDrawHisto(Float_t x1, Float_t x2, Float_t y1, Float_t y2, Int_t Nx=20, Int_t Ny=20);
7d855b04 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
6e7b5431 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);
7d855b04 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);
7d855b04 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);
7d855b04 57 //adjust PRF with GAUSIAN as generic GRF
8c555625 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);
7d855b04 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;}
7d855b04 69
70
8c555625 71protected:
7d855b04 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
7d855b04 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
6e7b5431 83 void DrawComment(TPaveText * comment); //draw comments to picture
cc80f89e 84 //chevron parameters
7d855b04 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
8c555625 115 //calculated during update
116
7d855b04 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
6e7b5431 121 //
7d855b04 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
73042f01 125
7d855b04 126private:
176aff27 127 AliTPCPRF2D(const AliTPCPRF2D &prf);
4c57c771 128 AliTPCPRF2D &operator = (const AliTPCPRF2D &/*prf*/) {return *this;}
7d855b04 129
130 /// \cond CLASSIMP
131 ClassDef(AliTPCPRF2D,1)
132 /// \endcond
133};
8c555625 134
135#endif /* ALITPCPRF2D_H */