]>
Commit | Line | Data |
---|---|---|
4c039060 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
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 | **************************************************************************/ | |
15 | ||
16 | /* | |
17 | $Log$ | |
18 | */ | |
19 | ||
a897a37a | 20 | ///////////////////////////////////////////////////// |
21 | // Segmentation and Response classes version 04 // | |
22 | ///////////////////////////////////////////////////// | |
23 | ||
24 | #include <TTUBE.h> | |
25 | #include <TNode.h> | |
26 | #include <TRandom.h> | |
27 | ||
28 | #include "AliMUONSegResV04.h" | |
29 | #include "AliRun.h" | |
30 | #include "AliMC.h" | |
31 | #include "iostream.h" | |
32 | ||
33 | //___________________________________________ | |
34 | ClassImp(AliMUONsegmentationV04) | |
35 | ||
36 | ||
e3a4d40e | 37 | void AliMUONsegmentationV04::Init(AliMUONchamber* ) |
a897a37a | 38 | { |
e3a4d40e | 39 | //printf("\n Initialise segmentation v04 \n"); |
a897a37a | 40 | // |
41 | // Fill the arrays fCx (x-contour) and fNpxS (ix-contour) for each sector | |
42 | // These arrays help in converting from real to pad co-ordinates and | |
43 | // vice versa | |
44 | // | |
45 | // | |
46 | // PCB module size in cm | |
47 | const Float_t dxPCB=40, dyPCB=40; | |
48 | // PCB distribution (7 rows with 1+3 segmentation regions) | |
49 | const Int_t kpcb[7][4] = {{1, 2, 2, 2}, | |
50 | {0, 3, 2, 2}, | |
51 | {0, 2, 2, 2}, | |
52 | {0, 0, 3, 3}, | |
53 | {0, 0, 2, 3}, | |
54 | {0, 0, 0, 4}, | |
55 | {0, 0, 0, 3}}; | |
56 | ||
57 | ||
58 | // | |
59 | // 3 3 3 | 3 3 3 | |
60 | // 3 3 3 3 | 3 3 3 3 | |
61 | // 3 3 3 2 2 | 2 2 3 3 3 | |
62 | // 3 3 3 2 2 2 | 2 2 2 3 3 3 | |
63 | // 3 3 2 2 1 1 | 1 1 2 2 3 3 | |
64 | // 3 3 2 2 1 1 1 | 1 1 1 2 2 3 3 | |
65 | // 3 3 2 2 1 1 0 | 0 1 1 2 2 3 3 | |
66 | // ------------------------------ | |
67 | // 3 3 2 2 1 1 0 | 0 1 1 2 2 3 3 | |
68 | // 3 3 2 2 1 1 1 | 1 1 1 2 2 3 3 | |
69 | // 3 3 2 2 1 1 | 1 1 2 2 3 3 | |
70 | // 3 3 3 2 2 2 | 2 2 2 3 3 3 | |
71 | // 3 3 3 2 2 | 2 2 3 3 3 | |
72 | // 3 3 3 3 | 3 3 3 3 | |
73 | // 3 3 3 | 3 3 3 | |
74 | // | |
75 | // number of pad rows per PCB | |
76 | // | |
77 | Int_t NpyPCB=Int_t(dyPCB/fDpy); | |
78 | // | |
79 | // maximum number of pad rows | |
80 | fNpy=7*NpyPCB; | |
81 | // | |
82 | // Calculate padsize along x | |
83 | fDpxD[fNsec-1]=fDpx; | |
84 | if (fNsec > 1) { | |
85 | for (Int_t i=fNsec-2; i>=0; i--){ | |
86 | fDpxD[i]=fDpxD[fNsec-1]/fNDiv[i]; | |
e3a4d40e | 87 | //printf("\n test ---dx %d %f \n",i,fDpxD[i]); |
a897a37a | 88 | } |
89 | } | |
90 | // | |
91 | // fill the arrays defining the pad segmentation boundaries | |
92 | // | |
93 | // loop over pcb module rows | |
94 | Int_t iy=0; | |
95 | for (Int_t irow=0; irow<7; irow++) { | |
96 | // | |
97 | // loop over pads along the anode wires | |
98 | for (Int_t i=0; i<=NpyPCB; i++) { | |
99 | // iy counts the padrow | |
100 | iy++; | |
101 | // Loop over sectors (isec=0 is the dead space surounding the beam pipe) | |
102 | for (Int_t isec=0; isec<4; isec++) { | |
103 | if (isec==0) { | |
104 | fNpxS[0][iy]=kpcb[irow][0]*Int_t(dxPCB/fDpxD[0]); | |
105 | fCx[0][iy]=kpcb[irow][0]*dxPCB; | |
106 | } else { | |
107 | fNpxS[isec][iy]=fNpxS[isec-1][iy] | |
108 | +kpcb[irow][isec]*Int_t(dxPCB/fDpxD[isec]); | |
109 | ||
110 | fCx[isec][iy]=fCx[isec-1][iy] | |
111 | +kpcb[irow][isec]*dxPCB; | |
112 | } | |
113 | } // sectors | |
114 | } // pad raws in module | |
115 | } // PCB rows | |
116 | /* | |
117 | for (Int_t iy=1; iy< fNpy; iy++) { | |
118 | printf("\nBoundary %d %f %d %f %d %f %d %f", | |
119 | fNpxS[0][iy], fCx[0][iy], | |
120 | fNpxS[1][iy], fCx[1][iy], | |
121 | fNpxS[2][iy], fCx[2][iy], | |
122 | fNpxS[3][iy], fCx[3][iy]); | |
123 | ||
124 | } | |
125 | */ | |
126 | } | |
127 | ||
128 | void AliMUONsegmentationV04::GiveTestPoints(Int_t &n, Float_t *x, Float_t *y) | |
129 | { | |
130 | n=3; | |
131 | x[0]=(fCx[1][1]+fCx[0][1])/2/TMath::Sqrt(2.); | |
132 | y[0]=x[0]; | |
133 | x[1]=(fCx[2][1]+fCx[1][1])/2/TMath::Sqrt(2.); | |
134 | y[1]=x[1]; | |
135 | x[2]=(fCx[3][1]+fCx[2][1])/2/TMath::Sqrt(2.); | |
136 | y[2]=x[2]; | |
137 | printf("\n 1%f %f", x[0], y[0]); | |
138 | printf("\n 2%f %f", x[1], y[1]); | |
139 | printf("\n 3%f %f\n ", x[2], y[2]); | |
140 | } | |
141 | ||
142 | ||
143 | ||
144 | ||
145 | ||
146 | ||
147 | ||
148 | ||
149 | ||
150 | ||
151 | ||
152 | ||
153 | ||
154 | ||
155 | ||
156 |