]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONSegResV04.cxx
Printing removed
[u/mrichter/AliRoot.git] / MUON / AliMUONSegResV04.cxx
CommitLineData
a897a37a 1/////////////////////////////////////////////////////
2// Segmentation and Response classes version 04 //
3/////////////////////////////////////////////////////
4
5#include <TTUBE.h>
6#include <TNode.h>
7#include <TRandom.h>
8
9#include "AliMUONSegResV04.h"
10#include "AliRun.h"
11#include "AliMC.h"
12#include "iostream.h"
13
14//___________________________________________
15ClassImp(AliMUONsegmentationV04)
16
17
18void AliMUONsegmentationV04::Init(AliMUONchamber* Chamber)
19{
20 printf("\n Initialise segmentation v04 \n");
21//
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
24// vice versa
25//
26//
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},
31 {0, 3, 2, 2},
32 {0, 2, 2, 2},
33 {0, 0, 3, 3},
34 {0, 0, 2, 3},
35 {0, 0, 0, 4},
36 {0, 0, 0, 3}};
37
38
39//
40// 3 3 3 | 3 3 3
41// 3 3 3 3 | 3 3 3 3
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
53// 3 3 3 3 | 3 3 3 3
54// 3 3 3 | 3 3 3
55//
56// number of pad rows per PCB
57//
58 Int_t NpyPCB=Int_t(dyPCB/fDpy);
59//
60// maximum number of pad rows
61 fNpy=7*NpyPCB;
62//
63// Calculate padsize along x
64 fDpxD[fNsec-1]=fDpx;
65 if (fNsec > 1) {
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]);
69 }
70 }
71//
72// fill the arrays defining the pad segmentation boundaries
73//
74// loop over pcb module rows
75 Int_t iy=0;
76 for (Int_t irow=0; irow<7; irow++) {
77//
78// loop over pads along the anode wires
79 for (Int_t i=0; i<=NpyPCB; i++) {
80// iy counts the padrow
81 iy++;
82// Loop over sectors (isec=0 is the dead space surounding the beam pipe)
83 for (Int_t isec=0; isec<4; isec++) {
84 if (isec==0) {
85 fNpxS[0][iy]=kpcb[irow][0]*Int_t(dxPCB/fDpxD[0]);
86 fCx[0][iy]=kpcb[irow][0]*dxPCB;
87 } else {
88 fNpxS[isec][iy]=fNpxS[isec-1][iy]
89 +kpcb[irow][isec]*Int_t(dxPCB/fDpxD[isec]);
90
91 fCx[isec][iy]=fCx[isec-1][iy]
92 +kpcb[irow][isec]*dxPCB;
93 }
94 } // sectors
95 } // pad raws in module
96 } // PCB rows
97/*
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]);
104
105 }
106*/
107}
108
109void AliMUONsegmentationV04::GiveTestPoints(Int_t &n, Float_t *x, Float_t *y)
110{
111 n=3;
112 x[0]=(fCx[1][1]+fCx[0][1])/2/TMath::Sqrt(2.);
113 y[0]=x[0];
114 x[1]=(fCx[2][1]+fCx[1][1])/2/TMath::Sqrt(2.);
115 y[1]=x[1];
116 x[2]=(fCx[3][1]+fCx[2][1])/2/TMath::Sqrt(2.);
117 y[2]=x[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]);
121}
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137