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 /////////////////////////////////////////////////////
21 // Segmentation and Response classes version 02 //
22 /////////////////////////////////////////////////////
27 #include "AliMUONSegResV02.h"
32 //___________________________________________
33 ClassImp(AliMUONsegmentationV02)
35 void AliMUONsegmentationV02::SetPADSIZ(Float_t p1, Float_t p2)
41 Int_t AliMUONsegmentationV02::Npx()
42 {return AliMUONsegmentationV01::Npy();}
44 Int_t AliMUONsegmentationV02::Npy()
45 {return AliMUONsegmentationV01::Npx();}
48 Float_t AliMUONsegmentationV02::Dpx(Int_t)
51 Float_t AliMUONsegmentationV02::Dpy(Int_t isec)
54 Int_t AliMUONsegmentationV02::Sector(Int_t ix, Int_t iy)
55 {return AliMUONsegmentationV01::Sector(iy, ix);}
57 void AliMUONsegmentationV02::
58 GetPadIxy(Float_t x, Float_t y, Int_t &ix, Int_t &iy)
60 AliMUONsegmentationV01::GetPadIxy(y, x, iy, ix);
61 // printf("\n x,y,ix,iy %f %f %d %d", x,y,ix,iy);
64 void AliMUONsegmentationV02::
65 GetPadCxy(Int_t ix, Int_t iy, Float_t &x, Float_t &y)
67 AliMUONsegmentationV01::GetPadCxy(iy, ix, y, x);
68 // printf("\n ix,iy,x,y %d %d %f %f ", ix,iy,x,y);
70 void AliMUONsegmentationV02::SetPad(Int_t ix,Int_t iy)
72 GetPadCxy(ix,iy,fx,fy);
73 fSector=Sector(ix,iy);
78 void AliMUONsegmentationV02::NextPad()
81 // Step to next pad in integration region
86 if (fy < fymax && fy != 0) {
90 } else if (fix != fixmax) {
93 // get y-position of next row (yc), xc not used here
94 GetPadCxy(fix,fiy,xc,yc);
95 // get x-pad coordiante for 1 pad in row (fix)
96 GetPadIxy(xc,fymin,ixc,fiy);
98 printf("\n Error: Stepping outside integration region\n ");
100 GetPadCxy(fix,fiy,fx,fy);
101 fSector=Sector(fix,fiy);
103 (fSector ==-1 || fSector==0 ||
104 TMath::Abs(fx)<1.5 || TMath::Abs(fy)<1.5))
106 // printf("\n this pad %f %f %d %d \n",fx,fy,fix,fiy);
110 Int_t AliMUONsegmentationV02::MorePads()
112 // Are there more pads in the integration region
114 if ((fy >= fymax && fix >= fixmax) || fx==0) {
121 void AliMUONsegmentationV02::
122 Neighbours(Int_t iX, Int_t iY, Int_t* Nlist, Int_t Xlist[10], Int_t Ylist[10])
125 AliMUONsegmentationV01::Neighbours(iY, iX, &N, Ylist, Xlist);