]> git.uio.no Git - u/mrichter/AliRoot.git/blob - RICH/AliRICHSegResV0.h
obsolete
[u/mrichter/AliRoot.git] / RICH / AliRICHSegResV0.h
1 #ifndef RICHSegResV0_H
2 #define RICHSegResV0_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
11 #include "AliRICH.h"
12 #include "AliRICHv0.h"
13 #include "AliRICHSegRes.h"
14
15 class AliRICHSegmentationV0 :
16 public AliRICHSegmentation {
17  public:
18     AliRICHSegmentationV0(){}
19     virtual ~AliRICHSegmentationV0(){}
20     //    
21     // Set Chamber Segmentation Parameters
22     //
23     // Pad size Dx*Dy 
24     virtual  void    SetPadSize(Float_t p1, Float_t p2);
25     // Anod Pitch
26     virtual  void    SetDAnod(Float_t D) {fWireD = D;};
27         
28     //
29     // Transform from pad (wire) to real coordinates and vice versa
30     //
31     // Anod wire coordinate closest to xhit
32     virtual Float_t GetAnod(Float_t xhit);
33     // Transform from pad to real coordinates
34     virtual void    GetPadIxy(Float_t x ,Float_t y ,Int_t   &ix,Int_t   &iy);
35     // Transform from real to pad coordinates
36     virtual void    GetPadCxy(Int_t   ix,Int_t   iy,Float_t &x ,Float_t &y );
37     //
38     // Initialisation
39     virtual void Init(AliRICHChamber*);
40     //
41     // Get member data
42     //
43     // Pad size in x
44     virtual Float_t Dpx(){return fDpx;}
45     //
46     // Pad size in y
47     virtual Float_t Dpy(){return fDpy;}
48     // Pad size in x by Sector
49     virtual Float_t Dpx(Int_t) {return fDpx;}
50     // Pad size in y by Sector
51     virtual Float_t Dpy(Int_t) {return fDpy;}
52     // Max number of Pads in x
53     virtual Int_t   Npx(){return fNpx;}
54     // Max number of Pads in y
55     virtual Int_t   Npy(){return fNpy;}
56     
57
58     // set pad position
59     virtual void     SetPad(Int_t, Int_t);
60     // set hit position
61     virtual void     SetHit(Float_t, Float_t);
62     //
63     // Iterate over pads
64     // Initialiser
65     virtual void  FirstPad(Float_t xhit, Float_t yhit, Float_t dx, Float_t dy);
66     // Stepper
67     virtual void  NextPad();
68     // Condition
69     virtual Int_t MorePads();
70     //
71     // Distance between 1 pad and a position
72     virtual Float_t Distance2AndOffset(Int_t iX, Int_t iY, Float_t X, Float_t Y, Int_t *
73                                        dummy);
74     // Number of pads read in parallel and offset to add to x 
75     // (specific to LYON, but mandatory for display)
76     virtual void GetNParallelAndOffset(Int_t iX, Int_t iY,
77                                        Int_t *Nparallel, Int_t *Offset) {*Nparallel=1;*Offset=0;}
78     // Get next neighbours 
79     virtual void Neighbours
80         (Int_t iX, Int_t iY, Int_t* Nlist, Int_t Xlist[10], Int_t Ylist[10]);
81     //
82     // Current Pad during Integration
83     // x-coordinate
84     virtual Int_t  Ix(){return fix;}
85     // y-coordinate
86     virtual Int_t  Iy(){return fiy;}
87     // current sector
88     virtual Int_t  ISector(){return 1;}
89     // calculate sector from x-y coordinates
90     virtual Int_t  Sector(Float_t x, Float_t y){return 1;}
91     //
92     // Signal Generation Condition during Stepping
93     virtual Int_t SigGenCond(Float_t x, Float_t y, Float_t z);
94     // Initialise signal gneration at coord (x,y,z)
95     virtual void  SigGenInit(Float_t x, Float_t y, Float_t z);
96     // Current integration limits
97     virtual void IntegrationLimits
98         (Float_t& x1, Float_t& x2, Float_t& y1, Float_t& y2);
99     // Test points for auto calibration
100     virtual void GiveTestPoints(Int_t &n, Float_t *x, Float_t *y);
101     // Debugging utilities
102     virtual void Draw();
103     // Function for systematic corrections
104     virtual void SetCorrFunc(Int_t dum, TF1* func) {fCorr=func;}
105     
106     virtual TF1* CorrFunc(Int_t) {return fCorr;} 
107     ClassDef(AliRICHSegmentationV0,1)
108         protected:
109     //
110     // Implementation of the segmentation data
111     // Version 0 models rectangular pads with the same dimensions all
112     // over the cathode plane
113     //
114     //  geometry
115     //
116     Float_t    fDpx;             // x pad width per sector  
117     Float_t    fDpy;             // y pad base width
118     Int_t      fNpx;             // Number of pads in x
119     Int_t      fNpy;             // Number of pads in y
120     Int_t      fSector;          // Current padplane
121     Float_t    fWireD;           // wire pitch
122     
123
124         
125     // Chamber region consideres during disintegration (lower left and upper right corner)
126     //
127     Int_t fixmin; // lower left  x
128     Int_t fixmax; // lower left  y
129     Int_t fiymin; // upper right x
130     Int_t fiymax; // upper right y 
131     //
132     // Current pad during integration (cursor for disintegration)
133     Int_t fix;  // pad coord. x 
134     Int_t fiy;  // pad coord. y 
135     Float_t fx; // x
136     Float_t fy; // y
137     //
138     // Current pad and wire during tracking (cursor at hit centre)
139     Float_t fxhit;
140     Float_t fyhit;
141     // Reference point to define signal generation condition
142     Int_t fixt;     // pad coord. x
143     Int_t fiyt;     // pad coord. y
144     Int_t fiwt;     // wire number
145     Float_t fxt;    // x
146     Float_t fyt;    // y
147     TF1*    fCorr;  // correction function
148 };
149
150 class AliRICHResponseV0 : //Mathieson response
151 public AliRICHResponse {
152  public:
153     AliRICHResponseV0(){}
154     virtual ~AliRICHResponseV0(){}
155     //
156     // Configuration methods
157     // 
158     // Number of sigmas over which cluster didintegration is performed
159     virtual void    SetSigmaIntegration(Float_t p1) {fSigmaIntegration=p1;}
160     virtual Float_t SigmaIntegration() {return fSigmaIntegration;}    
161     // charge slope in ADC/e
162     virtual void    SetChargeSlope(Float_t p1) {fChargeSlope=p1;}
163     virtual Float_t ChargeSlope()      {return fChargeSlope;}
164     // sigma of the charge spread function
165     virtual void    SetChargeSpread(Float_t p1, Float_t p2)
166         {fChargeSpreadX=p1; fChargeSpreadY=p2;}
167     virtual Float_t ChargeSpreadX()    {return fChargeSpreadX;}    
168     virtual Float_t ChargeSpreadY()    {return fChargeSpreadY;}        
169     // Adc-count saturation value
170     virtual void    SetMaxAdc(Float_t p1) {fMaxAdc=p1;}
171     virtual Float_t MaxAdc()           {return fMaxAdc;}
172     // anode cathode Pitch
173     virtual Float_t Pitch()            {return fPitch;}
174     virtual void    SetPitch(Float_t p1) {fPitch=p1;};
175     // alpha feedback
176     virtual void    SetAlphaFeedback(Float_t alpha) {fAlphaFeedback=alpha;}
177     virtual Float_t AlphaFeedback()  {return fAlphaFeedback;}
178     // ionisation enrgy
179     virtual void    SetEIonisation(Float_t e) {fEIonisation=e;}
180     virtual Float_t EIonisation() {return fEIonisation;}                            
181     // Mathieson parameters
182     virtual void   SetSqrtKx3(Float_t p1) {fSqrtKx3=p1;};
183     virtual void   SetKx2(Float_t p1) {fKx2=p1;};
184     virtual void   SetKx4(Float_t p1) {fKx4=p1;};
185     virtual void   SetSqrtKy3(Float_t p1) {fSqrtKy3=p1;};
186     virtual void   SetKy2(Float_t p1) {fKy2=p1;};
187     virtual void   SetKy4(Float_t p1) {fKy4=p1;};
188     //  
189     // Chamber response methods
190     // Pulse height from scored quantity (eloss)
191     virtual Float_t IntPH(Float_t eloss);
192     virtual Float_t IntPH();
193     // Charge disintegration
194     virtual Float_t IntXY(AliRICHSegmentation * segmentation);
195     virtual Int_t   FeedBackPhotons(Float_t *source, Float_t qtot);
196         protected:
197     Float_t fChargeSlope;              // Slope of the charge distribution
198     Float_t fChargeSpreadX;            // Width of the charge distribution in x
199     Float_t fChargeSpreadY;            // Width of the charge distribution in y
200     Float_t fSigmaIntegration;         // Number of sigma's used for charge distribution
201     Float_t fAlphaFeedback;            // Feedback photons coefficient
202     Float_t fEIonisation;              // Mean ionisation energy
203     Float_t fMaxAdc;                   // Maximum ADC channel
204     Float_t fSqrtKx3;         // Mathieson parameters for x
205     Float_t fKx2;
206     Float_t fKx4;
207     Float_t fSqrtKy3;         // Mathieson parameters for y
208     Float_t fKy2;
209     Float_t fKy4;
210     Float_t fPitch;           //anode-cathode pitch
211     ClassDef(AliRICHResponseV0,1)
212 };
213
214 class AliRICHGeometryV0 : //Chamber geometry
215 public AliRICHGeometry {
216  public:
217     // Radiator Thickness
218     virtual void   SetGapThickness(Float_t thickness)  {fGapThickness=thickness;} 
219     // Proximity Gap Thickness
220     virtual void   SetProximityGapThickness(Float_t thickness)       {fProximityGapThickness=thickness;}
221     // Quartz Length
222     virtual void   SetQuartzLength(Float_t length)          {fQuartzLength=length;}
223     // Quartz Width
224     virtual void   SetQuartzWidth(Float_t width)            {fQuartzWidth=width;}
225     // Quartz Thickness
226     virtual void   SetQuartzThickness(Float_t thickness)    {fQuartzThickness=thickness;}
227     // Freon Length
228     virtual void   SetOuterFreonLength(Float_t length)          {fOuterFreonLength=length;}
229     // Freon Width
230     virtual void   SetOuterFreonWidth(Float_t width)            {fOuterFreonWidth=width;}
231     // Freon Length
232     virtual void   SetInnerFreonLength(Float_t length)          {fInnerFreonLength=length;}
233     // Freon Width
234     virtual void   SetInnerFreonWidth(Float_t width)            {fInnerFreonWidth=width;}
235     // Freon Thickness
236     virtual void   SetFreonThickness(Float_t thickness)    {fFreonThickness=thickness;}
237
238     // Radiator thickness
239     virtual Float_t  GetGapThickness(){return fGapThickness;}
240     // Proximity Gap thickness
241     virtual Float_t  GetProximityGapThickness(){return fProximityGapThickness;}
242     // Quartz Length
243     virtual Float_t  GetQuartzLength(){return fQuartzLength;}
244     // Quartz Width
245     virtual Float_t  GetQuartzWidth(){return fQuartzWidth;}
246     // Quartz Thickness
247     virtual Float_t  GetQuartzThickness(){return fQuartzThickness;}
248     // Freon Length
249     virtual Float_t  GetOuterFreonLength(){return fOuterFreonLength;}
250     // Freon Width
251     virtual Float_t  GetOuterFreonWidth(){return fOuterFreonWidth;}
252     // Freon Length
253     virtual Float_t  GetInnerFreonLength(){return fInnerFreonLength;}
254     // Freon Width
255     virtual Float_t  GetInnerFreonWidth(){return fInnerFreonWidth;}
256     // Freon Thickness
257     virtual Float_t  GetFreonThickness(){return fFreonThickness;}
258
259     //Self-explainable:
260
261     Float_t fGapThickness;
262     Float_t fProximityGapThickness;
263     Float_t fQuartzLength;
264     Float_t fQuartzWidth;
265     Float_t fQuartzThickness;
266     Float_t fOuterFreonLength;
267     Float_t fOuterFreonWidth;
268     Float_t fInnerFreonLength;
269     Float_t fInnerFreonWidth;
270     Float_t fFreonThickness;
271
272     ClassDef(AliRICHGeometryV0,1)
273 };
274
275 #endif