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