]> git.uio.no Git - u/mrichter/AliRoot.git/blob - RICH/AliRICHSegmentation.h
idem
[u/mrichter/AliRoot.git] / RICH / AliRICHSegmentation.h
1 #ifndef AliRICHSegmentation_h
2 #define ALIRICHSegmentation_h
3
4
5 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
6  * See cxx source for full Copyright notice                               */
7
8
9 #include "TObject.h"
10 class TF1;
11
12 class AliRICHSegmentation : public TObject 
13 {
14 public:
15    AliRICHSegmentation();
16    virtual ~AliRICHSegmentation(){}
17 // pad size getter&setter   
18    void    SetPadSize(Float_t p1, Float_t p2) {fDpx=p1;fDpy=p2;Init();}
19    Float_t Dpx()                         const{return fDpx;}        // Get pad width in cm
20    Float_t Dpy()                         const{return fDpy;}        // Get pad heights in cm
21    
22    Int_t   Npx()                         const{return fNpx;}        // Get number of Pads in x direction
23    Int_t   Npy()                         const{return fNpy;}        // Get number of Pads in y direction
24    Float_t DeadZone()                    const{return fDeadZone;}   // Dead zone width in cm
25
26    void    SetDAnod(Float_t D) {fWireD = D; Init();}
27    Float_t GetAnod(Float_t xhit) const;
28         
29    Int_t  Ix()                          const{return fIx;}     // Current pad during integration: x-coordinate
30    Int_t  Iy()                          const{return fIy;}     // Current pad during integration: y-coordinate
31    Int_t  ISector()                     const{return fSector;} // Get current sector
32    
33    void  GetPadI(Float_t x, Float_t y , Int_t &ix, Int_t &iy);
34 //    void  GetPadI(Float_t x, Float_t y , Float_t z, Int_t &ix, Int_t &iy)  {GetPadI(x, y, ix, iy);}
35     // Transform from real to pad coordinates
36     void    GetPadC(Int_t ix, Int_t iy, Float_t &x, Float_t &y);
37 //    void    GetPadC(Int_t ix, Int_t iy, Float_t &x, Float_t &y, Float_t &z) {z=0; GetPadC(ix, iy, x , y);}
38     //
39    void Init();    // Recalculation after changing the paremeters
40     Float_t Dpx(Int_t) const {return fDpx;}
41     Float_t Dpy(Int_t) const {return fDpy;}
42
43     void SetCorrFunc(Int_t dum, TF1* func) {fCorr=func;}// Set function for systematic corrections
44     TF1*    CorrFunc(Int_t)          const {return fCorr;}// Set function for systematic corrections
45     
46     Float_t GetPadPlaneWidth()  const {return fPadPlane_Width;}
47     Float_t GetPadPlaneLength() const {return fPadPlane_Length;}
48     
49     void     SetPad(Int_t ix, Int_t iy);     // set pad position    
50     void     SetHit(Float_t xhit , Float_t yhit);// set hit position
51     
52     
53 //    void     SetHit(Float_t xhit, Float_t yhit, Float_t zhit){SetHit(xhit, yhit);}
54     //
55     // Iterate over pads
56     // Initialiser
57     void  FirstPad(Float_t xhit, Float_t yhit, Float_t dx, Float_t dy);
58     void  FirstPad(Float_t xhit, Float_t yhit, Float_t zhit, Float_t dx, Float_t dy)
59         {FirstPad(xhit, yhit, dx, dy);}
60     // Stepper
61     void  NextPad();
62     // Condition
63     Int_t MorePads();
64     //
65     // Distance between 1 pad and a position
66     Float_t Distance2AndOffset(Int_t iX, Int_t iY, Float_t X, Float_t Y, Int_t *dummy);
67     // Number of pads read in parallel and offset to add to x 
68     // (specific to LYON, but mandatory for display)
69     virtual void GetNParallelAndOffset(Int_t iX, Int_t iY,Int_t *Nparallel, Int_t *Offset) {*Nparallel=1;*Offset=0;}
70      
71     void Neighbours(Int_t iX, Int_t iY, Int_t* Nlist, Int_t Xlist[10], Int_t Ylist[10]);
72     
73     
74     Int_t  Sector(Float_t x,Float_t y);     // calculate sector from x-y coordinates
75
76     // Signal Generation Condition during Stepping
77     Int_t SigGenCond(Float_t x, Float_t y, Float_t z);
78     
79     void  SigGenInit(Float_t x, Float_t y, Float_t z);// Initialise signal gneration at coord (x,y,z)
80     void IntegrationLimits(Float_t& x1, Float_t& x2, Float_t& y1, Float_t& y2);             // Current integration limits
81     void GiveTestPoints(Int_t &n, Float_t *x, Float_t *y) const{n=1;x[0]=0.;y[0]=x[0];}     // Test points for auto calibration
82
83     
84      
85 protected:
86    Float_t    fDpx;             // x pad width per sector  
87    Float_t    fDpy;             // y pad base width
88    Int_t      fNpx;             // Number of pads in x
89    Int_t      fNpy;             // Number of pads in y
90    Int_t      fSector;          // Current padplane
91    Float_t    fWireD;           // wire pitch
92     
93    Float_t fDeadZone;               //width of deadzones beteween CsI padplanes
94    Float_t fPadPlane_Width;         //width of CsI padplanes
95    Float_t fPadPlane_Length;        //length of CsI padplanes
96
97         
98 // Chamber region consideres during disintegration (lower left and upper right corner)
99    Int_t fIxmin; // lower left  x
100    Int_t fIxmax; // lower left  y
101    Int_t fIymin; // upper right x
102    Int_t fIymax; // upper right y 
103     
104    Int_t fIx;  // Current x pad during integration (cursor for disintegration)
105    Int_t fIy;  // Current y pad during integration (cursor for disintegration)
106    Float_t fX; // x
107    Float_t fY; // y
108     //
109     // Current pad and wire during tracking (cursor at hit centre)
110    Float_t fXhit;   //x position
111    Float_t fYhit;   //y position
112     // Reference point to define signal generation condition
113    Int_t fIxt;     // pad coord. x
114    Int_t fIyt;     // pad coord. y
115    Int_t fIwt;     // wire number
116    Float_t fXt;    // x
117    Float_t fYt;    // y
118    TF1*    fCorr;  // correction function
119     
120    ClassDef(AliRICHSegmentation,1)
121 };
122 #endif //AliRICHSegmentation_h