Remove several warnings
[u/mrichter/AliRoot.git] / MUON / AliMUONSegResV02.cxx
CommitLineData
a897a37a 1/////////////////////////////////////////////////////
2// Segmentation and Response classes version 02 //
3/////////////////////////////////////////////////////
4
5#include <TTUBE.h>
6#include <TNode.h>
7#include <TRandom.h>
8#include "AliMUONSegResV02.h"
9#include "AliRun.h"
10#include "AliMC.h"
11#include "iostream.h"
12
13//___________________________________________
14ClassImp(AliMUONsegmentationV02)
15
16void AliMUONsegmentationV02::SetPADSIZ(Float_t p1, Float_t p2)
17{
18 fDpy=p1;
19 fDpx=p2;
20}
21
22Int_t AliMUONsegmentationV02::Npx()
23{return AliMUONsegmentationV01::Npy();}
24
25Int_t AliMUONsegmentationV02::Npy()
26{return AliMUONsegmentationV01::Npx();}
27
28
e3a4d40e 29Float_t AliMUONsegmentationV02::Dpx(Int_t)
a897a37a 30{return fDpy;}
31
32Float_t AliMUONsegmentationV02::Dpy(Int_t isec)
33{return fDpxD[isec];}
34
35Int_t AliMUONsegmentationV02::Sector(Int_t ix, Int_t iy)
36{return AliMUONsegmentationV01::Sector(iy, ix);}
37
38void AliMUONsegmentationV02::
39GetPadIxy(Float_t x, Float_t y, Int_t &ix, Int_t &iy)
40{
41AliMUONsegmentationV01::GetPadIxy(y, x, iy, ix);
42// printf("\n x,y,ix,iy %f %f %d %d", x,y,ix,iy);
43}
44
45void AliMUONsegmentationV02::
46GetPadCxy(Int_t ix, Int_t iy, Float_t &x, Float_t &y)
47{
48 AliMUONsegmentationV01::GetPadCxy(iy, ix, y, x);
49// printf("\n ix,iy,x,y %d %d %f %f ", ix,iy,x,y);
50}
51void AliMUONsegmentationV02::SetPad(Int_t ix,Int_t iy)
52{
53 GetPadCxy(ix,iy,fx,fy);
54 fSector=Sector(ix,iy);
55}
56
57
58
59void AliMUONsegmentationV02::NextPad()
60{
61 //
62 // Step to next pad in integration region
63 Float_t xc,yc;
64 Int_t ixc;
65
66// step up
67 if (fy < fymax && fy != 0) {
68 if (fiy==-1) fiy++;
69 fiy++;
70// step right
71 } else if (fix != fixmax) {
72 if (fix==-1) fix++;
73 fix++;
74// get y-position of next row (yc), xc not used here
75 GetPadCxy(fix,fiy,xc,yc);
76// get x-pad coordiante for 1 pad in row (fix)
77 GetPadIxy(xc,fymin,ixc,fiy);
78 } else {
79 printf("\n Error: Stepping outside integration region\n ");
80 }
81 GetPadCxy(fix,fiy,fx,fy);
82 fSector=Sector(fix,fiy);
83 if (MorePads() &&
84 (fSector ==-1 || fSector==0 ||
85 TMath::Abs(fx)<1.5 || TMath::Abs(fy)<1.5))
86 NextPad();
87// printf("\n this pad %f %f %d %d \n",fx,fy,fix,fiy);
88
89}
90
91Int_t AliMUONsegmentationV02::MorePads()
92//
93// Are there more pads in the integration region
94{
95 if ((fy >= fymax && fix >= fixmax) || fx==0) {
96 return 0;
97 } else {
98 return 1;
99 }
100}
101
102void AliMUONsegmentationV02::
103Neighbours(Int_t iX, Int_t iY, Int_t* Nlist, Int_t Xlist[10], Int_t Ylist[10])
104{
105 Int_t N;
106 AliMUONsegmentationV01::Neighbours(iY, iX, &N, Ylist, Xlist);
107 *Nlist=N;
108}
109
110