1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
20 #include "AliRICHSegmentationV1.h"
23 //--------------------------------------------------------
24 ClassImp(AliRICHSegmentationV1)
26 //________________________________________________________________________________
27 AliRICHSegmentationV1::AliRICHSegmentationV1()
30 // Default constructor for AliRICHSegmantionV1 (with dead zones)
39 //________________________________________________________________________________
40 AliRICHSegmentationV1::~AliRICHSegmentationV1()
47 // calculate sector from x-y coordinates
49 Int_t AliRICHSegmentationV1::Sector(Float_t x, Float_t y)
52 // Calculate in which sector is the hit
94 //printf("x:%f, y:%f, sector:%d\n",x,y,fSector);
100 void AliRICHSegmentationV1::GetPadIxy(Float_t x, Float_t y, Int_t &ix, Int_t &iy)
102 // returns pad coordinates (ix,iy) for given real coordinates (x,y)
104 // Please check origin of pad numbering !!!
106 Int_t sector=Sector(x,y);
108 //printf("Sector: %d\n",sector);
113 //ix = (x>0)? Int_t(x/fDpx)+1 : Int_t(x/fDpx);
114 //iy = (y>0)? Int_t(y/fDpy)+1 : Int_t(y/fDpy);
115 ix = Int_t (x/fDpx+1.3);
116 iy = Int_t (y/fDpy-2.6);
120 ix = Int_t (x/fDpx-1.3);
121 iy = Int_t (y/fDpy-2.6);
125 ix = Int_t (x/fDpx+1.3);
130 ix = Int_t (x/fDpx-1.3);
135 ix = Int_t (x/fDpx+1.3);
136 iy = Int_t (y/fDpy+2.6);
140 ix = Int_t (x/fDpx-1.3);
141 iy = Int_t (y/fDpy+2.6);
144 //ix = Int_t (x/fDpx);
145 //iy = Int_t (y/fDpy);
147 //ix = (x>0)? Int_t(x/fDpx)+1 : Int_t(x/fDpx);
148 //iy = (y>0)? Int_t(y/fDpy)+1 : Int_t(y/fDpy);
156 if (iy > fNpy) iy= fNpy;
157 if (iy < -fNpy) iy=-fNpy;
158 if (ix > fNpx) ix= fNpx;
159 if (ix < -fNpx) ix=-fNpx;
162 void AliRICHSegmentationV1::
163 GetPadCxy(Int_t ix, Int_t iy, Float_t &x, Float_t &y)
165 // returns real coordinates (x,y) for given pad coordinates (ix,iy)
168 //Int_t sector=Sector(ix*.8,iy*.84);
212 //x = (ix>0) ? Float_t(ix*fDpx)-fDpx/2. : Float_t(ix*fDpx)-fDpx/2.;
213 //y = (iy>0) ? Float_t(iy*fDpy)-fDpy/2. : Float_t(iy*fDpy)-fDpy/2.;
214 x = Float_t(ix*fDpx)-fDpx/2.-1.3;
215 y = Float_t(iy*fDpy)-fDpy/2.+2.6;
219 x = Float_t(ix*fDpx)-fDpx/2.+1.3;
220 y = Float_t(iy*fDpy)-fDpy/2.+2.6;
224 x = Float_t(ix*fDpx)-fDpx/2.-1.3;
225 y = Float_t(iy*fDpy)-fDpy/2.;
229 x = Float_t(ix*fDpx)-fDpx/2.+1.3;
230 y = Float_t(iy*fDpy)-fDpy/2.;
234 x = Float_t(ix*fDpx)-fDpx/2.-1.3;
235 y = Float_t(iy*fDpy)-fDpy/2.-2.6;
239 x = Float_t(ix*fDpx)-fDpx/2.+1.3;
240 y = Float_t(iy*fDpy)-fDpy/2.-2.6;
244 //printf("fSector:%d x:%f y:%f\n",fSector,x,y);
248 void AliRICHSegmentationV1::
249 IntegrationLimits(Float_t& x1,Float_t& x2,Float_t& y1, Float_t& y2)
252 // Calculates integration limits
260 //Int_t sector=Sector(fx,fy);
262 //printf("Sector:%d\n",sector);