]> git.uio.no Git - u/mrichter/AliRoot.git/blob - RICH/AliRICHSegmentationV0.h
Fixed coding conventions.
[u/mrichter/AliRoot.git] / RICH / AliRICHSegmentationV0.h
1 #ifndef ALIRICHSEGMENTATIONV0_H
2 #define ALIRICHSEGMENTATIONV0_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 /* $Id$ */
9
10 #include "AliRICHSegmentation.h"
11
12 class AliRICHSegmentationV0 :
13 public AliRICHSegmentation {
14  public:
15     AliRICHSegmentationV0(){}
16     virtual ~AliRICHSegmentationV0(){}
17     //    
18     // Set Chamber Segmentation Parameters
19     //
20     // Pad size Dx*Dy 
21     virtual  void    SetPadSize(Float_t p1, Float_t p2);
22     // Anod Pitch
23     virtual  void    SetDAnod(Float_t D) {fWireD = D;};
24         
25     //
26     // Transform from pad (wire) to real coordinates and vice versa
27     //
28     // Anod wire coordinate closest to xhit
29     virtual Float_t GetAnod(Float_t xhit);
30     // Transform from pad to real coordinates
31     virtual void    GetPadIxy(Float_t x ,Float_t y ,Int_t   &ix,Int_t   &iy);
32     // Transform from real to pad coordinates
33     virtual void    GetPadCxy(Int_t   ix,Int_t   iy,Float_t &x ,Float_t &y );
34     //
35     // Initialisation
36     virtual void Init(AliRICHChamber* chamber);
37     //
38     // Get member data
39     //
40     // Pad size in x
41     virtual Float_t Dpx(){return fDpx;}
42     //
43     // Pad size in y
44     virtual Float_t Dpy(){return fDpy;}
45     // Pad size in x by Sector
46     virtual Float_t Dpx(Int_t) {return fDpx;}
47     // Pad size in y by Sector
48     virtual Float_t Dpy(Int_t) {return fDpy;}
49     // Max number of Pads in x
50     virtual Int_t   Npx(){return fNpx;}
51     // Max number of Pads in y
52     virtual Int_t   Npy(){return fNpy;}
53     
54
55     // set pad position
56     virtual void     SetPad(Int_t ix, Int_t iy);
57     // set hit position
58     virtual void     SetHit(Float_t xhit , Float_t yhit);
59     //
60     // Iterate over pads
61     // Initialiser
62     virtual void  FirstPad(Float_t xhit, Float_t yhit, Float_t dx, Float_t dy);
63     // Stepper
64     virtual void  NextPad();
65     // Condition
66     virtual Int_t MorePads();
67     //
68     // Distance between 1 pad and a position
69     virtual Float_t Distance2AndOffset(Int_t iX, Int_t iY, Float_t X, Float_t Y, Int_t *
70                                        dummy);
71     // Number of pads read in parallel and offset to add to x 
72     // (specific to LYON, but mandatory for display)
73     virtual void GetNParallelAndOffset(Int_t iX, Int_t iY,
74                                        Int_t *Nparallel, Int_t *Offset) {*Nparallel=1;*Offset=0;}
75     // Get next neighbours 
76     virtual void Neighbours
77         (Int_t iX, Int_t iY, Int_t* Nlist, Int_t Xlist[10], Int_t Ylist[10]);
78     //
79     // Current Pad during Integration
80     // x-coordinate
81     virtual Int_t  Ix(){return fIx;}
82     // y-coordinate
83     virtual Int_t  Iy(){return fIy;}
84     // current sector
85     virtual Int_t  ISector(){return 1;}
86     // calculate sector from x-y coordinates
87     virtual Int_t  Sector(Float_t x, Float_t y){return 1;}
88     //
89     // Signal Generation Condition during Stepping
90     virtual Int_t SigGenCond(Float_t x, Float_t y, Float_t z);
91     // Initialise signal gneration at coord (x,y,z)
92     virtual void  SigGenInit(Float_t x, Float_t y, Float_t z);
93     // Current integration limits
94     virtual void IntegrationLimits
95         (Float_t& x1, Float_t& x2, Float_t& y1, Float_t& y2);
96     // Test points for auto calibration
97     virtual void GiveTestPoints(Int_t &n, Float_t *x, Float_t *y);
98     // Debugging utilities
99     virtual void Draw();
100     // Function for systematic corrections
101     virtual void SetCorrFunc(Int_t dum, TF1* func) {fCorr=func;}
102     
103     virtual TF1* CorrFunc(Int_t) {return fCorr;} 
104     ClassDef(AliRICHSegmentationV0,1)
105         protected:
106     //
107     // Implementation of the segmentation data
108     // Version 0 models rectangular pads with the same dimensions all
109     // over the cathode plane
110     //
111     //  geometry
112     //
113     Float_t    fDpx;             // x pad width per sector  
114     Float_t    fDpy;             // y pad base width
115     Int_t      fNpx;             // Number of pads in x
116     Int_t      fNpy;             // Number of pads in y
117     Int_t      fSector;          // Current padplane
118     Float_t    fWireD;           // wire pitch
119     
120
121         
122     // Chamber region consideres during disintegration (lower left and upper right corner)
123     //
124     Int_t fIxmin; // lower left  x
125     Int_t fIxmax; // lower left  y
126     Int_t fIymin; // upper right x
127     Int_t fIymax; // upper right y 
128     //
129     // Current pad during integration (cursor for disintegration)
130     Int_t fIx;  // pad coord. x 
131     Int_t fIy;  // pad coord. y 
132     Float_t fX; // x
133     Float_t fY; // y
134     //
135     // Current pad and wire during tracking (cursor at hit centre)
136     Float_t fXhit;   //x position
137     Float_t fYhit;   //y position
138     // Reference point to define signal generation condition
139     Int_t fIxt;     // pad coord. x
140     Int_t fIyt;     // pad coord. y
141     Int_t fIwt;     // wire number
142     Float_t fXt;    // x
143     Float_t fYt;    // y
144     TF1*    fCorr;  // correction function
145 };
146 #endif
147
148