]> git.uio.no Git - u/mrichter/AliRoot.git/blame - RICH/AliRICHSegResV0.h
Bari's pattern recognition algorithm
[u/mrichter/AliRoot.git] / RICH / AliRICHSegResV0.h
CommitLineData
ddae0931 1#ifndef RICHSegResV0_H
2#define RICHSegResV0_H
0279872e 3
4
3da30618 5/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
6 * See cxx source for full Copyright notice */
7
8/* $Id$ */
ddae0931 9
0279872e 10
ddae0931 11#include "AliRICH.h"
12#include "AliRICHv0.h"
0279872e 13#include "AliRICHSegRes.h"
ddae0931 14
0279872e 15class AliRICHSegmentationV0 :
16public AliRICHSegmentation {
ddae0931 17 public:
0279872e 18 AliRICHSegmentationV0(){}
19 virtual ~AliRICHSegmentationV0(){}
ddae0931 20 //
21 // Set Chamber Segmentation Parameters
0279872e 22 //
23 // Pad size Dx*Dy
24 virtual void SetPadSize(Float_t p1, Float_t p2);
25 // Anod Pitch
ddae0931 26 virtual void SetDAnod(Float_t D) {fWireD = D;};
0279872e 27
ddae0931 28 //
0279872e 29 // Transform from pad (wire) to real coordinates and vice versa
30 //
31 // Anod wire coordinate closest to xhit
ddae0931 32 virtual Float_t GetAnod(Float_t xhit);
0279872e 33 // Transform from pad to real coordinates
ddae0931 34 virtual void GetPadIxy(Float_t x ,Float_t y ,Int_t &ix,Int_t &iy);
0279872e 35 // Transform from real to pad coordinates
ddae0931 36 virtual void GetPadCxy(Int_t ix,Int_t iy,Float_t &x ,Float_t &y );
37 //
38 // Initialisation
0279872e 39 virtual void Init(AliRICHChamber*);
ddae0931 40 //
41 // Get member data
0279872e 42 //
43 // Pad size in x
ddae0931 44 virtual Float_t Dpx(){return fDpx;}
0279872e 45 //
46 // Pad size in y
ddae0931 47 virtual Float_t Dpy(){return fDpy;}
0279872e 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
ddae0931 53 virtual Int_t Npx(){return fNpx;}
0279872e 54 // Max number of Pads in y
ddae0931 55 virtual Int_t Npy(){return fNpy;}
0279872e 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);
ddae0931 62 //
63 // Iterate over pads
0279872e 64 // Initialiser
ddae0931 65 virtual void FirstPad(Float_t xhit, Float_t yhit, Float_t dx, Float_t dy);
0279872e 66 // Stepper
ddae0931 67 virtual void NextPad();
0279872e 68 // Condition
ddae0931 69 virtual Int_t MorePads();
0279872e 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;}
ddae0931 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]);
ddae0931 81 //
82 // Current Pad during Integration
0279872e 83 // x-coordinate
ddae0931 84 virtual Int_t Ix(){return fix;}
0279872e 85 // y-coordinate
86 virtual Int_t Iy(){return fiy;}
87 // current sector
ddae0931 88 virtual Int_t ISector(){return 1;}
0279872e 89 // calculate sector from x-y coordinates
90 virtual Int_t Sector(Float_t x, Float_t y){return 1;}
ddae0931 91 //
92 // Signal Generation Condition during Stepping
93 virtual Int_t SigGenCond(Float_t x, Float_t y, Float_t z);
0279872e 94 // Initialise signal gneration at coord (x,y,z)
ddae0931 95 virtual void SigGenInit(Float_t x, Float_t y, Float_t z);
0279872e 96 // Current integration limits
ddae0931 97 virtual void IntegrationLimits
98 (Float_t& x1, Float_t& x2, Float_t& y1, Float_t& y2);
0279872e 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)
ddae0931 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 //
0279872e 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
ddae0931 122
0279872e 123
124
ddae0931 125 // Chamber region consideres during disintegration (lower left and upper right corner)
126 //
0279872e 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
ddae0931 131 //
132 // Current pad during integration (cursor for disintegration)
0279872e 133 Int_t fix; // pad coord. x
134 Int_t fiy; // pad coord. y
135 Float_t fx; // x
136 Float_t fy; // y
ddae0931 137 //
138 // Current pad and wire during tracking (cursor at hit centre)
0279872e 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
ddae0931 148};
149
0279872e 150class AliRICHResponseV0 : //Mathieson response
151public AliRICHResponse {
ddae0931 152 public:
0279872e 153 AliRICHResponseV0(){}
154 virtual ~AliRICHResponseV0(){}
ddae0931 155 //
156 // Configuration methods
157 //
0279872e 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;}
ddae0931 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;};
ddae0931 188 //
189 // Chamber response methods
190 // Pulse height from scored quantity (eloss)
0279872e 191 virtual Float_t IntPH(Float_t eloss);
192 virtual Float_t IntPH();
ddae0931 193 // Charge disintegration
0279872e 194 virtual Float_t IntXY(AliRICHSegmentation * segmentation);
195 virtual Int_t FeedBackPhotons(Float_t *source, Float_t qtot);
ddae0931 196 protected:
0279872e 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
ddae0931 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
0279872e 211 ClassDef(AliRICHResponseV0,1)
212};
213
214class AliRICHGeometryV0 : //Chamber geometry
215public 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;}
5d6f4927 237 // Freon Thickness
238 virtual void SetRadiatorToPads(Float_t distance) {fRadiatorToPads=distance;}
0279872e 239
240 // Radiator thickness
241 virtual Float_t GetGapThickness(){return fGapThickness;}
242 // Proximity Gap thickness
243 virtual Float_t GetProximityGapThickness(){return fProximityGapThickness;}
244 // Quartz Length
245 virtual Float_t GetQuartzLength(){return fQuartzLength;}
246 // Quartz Width
247 virtual Float_t GetQuartzWidth(){return fQuartzWidth;}
248 // Quartz Thickness
249 virtual Float_t GetQuartzThickness(){return fQuartzThickness;}
250 // Freon Length
251 virtual Float_t GetOuterFreonLength(){return fOuterFreonLength;}
252 // Freon Width
253 virtual Float_t GetOuterFreonWidth(){return fOuterFreonWidth;}
254 // Freon Length
255 virtual Float_t GetInnerFreonLength(){return fInnerFreonLength;}
256 // Freon Width
257 virtual Float_t GetInnerFreonWidth(){return fInnerFreonWidth;}
258 // Freon Thickness
259 virtual Float_t GetFreonThickness(){return fFreonThickness;}
5d6f4927 260 // Get distance between radiator and pads
261 virtual Float_t GetRadiatorToPads(){return fRadiatorToPads;}
262
0279872e 263
264 //Self-explainable:
265
266 Float_t fGapThickness;
267 Float_t fProximityGapThickness;
268 Float_t fQuartzLength;
269 Float_t fQuartzWidth;
270 Float_t fQuartzThickness;
271 Float_t fOuterFreonLength;
272 Float_t fOuterFreonWidth;
273 Float_t fInnerFreonLength;
274 Float_t fInnerFreonWidth;
275 Float_t fFreonThickness;
5d6f4927 276
277 Float_t fRadiatorToPads; // Distance from radiator to pads
0279872e 278
279 ClassDef(AliRICHGeometryV0,1)
ddae0931 280};
281
282#endif