1 /////////////////////////////////////////////////////
2 // Segmentation and Response classes version 04 //
3 /////////////////////////////////////////////////////
9 #include "AliMUONSegResV04.h"
14 //___________________________________________
15 ClassImp(AliMUONsegmentationV04)
18 void AliMUONsegmentationV04::Init(AliMUONchamber* )
20 //printf("\n Initialise segmentation v04 \n");
22 // Fill the arrays fCx (x-contour) and fNpxS (ix-contour) for each sector
23 // These arrays help in converting from real to pad co-ordinates and
27 // PCB module size in cm
28 const Float_t dxPCB=40, dyPCB=40;
29 // PCB distribution (7 rows with 1+3 segmentation regions)
30 const Int_t kpcb[7][4] = {{1, 2, 2, 2},
42 // 3 3 3 2 2 | 2 2 3 3 3
43 // 3 3 3 2 2 2 | 2 2 2 3 3 3
44 // 3 3 2 2 1 1 | 1 1 2 2 3 3
45 // 3 3 2 2 1 1 1 | 1 1 1 2 2 3 3
46 // 3 3 2 2 1 1 0 | 0 1 1 2 2 3 3
47 // ------------------------------
48 // 3 3 2 2 1 1 0 | 0 1 1 2 2 3 3
49 // 3 3 2 2 1 1 1 | 1 1 1 2 2 3 3
50 // 3 3 2 2 1 1 | 1 1 2 2 3 3
51 // 3 3 3 2 2 2 | 2 2 2 3 3 3
52 // 3 3 3 2 2 | 2 2 3 3 3
56 // number of pad rows per PCB
58 Int_t NpyPCB=Int_t(dyPCB/fDpy);
60 // maximum number of pad rows
63 // Calculate padsize along x
66 for (Int_t i=fNsec-2; i>=0; i--){
67 fDpxD[i]=fDpxD[fNsec-1]/fNDiv[i];
68 //printf("\n test ---dx %d %f \n",i,fDpxD[i]);
72 // fill the arrays defining the pad segmentation boundaries
74 // loop over pcb module rows
76 for (Int_t irow=0; irow<7; irow++) {
78 // loop over pads along the anode wires
79 for (Int_t i=0; i<=NpyPCB; i++) {
80 // iy counts the padrow
82 // Loop over sectors (isec=0 is the dead space surounding the beam pipe)
83 for (Int_t isec=0; isec<4; isec++) {
85 fNpxS[0][iy]=kpcb[irow][0]*Int_t(dxPCB/fDpxD[0]);
86 fCx[0][iy]=kpcb[irow][0]*dxPCB;
88 fNpxS[isec][iy]=fNpxS[isec-1][iy]
89 +kpcb[irow][isec]*Int_t(dxPCB/fDpxD[isec]);
91 fCx[isec][iy]=fCx[isec-1][iy]
92 +kpcb[irow][isec]*dxPCB;
95 } // pad raws in module
98 for (Int_t iy=1; iy< fNpy; iy++) {
99 printf("\nBoundary %d %f %d %f %d %f %d %f",
100 fNpxS[0][iy], fCx[0][iy],
101 fNpxS[1][iy], fCx[1][iy],
102 fNpxS[2][iy], fCx[2][iy],
103 fNpxS[3][iy], fCx[3][iy]);
109 void AliMUONsegmentationV04::GiveTestPoints(Int_t &n, Float_t *x, Float_t *y)
112 x[0]=(fCx[1][1]+fCx[0][1])/2/TMath::Sqrt(2.);
114 x[1]=(fCx[2][1]+fCx[1][1])/2/TMath::Sqrt(2.);
116 x[2]=(fCx[3][1]+fCx[2][1])/2/TMath::Sqrt(2.);
118 printf("\n 1%f %f", x[0], y[0]);
119 printf("\n 2%f %f", x[1], y[1]);
120 printf("\n 3%f %f\n ", x[2], y[2]);