]>
Commit | Line | Data |
---|---|---|
a9e2aefa | 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 * | |
1e8fff9c | 12 | * about the suitability of this software for any purpeateose. It is * |
a9e2aefa | 13 | * provided "as is" without express or implied warranty. * |
14 | **************************************************************************/ | |
15 | ||
16 | /* | |
17 | $Log$ | |
1e8fff9c | 18 | Revision 1.7 2000/10/02 21:28:09 fca |
19 | Removal of useless dependecies via forward declarations | |
20 | ||
94de3818 | 21 | Revision 1.6 2000/10/02 17:20:45 egangler |
22 | Cleaning of the code (continued ) : | |
23 | -> coding conventions | |
24 | -> void Streamers | |
25 | -> some useless includes removed or replaced by "class" statement | |
26 | ||
8c449e83 | 27 | Revision 1.5 2000/06/28 15:16:35 morsch |
28 | (1) Client code adapted to new method signatures in AliMUONSegmentation (see comments there) | |
29 | to allow development of slat-muon chamber simulation and reconstruction code in the MUON | |
30 | framework. The changes should have no side effects (mostly dummy arguments). | |
31 | (2) Hit disintegration uses 3-dim hit coordinates to allow simulation | |
32 | of chambers with overlapping modules (MakePadHits, Disintegration). | |
33 | ||
802a864d | 34 | Revision 1.4 2000/06/26 14:02:38 morsch |
35 | Add class AliMUONConstants with MUON specific constants using static memeber data and access methods. | |
36 | ||
f665c1ea | 37 | Revision 1.3 2000/06/22 14:10:05 morsch |
38 | HP scope problems corrected (PH) | |
39 | ||
e17592e9 | 40 | Revision 1.2 2000/06/15 07:58:49 morsch |
41 | Code from MUON-dev joined | |
42 | ||
a9e2aefa | 43 | Revision 1.1.2.14 2000/06/14 14:37:25 morsch |
44 | Initialization of TriggerCircuit added (PC) | |
45 | ||
46 | Revision 1.1.2.13 2000/06/09 21:55:47 morsch | |
47 | Most coding rule violations corrected. | |
48 | ||
49 | Revision 1.1.2.12 2000/05/05 11:34:29 morsch | |
50 | Log inside comments. | |
51 | ||
52 | Revision 1.1.2.11 2000/05/05 10:06:48 morsch | |
53 | Coding Rule violations regarding trigger section corrected (CP) | |
54 | Log messages included. | |
55 | */ | |
56 | ||
57 | ///////////////////////////////////////////////////////// | |
58 | // Manager and hits classes for set:MUON version 0 // | |
59 | ///////////////////////////////////////////////////////// | |
60 | ||
61 | #include <TTUBE.h> | |
62 | #include <TNode.h> | |
63 | #include <TRandom.h> | |
64 | #include <TLorentzVector.h> | |
65 | #include <iostream.h> | |
66 | ||
67 | #include "AliMUONv1.h" | |
68 | #include "AliRun.h" | |
69 | #include "AliMC.h" | |
94de3818 | 70 | #include "AliMagF.h" |
a9e2aefa | 71 | #include "AliCallf77.h" |
72 | #include "AliConst.h" | |
73 | #include "AliMUONChamber.h" | |
74 | #include "AliMUONHit.h" | |
75 | #include "AliMUONPadHit.h" | |
f665c1ea | 76 | #include "AliMUONConstants.h" |
8c449e83 | 77 | #include "AliMUONTriggerCircuit.h" |
a9e2aefa | 78 | |
79 | ClassImp(AliMUONv1) | |
80 | ||
81 | //___________________________________________ | |
82 | AliMUONv1::AliMUONv1() : AliMUON() | |
83 | { | |
84 | // Constructor | |
85 | fChambers = 0; | |
86 | } | |
87 | ||
88 | //___________________________________________ | |
89 | AliMUONv1::AliMUONv1(const char *name, const char *title) | |
90 | : AliMUON(name,title) | |
91 | { | |
92 | // Constructor | |
93 | } | |
94 | ||
95 | //___________________________________________ | |
96 | void AliMUONv1::CreateGeometry() | |
97 | { | |
98 | // | |
99 | // Note: all chambers have the same structure, which could be | |
100 | // easily parameterised. This was intentionally not done in order | |
101 | // to give a starting point for the implementation of the actual | |
102 | // design of each station. | |
103 | Int_t *idtmed = fIdtmed->GetArray()-1099; | |
104 | ||
105 | // Distance between Stations | |
106 | // | |
107 | Float_t bpar[3]; | |
108 | Float_t tpar[3]; | |
109 | Float_t pgpar[10]; | |
110 | Float_t zpos1, zpos2, zfpos; | |
111 | Float_t dframep=.001; // Value for station 3 should be 6 ... | |
112 | Float_t dframep1=.001; | |
113 | // Bool_t frames=kTRUE; | |
114 | Bool_t frames=kFALSE; | |
115 | ||
116 | Float_t dframez=0.9; | |
117 | Float_t dr; | |
118 | Float_t dstation; | |
119 | ||
120 | // | |
121 | // Rotation matrices in the x-y plane | |
122 | Int_t idrotm[1199]; | |
123 | // phi= 0 deg | |
124 | AliMatrix(idrotm[1100], 90., 0., 90., 90., 0., 0.); | |
125 | // phi= 90 deg | |
126 | AliMatrix(idrotm[1101], 90., 90., 90., 180., 0., 0.); | |
127 | // phi= 180 deg | |
128 | AliMatrix(idrotm[1102], 90., 180., 90., 270., 0., 0.); | |
129 | // phi= 270 deg | |
130 | AliMatrix(idrotm[1103], 90., 270., 90., 0., 0., 0.); | |
131 | // | |
132 | Float_t phi=2*TMath::Pi()/12/2; | |
133 | ||
134 | // | |
135 | // pointer to the current chamber | |
136 | // pointer to the current chamber | |
137 | Int_t idAlu1=idtmed[1103]; | |
138 | Int_t idAlu2=idtmed[1104]; | |
139 | // Int_t idAlu1=idtmed[1100]; | |
140 | // Int_t idAlu2=idtmed[1100]; | |
141 | Int_t idAir=idtmed[1100]; | |
142 | Int_t idGas=idtmed[1105]; | |
143 | ||
144 | ||
145 | AliMUONChamber *iChamber, *iChamber1, *iChamber2; | |
146 | //******************************************************************** | |
147 | // Station 1 ** | |
148 | //******************************************************************** | |
149 | // CONCENTRIC | |
150 | // indices 1 and 2 for first and second chambers in the station | |
151 | // iChamber (first chamber) kept for other quanties than Z, | |
152 | // assumed to be the same in both chambers | |
153 | iChamber1 = iChamber = (AliMUONChamber*) (*fChambers)[0]; | |
154 | iChamber2 =(AliMUONChamber*) (*fChambers)[1]; | |
155 | zpos1=iChamber1->Z(); | |
156 | zpos2=iChamber2->Z(); | |
157 | dstation = zpos2 - zpos1; | |
158 | zfpos=-(iChamber->DGas()+dframez+iChamber->DAlu())/2; | |
159 | ||
160 | // | |
161 | // Mother volume | |
162 | tpar[0] = iChamber->RInner()-dframep1; | |
163 | tpar[1] = (iChamber->ROuter()+dframep1)/TMath::Cos(phi); | |
164 | tpar[2] = dstation/4; | |
165 | ||
166 | gMC->Gsvolu("C01M", "TUBE", idAir, tpar, 3); | |
167 | gMC->Gsvolu("C02M", "TUBE", idAir, tpar, 3); | |
168 | gMC->Gspos("C01M", 1, "ALIC", 0., 0., zpos1 , 0, "ONLY"); | |
1e8fff9c | 169 | gMC->Gspos("C02M", 1, "ALIC", 0., 0., zpos2 , 0, "ONLY"); |
a9e2aefa | 170 | // Aluminium frames |
171 | // Outer frames | |
172 | pgpar[0] = 360/12/2; | |
173 | pgpar[1] = 360.; | |
174 | pgpar[2] = 12.; | |
175 | pgpar[3] = 2; | |
176 | pgpar[4] = -dframez/2; | |
177 | pgpar[5] = iChamber->ROuter(); | |
178 | pgpar[6] = pgpar[5]+dframep1; | |
179 | pgpar[7] = +dframez/2; | |
180 | pgpar[8] = pgpar[5]; | |
181 | pgpar[9] = pgpar[6]; | |
182 | gMC->Gsvolu("C01O", "PGON", idAlu1, pgpar, 10); | |
183 | gMC->Gsvolu("C02O", "PGON", idAlu1, pgpar, 10); | |
184 | gMC->Gspos("C01O",1,"C01M", 0.,0.,-zfpos, 0,"ONLY"); | |
185 | gMC->Gspos("C01O",2,"C01M", 0.,0.,+zfpos, 0,"ONLY"); | |
186 | gMC->Gspos("C02O",1,"C02M", 0.,0.,-zfpos, 0,"ONLY"); | |
187 | gMC->Gspos("C02O",2,"C02M", 0.,0.,+zfpos, 0,"ONLY"); | |
188 | // | |
189 | // Inner frame | |
190 | tpar[0]= iChamber->RInner()-dframep1; | |
191 | tpar[1]= iChamber->RInner(); | |
192 | tpar[2]= dframez/2; | |
193 | gMC->Gsvolu("C01I", "TUBE", idAlu1, tpar, 3); | |
194 | gMC->Gsvolu("C02I", "TUBE", idAlu1, tpar, 3); | |
195 | ||
196 | gMC->Gspos("C01I",1,"C01M", 0.,0.,-zfpos, 0,"ONLY"); | |
197 | gMC->Gspos("C01I",2,"C01M", 0.,0.,+zfpos, 0,"ONLY"); | |
198 | gMC->Gspos("C02I",1,"C02M", 0.,0.,-zfpos, 0,"ONLY"); | |
199 | gMC->Gspos("C02I",2,"C02M", 0.,0.,+zfpos, 0,"ONLY"); | |
200 | // | |
201 | // Frame Crosses | |
202 | if (frames) { | |
203 | ||
204 | bpar[0] = (iChamber->ROuter() - iChamber->RInner())/2; | |
205 | bpar[1] = dframep1/2; | |
206 | bpar[2] = dframez/2; | |
207 | gMC->Gsvolu("C01B", "BOX", idAlu1, bpar, 3); | |
208 | gMC->Gsvolu("C02B", "BOX", idAlu1, bpar, 3); | |
209 | ||
210 | gMC->Gspos("C01B",1,"C01M", +iChamber->RInner()+bpar[0] , 0,-zfpos, | |
211 | idrotm[1100],"ONLY"); | |
212 | gMC->Gspos("C01B",2,"C01M", -iChamber->RInner()-bpar[0] , 0,-zfpos, | |
213 | idrotm[1100],"ONLY"); | |
214 | gMC->Gspos("C01B",3,"C01M", 0, +iChamber->RInner()+bpar[0] ,-zfpos, | |
215 | idrotm[1101],"ONLY"); | |
216 | gMC->Gspos("C01B",4,"C01M", 0, -iChamber->RInner()-bpar[0] ,-zfpos, | |
217 | idrotm[1101],"ONLY"); | |
218 | gMC->Gspos("C01B",5,"C01M", +iChamber->RInner()+bpar[0] , 0,+zfpos, | |
219 | idrotm[1100],"ONLY"); | |
220 | gMC->Gspos("C01B",6,"C01M", -iChamber->RInner()-bpar[0] , 0,+zfpos, | |
221 | idrotm[1100],"ONLY"); | |
222 | gMC->Gspos("C01B",7,"C01M", 0, +iChamber->RInner()+bpar[0] ,+zfpos, | |
223 | idrotm[1101],"ONLY"); | |
224 | gMC->Gspos("C01B",8,"C01M", 0, -iChamber->RInner()-bpar[0] ,+zfpos, | |
225 | idrotm[1101],"ONLY"); | |
226 | ||
227 | gMC->Gspos("C02B",1,"C02M", +iChamber->RInner()+bpar[0] , 0,-zfpos, | |
228 | idrotm[1100],"ONLY"); | |
229 | gMC->Gspos("C02B",2,"C02M", -iChamber->RInner()-bpar[0] , 0,-zfpos, | |
230 | idrotm[1100],"ONLY"); | |
231 | gMC->Gspos("C02B",3,"C02M", 0, +iChamber->RInner()+bpar[0] ,-zfpos, | |
232 | idrotm[1101],"ONLY"); | |
233 | gMC->Gspos("C02B",4,"C02M", 0, -iChamber->RInner()-bpar[0] ,-zfpos, | |
234 | idrotm[1101],"ONLY"); | |
235 | gMC->Gspos("C02B",5,"C02M", +iChamber->RInner()+bpar[0] , 0,+zfpos, | |
236 | idrotm[1100],"ONLY"); | |
237 | gMC->Gspos("C02B",6,"C02M", -iChamber->RInner()-bpar[0] , 0,+zfpos, | |
238 | idrotm[1100],"ONLY"); | |
239 | gMC->Gspos("C02B",7,"C02M", 0, +iChamber->RInner()+bpar[0] ,+zfpos, | |
240 | idrotm[1101],"ONLY"); | |
241 | gMC->Gspos("C02B",8,"C02M", 0, -iChamber->RInner()-bpar[0] ,+zfpos, | |
242 | idrotm[1101],"ONLY"); | |
243 | } | |
244 | // | |
245 | // Chamber Material represented by Alu sheet | |
246 | tpar[0]= iChamber->RInner(); | |
247 | tpar[1]= iChamber->ROuter(); | |
248 | tpar[2] = (iChamber->DGas()+iChamber->DAlu())/2; | |
249 | gMC->Gsvolu("C01A", "TUBE", idAlu2, tpar, 3); | |
250 | gMC->Gsvolu("C02A", "TUBE",idAlu2, tpar, 3); | |
251 | gMC->Gspos("C01A", 1, "C01M", 0., 0., 0., 0, "ONLY"); | |
252 | gMC->Gspos("C02A", 1, "C02M", 0., 0., 0., 0, "ONLY"); | |
253 | // | |
254 | // Sensitive volumes | |
255 | // tpar[2] = iChamber->DGas(); | |
256 | tpar[2] = iChamber->DGas()/2; | |
257 | gMC->Gsvolu("C01G", "TUBE", idtmed[1108], tpar, 3); | |
258 | gMC->Gsvolu("C02G", "TUBE", idtmed[1108], tpar, 3); | |
259 | gMC->Gspos("C01G", 1, "C01A", 0., 0., 0., 0, "ONLY"); | |
260 | gMC->Gspos("C02G", 1, "C02A", 0., 0., 0., 0, "ONLY"); | |
261 | // | |
262 | // Frame Crosses to be placed inside gas | |
263 | if (frames) { | |
264 | ||
265 | dr = (iChamber->ROuter() - iChamber->RInner()); | |
266 | bpar[0] = TMath::Sqrt(dr*dr-dframep1*dframep1/4)/2; | |
267 | bpar[1] = dframep1/2; | |
268 | bpar[2] = iChamber->DGas()/2; | |
269 | gMC->Gsvolu("C01F", "BOX", idAlu1, bpar, 3); | |
270 | gMC->Gsvolu("C02F", "BOX", idAlu1, bpar, 3); | |
271 | ||
272 | gMC->Gspos("C01F",1,"C01G", +iChamber->RInner()+bpar[0] , 0, 0, | |
273 | idrotm[1100],"ONLY"); | |
274 | gMC->Gspos("C01F",2,"C01G", -iChamber->RInner()-bpar[0] , 0, 0, | |
275 | idrotm[1100],"ONLY"); | |
276 | gMC->Gspos("C01F",3,"C01G", 0, +iChamber->RInner()+bpar[0] , 0, | |
277 | idrotm[1101],"ONLY"); | |
278 | gMC->Gspos("C01F",4,"C01G", 0, -iChamber->RInner()-bpar[0] , 0, | |
279 | idrotm[1101],"ONLY"); | |
280 | ||
281 | gMC->Gspos("C02F",1,"C02G", +iChamber->RInner()+bpar[0] , 0, 0, | |
282 | idrotm[1100],"ONLY"); | |
283 | gMC->Gspos("C02F",2,"C02G", -iChamber->RInner()-bpar[0] , 0, 0, | |
284 | idrotm[1100],"ONLY"); | |
285 | gMC->Gspos("C02F",3,"C02G", 0, +iChamber->RInner()+bpar[0] , 0, | |
286 | idrotm[1101],"ONLY"); | |
287 | gMC->Gspos("C02F",4,"C02G", 0, -iChamber->RInner()-bpar[0] , 0, | |
288 | idrotm[1101],"ONLY"); | |
289 | } | |
1e8fff9c | 290 | |
a9e2aefa | 291 | //******************************************************************** |
292 | // Station 2 ** | |
293 | //******************************************************************** | |
294 | // indices 1 and 2 for first and second chambers in the station | |
295 | // iChamber (first chamber) kept for other quanties than Z, | |
296 | // assumed to be the same in both chambers | |
297 | iChamber1 = iChamber = (AliMUONChamber*) (*fChambers)[2]; | |
298 | iChamber2 =(AliMUONChamber*) (*fChambers)[3]; | |
299 | zpos1=iChamber1->Z(); | |
300 | zpos2=iChamber2->Z(); | |
301 | dstation = zpos2 - zpos1; | |
302 | zfpos=-(iChamber->DGas()+dframez+iChamber->DAlu())/2; | |
303 | ||
304 | // | |
305 | // Mother volume | |
306 | tpar[0] = iChamber->RInner()-dframep; | |
307 | tpar[1] = (iChamber->ROuter()+dframep)/TMath::Cos(phi); | |
308 | tpar[2] = dstation/4; | |
309 | ||
310 | gMC->Gsvolu("C03M", "TUBE", idAir, tpar, 3); | |
311 | gMC->Gsvolu("C04M", "TUBE", idAir, tpar, 3); | |
312 | gMC->Gspos("C03M", 1, "ALIC", 0., 0., zpos1 , 0, "ONLY"); | |
313 | gMC->Gspos("C04M", 1, "ALIC", 0., 0., zpos2 , 0, "ONLY"); | |
1e8fff9c | 314 | |
a9e2aefa | 315 | // Aluminium frames |
316 | // Outer frames | |
317 | pgpar[0] = 360/12/2; | |
318 | pgpar[1] = 360.; | |
319 | pgpar[2] = 12.; | |
320 | pgpar[3] = 2; | |
321 | pgpar[4] = -dframez/2; | |
322 | pgpar[5] = iChamber->ROuter(); | |
323 | pgpar[6] = pgpar[5]+dframep; | |
324 | pgpar[7] = +dframez/2; | |
325 | pgpar[8] = pgpar[5]; | |
326 | pgpar[9] = pgpar[6]; | |
327 | gMC->Gsvolu("C03O", "PGON", idAlu1, pgpar, 10); | |
328 | gMC->Gsvolu("C04O", "PGON", idAlu1, pgpar, 10); | |
329 | gMC->Gspos("C03O",1,"C03M", 0.,0.,-zfpos, 0,"ONLY"); | |
330 | gMC->Gspos("C03O",2,"C03M", 0.,0.,+zfpos, 0,"ONLY"); | |
331 | gMC->Gspos("C04O",1,"C04M", 0.,0.,-zfpos, 0,"ONLY"); | |
332 | gMC->Gspos("C04O",2,"C04M", 0.,0.,+zfpos, 0,"ONLY"); | |
333 | // | |
334 | // Inner frame | |
335 | tpar[0]= iChamber->RInner()-dframep; | |
336 | tpar[1]= iChamber->RInner(); | |
337 | tpar[2]= dframez/2; | |
338 | gMC->Gsvolu("C03I", "TUBE", idAlu1, tpar, 3); | |
339 | gMC->Gsvolu("C04I", "TUBE", idAlu1, tpar, 3); | |
340 | ||
341 | gMC->Gspos("C03I",1,"C03M", 0.,0.,-zfpos, 0,"ONLY"); | |
342 | gMC->Gspos("C03I",2,"C03M", 0.,0.,+zfpos, 0,"ONLY"); | |
343 | gMC->Gspos("C04I",1,"C04M", 0.,0.,-zfpos, 0,"ONLY"); | |
344 | gMC->Gspos("C04I",2,"C04M", 0.,0.,+zfpos, 0,"ONLY"); | |
345 | // | |
346 | // Frame Crosses | |
347 | if (frames) { | |
348 | ||
349 | bpar[0] = (iChamber->ROuter() - iChamber->RInner())/2; | |
350 | bpar[1] = dframep/2; | |
351 | bpar[2] = dframez/2; | |
352 | gMC->Gsvolu("C03B", "BOX", idAlu1, bpar, 3); | |
353 | gMC->Gsvolu("C04B", "BOX", idAlu1, bpar, 3); | |
354 | ||
355 | gMC->Gspos("C03B",1,"C03M", +iChamber->RInner()+bpar[0] , 0,-zfpos, | |
356 | idrotm[1100],"ONLY"); | |
357 | gMC->Gspos("C03B",2,"C03M", -iChamber->RInner()-bpar[0] , 0,-zfpos, | |
358 | idrotm[1100],"ONLY"); | |
359 | gMC->Gspos("C03B",3,"C03M", 0, +iChamber->RInner()+bpar[0] ,-zfpos, | |
360 | idrotm[1101],"ONLY"); | |
361 | gMC->Gspos("C03B",4,"C03M", 0, -iChamber->RInner()-bpar[0] ,-zfpos, | |
362 | idrotm[1101],"ONLY"); | |
363 | gMC->Gspos("C03B",5,"C03M", +iChamber->RInner()+bpar[0] , 0,+zfpos, | |
364 | idrotm[1100],"ONLY"); | |
365 | gMC->Gspos("C03B",6,"C03M", -iChamber->RInner()-bpar[0] , 0,+zfpos, | |
366 | idrotm[1100],"ONLY"); | |
367 | gMC->Gspos("C03B",7,"C03M", 0, +iChamber->RInner()+bpar[0] ,+zfpos, | |
368 | idrotm[1101],"ONLY"); | |
369 | gMC->Gspos("C03B",8,"C03M", 0, -iChamber->RInner()-bpar[0] ,+zfpos, | |
370 | idrotm[1101],"ONLY"); | |
371 | ||
372 | gMC->Gspos("C04B",1,"C04M", +iChamber->RInner()+bpar[0] , 0,-zfpos, | |
373 | idrotm[1100],"ONLY"); | |
374 | gMC->Gspos("C04B",2,"C04M", -iChamber->RInner()-bpar[0] , 0,-zfpos, | |
375 | idrotm[1100],"ONLY"); | |
376 | gMC->Gspos("C04B",3,"C04M", 0, +iChamber->RInner()+bpar[0] ,-zfpos, | |
377 | idrotm[1101],"ONLY"); | |
378 | gMC->Gspos("C04B",4,"C04M", 0, -iChamber->RInner()-bpar[0] ,-zfpos, | |
379 | idrotm[1101],"ONLY"); | |
380 | gMC->Gspos("C04B",5,"C04M", +iChamber->RInner()+bpar[0] , 0,+zfpos, | |
381 | idrotm[1100],"ONLY"); | |
382 | gMC->Gspos("C04B",6,"C04M", -iChamber->RInner()-bpar[0] , 0,+zfpos, | |
383 | idrotm[1100],"ONLY"); | |
384 | gMC->Gspos("C04B",7,"C04M", 0, +iChamber->RInner()+bpar[0] ,+zfpos, | |
385 | idrotm[1101],"ONLY"); | |
386 | gMC->Gspos("C04B",8,"C04M", 0, -iChamber->RInner()-bpar[0] ,+zfpos, | |
387 | idrotm[1101],"ONLY"); | |
388 | } | |
389 | // | |
390 | // Chamber Material represented by Alu sheet | |
391 | tpar[0]= iChamber->RInner(); | |
392 | tpar[1]= iChamber->ROuter(); | |
393 | tpar[2] = (iChamber->DGas()+iChamber->DAlu())/2; | |
394 | gMC->Gsvolu("C03A", "TUBE", idAlu2, tpar, 3); | |
395 | gMC->Gsvolu("C04A", "TUBE", idAlu2, tpar, 3); | |
396 | gMC->Gspos("C03A", 1, "C03M", 0., 0., 0., 0, "ONLY"); | |
397 | gMC->Gspos("C04A", 1, "C04M", 0., 0., 0., 0, "ONLY"); | |
398 | // | |
399 | // Sensitive volumes | |
400 | // tpar[2] = iChamber->DGas(); | |
401 | tpar[2] = iChamber->DGas()/2; | |
402 | gMC->Gsvolu("C03G", "TUBE", idGas, tpar, 3); | |
403 | gMC->Gsvolu("C04G", "TUBE", idGas, tpar, 3); | |
404 | gMC->Gspos("C03G", 1, "C03A", 0., 0., 0., 0, "ONLY"); | |
405 | gMC->Gspos("C04G", 1, "C04A", 0., 0., 0., 0, "ONLY"); | |
406 | ||
407 | if (frames) { | |
408 | // | |
409 | // Frame Crosses to be placed inside gas | |
410 | dr = (iChamber->ROuter() - iChamber->RInner()); | |
411 | bpar[0] = TMath::Sqrt(dr*dr-dframep*dframep/4)/2; | |
412 | bpar[1] = dframep/2; | |
413 | bpar[2] = iChamber->DGas()/2; | |
414 | gMC->Gsvolu("C03F", "BOX", idAlu1, bpar, 3); | |
415 | gMC->Gsvolu("C04F", "BOX", idAlu1, bpar, 3); | |
416 | ||
417 | gMC->Gspos("C03F",1,"C03G", +iChamber->RInner()+bpar[0] , 0, 0, | |
418 | idrotm[1100],"ONLY"); | |
419 | gMC->Gspos("C03F",2,"C03G", -iChamber->RInner()-bpar[0] , 0, 0, | |
420 | idrotm[1100],"ONLY"); | |
421 | gMC->Gspos("C03F",3,"C03G", 0, +iChamber->RInner()+bpar[0] , 0, | |
422 | idrotm[1101],"ONLY"); | |
423 | gMC->Gspos("C03F",4,"C03G", 0, -iChamber->RInner()-bpar[0] , 0, | |
424 | idrotm[1101],"ONLY"); | |
425 | ||
426 | gMC->Gspos("C04F",1,"C04G", +iChamber->RInner()+bpar[0] , 0, 0, | |
427 | idrotm[1100],"ONLY"); | |
428 | gMC->Gspos("C04F",2,"C04G", -iChamber->RInner()-bpar[0] , 0, 0, | |
429 | idrotm[1100],"ONLY"); | |
430 | gMC->Gspos("C04F",3,"C04G", 0, +iChamber->RInner()+bpar[0] , 0, | |
431 | idrotm[1101],"ONLY"); | |
432 | gMC->Gspos("C04F",4,"C04G", 0, -iChamber->RInner()-bpar[0] , 0, | |
433 | idrotm[1101],"ONLY"); | |
434 | } | |
1e8fff9c | 435 | |
a9e2aefa | 436 | //******************************************************************** |
437 | // Station 3 ** | |
438 | //******************************************************************** | |
439 | // indices 1 and 2 for first and second chambers in the station | |
440 | // iChamber (first chamber) kept for other quanties than Z, | |
441 | // assumed to be the same in both chambers | |
442 | iChamber1 = iChamber = (AliMUONChamber*) (*fChambers)[4]; | |
443 | iChamber2 =(AliMUONChamber*) (*fChambers)[5]; | |
444 | zpos1=iChamber1->Z(); | |
445 | zpos2=iChamber2->Z(); | |
446 | dstation = zpos2 - zpos1; | |
447 | ||
448 | zfpos=-(iChamber->DGas()+dframez+iChamber->DAlu())/2; | |
449 | // | |
450 | // Mother volume | |
451 | tpar[0] = iChamber->RInner()-dframep; | |
452 | tpar[1] = (iChamber->ROuter()+dframep)/TMath::Cos(phi); | |
453 | tpar[2] = dstation/4; | |
454 | gMC->Gsvolu("C05M", "TUBE", idAir, tpar, 3); | |
455 | gMC->Gsvolu("C06M", "TUBE", idAir, tpar, 3); | |
456 | gMC->Gspos("C05M", 1, "ALIC", 0., 0., zpos1 , 0, "ONLY"); | |
457 | gMC->Gspos("C06M", 1, "ALIC", 0., 0., zpos2 , 0, "ONLY"); | |
1e8fff9c | 458 | |
459 | // volumes for slat geometry (xx=5,..,10 chamber id): | |
460 | // Sxx0 Sxx1 Sxx2 Sxx3 --> Slat Mother volumes | |
461 | // SxxG --> Sensitive volume (gas) | |
462 | // SxxP --> PCB (copper) | |
463 | // SxxI --> Insulator (vetronite) | |
464 | // SxxC --> Carbon panel | |
465 | // SxxR --> Rohacell | |
466 | // SxxH, SxxV --> Horizontal and Vertical frames (vetronite) | |
467 | ||
468 | // define the id of tracking media: | |
469 | Int_t idCopper = idtmed[1110]; | |
470 | Int_t idGlass = idtmed[1111]; | |
471 | Int_t idCarbon = idtmed[1112]; | |
472 | Int_t idRoha = idtmed[1113]; | |
473 | ||
474 | const Int_t nSlats3 = 4; // number of slats per quadrant | |
475 | const Int_t nPCB3[nSlats3] = {4,4,3,2}; // n PCB per slat | |
476 | ||
477 | // sensitive area: 40*40 cm**2 | |
478 | const Float_t SensLength = 40.; | |
479 | const Float_t SensHeight = 40.; | |
480 | const Float_t SensWidth = 0.5; // according to TDR fig 2.120 | |
481 | const Int_t SensMaterial = idGas; | |
482 | const Float_t yOverlap = 1.5; | |
483 | ||
484 | // PCB dimensions in cm; width: 30 mum copper | |
485 | const Float_t PCBLength = SensLength; | |
486 | const Float_t PCBHeight = 60.; | |
487 | const Float_t PCBWidth = 0.003; | |
488 | const Int_t PCBMaterial = idCopper; | |
489 | ||
490 | // Insulating material: 200 mum glass fiber glued to pcb | |
491 | const Float_t InsuLength = PCBLength; | |
492 | const Float_t InsuHeight = PCBHeight; | |
493 | const Float_t InsuWidth = 0.020; | |
494 | const Int_t InsuMaterial = idGlass; | |
495 | ||
496 | // Carbon fiber panels: 200mum carbon/epoxy skin | |
497 | const Float_t PanelLength = SensLength; | |
498 | const Float_t PanelHeight = SensHeight; | |
499 | const Float_t PanelWidth = 0.020; | |
500 | const Int_t PanelMaterial = idCarbon; | |
501 | ||
502 | // rohacell between the two carbon panels | |
503 | const Float_t RohaLength = SensLength; | |
504 | const Float_t RohaHeight = SensHeight; | |
505 | const Float_t RohaWidth = 0.5; | |
506 | const Int_t RohaMaterial = idRoha; | |
507 | ||
508 | // Frame around the slat: 2 sticks along length,2 along height | |
509 | // H: the horizontal ones | |
510 | const Float_t HFrameLength = PCBLength; | |
511 | const Float_t HFrameHeight = 1.5; | |
512 | const Float_t HFrameWidth = SensWidth; | |
513 | const Int_t HFrameMaterial = idGlass; | |
514 | ||
515 | // V: the vertical ones | |
516 | const Float_t VFrameLength = 4.0; | |
517 | const Float_t VFrameHeight = SensHeight + HFrameHeight; | |
518 | const Float_t VFrameWidth = SensWidth; | |
519 | const Int_t VFrameMaterial = idGlass; | |
520 | ||
521 | // B: the horizontal border filled with rohacell | |
522 | const Float_t BFrameLength = HFrameLength; | |
523 | const Float_t BFrameHeight = (PCBHeight - SensHeight)/2. - HFrameHeight; | |
524 | const Float_t BFrameWidth = HFrameWidth; | |
525 | const Int_t BFrameMaterial = idRoha; | |
526 | ||
527 | // NULOC: 30 mum copper + 200 mum vetronite (same radiation length as 14mum copper) | |
528 | const Float_t NulocLength = 2.5; | |
529 | const Float_t NulocHeight = 7.5; | |
530 | const Float_t NulocWidth = 0.0030 + 0.0014; // equivalent copper width of vetronite; | |
531 | const Int_t NulocMaterial = idCopper; | |
532 | ||
533 | // Gassiplex package | |
534 | const Float_t GassiLength = 1.0; | |
535 | const Float_t GassiHeight = 1.0; | |
536 | const Float_t GassiWidth = 0.15; // check it !!! | |
537 | const Int_t GassiMaterial = idGlass; | |
538 | ||
539 | // slat dimensions: slat is a MOTHER volume!!! made of air | |
540 | Float_t SlatLength[nSlats3]; | |
541 | const Float_t SlatHeight = PCBHeight; | |
542 | const Float_t SlatWidth = SensWidth + 2.*(PCBWidth + InsuWidth + | |
543 | 2.* PanelWidth + RohaWidth); | |
544 | const Int_t SlatMaterial = idAir; | |
545 | const Float_t dSlatLength = VFrameLength; // border on left and right | |
546 | ||
547 | // create and position the slat (mother) volumes | |
548 | Float_t spar[3]; | |
549 | char VolNam5[5]; | |
550 | char VolNam6[5]; | |
551 | Float_t xSlat[nSlats3]; | |
552 | Float_t ySlat[nSlats3]; | |
553 | ||
554 | for (Int_t i = 0; i<nSlats3; i++){ | |
555 | SlatLength[i] = PCBLength * nPCB3[i] + 2. * dSlatLength; | |
556 | xSlat[i] = SlatLength[i]/2.; | |
557 | ySlat[i] = SensHeight * (i+0.5) - yOverlap * i; | |
558 | spar[0] = SlatLength[i]/2.; | |
559 | spar[1] = SlatHeight/2.; | |
560 | spar[2] = SlatWidth/2.; | |
561 | // zSlat to be checked (odd downstream or upstream?) | |
562 | Float_t zSlat = (i%2 ==0)? -SlatWidth/2. : SlatWidth/2.; | |
563 | sprintf(VolNam5,"S05%d",i); | |
564 | gMC->Gsvolu(VolNam5,"BOX",SlatMaterial,spar,3); | |
565 | gMC->Gspos(VolNam5, i*4+1,"C05M", xSlat[i], ySlat[i], zSlat, 0, "ONLY"); | |
566 | gMC->Gspos(VolNam5, i*4+2,"C05M",-xSlat[i], ySlat[i], zSlat, 0, "ONLY"); | |
567 | gMC->Gspos(VolNam5, i*4+3,"C05M", xSlat[i],-ySlat[i],-zSlat, 0, "ONLY"); | |
568 | gMC->Gspos(VolNam5, i*4+4,"C05M",-xSlat[i],-ySlat[i],-zSlat, 0, "ONLY"); | |
569 | sprintf(VolNam6,"S06%d",i); | |
570 | gMC->Gsvolu(VolNam6,"BOX",SlatMaterial,spar,3); | |
571 | gMC->Gspos(VolNam6, i*4+1,"C06M", xSlat[i], ySlat[i], zSlat, 0, "ONLY"); | |
572 | gMC->Gspos(VolNam6, i*4+2,"C06M",-xSlat[i], ySlat[i], zSlat, 0, "ONLY"); | |
573 | gMC->Gspos(VolNam6, i*4+3,"C06M", xSlat[i],-ySlat[i],-zSlat, 0, "ONLY"); | |
574 | gMC->Gspos(VolNam6, i*4+4,"C06M",-xSlat[i],-ySlat[i],-zSlat, 0, "ONLY"); | |
575 | } | |
a9e2aefa | 576 | |
1e8fff9c | 577 | // create the sensitive volumes (subdivided as the PCBs), |
578 | Float_t SensPar[3] = { SensLength/2., SensHeight/2., SensWidth/2. }; | |
579 | gMC->Gsvolu("S05G","BOX",SensMaterial,SensPar,3); | |
580 | gMC->Gsvolu("S06G","BOX",SensMaterial,SensPar,3); | |
581 | ||
582 | // create the PCB volume | |
583 | Float_t PCBpar[3] = { PCBLength/2., PCBHeight/2., PCBWidth/2. }; | |
584 | gMC->Gsvolu("S05P","BOX",PCBMaterial,PCBpar,3); | |
585 | gMC->Gsvolu("S06P","BOX",PCBMaterial,PCBpar,3); | |
586 | ||
587 | // create the insulating material volume | |
588 | Float_t Insupar[3] = { InsuLength/2., InsuHeight/2., InsuWidth/2. }; | |
589 | gMC->Gsvolu("S05I","BOX",InsuMaterial,Insupar,3); | |
590 | gMC->Gsvolu("S06I","BOX",InsuMaterial,Insupar,3); | |
591 | ||
592 | // create the panel volume | |
593 | Float_t Panelpar[3] = { PanelLength/2., PanelHeight/2., PanelWidth/2. }; | |
594 | gMC->Gsvolu("S05C","BOX",PanelMaterial,Panelpar,3); | |
595 | gMC->Gsvolu("S06C","BOX",PanelMaterial,Panelpar,3); | |
596 | ||
597 | // create the rohacell volume | |
598 | Float_t Rohapar[3] = { RohaLength/2., RohaHeight/2., RohaWidth/2. }; | |
599 | gMC->Gsvolu("S05R","BOX",RohaMaterial,Rohapar,3); | |
600 | gMC->Gsvolu("S06R","BOX",RohaMaterial,Rohapar,3); | |
601 | ||
602 | // create the vertical frame volume | |
603 | Float_t VFramepar[3]={VFrameLength/2., VFrameHeight/2., VFrameWidth/2.}; | |
604 | gMC->Gsvolu("S05V","BOX",VFrameMaterial,VFramepar,3); | |
605 | gMC->Gsvolu("S06V","BOX",VFrameMaterial,VFramepar,3); | |
606 | ||
607 | // create the horizontal frame volume | |
608 | Float_t HFramepar[3]={HFrameLength/2., HFrameHeight/2., HFrameWidth/2.}; | |
609 | gMC->Gsvolu("S05H","BOX",HFrameMaterial,HFramepar,3); | |
610 | gMC->Gsvolu("S06H","BOX",HFrameMaterial,HFramepar,3); | |
611 | ||
612 | // create the horizontal border volume | |
613 | Float_t BFramepar[3]={BFrameLength/2., BFrameHeight/2., BFrameWidth/2.}; | |
614 | gMC->Gsvolu("S05B","BOX",BFrameMaterial,BFramepar,3); | |
615 | gMC->Gsvolu("S06B","BOX",BFrameMaterial,BFramepar,3); | |
616 | ||
617 | Int_t index=0; | |
618 | for (Int_t i = 0; i<nSlats3; i++){ | |
619 | sprintf(VolNam5,"S05%d",i); | |
620 | sprintf(VolNam6,"S06%d",i); | |
621 | Float_t xvframe = (SlatLength[i] - VFrameLength)/2.; | |
622 | gMC->Gspos("S05V",2*i-1,VolNam5, xvframe, 0., 0. , 0, "ONLY"); | |
623 | gMC->Gspos("S05V",2*i ,VolNam5,-xvframe, 0., 0. , 0, "ONLY"); | |
624 | gMC->Gspos("S06V",2*i-1,VolNam6, xvframe, 0., 0. , 0, "ONLY"); | |
625 | gMC->Gspos("S06V",2*i ,VolNam6,-xvframe, 0., 0. , 0, "ONLY"); | |
626 | for (Int_t j=0; j<nPCB3[i]; j++){ | |
627 | index++; | |
628 | Float_t xx = SensLength * (-nPCB3[i]/2.+j+.5); | |
629 | Float_t yy = 0.; | |
630 | Float_t zSens = 0.; | |
631 | gMC->Gspos("S05G",index,VolNam5, xx, yy, zSens , 0, "ONLY"); | |
632 | gMC->Gspos("S06G",index,VolNam6, xx, yy, zSens , 0, "ONLY"); | |
633 | Float_t zPCB = (SensWidth+PCBWidth)/2.; | |
634 | gMC->Gspos("S05P",2*index-1,VolNam5, xx, yy, zPCB , 0, "ONLY"); | |
635 | gMC->Gspos("S05P",2*index ,VolNam5, xx, yy,-zPCB , 0, "ONLY"); | |
636 | gMC->Gspos("S06P",2*index-1,VolNam6, xx, yy, zPCB , 0, "ONLY"); | |
637 | gMC->Gspos("S06P",2*index ,VolNam6, xx, yy,-zPCB , 0, "ONLY"); | |
638 | Float_t zInsu = (InsuWidth+PCBWidth)/2. + zPCB; | |
639 | gMC->Gspos("S05I",2*index-1,VolNam5, xx, yy, zInsu , 0, "ONLY"); | |
640 | gMC->Gspos("S05I",2*index ,VolNam5, xx, yy,-zInsu , 0, "ONLY"); | |
641 | gMC->Gspos("S06I",2*index-1,VolNam6, xx, yy, zInsu , 0, "ONLY"); | |
642 | gMC->Gspos("S06I",2*index ,VolNam6, xx, yy,-zInsu , 0, "ONLY"); | |
643 | Float_t zPanel1 = (InsuWidth+PanelWidth)/2. + zInsu; | |
644 | gMC->Gspos("S05C",4*index-3,VolNam5, xx, yy, zPanel1 , 0, "ONLY"); | |
645 | gMC->Gspos("S05C",4*index-2,VolNam5, xx, yy,-zPanel1 , 0, "ONLY"); | |
646 | gMC->Gspos("S06C",4*index-3,VolNam6, xx, yy, zPanel1 , 0, "ONLY"); | |
647 | gMC->Gspos("S06C",4*index-2,VolNam6, xx, yy,-zPanel1 , 0, "ONLY"); | |
648 | Float_t zRoha = (RohaWidth+PanelWidth)/2. + zPanel1; | |
649 | gMC->Gspos("S05R",2*index-1,VolNam5, xx, yy, zRoha , 0, "ONLY"); | |
650 | gMC->Gspos("S05R",2*index ,VolNam5, xx, yy,-zRoha , 0, "ONLY"); | |
651 | gMC->Gspos("S06R",2*index-1,VolNam6, xx, yy, zRoha , 0, "ONLY"); | |
652 | gMC->Gspos("S06R",2*index ,VolNam6, xx, yy,-zRoha , 0, "ONLY"); | |
653 | Float_t zPanel2 = (RohaWidth+PanelWidth)/2. + zRoha; | |
654 | gMC->Gspos("S05C",4*index-1,VolNam5, xx, yy, zPanel2 , 0, "ONLY"); | |
655 | gMC->Gspos("S05C",4*index ,VolNam5, xx, yy,-zPanel2 , 0, "ONLY"); | |
656 | gMC->Gspos("S06C",4*index-1,VolNam6, xx, yy, zPanel2 , 0, "ONLY"); | |
657 | gMC->Gspos("S06C",4*index ,VolNam6, xx, yy,-zPanel2 , 0, "ONLY"); | |
658 | Float_t yframe = (SensHeight + HFrameHeight)/2.; | |
659 | gMC->Gspos("S05H",2*index-1,VolNam5, xx, yframe, 0. , 0, "ONLY"); | |
660 | gMC->Gspos("S05H",2*index ,VolNam5, xx,-yframe, 0. , 0, "ONLY"); | |
661 | gMC->Gspos("S06H",2*index-1,VolNam6, xx, yframe, 0. , 0, "ONLY"); | |
662 | gMC->Gspos("S06H",2*index ,VolNam6, xx,-yframe, 0. , 0, "ONLY"); | |
663 | Float_t yborder = (BFrameHeight + HFrameHeight)/2. + yframe; | |
664 | gMC->Gspos("S05B",2*index-1,VolNam5, xx, yborder, 0. , 0, "ONLY"); | |
665 | gMC->Gspos("S05B",2*index ,VolNam5, xx,-yborder, 0. , 0, "ONLY"); | |
666 | gMC->Gspos("S06B",2*index-1,VolNam6, xx, yborder, 0. , 0, "ONLY"); | |
667 | gMC->Gspos("S06B",2*index ,VolNam6, xx,-yborder, 0. , 0, "ONLY"); | |
668 | } | |
a9e2aefa | 669 | } |
a9e2aefa | 670 | |
1e8fff9c | 671 | // create the NULOC volume and position it in the horizontal frame |
672 | Float_t nulocpar[3]={NulocLength/2., NulocHeight/2., NulocWidth/2.}; | |
673 | gMC->Gsvolu("S05N","BOX",NulocMaterial,nulocpar,3); | |
674 | gMC->Gsvolu("S06N","BOX",NulocMaterial,nulocpar,3); | |
675 | ||
676 | Float_t xxmax = (BFrameLength - NulocLength)/2.; | |
677 | index = 0; | |
678 | for (Float_t xx = -xxmax; xx<=xxmax; xx+=3*NulocLength) { | |
679 | index++; | |
680 | gMC->Gspos("S05N",2*index-1,"S05B", xx, 0.,-BFrameWidth/4., 0, "ONLY"); | |
681 | gMC->Gspos("S05N",2*index ,"S05B", xx, 0., BFrameWidth/4., 0, "ONLY"); | |
682 | gMC->Gspos("S06N",2*index-1,"S06B", xx, 0.,-BFrameWidth/4., 0, "ONLY"); | |
683 | gMC->Gspos("S06N",2*index ,"S06B", xx, 0., BFrameWidth/4., 0, "ONLY"); | |
684 | } | |
685 | ||
686 | // create the gassiplex volume | |
687 | Float_t gassipar[3]={GassiLength/2., GassiHeight/2., GassiWidth/2.}; | |
688 | gMC->Gsvolu("S05E","BOX",GassiMaterial,gassipar,3); | |
689 | gMC->Gsvolu("S06E","BOX",GassiMaterial,gassipar,3); | |
690 | ||
691 | ||
692 | // position 4 gassiplex in the nuloc | |
693 | ||
694 | gMC->Gspos("S05E",1,"S05N", 0., -3 * NulocHeight/8., 0. , 0, "ONLY"); | |
695 | gMC->Gspos("S05E",2,"S05N", 0., - NulocHeight/8., 0. , 0, "ONLY"); | |
696 | gMC->Gspos("S05E",3,"S05N", 0., NulocHeight/8., 0. , 0, "ONLY"); | |
697 | gMC->Gspos("S05E",4,"S05N", 0., 3 * NulocHeight/8., 0. , 0, "ONLY"); | |
698 | gMC->Gspos("S06E",1,"S06N", 0., -3 * NulocHeight/8., 0. , 0, "ONLY"); | |
699 | gMC->Gspos("S06E",2,"S06N", 0., - NulocHeight/8., 0. , 0, "ONLY"); | |
700 | gMC->Gspos("S06E",3,"S06N", 0., NulocHeight/8., 0. , 0, "ONLY"); | |
701 | gMC->Gspos("S06E",4,"S06N", 0., 3 * NulocHeight/8., 0. , 0, "ONLY"); | |
702 | ||
a9e2aefa | 703 | |
704 | //******************************************************************** | |
705 | // Station 4 ** | |
706 | //******************************************************************** | |
707 | // indices 1 and 2 for first and second chambers in the station | |
708 | // iChamber (first chamber) kept for other quanties than Z, | |
709 | // assumed to be the same in both chambers | |
710 | iChamber1 = iChamber = (AliMUONChamber*) (*fChambers)[6]; | |
711 | iChamber2 =(AliMUONChamber*) (*fChambers)[7]; | |
712 | zpos1=iChamber1->Z(); | |
713 | zpos2=iChamber2->Z(); | |
714 | dstation = zpos2 - zpos1; | |
715 | zfpos=-(iChamber->DGas()+dframez+iChamber->DAlu())/2; | |
716 | ||
717 | // | |
718 | // Mother volume | |
719 | tpar[0] = iChamber->RInner()-dframep; | |
720 | tpar[1] = (iChamber->ROuter()+dframep)/TMath::Cos(phi); | |
1e8fff9c | 721 | tpar[2] = 3.252; |
a9e2aefa | 722 | |
723 | gMC->Gsvolu("C07M", "TUBE", idAir, tpar, 3); | |
724 | gMC->Gsvolu("C08M", "TUBE", idAir, tpar, 3); | |
725 | gMC->Gspos("C07M", 1, "ALIC", 0., 0., zpos1 , 0, "ONLY"); | |
726 | gMC->Gspos("C08M", 1, "ALIC", 0., 0., zpos2 , 0, "ONLY"); | |
1e8fff9c | 727 | |
a9e2aefa | 728 | |
1e8fff9c | 729 | const Int_t nSlats4 = 7; // number of slats per quadrant |
730 | const Int_t nPCB4[nSlats4] = {7,7,6,6,5,4,2}; // n PCB per slat | |
731 | ||
732 | // slat dimensions: slat is a MOTHER volume!!! made of air | |
733 | Float_t SlatLength4[nSlats4]; | |
734 | ||
735 | // create and position the slat (mother) volumes | |
736 | ||
737 | char VolNam7[5]; | |
738 | char VolNam8[5]; | |
739 | Float_t xSlat4; | |
740 | Float_t ySlat41, ySlat42; | |
741 | ||
742 | ||
743 | for (Int_t i = 0; i<nSlats4; i++){ | |
744 | SlatLength4[i] = PCBLength * nPCB4[i] + 2. * dSlatLength; | |
745 | xSlat4 = SlatLength4[i]/2.; | |
746 | if (i==0) xSlat4 += 30.; | |
a9e2aefa | 747 | |
1e8fff9c | 748 | ySlat41 = SensHeight * (i+0.5) - yOverlap *i - yOverlap/2.; |
749 | ySlat42 = -SensHeight * (i+0.5) + yOverlap *i + yOverlap/2.; | |
a9e2aefa | 750 | |
1e8fff9c | 751 | spar[0] = SlatLength4[i]/2.; |
752 | spar[1] = SlatHeight/2.; | |
753 | spar[2] = SlatWidth/2.; | |
754 | // zSlat to be checked (odd downstream or upstream?) | |
755 | Float_t zSlat = (i%2 ==0)? SlatWidth/2. : -SlatWidth/2.; | |
756 | sprintf(VolNam7,"S07%d",i); | |
757 | gMC->Gsvolu(VolNam7,"BOX",SlatMaterial,spar,3); | |
758 | gMC->Gspos(VolNam7, i*4+1,"C07M", xSlat4, ySlat41, -zSlat, 0, "ONLY"); | |
759 | gMC->Gspos(VolNam7, i*4+2,"C07M",-xSlat4, ySlat41, -zSlat, 0, "ONLY"); | |
760 | gMC->Gspos(VolNam7, i*4+3,"C07M", xSlat4, ySlat42, zSlat, 0, "ONLY"); | |
761 | gMC->Gspos(VolNam7, i*4+4,"C07M",-xSlat4, ySlat42, zSlat, 0, "ONLY"); | |
762 | sprintf(VolNam8,"S08%d",i); | |
763 | gMC->Gsvolu(VolNam8,"BOX",SlatMaterial,spar,3); | |
764 | gMC->Gspos(VolNam8, i*4+1,"C08M", xSlat4, ySlat41, -zSlat, 0, "ONLY"); | |
765 | gMC->Gspos(VolNam8, i*4+2,"C08M",-xSlat4, ySlat41, -zSlat, 0, "ONLY"); | |
766 | gMC->Gspos(VolNam8, i*4+3,"C08M", xSlat4, ySlat42, zSlat, 0, "ONLY"); | |
767 | gMC->Gspos(VolNam8, i*4+4,"C08M",-xSlat4, ySlat42, zSlat, 0, "ONLY"); | |
a9e2aefa | 768 | } |
769 | ||
1e8fff9c | 770 | // create the sensitive volumes (subdivided as the PCBs), |
771 | ||
772 | gMC->Gsvolu("S07G","BOX",SensMaterial,SensPar,3); | |
773 | gMC->Gsvolu("S08G","BOX",SensMaterial,SensPar,3); | |
a9e2aefa | 774 | |
1e8fff9c | 775 | // create the PCB volume |
776 | ||
777 | gMC->Gsvolu("S07P","BOX",PCBMaterial,PCBpar,3); | |
778 | gMC->Gsvolu("S08P","BOX",PCBMaterial,PCBpar,3); | |
779 | ||
780 | // create the insulating material volume | |
781 | ||
782 | gMC->Gsvolu("S07I","BOX",InsuMaterial,Insupar,3); | |
783 | gMC->Gsvolu("S08I","BOX",InsuMaterial,Insupar,3); | |
784 | ||
785 | // create the panel volume | |
786 | ||
787 | gMC->Gsvolu("S07C","BOX",PanelMaterial,Panelpar,3); | |
788 | gMC->Gsvolu("S08C","BOX",PanelMaterial,Panelpar,3); | |
789 | ||
790 | // create the rohacell volume | |
791 | ||
792 | gMC->Gsvolu("S07R","BOX",RohaMaterial,Rohapar,3); | |
793 | gMC->Gsvolu("S08R","BOX",RohaMaterial,Rohapar,3); | |
794 | ||
795 | // create the vertical frame volume | |
796 | ||
797 | gMC->Gsvolu("S07V","BOX",VFrameMaterial,VFramepar,3); | |
798 | gMC->Gsvolu("S08V","BOX",VFrameMaterial,VFramepar,3); | |
799 | ||
800 | // create the horizontal frame volume | |
801 | ||
802 | gMC->Gsvolu("S07H","BOX",HFrameMaterial,HFramepar,3); | |
803 | gMC->Gsvolu("S08H","BOX",HFrameMaterial,HFramepar,3); | |
804 | ||
805 | // create the horizontal border volume | |
806 | ||
807 | gMC->Gsvolu("S07B","BOX",BFrameMaterial,BFramepar,3); | |
808 | gMC->Gsvolu("S08B","BOX",BFrameMaterial,BFramepar,3); | |
809 | ||
810 | for (Int_t i = 0; i<nSlats4; i++){ | |
811 | sprintf(VolNam7,"S07%d",i); | |
812 | sprintf(VolNam8,"S08%d",i); | |
813 | Float_t xvframe = (SlatLength4[i] - VFrameLength)/2.; | |
814 | gMC->Gspos("S07V",2*i-1,VolNam7, xvframe, 0., 0. , 0, "ONLY"); | |
815 | gMC->Gspos("S07V",2*i ,VolNam7,-xvframe, 0., 0. , 0, "ONLY"); | |
816 | gMC->Gspos("S08V",2*i-1,VolNam8, xvframe, 0., 0. , 0, "ONLY"); | |
817 | gMC->Gspos("S08V",2*i ,VolNam8,-xvframe, 0., 0. , 0, "ONLY"); | |
818 | for (Int_t j=0; j<nPCB4[i]; j++){ | |
819 | index++; | |
820 | Float_t xx = SensLength * (-nPCB4[i]/2.+j+.5); | |
821 | Float_t yy = 0.; | |
822 | Float_t zSens = 0.; | |
823 | gMC->Gspos("S07G",index,VolNam7, xx, yy, zSens , 0, "ONLY"); | |
824 | gMC->Gspos("S08G",index,VolNam8, xx, yy, zSens , 0, "ONLY"); | |
825 | Float_t zPCB = (SensWidth+PCBWidth)/2.; | |
826 | gMC->Gspos("S07P",2*index-1,VolNam7, xx, yy, zPCB , 0, "ONLY"); | |
827 | gMC->Gspos("S07P",2*index ,VolNam7, xx, yy,-zPCB , 0, "ONLY"); | |
828 | gMC->Gspos("S08P",2*index-1,VolNam8, xx, yy, zPCB , 0, "ONLY"); | |
829 | gMC->Gspos("S08P",2*index ,VolNam8, xx, yy,-zPCB , 0, "ONLY"); | |
830 | Float_t zInsu = (InsuWidth+PCBWidth)/2. + zPCB; | |
831 | gMC->Gspos("S07I",2*index-1,VolNam7, xx, yy, zInsu , 0, "ONLY"); | |
832 | gMC->Gspos("S07I",2*index ,VolNam7, xx, yy,-zInsu , 0, "ONLY"); | |
833 | gMC->Gspos("S08I",2*index-1,VolNam8, xx, yy, zInsu , 0, "ONLY"); | |
834 | gMC->Gspos("S08I",2*index ,VolNam8, xx, yy,-zInsu , 0, "ONLY"); | |
835 | Float_t zPanel1 = (InsuWidth+PanelWidth)/2. + zInsu; | |
836 | gMC->Gspos("S07C",4*index-3,VolNam7, xx, yy, zPanel1 , 0, "ONLY"); | |
837 | gMC->Gspos("S07C",4*index-2,VolNam7, xx, yy,-zPanel1 , 0, "ONLY"); | |
838 | gMC->Gspos("S08C",4*index-3,VolNam8, xx, yy, zPanel1 , 0, "ONLY"); | |
839 | gMC->Gspos("S08C",4*index-2,VolNam8, xx, yy,-zPanel1 , 0, "ONLY"); | |
840 | Float_t zRoha = (RohaWidth+PanelWidth)/2. + zPanel1; | |
841 | gMC->Gspos("S07R",2*index-1,VolNam7, xx, yy, zRoha , 0, "ONLY"); | |
842 | gMC->Gspos("S07R",2*index ,VolNam7, xx, yy,-zRoha , 0, "ONLY"); | |
843 | gMC->Gspos("S08R",2*index-1,VolNam8, xx, yy, zRoha , 0, "ONLY"); | |
844 | gMC->Gspos("S08R",2*index ,VolNam8, xx, yy,-zRoha , 0, "ONLY"); | |
845 | Float_t zPanel2 = (RohaWidth+PanelWidth)/2. + zRoha; | |
846 | gMC->Gspos("S07C",4*index-1,VolNam7, xx, yy, zPanel2 , 0, "ONLY"); | |
847 | gMC->Gspos("S07C",4*index ,VolNam7, xx, yy,-zPanel2 , 0, "ONLY"); | |
848 | gMC->Gspos("S08C",4*index-1,VolNam8, xx, yy, zPanel2 , 0, "ONLY"); | |
849 | gMC->Gspos("S08C",4*index ,VolNam8, xx, yy,-zPanel2 , 0, "ONLY"); | |
850 | Float_t yframe = (SensHeight + HFrameHeight)/2.; | |
851 | gMC->Gspos("S07H",2*index-1,VolNam7, xx, yframe, 0. , 0, "ONLY"); | |
852 | gMC->Gspos("S07H",2*index ,VolNam7, xx,-yframe, 0. , 0, "ONLY"); | |
853 | gMC->Gspos("S08H",2*index-1,VolNam8, xx, yframe, 0. , 0, "ONLY"); | |
854 | gMC->Gspos("S08H",2*index ,VolNam8, xx,-yframe, 0. , 0, "ONLY"); | |
855 | Float_t yborder = (BFrameHeight + HFrameHeight)/2. + yframe; | |
856 | gMC->Gspos("S07B",2*index-1,VolNam7, xx, yborder, 0. , 0, "ONLY"); | |
857 | gMC->Gspos("S07B",2*index ,VolNam7, xx,-yborder, 0. , 0, "ONLY"); | |
858 | gMC->Gspos("S08B",2*index-1,VolNam8, xx, yborder, 0. , 0, "ONLY"); | |
859 | gMC->Gspos("S08B",2*index ,VolNam8, xx,-yborder, 0. , 0, "ONLY"); | |
860 | } | |
a9e2aefa | 861 | } |
1e8fff9c | 862 | |
863 | // create the NULOC volume and position it in the horizontal frame | |
864 | ||
865 | gMC->Gsvolu("S07N","BOX",NulocMaterial,nulocpar,3); | |
866 | gMC->Gsvolu("S08N","BOX",NulocMaterial,nulocpar,3); | |
867 | ||
868 | ||
869 | index = 0; | |
870 | for (Float_t xx = -xxmax; xx<=xxmax; xx+=3*NulocLength) { | |
871 | index++; | |
872 | gMC->Gspos("S07N",2*index-1,"S07B", xx, 0.,-BFrameWidth/4., 0, "ONLY"); | |
873 | gMC->Gspos("S07N",2*index ,"S07B", xx, 0., BFrameWidth/4., 0, "ONLY"); | |
874 | gMC->Gspos("S08N",2*index-1,"S08B", xx, 0.,-BFrameWidth/4., 0, "ONLY"); | |
875 | gMC->Gspos("S08N",2*index ,"S08B", xx, 0., BFrameWidth/4., 0, "ONLY"); | |
876 | } | |
877 | ||
878 | // create the gassiplex volume | |
879 | ||
880 | gMC->Gsvolu("S07E","BOX",GassiMaterial,gassipar,3); | |
881 | gMC->Gsvolu("S08E","BOX",GassiMaterial,gassipar,3); | |
882 | ||
883 | ||
884 | // position 4 gassiplex in the nuloc | |
885 | ||
886 | gMC->Gspos("S07E",1,"S07N", 0., -3 * NulocHeight/8., 0. , 0, "ONLY"); | |
887 | gMC->Gspos("S07E",2,"S07N", 0., - NulocHeight/8., 0. , 0, "ONLY"); | |
888 | gMC->Gspos("S07E",3,"S07N", 0., NulocHeight/8., 0. , 0, "ONLY"); | |
889 | gMC->Gspos("S07E",4,"S07N", 0., 3 * NulocHeight/8., 0. , 0, "ONLY"); | |
890 | gMC->Gspos("S08E",1,"S08N", 0., -3 * NulocHeight/8., 0. , 0, "ONLY"); | |
891 | gMC->Gspos("S08E",2,"S08N", 0., - NulocHeight/8., 0. , 0, "ONLY"); | |
892 | gMC->Gspos("S08E",3,"S08N", 0., NulocHeight/8., 0. , 0, "ONLY"); | |
893 | gMC->Gspos("S08E",4,"S08N", 0., 3 * NulocHeight/8., 0. , 0, "ONLY"); | |
894 | ||
895 | ||
896 | ||
a9e2aefa | 897 | //******************************************************************** |
898 | // Station 5 ** | |
899 | //******************************************************************** | |
900 | // indices 1 and 2 for first and second chambers in the station | |
901 | // iChamber (first chamber) kept for other quanties than Z, | |
902 | // assumed to be the same in both chambers | |
903 | iChamber1 = iChamber = (AliMUONChamber*) (*fChambers)[8]; | |
904 | iChamber2 =(AliMUONChamber*) (*fChambers)[9]; | |
905 | zpos1=iChamber1->Z(); | |
906 | zpos2=iChamber2->Z(); | |
907 | dstation = zpos2 - zpos1; | |
908 | zfpos=-(iChamber->DGas()+dframez+iChamber->DAlu())/2; | |
909 | ||
910 | // | |
911 | // Mother volume | |
912 | tpar[0] = iChamber->RInner()-dframep; | |
913 | tpar[1] = (iChamber->ROuter()+dframep)/TMath::Cos(phi); | |
914 | tpar[2] = dstation/4; | |
915 | ||
916 | gMC->Gsvolu("C09M", "TUBE", idAir, tpar, 3); | |
917 | gMC->Gsvolu("C10M", "TUBE", idAir, tpar, 3); | |
918 | gMC->Gspos("C09M", 1, "ALIC", 0., 0., zpos1 , 0, "ONLY"); | |
919 | gMC->Gspos("C10M", 1, "ALIC", 0., 0., zpos2 , 0, "ONLY"); | |
a9e2aefa | 920 | |
a9e2aefa | 921 | |
1e8fff9c | 922 | const Int_t nSlats5 = 7; // number of slats per quadrant |
923 | const Int_t nPCB5[nSlats5] = {6,6,6,5,5,4,3}; // n PCB per slat | |
924 | ||
925 | // slat dimensions: slat is a MOTHER volume!!! made of air | |
926 | Float_t SlatLength5[nSlats5]; | |
927 | //const Float_t SlatHeight = PCBHeight; | |
928 | // const Float_t SlatWidth = SensWidth + 2.*(PCBWidth + InsuWidth + | |
929 | // 2.* PanelWidth + RohaWidth); | |
930 | // const Int_t SlatMaterial = idAir; | |
931 | // const Float_t dSlatLength = VFrameLength; // border on left and right | |
932 | ||
933 | // create and position the slat (mother) volumes | |
934 | // Float_t spar[3]; | |
935 | char VolNam9[5]; | |
936 | char VolNam10[5]; | |
937 | Float_t xSlat5[nSlats5]; | |
938 | Float_t ySlat5[nSlats5]; | |
939 | ||
940 | for (Int_t i = 0; i<nSlats5; i++){ | |
941 | SlatLength5[i] = PCBLength * nPCB5[i] + 2. * dSlatLength; | |
942 | xSlat5[i] = SlatLength5[i]/2.; | |
943 | ySlat5[i] = SensHeight * (i+0.5) - yOverlap * i; | |
944 | spar[0] = SlatLength5[i]/2.; | |
945 | spar[1] = SlatHeight/2.; | |
946 | spar[2] = SlatWidth/2.; | |
947 | // zSlat to be checked (odd downstream or upstream?) | |
948 | Float_t zSlat = (i%2 ==0)? -SlatWidth/2. : SlatWidth/2.; | |
949 | sprintf(VolNam9,"S09%d",i); | |
950 | gMC->Gsvolu(VolNam9,"BOX",SlatMaterial,spar,3); | |
951 | gMC->Gspos(VolNam9, i*4+1,"C09M", xSlat5[i], ySlat5[i], zSlat, 0, "ONLY"); | |
952 | gMC->Gspos(VolNam9, i*4+2,"C09M",-xSlat5[i], ySlat5[i], zSlat, 0, "ONLY"); | |
953 | gMC->Gspos(VolNam9, i*4+3,"C09M", xSlat5[i],-ySlat5[i],-zSlat, 0, "ONLY"); | |
954 | gMC->Gspos(VolNam9, i*4+4,"C09M",-xSlat5[i],-ySlat5[i],-zSlat, 0, "ONLY"); | |
955 | sprintf(VolNam10,"S10%d",i); | |
956 | gMC->Gsvolu(VolNam10,"BOX",SlatMaterial,spar,3); | |
957 | gMC->Gspos(VolNam10, i*4+1,"C10M", xSlat5[i], ySlat5[i], zSlat, 0, "ONLY"); | |
958 | gMC->Gspos(VolNam10, i*4+2,"C10M",-xSlat5[i], ySlat5[i], zSlat, 0, "ONLY"); | |
959 | gMC->Gspos(VolNam10, i*4+3,"C10M", xSlat5[i],-ySlat5[i],-zSlat, 0, "ONLY"); | |
960 | gMC->Gspos(VolNam10, i*4+4,"C10M",-xSlat5[i],-ySlat5[i],-zSlat, 0, "ONLY"); | |
a9e2aefa | 961 | } |
962 | ||
1e8fff9c | 963 | // create the sensitive volumes (subdivided as the PCBs), |
964 | ||
965 | gMC->Gsvolu("S09G","BOX",SensMaterial,SensPar,3); | |
966 | gMC->Gsvolu("S10G","BOX",SensMaterial,SensPar,3); | |
a9e2aefa | 967 | |
1e8fff9c | 968 | // create the PCB volume |
969 | ||
970 | gMC->Gsvolu("S09P","BOX",PCBMaterial,PCBpar,3); | |
971 | gMC->Gsvolu("S10P","BOX",PCBMaterial,PCBpar,3); | |
972 | ||
973 | // create the insulating material volume | |
974 | ||
975 | gMC->Gsvolu("S09I","BOX",InsuMaterial,Insupar,3); | |
976 | gMC->Gsvolu("S10I","BOX",InsuMaterial,Insupar,3); | |
977 | ||
978 | // create the panel volume | |
979 | ||
980 | gMC->Gsvolu("S09C","BOX",PanelMaterial,Panelpar,3); | |
981 | gMC->Gsvolu("S10C","BOX",PanelMaterial,Panelpar,3); | |
982 | ||
983 | // create the rohacell volume | |
984 | ||
985 | gMC->Gsvolu("S09R","BOX",RohaMaterial,Rohapar,3); | |
986 | gMC->Gsvolu("S10R","BOX",RohaMaterial,Rohapar,3); | |
987 | ||
988 | // create the vertical frame volume | |
989 | ||
990 | gMC->Gsvolu("S09V","BOX",VFrameMaterial,VFramepar,3); | |
991 | gMC->Gsvolu("S10V","BOX",VFrameMaterial,VFramepar,3); | |
992 | ||
993 | // create the horizontal frame volume | |
994 | ||
995 | gMC->Gsvolu("S09H","BOX",HFrameMaterial,HFramepar,3); | |
996 | gMC->Gsvolu("S10H","BOX",HFrameMaterial,HFramepar,3); | |
997 | ||
998 | // create the horizontal border volume | |
999 | ||
1000 | gMC->Gsvolu("S09B","BOX",BFrameMaterial,BFramepar,3); | |
1001 | gMC->Gsvolu("S10B","BOX",BFrameMaterial,BFramepar,3); | |
1002 | ||
1003 | ||
1004 | for (Int_t i = 0; i<nSlats5; i++){ | |
1005 | sprintf(VolNam9,"S09%d",i); | |
1006 | sprintf(VolNam10,"S10%d",i); | |
1007 | Float_t xvframe = (SlatLength5[i] - VFrameLength)/2.; | |
1008 | gMC->Gspos("S09V",2*i-1,VolNam9, xvframe, 0., 0. , 0, "ONLY"); | |
1009 | gMC->Gspos("S09V",2*i ,VolNam9,-xvframe, 0., 0. , 0, "ONLY"); | |
1010 | gMC->Gspos("S10V",2*i-1,VolNam10, xvframe, 0., 0. , 0, "ONLY"); | |
1011 | gMC->Gspos("S10V",2*i ,VolNam10,-xvframe, 0., 0. , 0, "ONLY"); | |
1012 | for (Int_t j=0; j<nPCB5[i]; j++){ | |
1013 | index++; | |
1014 | Float_t xx = SensLength * (-nPCB5[i]/2.+j+.5); | |
1015 | Float_t yy = 0.; | |
1016 | Float_t zSens = 0.; | |
1017 | gMC->Gspos("S09G",index,VolNam9, xx, yy, zSens , 0, "ONLY"); | |
1018 | gMC->Gspos("S10G",index,VolNam10, xx, yy, zSens , 0, "ONLY"); | |
1019 | Float_t zPCB = (SensWidth+PCBWidth)/2.; | |
1020 | gMC->Gspos("S09P",2*index-1,VolNam9, xx, yy, zPCB , 0, "ONLY"); | |
1021 | gMC->Gspos("S09P",2*index ,VolNam9, xx, yy,-zPCB , 0, "ONLY"); | |
1022 | gMC->Gspos("S10P",2*index-1,VolNam10, xx, yy, zPCB , 0, "ONLY"); | |
1023 | gMC->Gspos("S10P",2*index ,VolNam10, xx, yy,-zPCB , 0, "ONLY"); | |
1024 | Float_t zInsu = (InsuWidth+PCBWidth)/2. + zPCB; | |
1025 | gMC->Gspos("S09I",2*index-1,VolNam9, xx, yy, zInsu , 0, "ONLY"); | |
1026 | gMC->Gspos("S09I",2*index ,VolNam9, xx, yy,-zInsu , 0, "ONLY"); | |
1027 | gMC->Gspos("S10I",2*index-1,VolNam10, xx, yy, zInsu , 0, "ONLY"); | |
1028 | gMC->Gspos("S10I",2*index ,VolNam10, xx, yy,-zInsu , 0, "ONLY"); | |
1029 | Float_t zPanel1 = (InsuWidth+PanelWidth)/2. + zInsu; | |
1030 | gMC->Gspos("S09C",4*index-3,VolNam9, xx, yy, zPanel1 , 0, "ONLY"); | |
1031 | gMC->Gspos("S09C",4*index-2,VolNam9, xx, yy,-zPanel1 , 0, "ONLY"); | |
1032 | gMC->Gspos("S10C",4*index-3,VolNam10, xx, yy, zPanel1 , 0, "ONLY"); | |
1033 | gMC->Gspos("S10C",4*index-2,VolNam10, xx, yy,-zPanel1 , 0, "ONLY"); | |
1034 | Float_t zRoha = (RohaWidth+PanelWidth)/2. + zPanel1; | |
1035 | gMC->Gspos("S09R",2*index-1,VolNam9, xx, yy, zRoha , 0, "ONLY"); | |
1036 | gMC->Gspos("S09R",2*index ,VolNam9, xx, yy,-zRoha , 0, "ONLY"); | |
1037 | gMC->Gspos("S10R",2*index-1,VolNam10, xx, yy, zRoha , 0, "ONLY"); | |
1038 | gMC->Gspos("S10R",2*index ,VolNam10, xx, yy,-zRoha , 0, "ONLY"); | |
1039 | Float_t zPanel2 = (RohaWidth+PanelWidth)/2. + zRoha; | |
1040 | gMC->Gspos("S09C",4*index-1,VolNam9, xx, yy, zPanel2 , 0, "ONLY"); | |
1041 | gMC->Gspos("S09C",4*index ,VolNam9, xx, yy,-zPanel2 , 0, "ONLY"); | |
1042 | gMC->Gspos("S10C",4*index-1,VolNam10, xx, yy, zPanel2 , 0, "ONLY"); | |
1043 | gMC->Gspos("S10C",4*index ,VolNam10, xx, yy,-zPanel2 , 0, "ONLY"); | |
1044 | Float_t yframe = (SensHeight + HFrameHeight)/2.; | |
1045 | gMC->Gspos("S09H",2*index-1,VolNam9, xx, yframe, 0. , 0, "ONLY"); | |
1046 | gMC->Gspos("S09H",2*index ,VolNam9, xx,-yframe, 0. , 0, "ONLY"); | |
1047 | gMC->Gspos("S10H",2*index-1,VolNam10, xx, yframe, 0. , 0, "ONLY"); | |
1048 | gMC->Gspos("S10H",2*index ,VolNam10, xx,-yframe, 0. , 0, "ONLY"); | |
1049 | Float_t yborder = (BFrameHeight + HFrameHeight)/2. + yframe; | |
1050 | gMC->Gspos("S09B",2*index-1,VolNam9, xx, yborder, 0. , 0, "ONLY"); | |
1051 | gMC->Gspos("S09B",2*index ,VolNam9, xx,-yborder, 0. , 0, "ONLY"); | |
1052 | gMC->Gspos("S10B",2*index-1,VolNam10, xx, yborder, 0. , 0, "ONLY"); | |
1053 | gMC->Gspos("S10B",2*index ,VolNam10, xx,-yborder, 0. , 0, "ONLY"); | |
1054 | } | |
1055 | } | |
1056 | ||
1057 | // create the NULOC volume and position it in the horizontal frame | |
1058 | ||
1059 | gMC->Gsvolu("S09N","BOX",NulocMaterial,nulocpar,3); | |
1060 | gMC->Gsvolu("S10N","BOX",NulocMaterial,nulocpar,3); | |
1061 | ||
1062 | index = 0; | |
1063 | for (Float_t xx = -xxmax; xx<=xxmax; xx+=3*NulocLength) { | |
1064 | index++; | |
1065 | gMC->Gspos("S09N",2*index-1,"S09B", xx, 0.,-BFrameWidth/4., 0, "ONLY"); | |
1066 | gMC->Gspos("S09N",2*index ,"S09B", xx, 0., BFrameWidth/4., 0, "ONLY"); | |
1067 | gMC->Gspos("S10N",2*index-1,"S10B", xx, 0.,-BFrameWidth/4., 0, "ONLY"); | |
1068 | gMC->Gspos("S10N",2*index ,"S10B", xx, 0., BFrameWidth/4., 0, "ONLY"); | |
a9e2aefa | 1069 | } |
1070 | ||
1e8fff9c | 1071 | // create the gassiplex volume |
1072 | ||
1073 | gMC->Gsvolu("S09E","BOX",GassiMaterial,gassipar,3); | |
1074 | gMC->Gsvolu("S10E","BOX",GassiMaterial,gassipar,3); | |
1075 | ||
1076 | ||
1077 | // position 4 gassiplex in the nuloc | |
1078 | ||
1079 | gMC->Gspos("S09E",1,"S09N", 0., -3 * NulocHeight/8., 0. , 0, "ONLY"); | |
1080 | gMC->Gspos("S09E",2,"S09N", 0., - NulocHeight/8., 0. , 0, "ONLY"); | |
1081 | gMC->Gspos("S09E",3,"S09N", 0., NulocHeight/8., 0. , 0, "ONLY"); | |
1082 | gMC->Gspos("S09E",4,"S09N", 0., 3 * NulocHeight/8., 0. , 0, "ONLY"); | |
1083 | gMC->Gspos("S10E",1,"S10N", 0., -3 * NulocHeight/8., 0. , 0, "ONLY"); | |
1084 | gMC->Gspos("S10E",2,"S10N", 0., - NulocHeight/8., 0. , 0, "ONLY"); | |
1085 | gMC->Gspos("S10E",3,"S10N", 0., NulocHeight/8., 0. , 0, "ONLY"); | |
1086 | gMC->Gspos("S10E",4,"S10N", 0., 3 * NulocHeight/8., 0. , 0, "ONLY"); | |
1087 | ||
1088 | ||
a9e2aefa | 1089 | /////////////////////////////////////// |
1090 | // GEOMETRY FOR THE TRIGGER CHAMBERS // | |
1091 | /////////////////////////////////////// | |
1092 | ||
1093 | // 03/00 P. Dupieux : introduce a slighly more realistic | |
1094 | // geom. of the trigger readout planes with | |
1095 | // 2 Zpos per trigger plane (alternate | |
1096 | // between left and right of the trigger) | |
1097 | ||
1098 | // Parameters of the Trigger Chambers | |
1099 | ||
1100 | ||
1101 | const Float_t kXMC1MIN=34.; | |
1102 | const Float_t kXMC1MED=51.; | |
1103 | const Float_t kXMC1MAX=272.; | |
1104 | const Float_t kYMC1MIN=34.; | |
1105 | const Float_t kYMC1MAX=51.; | |
1106 | const Float_t kRMIN1=50.; | |
1107 | const Float_t kRMAX1=62.; | |
1108 | const Float_t kRMIN2=50.; | |
1109 | const Float_t kRMAX2=66.; | |
1110 | ||
1111 | // zposition of the middle of the gas gap in mother vol | |
1112 | const Float_t kZMCm=-3.6; | |
1113 | const Float_t kZMCp=+3.6; | |
1114 | ||
1115 | ||
1116 | // TRIGGER STATION 1 - TRIGGER STATION 1 - TRIGGER STATION 1 | |
1117 | ||
1118 | // iChamber 1 and 2 for first and second chambers in the station | |
1119 | // iChamber (first chamber) kept for other quanties than Z, | |
1120 | // assumed to be the same in both chambers | |
1121 | iChamber1 = iChamber = (AliMUONChamber*) (*fChambers)[10]; | |
1122 | iChamber2 =(AliMUONChamber*) (*fChambers)[11]; | |
1123 | ||
1124 | // 03/00 | |
1125 | // zpos1 and zpos2 are now the middle of the first and second | |
1126 | // plane of station 1 : | |
1127 | // zpos1=(16075+15995)/2=16035 mm, thick/2=40 mm | |
1128 | // zpos2=(16225+16145)/2=16185 mm, thick/2=40 mm | |
1129 | // | |
1130 | // zpos1m=15999 mm , zpos1p=16071 mm (middles of gas gaps) | |
1131 | // zpos2m=16149 mm , zpos2p=16221 mm (middles of gas gaps) | |
1132 | // rem : the total thickness accounts for 1 mm of al on both | |
1133 | // side of the RPCs (see zpos1 and zpos2), as previously | |
1134 | ||
1135 | zpos1=iChamber1->Z(); | |
1136 | zpos2=iChamber2->Z(); | |
1137 | ||
1138 | ||
1139 | // Mother volume definition | |
1140 | tpar[0] = iChamber->RInner(); | |
1141 | tpar[1] = iChamber->ROuter(); | |
1142 | tpar[2] = 4.0; | |
1143 | gMC->Gsvolu("CM11", "TUBE", idAir, tpar, 3); | |
1144 | gMC->Gsvolu("CM12", "TUBE", idAir, tpar, 3); | |
1145 | ||
1146 | // Definition of the flange between the beam shielding and the RPC | |
1147 | tpar[0]= kRMIN1; | |
1148 | tpar[1]= kRMAX1; | |
1149 | tpar[2]= 4.0; | |
1150 | ||
1151 | gMC->Gsvolu("CF1A", "TUBE", idAlu1, tpar, 3); //Al | |
1152 | gMC->Gspos("CF1A", 1, "CM11", 0., 0., 0., 0, "MANY"); | |
1153 | gMC->Gspos("CF1A", 2, "CM12", 0., 0., 0., 0, "MANY"); | |
1154 | ||
1155 | ||
1156 | // FIRST PLANE OF STATION 1 | |
1157 | ||
1158 | // ratios of zpos1m/zpos1p and inverse for first plane | |
1159 | Float_t zmp=(zpos1-3.6)/(zpos1+3.6); | |
1160 | Float_t zpm=1./zmp; | |
1161 | ||
1162 | ||
1163 | // Definition of prototype for chambers in the first plane | |
1164 | ||
1165 | tpar[0]= 0.; | |
1166 | tpar[1]= 0.; | |
1167 | tpar[2]= 0.; | |
1168 | ||
1169 | gMC->Gsvolu("CC1A", "BOX ", idAlu1, tpar, 0); //Al | |
1170 | gMC->Gsvolu("CB1A", "BOX ", idtmed[1107], tpar, 0); //Bakelite | |
1171 | gMC->Gsvolu("CG1A", "BOX ", idtmed[1106], tpar, 0); //Gas streamer | |
1172 | ||
1173 | // chamber type A | |
1174 | tpar[0] = -1.; | |
1175 | tpar[1] = -1.; | |
1176 | ||
1177 | const Float_t kXMC1A=kXMC1MED+(kXMC1MAX-kXMC1MED)/2.; | |
1178 | const Float_t kYMC1Am=0.; | |
1179 | const Float_t kYMC1Ap=0.; | |
1180 | ||
1181 | tpar[2] = 0.1; | |
1182 | gMC->Gsposp("CG1A", 1, "CB1A", 0., 0., 0., 0, "ONLY",tpar,3); | |
1183 | tpar[2] = 0.3; | |
1184 | gMC->Gsposp("CB1A", 1, "CC1A", 0., 0., 0., 0, "ONLY",tpar,3); | |
1185 | ||
1186 | tpar[2] = 0.4; | |
1187 | tpar[0] = (kXMC1MAX-kXMC1MED)/2.; | |
1188 | tpar[1] = kYMC1MIN; | |
1189 | ||
1190 | gMC->Gsposp("CC1A", 1, "CM11",kXMC1A,kYMC1Am,kZMCm, 0, "ONLY", tpar, 3); | |
1191 | gMC->Gsposp("CC1A", 2, "CM11",-kXMC1A,kYMC1Ap,kZMCp, 0, "ONLY", tpar, 3); | |
1192 | ||
1193 | // chamber type B | |
1194 | Float_t tpar1save=tpar[1]; | |
1195 | Float_t y1msave=kYMC1Am; | |
1196 | Float_t y1psave=kYMC1Ap; | |
1197 | ||
1198 | tpar[0] = (kXMC1MAX-kXMC1MIN)/2.; | |
1199 | tpar[1] = (kYMC1MAX-kYMC1MIN)/2.; | |
1200 | ||
1201 | const Float_t kXMC1B=kXMC1MIN+tpar[0]; | |
1202 | const Float_t kYMC1Bp=(y1msave+tpar1save)*zpm+tpar[1]; | |
1203 | const Float_t kYMC1Bm=(y1psave+tpar1save)*zmp+tpar[1]; | |
1204 | ||
1205 | gMC->Gsposp("CC1A", 3, "CM11",kXMC1B,kYMC1Bp,kZMCp, 0, "ONLY", tpar, 3); | |
1206 | gMC->Gsposp("CC1A", 4, "CM11",-kXMC1B,kYMC1Bm,kZMCm, 0, "ONLY", tpar, 3); | |
1207 | gMC->Gsposp("CC1A", 5, "CM11",kXMC1B,-kYMC1Bp,kZMCp, 0, "ONLY", tpar, 3); | |
1208 | gMC->Gsposp("CC1A", 6, "CM11",-kXMC1B,-kYMC1Bm,kZMCm, 0, "ONLY", tpar, 3); | |
1209 | ||
1210 | // chamber type C (end of type B !!) | |
1211 | tpar1save=tpar[1]; | |
1212 | y1msave=kYMC1Bm; | |
1213 | y1psave=kYMC1Bp; | |
1214 | ||
1215 | tpar[0] = kXMC1MAX/2; | |
1216 | tpar[1] = kYMC1MAX/2; | |
1217 | ||
1218 | const Float_t kXMC1C=tpar[0]; | |
1219 | // warning : same Z than type B | |
1220 | const Float_t kYMC1Cp=(y1psave+tpar1save)*1.+tpar[1]; | |
1221 | const Float_t kYMC1Cm=(y1msave+tpar1save)*1.+tpar[1]; | |
1222 | ||
1223 | gMC->Gsposp("CC1A", 7, "CM11",kXMC1C,kYMC1Cp,kZMCp, 0, "ONLY", tpar, 3); | |
1224 | gMC->Gsposp("CC1A", 8, "CM11",-kXMC1C,kYMC1Cm,kZMCm, 0, "ONLY", tpar, 3); | |
1225 | gMC->Gsposp("CC1A", 9, "CM11",kXMC1C,-kYMC1Cp,kZMCp, 0, "ONLY", tpar, 3); | |
1226 | gMC->Gsposp("CC1A", 10, "CM11",-kXMC1C,-kYMC1Cm,kZMCm, 0, "ONLY", tpar, 3); | |
1227 | ||
1228 | // chamber type D, E and F (same size) | |
1229 | tpar1save=tpar[1]; | |
1230 | y1msave=kYMC1Cm; | |
1231 | y1psave=kYMC1Cp; | |
1232 | ||
1233 | tpar[0] = kXMC1MAX/2.; | |
1234 | tpar[1] = kYMC1MIN; | |
1235 | ||
1236 | const Float_t kXMC1D=tpar[0]; | |
1237 | const Float_t kYMC1Dp=(y1msave+tpar1save)*zpm+tpar[1]; | |
1238 | const Float_t kYMC1Dm=(y1psave+tpar1save)*zmp+tpar[1]; | |
1239 | ||
1240 | gMC->Gsposp("CC1A", 11, "CM11",kXMC1D,kYMC1Dm,kZMCm, 0, "ONLY", tpar, 3); | |
1241 | gMC->Gsposp("CC1A", 12, "CM11",-kXMC1D,kYMC1Dp,kZMCp, 0, "ONLY", tpar, 3); | |
1242 | gMC->Gsposp("CC1A", 13, "CM11",kXMC1D,-kYMC1Dm,kZMCm, 0, "ONLY", tpar, 3); | |
1243 | gMC->Gsposp("CC1A", 14, "CM11",-kXMC1D,-kYMC1Dp,kZMCp, 0, "ONLY", tpar, 3); | |
1244 | ||
1245 | ||
1246 | tpar1save=tpar[1]; | |
1247 | y1msave=kYMC1Dm; | |
1248 | y1psave=kYMC1Dp; | |
1249 | const Float_t kYMC1Ep=(y1msave+tpar1save)*zpm+tpar[1]; | |
1250 | const Float_t kYMC1Em=(y1psave+tpar1save)*zmp+tpar[1]; | |
1251 | ||
1252 | gMC->Gsposp("CC1A", 15, "CM11",kXMC1D,kYMC1Ep,kZMCp, 0, "ONLY", tpar, 3); | |
1253 | gMC->Gsposp("CC1A", 16, "CM11",-kXMC1D,kYMC1Em,kZMCm, 0, "ONLY", tpar, 3); | |
1254 | gMC->Gsposp("CC1A", 17, "CM11",kXMC1D,-kYMC1Ep,kZMCp, 0, "ONLY", tpar, 3); | |
1255 | gMC->Gsposp("CC1A", 18, "CM11",-kXMC1D,-kYMC1Em,kZMCm, 0, "ONLY", tpar, 3); | |
1256 | ||
1257 | tpar1save=tpar[1]; | |
1258 | y1msave=kYMC1Em; | |
1259 | y1psave=kYMC1Ep; | |
1260 | const Float_t kYMC1Fp=(y1msave+tpar1save)*zpm+tpar[1]; | |
1261 | const Float_t kYMC1Fm=(y1psave+tpar1save)*zmp+tpar[1]; | |
1262 | ||
1263 | gMC->Gsposp("CC1A", 19, "CM11",kXMC1D,kYMC1Fm,kZMCm, 0, "ONLY", tpar, 3); | |
1264 | gMC->Gsposp("CC1A", 20, "CM11",-kXMC1D,kYMC1Fp,kZMCp, 0, "ONLY", tpar, 3); | |
1265 | gMC->Gsposp("CC1A", 21, "CM11",kXMC1D,-kYMC1Fm,kZMCm, 0, "ONLY", tpar, 3); | |
1266 | gMC->Gsposp("CC1A", 22, "CM11",-kXMC1D,-kYMC1Fp,kZMCp, 0, "ONLY", tpar, 3); | |
1267 | ||
1268 | // Positioning first plane in ALICE | |
1269 | gMC->Gspos("CM11", 1, "ALIC", 0., 0., zpos1, 0, "ONLY"); | |
1270 | ||
1271 | // End of geometry definition for the first plane of station 1 | |
1272 | ||
1273 | ||
1274 | ||
1275 | // SECOND PLANE OF STATION 1 : proj ratio = zpos2/zpos1 | |
1276 | ||
1277 | const Float_t kZ12=zpos2/zpos1; | |
1278 | ||
1279 | // Definition of prototype for chambers in the second plane of station 1 | |
1280 | ||
1281 | tpar[0]= 0.; | |
1282 | tpar[1]= 0.; | |
1283 | tpar[2]= 0.; | |
1284 | ||
1285 | gMC->Gsvolu("CC2A", "BOX ", idAlu1, tpar, 0); //Al | |
1286 | gMC->Gsvolu("CB2A", "BOX ", idtmed[1107], tpar, 0); //Bakelite | |
1287 | gMC->Gsvolu("CG2A", "BOX ", idtmed[1106], tpar, 0); //Gas streamer | |
1288 | ||
1289 | // chamber type A | |
1290 | tpar[0] = -1.; | |
1291 | tpar[1] = -1.; | |
1292 | ||
1293 | const Float_t kXMC2A=kXMC1A*kZ12; | |
1294 | const Float_t kYMC2Am=0.; | |
1295 | const Float_t kYMC2Ap=0.; | |
1296 | ||
1297 | tpar[2] = 0.1; | |
1298 | gMC->Gsposp("CG2A", 1, "CB2A", 0., 0., 0., 0, "ONLY",tpar,3); | |
1299 | tpar[2] = 0.3; | |
1300 | gMC->Gsposp("CB2A", 1, "CC2A", 0., 0., 0., 0, "ONLY",tpar,3); | |
1301 | ||
1302 | tpar[2] = 0.4; | |
1303 | tpar[0] = ((kXMC1MAX-kXMC1MED)/2.)*kZ12; | |
1304 | tpar[1] = kYMC1MIN*kZ12; | |
1305 | ||
1306 | gMC->Gsposp("CC2A", 1, "CM12",kXMC2A,kYMC2Am,kZMCm, 0, "ONLY", tpar, 3); | |
1307 | gMC->Gsposp("CC2A", 2, "CM12",-kXMC2A,kYMC2Ap,kZMCp, 0, "ONLY", tpar, 3); | |
1308 | ||
1309 | ||
1310 | // chamber type B | |
1311 | ||
1312 | tpar[0] = ((kXMC1MAX-kXMC1MIN)/2.)*kZ12; | |
1313 | tpar[1] = ((kYMC1MAX-kYMC1MIN)/2.)*kZ12; | |
1314 | ||
1315 | const Float_t kXMC2B=kXMC1B*kZ12; | |
1316 | const Float_t kYMC2Bp=kYMC1Bp*kZ12; | |
1317 | const Float_t kYMC2Bm=kYMC1Bm*kZ12; | |
1318 | gMC->Gsposp("CC2A", 3, "CM12",kXMC2B,kYMC2Bp,kZMCp, 0, "ONLY", tpar, 3); | |
1319 | gMC->Gsposp("CC2A", 4, "CM12",-kXMC2B,kYMC2Bm,kZMCm, 0, "ONLY", tpar, 3); | |
1320 | gMC->Gsposp("CC2A", 5, "CM12",kXMC2B,-kYMC2Bp,kZMCp, 0, "ONLY", tpar, 3); | |
1321 | gMC->Gsposp("CC2A", 6, "CM12",-kXMC2B,-kYMC2Bm,kZMCm, 0, "ONLY", tpar, 3); | |
1322 | ||
1323 | ||
1324 | // chamber type C (end of type B !!) | |
1325 | ||
1326 | tpar[0] = (kXMC1MAX/2)*kZ12; | |
1327 | tpar[1] = (kYMC1MAX/2)*kZ12; | |
1328 | ||
1329 | const Float_t kXMC2C=kXMC1C*kZ12; | |
1330 | const Float_t kYMC2Cp=kYMC1Cp*kZ12; | |
1331 | const Float_t kYMC2Cm=kYMC1Cm*kZ12; | |
1332 | gMC->Gsposp("CC2A", 7, "CM12",kXMC2C,kYMC2Cp,kZMCp, 0, "ONLY", tpar, 3); | |
1333 | gMC->Gsposp("CC2A", 8, "CM12",-kXMC2C,kYMC2Cm,kZMCm, 0, "ONLY", tpar, 3); | |
1334 | gMC->Gsposp("CC2A", 9, "CM12",kXMC2C,-kYMC2Cp,kZMCp, 0, "ONLY", tpar, 3); | |
1335 | gMC->Gsposp("CC2A", 10, "CM12",-kXMC2C,-kYMC2Cm,kZMCm, 0, "ONLY", tpar, 3); | |
1336 | ||
1337 | // chamber type D, E and F (same size) | |
1338 | ||
1339 | tpar[0] = (kXMC1MAX/2.)*kZ12; | |
1340 | tpar[1] = kYMC1MIN*kZ12; | |
1341 | ||
1342 | const Float_t kXMC2D=kXMC1D*kZ12; | |
1343 | const Float_t kYMC2Dp=kYMC1Dp*kZ12; | |
1344 | const Float_t kYMC2Dm=kYMC1Dm*kZ12; | |
1345 | gMC->Gsposp("CC2A", 11, "CM12",kXMC2D,kYMC2Dm,kZMCm, 0, "ONLY", tpar, 3); | |
1346 | gMC->Gsposp("CC2A", 12, "CM12",-kXMC2D,kYMC2Dp,kZMCp, 0, "ONLY", tpar, 3); | |
1347 | gMC->Gsposp("CC2A", 13, "CM12",kXMC2D,-kYMC2Dm,kZMCm, 0, "ONLY", tpar, 3); | |
1348 | gMC->Gsposp("CC2A", 14, "CM12",-kXMC2D,-kYMC2Dp,kZMCp, 0, "ONLY", tpar, 3); | |
1349 | ||
1350 | const Float_t kYMC2Ep=kYMC1Ep*kZ12; | |
1351 | const Float_t kYMC2Em=kYMC1Em*kZ12; | |
1352 | gMC->Gsposp("CC2A", 15, "CM12",kXMC2D,kYMC2Ep,kZMCp, 0, "ONLY", tpar, 3); | |
1353 | gMC->Gsposp("CC2A", 16, "CM12",-kXMC2D,kYMC2Em,kZMCm, 0, "ONLY", tpar, 3); | |
1354 | gMC->Gsposp("CC2A", 17, "CM12",kXMC2D,-kYMC2Ep,kZMCp, 0, "ONLY", tpar, 3); | |
1355 | gMC->Gsposp("CC2A", 18, "CM12",-kXMC2D,-kYMC2Em,kZMCm, 0, "ONLY", tpar, 3); | |
1356 | ||
1357 | ||
1358 | const Float_t kYMC2Fp=kYMC1Fp*kZ12; | |
1359 | const Float_t kYMC2Fm=kYMC1Fm*kZ12; | |
1360 | gMC->Gsposp("CC2A", 19, "CM12",kXMC2D,kYMC2Fm,kZMCm, 0, "ONLY", tpar, 3); | |
1361 | gMC->Gsposp("CC2A", 20, "CM12",-kXMC2D,kYMC2Fp,kZMCp, 0, "ONLY", tpar, 3); | |
1362 | gMC->Gsposp("CC2A", 21, "CM12",kXMC2D,-kYMC2Fm,kZMCm, 0, "ONLY", tpar, 3); | |
1363 | gMC->Gsposp("CC2A", 22, "CM12",-kXMC2D,-kYMC2Fp,kZMCp, 0, "ONLY", tpar, 3); | |
1364 | ||
1365 | // Positioning second plane of station 1 in ALICE | |
1366 | ||
1367 | gMC->Gspos("CM12", 1, "ALIC", 0., 0., zpos2, 0, "ONLY"); | |
1368 | ||
1369 | // End of geometry definition for the second plane of station 1 | |
1370 | ||
1371 | ||
1372 | ||
1373 | // TRIGGER STATION 2 - TRIGGER STATION 2 - TRIGGER STATION 2 | |
1374 | ||
1375 | // 03/00 | |
1376 | // zpos3 and zpos4 are now the middle of the first and second | |
1377 | // plane of station 2 : | |
1378 | // zpos3=(17075+16995)/2=17035 mm, thick/2=40 mm | |
1379 | // zpos4=(17225+17145)/2=17185 mm, thick/2=40 mm | |
1380 | // | |
1381 | // zpos3m=16999 mm , zpos3p=17071 mm (middles of gas gaps) | |
1382 | // zpos4m=17149 mm , zpos4p=17221 mm (middles of gas gaps) | |
1383 | // rem : the total thickness accounts for 1 mm of al on both | |
1384 | // side of the RPCs (see zpos3 and zpos4), as previously | |
1385 | iChamber1 = iChamber = (AliMUONChamber*) (*fChambers)[12]; | |
1386 | iChamber2 =(AliMUONChamber*) (*fChambers)[13]; | |
1387 | Float_t zpos3=iChamber1->Z(); | |
1388 | Float_t zpos4=iChamber2->Z(); | |
1389 | ||
1390 | ||
1391 | // Mother volume definition | |
1392 | tpar[0] = iChamber->RInner(); | |
1393 | tpar[1] = iChamber->ROuter(); | |
1394 | tpar[2] = 4.0; | |
1395 | ||
1396 | gMC->Gsvolu("CM21", "TUBE", idAir, tpar, 3); | |
1397 | gMC->Gsvolu("CM22", "TUBE", idAir, tpar, 3); | |
1398 | ||
1399 | // Definition of the flange between the beam shielding and the RPC | |
1400 | // ???? interface shielding | |
1401 | ||
1402 | tpar[0]= kRMIN2; | |
1403 | tpar[1]= kRMAX2; | |
1404 | tpar[2]= 4.0; | |
1405 | ||
1406 | gMC->Gsvolu("CF2A", "TUBE", idAlu1, tpar, 3); //Al | |
1407 | gMC->Gspos("CF2A", 1, "CM21", 0., 0., 0., 0, "MANY"); | |
1408 | gMC->Gspos("CF2A", 2, "CM22", 0., 0., 0., 0, "MANY"); | |
1409 | ||
1410 | ||
1411 | ||
1412 | // FIRST PLANE OF STATION 2 : proj ratio = zpos3/zpos1 | |
1413 | ||
1414 | const Float_t kZ13=zpos3/zpos1; | |
1415 | ||
1416 | // Definition of prototype for chambers in the first plane of station 2 | |
1417 | tpar[0]= 0.; | |
1418 | tpar[1]= 0.; | |
1419 | tpar[2]= 0.; | |
1420 | ||
1421 | gMC->Gsvolu("CC3A", "BOX ", idAlu1, tpar, 0); //Al | |
1422 | gMC->Gsvolu("CB3A", "BOX ", idtmed[1107], tpar, 0); //Bakelite | |
1423 | gMC->Gsvolu("CG3A", "BOX ", idtmed[1106], tpar, 0); //Gas streamer | |
1424 | ||
1425 | ||
1426 | // chamber type A | |
1427 | tpar[0] = -1.; | |
1428 | tpar[1] = -1.; | |
1429 | ||
1430 | const Float_t kXMC3A=kXMC1A*kZ13; | |
1431 | const Float_t kYMC3Am=0.; | |
1432 | const Float_t kYMC3Ap=0.; | |
1433 | ||
1434 | tpar[2] = 0.1; | |
1435 | gMC->Gsposp("CG3A", 1, "CB3A", 0., 0., 0., 0, "ONLY",tpar,3); | |
1436 | tpar[2] = 0.3; | |
1437 | gMC->Gsposp("CB3A", 1, "CC3A", 0., 0., 0., 0, "ONLY",tpar,3); | |
1438 | ||
1439 | tpar[2] = 0.4; | |
1440 | tpar[0] = ((kXMC1MAX-kXMC1MED)/2.)*kZ13; | |
1441 | tpar[1] = kYMC1MIN*kZ13; | |
1442 | gMC->Gsposp("CC3A", 1, "CM21",kXMC3A,kYMC3Am,kZMCm, 0, "ONLY", tpar, 3); | |
1443 | gMC->Gsposp("CC3A", 2, "CM21",-kXMC3A,kYMC3Ap,kZMCp, 0, "ONLY", tpar, 3); | |
1444 | ||
1445 | ||
1446 | // chamber type B | |
1447 | tpar[0] = ((kXMC1MAX-kXMC1MIN)/2.)*kZ13; | |
1448 | tpar[1] = ((kYMC1MAX-kYMC1MIN)/2.)*kZ13; | |
1449 | ||
1450 | const Float_t kXMC3B=kXMC1B*kZ13; | |
1451 | const Float_t kYMC3Bp=kYMC1Bp*kZ13; | |
1452 | const Float_t kYMC3Bm=kYMC1Bm*kZ13; | |
1453 | gMC->Gsposp("CC3A", 3, "CM21",kXMC3B,kYMC3Bp,kZMCp, 0, "ONLY", tpar, 3); | |
1454 | gMC->Gsposp("CC3A", 4, "CM21",-kXMC3B,kYMC3Bm,kZMCm, 0, "ONLY", tpar, 3); | |
1455 | gMC->Gsposp("CC3A", 5, "CM21",kXMC3B,-kYMC3Bp,kZMCp, 0, "ONLY", tpar, 3); | |
1456 | gMC->Gsposp("CC3A", 6, "CM21",-kXMC3B,-kYMC3Bm,kZMCm, 0, "ONLY", tpar, 3); | |
1457 | ||
1458 | ||
1459 | // chamber type C (end of type B !!) | |
1460 | tpar[0] = (kXMC1MAX/2)*kZ13; | |
1461 | tpar[1] = (kYMC1MAX/2)*kZ13; | |
1462 | ||
1463 | const Float_t kXMC3C=kXMC1C*kZ13; | |
1464 | const Float_t kYMC3Cp=kYMC1Cp*kZ13; | |
1465 | const Float_t kYMC3Cm=kYMC1Cm*kZ13; | |
1466 | gMC->Gsposp("CC3A", 7, "CM21",kXMC3C,kYMC3Cp,kZMCp, 0, "ONLY", tpar, 3); | |
1467 | gMC->Gsposp("CC3A", 8, "CM21",-kXMC3C,kYMC3Cm,kZMCm, 0, "ONLY", tpar, 3); | |
1468 | gMC->Gsposp("CC3A", 9, "CM21",kXMC3C,-kYMC3Cp,kZMCp, 0, "ONLY", tpar, 3); | |
1469 | gMC->Gsposp("CC3A", 10, "CM21",-kXMC3C,-kYMC3Cm,kZMCm, 0, "ONLY", tpar, 3); | |
1470 | ||
1471 | ||
1472 | // chamber type D, E and F (same size) | |
1473 | ||
1474 | tpar[0] = (kXMC1MAX/2.)*kZ13; | |
1475 | tpar[1] = kYMC1MIN*kZ13; | |
1476 | ||
1477 | const Float_t kXMC3D=kXMC1D*kZ13; | |
1478 | const Float_t kYMC3Dp=kYMC1Dp*kZ13; | |
1479 | const Float_t kYMC3Dm=kYMC1Dm*kZ13; | |
1480 | gMC->Gsposp("CC3A", 11, "CM21",kXMC3D,kYMC3Dm,kZMCm, 0, "ONLY", tpar, 3); | |
1481 | gMC->Gsposp("CC3A", 12, "CM21",-kXMC3D,kYMC3Dp,kZMCp, 0, "ONLY", tpar, 3); | |
1482 | gMC->Gsposp("CC3A", 13, "CM21",kXMC3D,-kYMC3Dm,kZMCm, 0, "ONLY", tpar, 3); | |
1483 | gMC->Gsposp("CC3A", 14, "CM21",-kXMC3D,-kYMC3Dp,kZMCp, 0, "ONLY", tpar, 3); | |
1484 | ||
1485 | const Float_t kYMC3Ep=kYMC1Ep*kZ13; | |
1486 | const Float_t kYMC3Em=kYMC1Em*kZ13; | |
1487 | gMC->Gsposp("CC3A", 15, "CM21",kXMC3D,kYMC3Ep,kZMCp, 0, "ONLY", tpar, 3); | |
1488 | gMC->Gsposp("CC3A", 16, "CM21",-kXMC3D,kYMC3Em,kZMCm, 0, "ONLY", tpar, 3); | |
1489 | gMC->Gsposp("CC3A", 17, "CM21",kXMC3D,-kYMC3Ep,kZMCp, 0, "ONLY", tpar, 3); | |
1490 | gMC->Gsposp("CC3A", 18, "CM21",-kXMC3D,-kYMC3Em,kZMCm, 0, "ONLY", tpar, 3); | |
1491 | ||
1492 | const Float_t kYMC3Fp=kYMC1Fp*kZ13; | |
1493 | const Float_t kYMC3Fm=kYMC1Fm*kZ13; | |
1494 | gMC->Gsposp("CC3A", 19, "CM21",kXMC3D,kYMC3Fm,kZMCm, 0, "ONLY", tpar, 3); | |
1495 | gMC->Gsposp("CC3A", 20, "CM21",-kXMC3D,kYMC3Fp,kZMCp, 0, "ONLY", tpar, 3); | |
1496 | gMC->Gsposp("CC3A", 21, "CM21",kXMC3D,-kYMC3Fm,kZMCm, 0, "ONLY", tpar, 3); | |
1497 | gMC->Gsposp("CC3A", 22, "CM21",-kXMC3D,-kYMC3Fp,kZMCp, 0, "ONLY", tpar, 3); | |
1498 | ||
1499 | ||
1500 | // Positioning first plane of station 2 in ALICE | |
1501 | ||
1502 | gMC->Gspos("CM21", 1, "ALIC", 0., 0., zpos3, 0, "ONLY"); | |
1503 | ||
1504 | // End of geometry definition for the first plane of station 2 | |
1505 | ||
1506 | ||
1507 | ||
1508 | ||
1509 | // SECOND PLANE OF STATION 2 : proj ratio = zpos4/zpos1 | |
1510 | ||
1511 | const Float_t kZ14=zpos4/zpos1; | |
1512 | ||
1513 | // Definition of prototype for chambers in the second plane of station 2 | |
1514 | ||
1515 | tpar[0]= 0.; | |
1516 | tpar[1]= 0.; | |
1517 | tpar[2]= 0.; | |
1518 | ||
1519 | gMC->Gsvolu("CC4A", "BOX ", idAlu1, tpar, 0); //Al | |
1520 | gMC->Gsvolu("CB4A", "BOX ", idtmed[1107], tpar, 0); //Bakelite | |
1521 | gMC->Gsvolu("CG4A", "BOX ", idtmed[1106], tpar, 0); //Gas streamer | |
1522 | ||
1523 | // chamber type A | |
1524 | tpar[0] = -1.; | |
1525 | tpar[1] = -1.; | |
1526 | ||
1527 | const Float_t kXMC4A=kXMC1A*kZ14; | |
1528 | const Float_t kYMC4Am=0.; | |
1529 | const Float_t kYMC4Ap=0.; | |
1530 | ||
1531 | tpar[2] = 0.1; | |
1532 | gMC->Gsposp("CG4A", 1, "CB4A", 0., 0., 0., 0, "ONLY",tpar,3); | |
1533 | tpar[2] = 0.3; | |
1534 | gMC->Gsposp("CB4A", 1, "CC4A", 0., 0., 0., 0, "ONLY",tpar,3); | |
1535 | ||
1536 | tpar[2] = 0.4; | |
1537 | tpar[0] = ((kXMC1MAX-kXMC1MED)/2.)*kZ14; | |
1538 | tpar[1] = kYMC1MIN*kZ14; | |
1539 | gMC->Gsposp("CC4A", 1, "CM22",kXMC4A,kYMC4Am,kZMCm, 0, "ONLY", tpar, 3); | |
1540 | gMC->Gsposp("CC4A", 2, "CM22",-kXMC4A,kYMC4Ap,kZMCp, 0, "ONLY", tpar, 3); | |
1541 | ||
1542 | ||
1543 | // chamber type B | |
1544 | tpar[0] = ((kXMC1MAX-kXMC1MIN)/2.)*kZ14; | |
1545 | tpar[1] = ((kYMC1MAX-kYMC1MIN)/2.)*kZ14; | |
1546 | ||
1547 | const Float_t kXMC4B=kXMC1B*kZ14; | |
1548 | const Float_t kYMC4Bp=kYMC1Bp*kZ14; | |
1549 | const Float_t kYMC4Bm=kYMC1Bm*kZ14; | |
1550 | gMC->Gsposp("CC4A", 3, "CM22",kXMC4B,kYMC4Bp,kZMCp, 0, "ONLY", tpar, 3); | |
1551 | gMC->Gsposp("CC4A", 4, "CM22",-kXMC4B,kYMC4Bm,kZMCm, 0, "ONLY", tpar, 3); | |
1552 | gMC->Gsposp("CC4A", 5, "CM22",kXMC4B,-kYMC4Bp,kZMCp, 0, "ONLY", tpar, 3); | |
1553 | gMC->Gsposp("CC4A", 6, "CM22",-kXMC4B,-kYMC4Bm,kZMCm, 0, "ONLY", tpar, 3); | |
1554 | ||
1555 | ||
1556 | // chamber type C (end of type B !!) | |
1557 | tpar[0] =(kXMC1MAX/2)*kZ14; | |
1558 | tpar[1] = (kYMC1MAX/2)*kZ14; | |
1559 | ||
1560 | const Float_t kXMC4C=kXMC1C*kZ14; | |
1561 | const Float_t kYMC4Cp=kYMC1Cp*kZ14; | |
1562 | const Float_t kYMC4Cm=kYMC1Cm*kZ14; | |
1563 | gMC->Gsposp("CC4A", 7, "CM22",kXMC4C,kYMC4Cp,kZMCp, 0, "ONLY", tpar, 3); | |
1564 | gMC->Gsposp("CC4A", 8, "CM22",-kXMC4C,kYMC4Cm,kZMCm, 0, "ONLY", tpar, 3); | |
1565 | gMC->Gsposp("CC4A", 9, "CM22",kXMC4C,-kYMC4Cp,kZMCp, 0, "ONLY", tpar, 3); | |
1566 | gMC->Gsposp("CC4A", 10, "CM22",-kXMC4C,-kYMC4Cm,kZMCm, 0, "ONLY", tpar, 3); | |
1567 | ||
1568 | ||
1569 | // chamber type D, E and F (same size) | |
1570 | tpar[0] = (kXMC1MAX/2.)*kZ14; | |
1571 | tpar[1] = kYMC1MIN*kZ14; | |
1572 | ||
1573 | const Float_t kXMC4D=kXMC1D*kZ14; | |
1574 | const Float_t kYMC4Dp=kYMC1Dp*kZ14; | |
1575 | const Float_t kYMC4Dm=kYMC1Dm*kZ14; | |
1576 | gMC->Gsposp("CC4A", 11, "CM22",kXMC4D,kYMC4Dm,kZMCm, 0, "ONLY", tpar, 3); | |
1577 | gMC->Gsposp("CC4A", 12, "CM22",-kXMC4D,kYMC4Dp,kZMCp, 0, "ONLY", tpar, 3); | |
1578 | gMC->Gsposp("CC4A", 13, "CM22",kXMC4D,-kYMC4Dm,kZMCm, 0, "ONLY", tpar, 3); | |
1579 | gMC->Gsposp("CC4A", 14, "CM22",-kXMC4D,-kYMC4Dp,kZMCp, 0, "ONLY", tpar, 3); | |
1580 | ||
1581 | const Float_t kYMC4Ep=kYMC1Ep*kZ14; | |
1582 | const Float_t kYMC4Em=kYMC1Em*kZ14; | |
1583 | gMC->Gsposp("CC4A", 15, "CM22",kXMC4D,kYMC4Ep,kZMCp, 0, "ONLY", tpar, 3); | |
1584 | gMC->Gsposp("CC4A", 16, "CM22",-kXMC4D,kYMC4Em,kZMCm, 0, "ONLY", tpar, 3); | |
1585 | gMC->Gsposp("CC4A", 17, "CM22",kXMC4D,-kYMC4Ep,kZMCp, 0, "ONLY", tpar, 3); | |
1586 | gMC->Gsposp("CC4A", 18, "CM22",-kXMC4D,-kYMC4Em,kZMCm, 0, "ONLY", tpar, 3); | |
1587 | ||
1588 | const Float_t kYMC4Fp=kYMC1Fp*kZ14; | |
1589 | const Float_t kYMC4Fm=kYMC1Fm*kZ14; | |
1590 | gMC->Gsposp("CC4A", 19, "CM22",kXMC4D,kYMC4Fm,kZMCm, 0, "ONLY", tpar, 3); | |
1591 | gMC->Gsposp("CC4A", 20, "CM22",-kXMC4D,kYMC4Fp,kZMCp, 0, "ONLY", tpar, 3); | |
1592 | gMC->Gsposp("CC4A", 21, "CM22",kXMC4D,-kYMC4Fm,kZMCm, 0, "ONLY", tpar, 3); | |
1593 | gMC->Gsposp("CC4A", 22, "CM22",-kXMC4D,-kYMC4Fp,kZMCp, 0, "ONLY", tpar, 3); | |
1594 | ||
1595 | ||
1596 | // Positioning second plane of station 2 in ALICE | |
1597 | ||
1598 | gMC->Gspos("CM22", 1, "ALIC", 0., 0., zpos4, 0, "ONLY"); | |
1599 | ||
1600 | // End of geometry definition for the second plane of station 2 | |
1601 | ||
1602 | // End of trigger geometry definition | |
1603 | ||
1604 | } | |
1605 | ||
1606 | ||
1607 | ||
1608 | //___________________________________________ | |
1609 | void AliMUONv1::CreateMaterials() | |
1610 | { | |
1611 | // *** DEFINITION OF AVAILABLE MUON MATERIALS *** | |
1612 | // | |
1613 | // Ar-CO2 gas | |
1614 | Float_t ag1[3] = { 39.95,12.01,16. }; | |
1615 | Float_t zg1[3] = { 18.,6.,8. }; | |
1616 | Float_t wg1[3] = { .8,.0667,.13333 }; | |
1617 | Float_t dg1 = .001821; | |
1618 | // | |
1619 | // Ar-buthane-freon gas -- trigger chambers | |
1620 | Float_t atr1[4] = { 39.95,12.01,1.01,19. }; | |
1621 | Float_t ztr1[4] = { 18.,6.,1.,9. }; | |
1622 | Float_t wtr1[4] = { .56,.1262857,.2857143,.028 }; | |
1623 | Float_t dtr1 = .002599; | |
1624 | // | |
1625 | // Ar-CO2 gas | |
1626 | Float_t agas[3] = { 39.95,12.01,16. }; | |
1627 | Float_t zgas[3] = { 18.,6.,8. }; | |
1628 | Float_t wgas[3] = { .74,.086684,.173316 }; | |
1629 | Float_t dgas = .0018327; | |
1630 | // | |
1631 | // Ar-Isobutane gas (80%+20%) -- tracking | |
1632 | Float_t ag[3] = { 39.95,12.01,1.01 }; | |
1633 | Float_t zg[3] = { 18.,6.,1. }; | |
1634 | Float_t wg[3] = { .8,.057,.143 }; | |
1635 | Float_t dg = .0019596; | |
1636 | // | |
1637 | // Ar-Isobutane-Forane-SF6 gas (49%+7%+40%+4%) -- trigger | |
1638 | Float_t atrig[5] = { 39.95,12.01,1.01,19.,32.066 }; | |
1639 | Float_t ztrig[5] = { 18.,6.,1.,9.,16. }; | |
1640 | Float_t wtrig[5] = { .49,1.08,1.5,1.84,0.04 }; | |
1641 | Float_t dtrig = .0031463; | |
1642 | // | |
1643 | // bakelite | |
1644 | ||
1645 | Float_t abak[3] = {12.01 , 1.01 , 16.}; | |
1646 | Float_t zbak[3] = {6. , 1. , 8.}; | |
1647 | Float_t wbak[3] = {6. , 6. , 1.}; | |
1648 | Float_t dbak = 1.4; | |
1649 | ||
1650 | Float_t epsil, stmin, deemax, tmaxfd, stemax; | |
1651 | ||
1652 | Int_t iSXFLD = gAlice->Field()->Integ(); | |
1653 | Float_t sXMGMX = gAlice->Field()->Max(); | |
1654 | // | |
1655 | // --- Define the various materials for GEANT --- | |
1656 | AliMaterial(9, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2); | |
1657 | AliMaterial(10, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2); | |
1658 | AliMaterial(15, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500); | |
1659 | AliMixture(19, "Bakelite$", abak, zbak, dbak, -3, wbak); | |
1660 | AliMixture(20, "ArC4H10 GAS$", ag, zg, dg, 3, wg); | |
1661 | AliMixture(21, "TRIG GAS$", atrig, ztrig, dtrig, -5, wtrig); | |
1662 | AliMixture(22, "ArCO2 80%$", ag1, zg1, dg1, 3, wg1); | |
1663 | AliMixture(23, "Ar-freon $", atr1, ztr1, dtr1, 4, wtr1); | |
1664 | AliMixture(24, "ArCO2 GAS$", agas, zgas, dgas, 3, wgas); | |
1e8fff9c | 1665 | // materials for slat: |
1666 | // Sensitive area: gas (already defined) | |
1667 | // PCB: copper | |
1668 | // insulating material and frame: vetronite | |
1669 | // walls: carbon, rohacell, carbon | |
1670 | Float_t aglass[5]={12.01, 28.09, 16., 10.8, 23.}; | |
1671 | Float_t zglass[5]={ 6., 14., 8., 5., 11.}; | |
1672 | Float_t wglass[5]={ 0.5, 0.105, 0.355, 0.03, 0.01}; | |
1673 | Float_t dglass=1.74; | |
1674 | ||
1675 | // rohacell: C9 H13 N1 O2 | |
1676 | Float_t arohac[4] = {12.01, 1.01, 14.010, 16.}; | |
1677 | Float_t zrohac[4] = { 6., 1., 7., 8.}; | |
1678 | Float_t wrohac[4] = { 9., 13., 1., 2.}; | |
1679 | Float_t drohac = 0.03; | |
1680 | ||
1681 | AliMaterial(31, "COPPER$", 63.54, 29., 8.96, 1.4, 0.); | |
1682 | AliMixture(32, "Vetronite$",aglass, zglass, dglass, 5, wglass); | |
1683 | AliMaterial(33, "Carbon$", 12.01, 6., 2.265, 18.8, 49.9); | |
1684 | AliMixture(34, "Rohacell$", arohac, zrohac, drohac, -4, wrohac); | |
1685 | ||
a9e2aefa | 1686 | |
1687 | epsil = .001; // Tracking precision, | |
1688 | stemax = -1.; // Maximum displacement for multiple scat | |
1689 | tmaxfd = -20.; // Maximum angle due to field deflection | |
1690 | deemax = -.3; // Maximum fractional energy loss, DLS | |
1691 | stmin = -.8; | |
1692 | // | |
1693 | // Air | |
1694 | AliMedium(1, "AIR_CH_US ", 15, 1, iSXFLD, sXMGMX, tmaxfd, stemax, deemax, epsil, stmin); | |
1695 | // | |
1696 | // Aluminum | |
1697 | ||
1698 | AliMedium(4, "ALU_CH_US ", 9, 0, iSXFLD, sXMGMX, tmaxfd, fMaxStepAlu, | |
1699 | fMaxDestepAlu, epsil, stmin); | |
1700 | AliMedium(5, "ALU_CH_US ", 10, 0, iSXFLD, sXMGMX, tmaxfd, fMaxStepAlu, | |
1701 | fMaxDestepAlu, epsil, stmin); | |
1702 | // | |
1703 | // Ar-isoC4H10 gas | |
1704 | ||
1705 | AliMedium(6, "AR_CH_US ", 20, 1, iSXFLD, sXMGMX, tmaxfd, fMaxStepGas, | |
1706 | fMaxDestepGas, epsil, stmin); | |
1707 | // | |
1708 | // Ar-Isobuthane-Forane-SF6 gas | |
1709 | ||
1710 | AliMedium(7, "GAS_CH_TRIGGER ", 21, 1, iSXFLD, sXMGMX, tmaxfd, stemax, deemax, epsil, stmin); | |
1711 | ||
1712 | AliMedium(8, "BAKE_CH_TRIGGER ", 19, 0, iSXFLD, sXMGMX, tmaxfd, fMaxStepAlu, | |
1713 | fMaxDestepAlu, epsil, stmin); | |
1714 | ||
1715 | AliMedium(9, "ARG_CO2 ", 22, 1, iSXFLD, sXMGMX, tmaxfd, fMaxStepGas, | |
1716 | fMaxDestepAlu, epsil, stmin); | |
1e8fff9c | 1717 | // tracking media for slats: check the parameters!! |
1718 | AliMedium(11, "PCB_COPPER ", 31, 0, iSXFLD, sXMGMX, tmaxfd, | |
1719 | fMaxStepAlu, fMaxDestepAlu, epsil, stmin); | |
1720 | AliMedium(12, "VETRONITE ", 32, 0, iSXFLD, sXMGMX, tmaxfd, | |
1721 | fMaxStepAlu, fMaxDestepAlu, epsil, stmin); | |
1722 | AliMedium(13, "CARBON ", 33, 0, iSXFLD, sXMGMX, tmaxfd, | |
1723 | fMaxStepAlu, fMaxDestepAlu, epsil, stmin); | |
1724 | AliMedium(14, "Rohacell ", 34, 0, iSXFLD, sXMGMX, tmaxfd, | |
1725 | fMaxStepAlu, fMaxDestepAlu, epsil, stmin); | |
a9e2aefa | 1726 | } |
1727 | ||
1728 | //___________________________________________ | |
1729 | ||
1730 | void AliMUONv1::Init() | |
1731 | { | |
1732 | // | |
1733 | // Initialize Tracking Chambers | |
1734 | // | |
1735 | ||
1736 | printf("\n\n\n Start Init for version 1 - CPC chamber type\n\n\n"); | |
e17592e9 | 1737 | Int_t i; |
f665c1ea | 1738 | for (i=0; i<AliMUONConstants::NCh(); i++) { |
a9e2aefa | 1739 | ( (AliMUONChamber*) (*fChambers)[i])->Init(); |
1740 | } | |
1741 | ||
1742 | // | |
1743 | // Set the chamber (sensitive region) GEANT identifier | |
1744 | AliMC* gMC = AliMC::GetMC(); | |
1745 | ((AliMUONChamber*)(*fChambers)[0])->SetGid(gMC->VolId("C01G")); | |
1746 | ((AliMUONChamber*)(*fChambers)[1])->SetGid(gMC->VolId("C02G")); | |
1747 | ((AliMUONChamber*)(*fChambers)[2])->SetGid(gMC->VolId("C03G")); | |
1748 | ((AliMUONChamber*)(*fChambers)[3])->SetGid(gMC->VolId("C04G")); | |
1e8fff9c | 1749 | ((AliMUONChamber*)(*fChambers)[4])->SetGid(gMC->VolId("S05G")); |
1750 | ((AliMUONChamber*)(*fChambers)[5])->SetGid(gMC->VolId("S06G")); | |
1751 | ((AliMUONChamber*)(*fChambers)[6])->SetGid(gMC->VolId("S07G")); | |
1752 | ((AliMUONChamber*)(*fChambers)[7])->SetGid(gMC->VolId("S08G")); | |
1753 | ((AliMUONChamber*)(*fChambers)[8])->SetGid(gMC->VolId("S09G")); | |
1754 | ((AliMUONChamber*)(*fChambers)[9])->SetGid(gMC->VolId("S10G")); | |
a9e2aefa | 1755 | ((AliMUONChamber*)(*fChambers)[10])->SetGid(gMC->VolId("CG1A")); |
1756 | ((AliMUONChamber*)(*fChambers)[11])->SetGid(gMC->VolId("CG2A")); | |
1757 | ((AliMUONChamber*)(*fChambers)[12])->SetGid(gMC->VolId("CG3A")); | |
1758 | ((AliMUONChamber*)(*fChambers)[13])->SetGid(gMC->VolId("CG4A")); | |
1759 | ||
1760 | printf("\n\n\n Finished Init for version 0 - CPC chamber type\n\n\n"); | |
1761 | ||
1762 | //cp | |
1763 | printf("\n\n\n Start Init for Trigger Circuits\n\n\n"); | |
f665c1ea | 1764 | for (i=0; i<AliMUONConstants::NTriggerCircuit(); i++) { |
a9e2aefa | 1765 | ( (AliMUONTriggerCircuit*) (*fTriggerCircuits)[i])->Init(i); |
1766 | } | |
1767 | printf(" Finished Init for Trigger Circuits\n\n\n"); | |
1768 | //cp | |
1769 | ||
1770 | } | |
1771 | ||
1772 | //___________________________________________ | |
1773 | void AliMUONv1::StepManager() | |
1774 | { | |
1775 | Int_t copy, id; | |
1776 | static Int_t idvol; | |
1777 | static Int_t vol[2]; | |
1778 | Int_t ipart; | |
1779 | TLorentzVector pos; | |
1780 | TLorentzVector mom; | |
1781 | Float_t theta,phi; | |
1782 | Float_t destep, step; | |
1783 | ||
1e8fff9c | 1784 | static Float_t eloss, eloss2, xhit, yhit, zhit, tof, tlength; |
a9e2aefa | 1785 | const Float_t kBig=1.e10; |
a9e2aefa | 1786 | // modifs perso |
1787 | static Float_t hits[15]; | |
1788 | ||
1789 | TClonesArray &lhits = *fHits; | |
1790 | ||
1791 | // | |
1792 | // Set maximum step size for gas | |
1793 | // numed=gMC->GetMedium(); | |
1794 | // | |
1795 | // Only charged tracks | |
1796 | if( !(gMC->TrackCharge()) ) return; | |
1797 | // | |
1798 | // Only gas gap inside chamber | |
1799 | // Tag chambers and record hits when track enters | |
1800 | idvol=-1; | |
1801 | id=gMC->CurrentVolID(copy); | |
1802 | ||
f665c1ea | 1803 | for (Int_t i=1; i<=AliMUONConstants::NCh(); i++) { |
a9e2aefa | 1804 | if(id==((AliMUONChamber*)(*fChambers)[i-1])->GetGid()){ |
1805 | vol[0]=i; | |
1806 | idvol=i-1; | |
1807 | } | |
1808 | } | |
1809 | if (idvol == -1) return; | |
1810 | // | |
1811 | // Get current particle id (ipart), track position (pos) and momentum (mom) | |
1812 | gMC->TrackPosition(pos); | |
1813 | gMC->TrackMomentum(mom); | |
1814 | ||
1815 | ipart = gMC->TrackPid(); | |
1816 | //Int_t ipart1 = gMC->IdFromPDG(ipart); | |
1817 | //printf("ich, ipart %d %d \n",vol[0],ipart1); | |
1818 | ||
1819 | // | |
1820 | // momentum loss and steplength in last step | |
1821 | destep = gMC->Edep(); | |
1822 | step = gMC->TrackStep(); | |
1823 | ||
1824 | // | |
1825 | // record hits when track enters ... | |
1826 | if( gMC->IsTrackEntering()) { | |
1827 | gMC->SetMaxStep(fMaxStepGas); | |
1828 | Double_t tc = mom[0]*mom[0]+mom[1]*mom[1]; | |
1829 | Double_t rt = TMath::Sqrt(tc); | |
1830 | Double_t pmom = TMath::Sqrt(tc+mom[2]*mom[2]); | |
1831 | Double_t tx=mom[0]/pmom; | |
1832 | Double_t ty=mom[1]/pmom; | |
1833 | Double_t tz=mom[2]/pmom; | |
1834 | Double_t s=((AliMUONChamber*)(*fChambers)[idvol]) | |
1835 | ->ResponseModel() | |
1836 | ->Pitch()/tz; | |
1837 | theta = Float_t(TMath::ATan2(rt,Double_t(mom[2])))*kRaddeg; | |
1838 | phi = Float_t(TMath::ATan2(Double_t(mom[1]),Double_t(mom[0])))*kRaddeg; | |
1839 | hits[0] = Float_t(ipart); // Geant3 particle type | |
1840 | hits[1] = pos[0]+s*tx; // X-position for hit | |
1841 | hits[2] = pos[1]+s*ty; // Y-position for hit | |
1842 | hits[3] = pos[2]+s*tz; // Z-position for hit | |
1843 | hits[4] = theta; // theta angle of incidence | |
1844 | hits[5] = phi; // phi angle of incidence | |
1845 | hits[8] = (Float_t) fNPadHits; // first padhit | |
1846 | hits[9] = -1; // last pad hit | |
1847 | ||
1848 | // modifs perso | |
1849 | hits[10] = mom[3]; // hit momentum P | |
1850 | hits[11] = mom[0]; // Px/P | |
1851 | hits[12] = mom[1]; // Py/P | |
1852 | hits[13] = mom[2]; // Pz/P | |
1853 | // fin modifs perso | |
1854 | tof=gMC->TrackTime(); | |
1855 | hits[14] = tof; // Time of flight | |
1856 | // phi angle of incidence | |
1857 | tlength = 0; | |
1858 | eloss = 0; | |
1859 | eloss2 = 0; | |
1860 | xhit = pos[0]; | |
1861 | yhit = pos[1]; | |
1e8fff9c | 1862 | zhit = pos[2]; |
a9e2aefa | 1863 | // Only if not trigger chamber |
1e8fff9c | 1864 | |
1865 | ||
1866 | ||
1867 | ||
a9e2aefa | 1868 | if(idvol<10) { |
1869 | // | |
1870 | // Initialize hit position (cursor) in the segmentation model | |
1871 | ((AliMUONChamber*) (*fChambers)[idvol]) | |
1872 | ->SigGenInit(pos[0], pos[1], pos[2]); | |
1873 | } else { | |
1874 | //geant3->Gpcxyz(); | |
1875 | //printf("In the Trigger Chamber #%d\n",idvol-9); | |
1876 | } | |
1877 | } | |
1878 | eloss2+=destep; | |
1879 | ||
1880 | // | |
1881 | // Calculate the charge induced on a pad (disintegration) in case | |
1882 | // | |
1883 | // Mip left chamber ... | |
1884 | if( gMC->IsTrackExiting() || gMC->IsTrackStop() || gMC->IsTrackDisappeared()){ | |
1885 | gMC->SetMaxStep(kBig); | |
1886 | eloss += destep; | |
1887 | tlength += step; | |
1888 | ||
802a864d | 1889 | Float_t x0,y0,z0; |
1890 | Float_t localPos[3]; | |
1891 | Float_t globalPos[3] = {pos[0], pos[1], pos[2]}; | |
802a864d | 1892 | gMC->Gmtod(globalPos,localPos,1); |
1893 | ||
a9e2aefa | 1894 | if(idvol<10) { |
1895 | // tracking chambers | |
1896 | x0 = 0.5*(xhit+pos[0]); | |
1897 | y0 = 0.5*(yhit+pos[1]); | |
1e8fff9c | 1898 | z0 = 0.5*(zhit+pos[2]); |
1899 | // z0 = localPos[2]; | |
a9e2aefa | 1900 | } else { |
1901 | // trigger chambers | |
1902 | x0=xhit; | |
1903 | y0=yhit; | |
1e8fff9c | 1904 | // z0=yhit; |
802a864d | 1905 | z0=0.; |
a9e2aefa | 1906 | } |
1907 | ||
1e8fff9c | 1908 | |
802a864d | 1909 | if (eloss >0) MakePadHits(x0,y0,z0,eloss,tof,idvol); |
a9e2aefa | 1910 | |
1911 | ||
1912 | hits[6]=tlength; | |
1913 | hits[7]=eloss2; | |
1914 | if (fNPadHits > (Int_t)hits[8]) { | |
1915 | hits[8]= hits[8]+1; | |
1916 | hits[9]= (Float_t) fNPadHits; | |
1917 | } | |
1918 | ||
1919 | new(lhits[fNhits++]) | |
1920 | AliMUONHit(fIshunt,gAlice->CurrentTrack(),vol,hits); | |
1921 | eloss = 0; | |
1922 | // | |
1923 | // Check additional signal generation conditions | |
1924 | // defined by the segmentation | |
1925 | // model (boundary crossing conditions) | |
1926 | } else if | |
1927 | (((AliMUONChamber*) (*fChambers)[idvol]) | |
1928 | ->SigGenCond(pos[0], pos[1], pos[2])) | |
1929 | { | |
1930 | ((AliMUONChamber*) (*fChambers)[idvol]) | |
1931 | ->SigGenInit(pos[0], pos[1], pos[2]); | |
802a864d | 1932 | |
1933 | Float_t localPos[3]; | |
1934 | Float_t globalPos[3] = {pos[0], pos[1], pos[2]}; | |
1935 | gMC->Gmtod(globalPos,localPos,1); | |
1936 | ||
1937 | ||
a9e2aefa | 1938 | if (eloss > 0 && idvol < 10) |
1e8fff9c | 1939 | MakePadHits(0.5*(xhit+pos[0]),0.5*(yhit+pos[1]),pos[2],eloss,tof,idvol); |
a9e2aefa | 1940 | xhit = pos[0]; |
1941 | yhit = pos[1]; | |
1e8fff9c | 1942 | zhit = pos[2]; |
a9e2aefa | 1943 | eloss = destep; |
1944 | tlength += step ; | |
1945 | // | |
1946 | // nothing special happened, add up energy loss | |
1947 | } else { | |
1948 | eloss += destep; | |
1949 | tlength += step ; | |
1950 | } | |
1951 | } | |
1952 | ||
1953 |