]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STRUCT/AliDIPOv2.cxx
Change of mother volume to avoid extrusion of MUON Station 3.
[u/mrichter/AliRoot.git] / STRUCT / AliDIPOv2.cxx
CommitLineData
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
eeacf08b 16/* $Id$ */
4c039060 17
fe4da5cc 18///////////////////////////////////////////////////////////////////////////////
19// //
20// Magnetic Dipole version 1 //
21// //
22//Begin_Html
23/*
d811c12b 24<img src="picts/AliDIPOv2Class.gif">
fe4da5cc 25</pre>
26<br clear=left>
27<font size=+2 color=red>
28<p>The responsible person for this module is
29<a href="mailto:andreas.morsch@cern.ch">Andreas Morsch</a>.
30</font>
31<pre>
32*/
33//End_Html
34// //
35// //
fe4da5cc 36
88cb7938 37#include <TVirtualMC.h>
38
39#include "AliConst.h"
fe4da5cc 40#include "AliDIPOv2.h"
94de3818 41#include "AliMagF.h"
88cb7938 42#include "AliRun.h"
fe4da5cc 43
44ClassImp(AliDIPOv2)
45
46//_____________________________________________________________________________
1b206195 47AliDIPOv2::AliDIPOv2()
fe4da5cc 48{
49 //
1b206195 50 // Last design of magnetic dipole version 2
fe4da5cc 51 //
52}
53
54//_____________________________________________________________________________
55AliDIPOv2::AliDIPOv2(const char *name, const char *title)
56 : AliDIPO(name,title)
57{
58 //
59 // Standard constructor for the magnetic dipole version 2
60 SetMarkerColor(7);
61 SetMarkerStyle(2);
62 SetMarkerSize(0.4);
63}
c557d782 64
fe4da5cc 65void AliDIPOv2::CreateGeometry()
c557d782 66{
67 //
68 // Creation of the geometry of the magnetic DIPOLE version 2
69 //
70
71 CreateSpectrometerDipole();
72 CreateCompensatorDipole();
73}
74
75
76//_____________________________________________________________________________
77void AliDIPOv2::CreateSpectrometerDipole()
fe4da5cc 78{
79 //
80 // Creation of the geometry of the magnetic DIPOLE version 2
81 //
1b206195 82
395de7f7 83 Float_t cpar[5], tpar[18], ypar[12];
fe4da5cc 84 Float_t dz, dx, dy;
85 Int_t idrotm[1899];
b43eb0dc 86 Float_t accMax, the1, phi1, the2, phi2, the3, phi3;
d811c12b 87
1b206195 88 Int_t *idtmed = fIdtmed->GetArray()-1799;
89
ee7389e1 90// const Int_t kCoil = 1813;
91// const Int_t kCable= 1811;
92
93 const Int_t kCoil = 1808;
94 const Int_t kCable= 1808;
95
b43eb0dc 96 accMax = 9.; // ANGLE POLAIRE MAXIMUM
1b206195 97
fe4da5cc 98 // DIPOLE MAGNET
395de7f7 99 const Float_t kZDipole = 975;
1b206195 100
e094dc1b 101 tpar[0] = 0.;
102 tpar[1] = 360.;
395de7f7 103 tpar[2] = 5.;
e094dc1b 104 //
395de7f7 105 tpar[3] = -250.55+kZDipole;
01073cc3 106 tpar[4] = 30.1;
e094dc1b 107 tpar[5] = 527.34;
108 //
395de7f7 109 tpar[6] = -160.7+kZDipole;
01073cc3 110 tpar[7] = 30.1;
e094dc1b 111 tpar[8] = 527.34;
112 //
01073cc3 113 tpar[9] = 35.+kZDipole;
114 tpar[10] = 30.1;
e094dc1b 115 tpar[11] = 527.34;
395de7f7 116
117 tpar[12] = 150.8+kZDipole;
27d0c140 118 tpar[13] = 182.4;
e094dc1b 119 tpar[14] = 527.34;
395de7f7 120 //
27d0c140 121 tpar[15] = 260.55+kZDipole;
122 tpar[16] = 182.4;
395de7f7 123 tpar[17] = 527.34;
e094dc1b 124
1b206195 125
395de7f7 126 gMC->Gsvolu("DDIP", "PCON", idtmed[1814], tpar, 18);
fe4da5cc 127 // COILS
fe4da5cc 128 // air - m.f.
1b206195 129 cpar[0] = 207.;
130 cpar[1] = 274.;
131 cpar[2] = 37.65;
132 cpar[3] = 119.;
395de7f7 133 cpar[4] = 241.;
1b206195 134 // coil - high cuts
ee7389e1 135 gMC->Gsvolu("DC1 ", "TUBS", idtmed[kCoil+40], cpar, 5);
1b206195 136 cpar[3] = -61.;
137 cpar[4] = 61.;
ee7389e1 138 gMC->Gsvolu("DC2 ", "TUBS", idtmed[kCoil+40], cpar, 5);
1b206195 139
140 // coil - low cuts cuts
141 cpar[0] = 207.;
142// cpar[1] = cpar[0] + 10.;
143 cpar[1] = 217;
144 cpar[3] = 119.;
145 cpar[4] = 241.;
146
ee7389e1 147 gMC->Gsvolu("DC3 ", "TUBS", idtmed[kCoil], cpar, 5);
1b206195 148 cpar[0] = 207.;
149 cpar[1] = 217;
150 cpar[3] = -61.;
151 cpar[4] = 61.;
ee7389e1 152 gMC->Gsvolu("DC4 ", "TUBS", idtmed[kCoil], cpar, 5);
1b206195 153
cfce8870 154 gMC->Gspos("DC3 ", 1, "DC1 ", 0., 0., 0., 0, "ONLY");
cfce8870 155 gMC->Gspos("DC4 ", 1, "DC2 ", 0., 0., 0., 0, "ONLY");
1b206195 156
157// dz = 37.65 - 243.55
158 dz = -205.9-2.45;
159 dx = 5.;
395de7f7 160 gMC->Gspos("DC1 ", 1, "DDIP", dx, 0., dz+kZDipole, 0, "ONLY");
161 gMC->Gspos("DC1 ", 2, "DDIP", dx, 0., -dz+kZDipole, 0, "ONLY");
162 gMC->Gspos("DC2 ", 1, "DDIP", -dx, 0., dz+kZDipole, 0, "ONLY");
163 gMC->Gspos("DC2 ", 2, "DDIP", -dx, 0., -dz+kZDipole, 0, "ONLY");
fe4da5cc 164 the1 = 180.;
165 phi1 = 0.;
166 the2 = 90.;
1b206195 167 phi2 = 151.;
fe4da5cc 168 the3 = 90.;
1b206195 169 phi3 = 61.;
fe4da5cc 170 AliMatrix(idrotm[1800], the1, phi1, the2, phi2, the3, phi3);
1b206195 171 phi2 = 29.; //90-61
fe4da5cc 172 the3 = -90.;
1b206195 173 phi3 = -61.;
fe4da5cc 174 AliMatrix(idrotm[1801], the1, phi1, the2, phi2, the3, phi3);
175 the1 = 0.;
176 phi1 = 0.;
177 the2 = 90.;
1b206195 178 phi2 = 151.;
fe4da5cc 179 the3 = 90.;
1b206195 180 phi3 = 61.;
fe4da5cc 181 AliMatrix(idrotm[1802], the1, phi1, the2, phi2, the3, phi3);
1b206195 182 phi2 = 29.;
fe4da5cc 183 the3 = -90.;
1b206195 184 phi3 = -61.;
fe4da5cc 185 AliMatrix(idrotm[1803], the1, phi1, the2, phi2, the3, phi3);
1b206195 186
fe4da5cc 187 cpar[0] = 25.;
1b206195 188 cpar[1] = 100.3; //25+75.3
189 cpar[2] = 33.5;
fe4da5cc 190 cpar[3] = 270.;
191 cpar[4] = 360.;
1b206195 192//* coil high cuts
ee7389e1 193 gMC->Gsvolu("DC11", "TUBS", idtmed[kCoil+40], cpar, 5);
1b206195 194
395de7f7 195 dx = TMath::Sin(30.5*kDegrad) * -(207.+33.5)+5./TMath::Sin(30.5*kDegrad);
1b206195 196 dy = TMath::Cos(30.5*kDegrad) * -(207.+33.5);
197 dz = cpar[1] - 243.55-2.45;
395de7f7 198 gMC->Gspos("DC11", 1, "DDIP", dx, dy, dz+kZDipole, idrotm[1800], "ONLY");
199 gMC->Gspos("DC11", 2, "DDIP", dx, dy, -dz+kZDipole, idrotm[1802], "ONLY");
200 gMC->Gspos("DC11", 3, "DDIP", -dx, dy, dz+kZDipole, idrotm[1801], "ONLY");
201 gMC->Gspos("DC11", 4, "DDIP", -dx, dy, -dz+kZDipole, idrotm[1803], "ONLY");
1b206195 202
203
204
205//* ... higher cuts
fe4da5cc 206 cpar[0] = 25.;
1b206195 207 cpar[1] = 100.3; //25+75.3
208 cpar[2] = 33.5;
fe4da5cc 209 cpar[3] = 0.;
210 cpar[4] = 90.;
1b206195 211//* coil high cuts
ee7389e1 212 gMC->Gsvolu("DC12", "TUBS", idtmed[kCoil+40], cpar, 5);
1b206195 213
395de7f7 214 dx = TMath::Sin(30.5*kDegrad) * -(207.+33.5)+5./TMath::Sin(30.5*kDegrad);
1b206195 215 dy = TMath::Cos(30.5*kDegrad) *(207.+33.5);
216 dz = cpar[1] - 243.55-2.45;
395de7f7 217 gMC->Gspos("DC12", 1, "DDIP", dx, dy, dz+kZDipole, idrotm[1801], "ONLY");
218 gMC->Gspos("DC12", 2, "DDIP", dx, dy, -dz+kZDipole, idrotm[1803], "ONLY");
219 gMC->Gspos("DC12", 3, "DDIP", -dx, dy, dz+kZDipole, idrotm[1800], "ONLY");
220 gMC->Gspos("DC12", 4, "DDIP", -dx, dy, -dz+kZDipole, idrotm[1802], "ONLY");
1b206195 221
fe4da5cc 222 the1 = 90.;
1b206195 223 phi1 = 61.;
fe4da5cc 224 the2 = 90.;
1b206195 225 phi2 = 151.;
fe4da5cc 226 the3 = 0.;
227 phi3 = 0.;
228 AliMatrix(idrotm[1804], the1, phi1, the2, phi2, the3, phi3);
229 the1 = 90.;
1b206195 230 phi1 = -61.;
fe4da5cc 231 the2 = 90.;
1b206195 232 phi2 = -151.;
fe4da5cc 233 AliMatrix(idrotm[1805], the1, phi1, the2, phi2, the3, phi3);
1b206195 234 the1 = 90.;
235 phi1 = 119.; //180 -61
236 the2 = 90.;
237 phi2 = 209.; //270-61
238 AliMatrix(idrotm[1806], the1, phi1, the2, phi2, the3, phi3);
239 the1 = 90.;
240 phi1 = -119.;
241 the2 = 90.;
242 phi2 = -209.;
243 AliMatrix(idrotm[1807], the1, phi1, the2, phi2, the3, phi3);
244
245//* coil - high cuts
246
247 tpar[0] = 37.65;
248 tpar[1] = 33.5;
249 tpar[2] = 145.5;
ee7389e1 250 gMC->Gsvolu("DL1 ", "BOX ", idtmed[kCoil+40], tpar, 3);
1b206195 251
252// coil - low cuts
253
254 tpar[0] = 5.;
255 dx = 37.65 - 5.;
ee7389e1 256 gMC->Gsvolu("DL2 ", "BOX ", idtmed[kCoil], tpar, 3);
1b206195 257 gMC->Gspos("DL2 ", 1, "DL1 ", dx, 0., 0., 0, "ONLY");
258
259 dx =-53.62;
260 dy =-241.26819;
395de7f7 261 dz = 0.;
262 gMC->Gspos("DL1 ", 1, "DDIP", dx, dy, dz+kZDipole, idrotm[1804], "ONLY");
263 gMC->Gspos("DL1 ", 2, "DDIP", dx, -dy, dz+kZDipole, idrotm[1805], "ONLY");
264 gMC->Gspos("DL1 ", 3, "DDIP",-dx, dy, dz+kZDipole, idrotm[1806], "ONLY");
265 gMC->Gspos("DL1 ", 4, "DDIP",-dx, -dy, dz+kZDipole, idrotm[1807], "ONLY");
1b206195 266
267 // Contactor
268
269 // high cuts
270
271 //Steel outer face planes
272
273 cpar[0] = 207.-18.6;
274 cpar[1] = 274.+18.6;
275 cpar[2] = 1.;
276 cpar[3] = -50.;
277 cpar[4] = 50.;
278
279 gMC->Gsvolu("DCO1", "TUBS", idtmed[1818], cpar, 5);
280 dx = -5.;
281 dz = 168.25-1.5-1.;
395de7f7 282 gMC->Gspos("DCO1", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY");
1b206195 283 dz = 243.55+4.5+1.5+1.;
395de7f7 284 gMC->Gspos("DCO1", 2, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY");
d811c12b 285
1b206195 286 // 9.06.2000
287
288 // cpar[0] = 207.-18.6;
289 // cpar[1] = 274.+18.6;
290 // cpar[2] = 1.;
291 cpar[3] = 180.-50.;
292 cpar[4] = 180.+50.;
293
294 gMC->Gsvolu("DCO2", "TUBS", idtmed[1818], cpar, 5);
295 dx = +5.;
296 dz = 168.25-1.5-1.;
395de7f7 297 gMC->Gspos("DCO2", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY");
1b206195 298 dz = 243.55+4.5+1.5+1.;
395de7f7 299 gMC->Gspos("DCO2", 2, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY");
1b206195 300
301
302
303 // Resin face planes
304
305 cpar[0] = 207.;
306 cpar[1] = 274.;
307 cpar[2] = .75;
308 cpar[3] = -50.;
309 cpar[4] = 50.;
310
311 gMC->Gsvolu("DCO3", "TUBS", idtmed[1812], cpar, 5);
312 dx = -5;
313 dz = 168.25-0.75;
395de7f7 314 gMC->Gspos("DCO3", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY");
1b206195 315 dz = 243.55+4.5+0.75;
395de7f7 316 gMC->Gspos("DCO3", 2, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY");
1b206195 317
318 // 9.06.2000
319
320 cpar[3] = 180.-50.;
321 cpar[4] = 180.+50.;
322 gMC->Gsvolu("DCO4", "TUBS", idtmed[1812], cpar, 5);
323 dx = +5;
324 dz = 168.25-0.75;
395de7f7 325 gMC->Gspos("DCO4", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY");
326 dz = 243.55+4.5+0.75 ;
327 gMC->Gspos("DCO4", 2, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY");
1b206195 328
329
330 // G10 face plane
331
332 cpar[0] = 207.;
333 cpar[1] = 274.;
334 cpar[2] = 2.25;
335 cpar[3] = -50.;
336 cpar[4] = 50.;
337
338 gMC->Gsvolu("DCO5", "TUBS", idtmed[1810], cpar, 5);
339
340 dx = -5;
341 dz = 243.55+2.25;
395de7f7 342 gMC->Gspos("DCO5", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY");
1b206195 343
344 // 9.06.2000
345
346 cpar[3] = 180.-50.;
347 cpar[4] = 180.+50.;
348
349 gMC->Gsvolu("DCO6", "TUBS", idtmed[1810], cpar, 5);
350
351 dx = +5;
395de7f7 352 dz = 243.55+2.25;
353 gMC->Gspos("DCO6", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY");
1b206195 354
355 //Steel supported planes
356
357 cpar[0] = 274.+1.5+2.;
358 cpar[1] = 274.+18.6;
359 cpar[2] = 1.;
360 cpar[3] = -50.;
361 cpar[4] = 50.;
362
363 gMC->Gsvolu("DCO7", "TUBS", idtmed[1818], cpar, 5);
364
365 dx = -5;
366 dz = 168.25+1.;
395de7f7 367 gMC->Gspos("DCO7", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY");
1b206195 368
369 // 9.06.2000
370 cpar[0] = 274.+1.5+2.;
371 cpar[1] = 274.+18.6;
372 cpar[2] = 1.;
373 cpar[3] = 180.-50.;
374 cpar[4] = 180.+50.;
375
376
377 gMC->Gsvolu("DCO8", "TUBS", idtmed[1818], cpar, 5);
378
379 dx = +5;
380 dz = 168.25+1.;
395de7f7 381 gMC->Gspos("DCO8", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY");
1b206195 382
383 //
384
385 cpar[0] = 207.- 18.6;
386 cpar[1] = 207.- 2.- 1.5;
387 cpar[2] = 1.;
388 cpar[3] = -50.;
389 cpar[4] = 50.;
390
391 gMC->Gsvolu("DCO9", "TUBS", idtmed[1818], cpar, 5);
392
393 dx = -5;
394 dz = 168.25+1.;
395de7f7 395 gMC->Gspos("DCO9", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY");
1b206195 396
397 // 9.06.2000
398
399 cpar[0] = 207.- 18.6;
400 cpar[1] = 207.- 2.- 1.5;
401 cpar[2] = 1.;
402 cpar[3] = 180.-50.;
403 cpar[4] = 180.+50.;
404
405 gMC->Gsvolu("DCOA", "TUBS", idtmed[1818], cpar, 5);
406
407 dx = +5;
408 dz = 168.25+1.;
395de7f7 409 gMC->Gspos("DCOA", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY");
1b206195 410
411
412 // Sides steel planes
413
414 cpar[0] = 207. - 1.5 -2.;
395de7f7 415 cpar[1] = 207. - 1.5;
1b206195 416 cpar[2] = ((243.55+4.5+1.5)-168.25)/2;
417 cpar[3] = -50.;
418 cpar[4] = 50.;
419
420 gMC->Gsvolu("DCOB", "TUBS", idtmed[1818], cpar, 5);
421
422 cpar[0] = 274. + 1.5;
423 cpar[1] = 274. + 1.5 +2.;
424
425 gMC->Gsvolu("DCOC", "TUBS", idtmed[1818], cpar, 5);
426
427 dx=-5.;
428 dz = ((243.55+4.5+1.5)+168.25)/2;
395de7f7 429 gMC->Gspos("DCOB", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY");
430 gMC->Gspos("DCOC", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY");
1b206195 431
432 // 9.06.2000
433
434 cpar[0] = 207. - 1.5 -2.;
395de7f7 435 cpar[1] = 207. - 1.5;
1b206195 436 cpar[2] = ((243.55+4.5+1.5)-168.25)/2;
437 cpar[3] = 180.-50.;
438 cpar[4] = 180.+50.;
439
440 gMC->Gsvolu("DCOD", "TUBS", idtmed[1818], cpar, 5);
441
442 cpar[0] = 274. + 1.5;
443 cpar[1] = 274. + 1.5 +2.;
444
445 gMC->Gsvolu("DCOE", "TUBS", idtmed[1818], cpar, 5);
446
447 dx=+5.;
448 dz = ((243.55+4.5+1.5)+168.25)/2;
395de7f7 449 gMC->Gspos("DCOD", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY");
450 gMC->Gspos("DCOE", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY");
1b206195 451
452
453 // Top and bottom resin planes
454
395de7f7 455 cpar[0] = 207. - 1.5;
456 cpar[1] = 207.;
1b206195 457 cpar[2] = ((243.55+4.5+1.5)-168.25)/2;
458 cpar[3] = -50.;
459 cpar[4] = 50.;
460
461 gMC->Gsvolu("DCOF", "TUBS", idtmed[1812], cpar, 5);
462
463 cpar[0] = 274.;
464 cpar[1] = 274. + 1.5;
465
466 gMC->Gsvolu("DCOG", "TUBS", idtmed[1812], cpar, 5);
467
468
469 dx=-5.;
470 dz = ((243.55+4.5+1.5)+168.25)/2;
395de7f7 471 gMC->Gspos("DCOF", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY");
472 gMC->Gspos("DCOG", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY");
1b206195 473
474 // 9.06.2000
395de7f7 475 cpar[0] = 207. - 1.5;
476 cpar[1] = 207.;
1b206195 477 cpar[2] = ((243.55+4.5+1.5)-168.25)/2;
478
479 cpar[3] = 180.-50.;
480 cpar[4] = 180.+50.;
481
482 gMC->Gsvolu("DCOH", "TUBS", idtmed[1812], cpar, 5);
483
484 cpar[0] = 274.;
485 cpar[1] = 274. + 1.5;
486
487 gMC->Gsvolu("DCOI", "TUBS", idtmed[1812], cpar, 5);
488
489
490 dx=+5.;
491 dz = ((243.55+4.5+1.5)+168.25)/2;
395de7f7 492 gMC->Gspos("DCOH", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY");
493 gMC->Gspos("DCOI", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY");
1b206195 494
495
496 // Aluminum cabels
497
498 cpar[0] = 274. + 1.5 +2.;
499 cpar[1] = 274. + 1.5 +2. + 80.;
500 cpar[2] = 5.05/2;
501 cpar[3] = -24.;
502 cpar[4] = 24.;
503
ee7389e1 504 gMC->Gsvolu("DCOJ", "TUBS", idtmed[kCable], cpar, 5);
1b206195 505
506 // dx = 274. + 1.5 +2. +40.;
507 // dx = 5. + 1.5 +2. +40.;
508 // dx = 5. + 1.5 +2.;
509 dx=-5.;
510 dz = 168.25 + 5.05 + 5.05/2;
395de7f7 511 gMC->Gspos("DCOJ", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY");
1b206195 512
513 dz = 243.55 - 5.05/2;
395de7f7 514 gMC->Gspos("DCOJ", 2, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY");
1b206195 515
516 // 9.06.2000
517
518 cpar[3] = 180.-24.;
519 cpar[4] = 180.+24.;
520
ee7389e1 521 gMC->Gsvolu("DCOK", "TUBS", idtmed[kCable], cpar, 5);
1b206195 522
523 // dx = 274. + 1.5 +2. +40.;
524 // dx = 5. + 1.5 +2. +40.;
525 // dx = 5. + 1.5 +2.;
526 dx=+5.;
527 dz = 168.25 + 5.05 + 5.05/2;
395de7f7 528 gMC->Gspos("DCOK", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY");
1b206195 529
530 dz = 243.55 - 5.05/2;
395de7f7 531 gMC->Gspos("DCOK", 2, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY");
1b206195 532
533
fe4da5cc 534 // YOKE
1b206195 535
536// Top and bottom blocks
395de7f7 537 ypar[0] = 298.1;
1b206195 538 ypar[1] = 69.5;
539 ypar[2] = 155.75;
540
541// iron- high cuts
542 gMC->Gsvolu("DY1 ", "BOX ", idtmed[1858], ypar, 3);
395de7f7 543 ypar[0] = 144.+10.;
1b206195 544 ypar[1] = 193.3+10.;
fe4da5cc 545 ypar[2] = 5.;
1b206195 546 ypar[3] = 155.75;
547 dy = -69.5 + 5.;
548// iron- low cuts
549 gMC->Gsvolu("DY11", "TRD1", idtmed[1818], ypar, 4);
550 gMC->Gspos("DY11", 1, "DY1 ", 0., dy, 0., 0, "ONLY");
551
552 dy = 365.5;
553 dz = 4.95;
395de7f7 554 gMC->Gspos("DY1 ", 1, "DDIP", 0., dy, -dz+kZDipole, 0, "ONLY");
1b206195 555
556 the1 = 270.;
fe4da5cc 557 phi1 = 0.;
1b206195 558 the2 = 270.;
fe4da5cc 559 phi2 = 90.;
1b206195 560 the3 = 0.;
fe4da5cc 561 phi3 = 0.;
1b206195 562 AliMatrix(idrotm[1808], the1, phi1, the2, phi2, the3, phi3);
395de7f7 563 gMC->Gspos("DY1 ", 2, "DDIP", 0., -dy, -dz+kZDipole, idrotm[1808] , "ONLY");
1b206195 564
565// side walls
395de7f7 566 // ypar[0] = 579./2.;
567 ypar[0] = 296.;
1b206195 568 ypar[1] = 0.;
569 ypar[2] = 0.;
570 ypar[3] = 155.75;
395de7f7 571 ypar[4] = 47.9;
1b206195 572 ypar[5] = 72.55;
395de7f7 573 ypar[6] = 4.3058039629;
1b206195 574 // z+
575 ypar[7] = 155.75;
395de7f7 576 ypar[8] = 47.9;
1b206195 577 ypar[9] = 72.55;
395de7f7 578 ypar[10] = 4.3058039629;
1b206195 579
580// iron - high cuts
581
582 gMC->Gsvolu("DY2 ", "TRAP", idtmed[1858], ypar,11);
583
584 ypar[4] = 47.9 -5.;
585 ypar[5] = 72.55 -5.;
586
587 ypar[8] = 47.9 -5.;
588 ypar[9] = 72.55 -5.;
589
590
591// iron - low cuts
592
593 gMC->Gsvolu("DY22", "TRAP", idtmed[1818], ypar,11);
594
595 dy = 0.;
596 dx = -5.;
597
598 gMC->Gspos("DY22", 1, "DY2 ", dx, dy, 0., 0, "ONLY");
599
600 the1 = 90.;
601 phi1 = 180.;
602 the2 = 180.;
603 phi2 = 180.;
604 the3 = 90.;
605 phi3 = 90.;
606 AliMatrix(idrotm[1809], the1, phi1, the2, phi2, the3, phi3);
607
608 the1 = 90.;
fe4da5cc 609 phi1 = 0.;
1b206195 610 the2 = 180.;
611 phi2 = 0.;
395de7f7 612 the3 = 90.;
1b206195 613 phi3 = 90.;
614 AliMatrix(idrotm[1810], the1, phi1, the2, phi2, the3, phi3);
615
616 dx = 228.875;
617 dz = - 4.95;
395de7f7 618
619 gMC->Gspos("DY2 ", 1, "DDIP", dx, 0.0, dz+kZDipole, idrotm[1809], "ONLY");
620 gMC->Gspos("DY2 ", 2, "DDIP", -dx, 0.0, dz+kZDipole, idrotm[1810], "ONLY");
6be67e67 621
622 AliMatrix(idrotm[1811], 270., 0., 90., 90., 180., 0.);
623 gMC->Gspos("DDIP", 1, "ALIC", 0., 0., 0., idrotm[1811], "ONLY");
1b206195 624
cfce8870 625 gMC->Gsatt("DDIP", "SEEN", 0);
1b206195 626// gMC->Gsatt("DC21", "SEEN", 0);
627// gMC->Gsatt("DC22", "SEEN", 0);
628// gMC->Gsatt("DC3 ", "SEEN", 0);
629// gMC->Gsatt("DC4 ", "SEEN", 0);
fe4da5cc 630}
631
c557d782 632
633void AliDIPOv2::CreateCompensatorDipole()
634{
635 //
636 // Geometry of the compensator Dipole MBWMD (was MCB @ SPS)
637 //
638 Int_t *idtmed = fIdtmed->GetArray()-1799;
639 Int_t idrotm[1899];
640//
9c01dd47 641 Float_t pbox[3] = {63., 63., 170.};
c557d782 642
643// Mother volumes
644 gMC->Gsvolu("DCM0", "BOX", idtmed[1814], pbox, 3);
34d8746c 645
c557d782 646//
34d8746c 647// Mother volume containing lower coil
c557d782 648 pbox[0] = 58.5/2.;
649 pbox[1] = 30.0;
34d8746c 650 pbox[2] = 152.5;
651
c557d782 652 gMC->Gsvolu("DCML", "BOX", idtmed[1809], pbox, 3);
653//
654// Base
655 pbox[0] = 62.5;
656 pbox[1] = 15.0;
657 gMC->Gsvolu("DCBA", "BOX", idtmed[1809], pbox, 3);
c557d782 658//
659// Coil: straight sections, horizontal
660 pbox[0] = 6.;
661 pbox[1] = 11.;
34d8746c 662 pbox[2] = 135.;
c557d782 663 gMC->Gsvolu("DCH1", "BOX", idtmed[1816], pbox, 3);
664//
665// Coil: straight sections, horizontal
666 pbox[0] = 6.;
667 pbox[1] = 11.;
668 pbox[2] = 135.;
669 gMC->Gsvolu("DCH2", "BOX", idtmed[1816], pbox, 3);
670
671//
672// Mother volume containing upper coil
673 pbox[0] = 8.0;
674 pbox[1] = 17.5;
675 pbox[2] = 135.0;
676 gMC->Gsvolu("DCMU", "BOX", idtmed[1809], pbox, 3);
677
678//
679// Coil: straight sections, vertical
34d8746c 680 pbox[0] = 6.0;
681 pbox[1] = 9.5;
682 pbox[2] = 11.0;
c557d782 683
684 gMC->Gsvolu("DCCV", "BOX", idtmed[1816], pbox, 3);
685//
686// Coil: circular section
687
688 Float_t ptubs[5];
689 ptubs[0] = 0.;
690 ptubs[1] = 35.;
691 ptubs[2] = 8.;
692 ptubs[3] = 0.;
693 ptubs[4] = 90.;
34d8746c 694// gMC->Gsvolu("DCC1", "TUBS", idtmed[1809], ptubs, 5);
c557d782 695 ptubs[0] = 13.;
696 ptubs[1] = 35.;
697 ptubs[2] = 6.;
34d8746c 698 ptubs[3] = 0.;
699 ptubs[4] = 90.;
700 gMC->Gsvolu("DCC1", "TUBS", idtmed[1816], ptubs, 5);
701//
702// Clamps
703 Float_t ppgon[10];
704 ppgon[0] = 0.;
705 ppgon[1] = 90.;
706 ppgon[2] = 1.;
707 ppgon[3] = 2.;
708 ppgon[4] = -1.;
709 ppgon[5] = 0.;
710 ppgon[6] = 24.75;
711 ppgon[7] = 1.;
712 ppgon[8] = 0.;
713 ppgon[9] = 24.75;
714 gMC->Gsvolu("DCLA", "PGON", idtmed[1809], ppgon, 10);
c557d782 715//
716// Assemble all
717//
718 AliMatrix(idrotm[1811], -90., 0., 90., 90., 0., 0.);
34d8746c 719 AliMatrix(idrotm[1812], 0., 0., 90., 90., 90., 0.);
c557d782 720 AliMatrix(idrotm[1813], 180., 0., 90., 90., 90., 0.);
34d8746c 721 AliMatrix(idrotm[1814], 0., 180., 90., 270., 90., 0.);
722 AliMatrix(idrotm[1815], 180., 180., 90., 270., 90., 0.);
723
724 gMC->Gspos("DCH1", 1, "DCML", 23.25, -13., -17.5, 0, "ONLY");
725 gMC->Gspos("DCCV", 1, "DCM0", 12., 19., -159., 0, "ONLY");
726 gMC->Gspos("DCCV", 2, "DCM0", -12., 19., -159., 0, "ONLY");
727 gMC->Gspos("DCCV", 3, "DCML", 23.25, 20.5, 141.5, 0, "ONLY");
c557d782 728
34d8746c 729 gMC->Gspos("DCML", 1, "DCM0", -33.25, -2.5, 17.5, 0, "ONLY");
730 gMC->Gspos("DCML", 2, "DCM0", 33.25, -2.5, 17.5, idrotm[1811], "ONLY");
c557d782 731
732
34d8746c 733 gMC->Gspos("DCH2", 1, "DCMU", 2., 6.5, 0., 0, "ONLY");
c557d782 734 gMC->Gspos("DCMU", 1, "DCM0", -12., 45., 0., 0, "ONLY");
735 gMC->Gspos("DCMU", 2, "DCM0", 12., 45., 0., idrotm[1811], "ONLY");
736
34d8746c 737// gMC->Gspos("DCC2", 1, "DCC1", 0., 0., 0., 0, "ONLY");
c557d782 738
739 gMC->Gspos("DCC1", 1, "DCM0", -12., 27.5, 135., idrotm[1812], "ONLY");
740 gMC->Gspos("DCC1", 2, "DCM0", 12., 27.5, 135., idrotm[1812], "ONLY");
741 gMC->Gspos("DCC1", 3, "DCM0", -12., 27.5, -135., idrotm[1813], "ONLY");
742 gMC->Gspos("DCC1", 4, "DCM0", 12., 27.5, -135., idrotm[1813], "ONLY");
743
34d8746c 744 gMC->Gspos("DCC1", 5, "DCM0", 12., 27.5-32.+13., -135., idrotm[1815], "ONLY");
745 gMC->Gspos("DCC1", 6, "DCM0", -12., 27.5-32.+13., -135., idrotm[1815], "ONLY");
746
747 gMC->Gspos("DCC1", 7, "DCML", 23.25, -13+13.+11., 117.5, idrotm[1814], "ONLY");
748
749 gMC->Gspos("DCLA", 1, "DCM0", 20., 27.5, -134., 0, "ONLY");
750 gMC->Gspos("DCLA", 2, "DCM0", 20., 27.5, -44., 0, "ONLY");
751 gMC->Gspos("DCLA", 3, "DCM0", 20., 27.5, 46., 0, "ONLY");
752 gMC->Gspos("DCLA", 4, "DCM0", 20., 27.5, 134., 0, "ONLY");
753
754 gMC->Gspos("DCLA", 5, "DCM0", -20., 27.5, -134., idrotm[1811], "ONLY");
755 gMC->Gspos("DCLA", 6, "DCM0", -20., 27.5, -44., idrotm[1811], "ONLY");
756 gMC->Gspos("DCLA", 7, "DCM0", -20., 27.5, 46., idrotm[1811], "ONLY");
757 gMC->Gspos("DCLA", 8, "DCM0", -20., 27.5, 134., idrotm[1811], "ONLY");
c557d782 758
c557d782 759
34d8746c 760 gMC->Gspos("DCBA", 1, "DCM0", 0., -47.5 , 17.5, 0, "ONLY");
6be67e67 761 AliMatrix(idrotm[1816], 270., 0., 90., 90., 180., 0.);
762 gMC->Gspos("DCM0", 1, "ALIC", 0., -6.75, 975., idrotm[1816], "ONLY");
c557d782 763
764
765}
766
fe4da5cc 767//_____________________________________________________________________________
eeacf08b 768void AliDIPOv2::DrawModule() const
fe4da5cc 769{
770 //
771 // Draw a shaded view of the muon absorber
772 //
773
fe4da5cc 774 // Set everything unseen
cfce8870 775 gMC->Gsatt("*", "seen", -1);
fe4da5cc 776 //
777 // Set ALIC mother transparent
cfce8870 778 gMC->Gsatt("ALIC","SEEN",0);
fe4da5cc 779 //
780 // Set the volumes visible
cfce8870 781 gMC->Gsatt("DDIP","seen",0);
782 gMC->Gsatt("DC1 ","seen",1);
783 gMC->Gsatt("DC2 ","seen",1);
784 gMC->Gsatt("DC3 ","seen",1);
785 gMC->Gsatt("DC4 ","seen",1);
786 gMC->Gsatt("DC11","seen",1);
787 gMC->Gsatt("DC21","seen",1);
788 gMC->Gsatt("DC12","seen",1);
789 gMC->Gsatt("DC22","seen",1);
790 gMC->Gsatt("DL1 ","seen",1);
791 gMC->Gsatt("DL2 ","seen",1);
792 gMC->Gsatt("DY1 ","seen",1);
793 gMC->Gsatt("DY2 ","seen",1);
794 gMC->Gsatt("DYL ","seen",1);
795 gMC->Gsatt("DY3 ","seen",1);
1b206195 796 // gMC->Gsatt("DY4 ","seen",1);
797 // gMC->Gsatt("DY5 ","seen",1);
798 // gMC->Gsatt("DY6 ","seen",1);
799// gMC->Gsatt("DY7 ","seen",1);
fe4da5cc 800 //
cfce8870 801 gMC->Gdopt("hide", "on");
802 gMC->Gdopt("shad", "on");
803 gMC->Gsatt("*", "fill", 7);
804 gMC->SetClipBox(".");
805 gMC->SetClipBox(".");
806 gMC->DefaultRange();
807 gMC->Gdraw("alic", 30, 30, 0, 17, 13.5, .019, .019);
808 gMC->Gdhead(1111, "Magnetic Dipole Version 2");
809 gMC->Gdman(16, 4, "MAN");
fe4da5cc 810}
811
c557d782 812
813
814
fe4da5cc 815//_____________________________________________________________________________
816void AliDIPOv2::CreateMaterials()
817{
818 //
819 // Create Materials for Magnetic Dipole version 2
820 //
821
b43eb0dc 822 Int_t isxfld = gAlice->Field()->Integ();
823 Float_t sxmgmx = gAlice->Field()->Max();
fe4da5cc 824
002b3738 825
fe4da5cc 826 Float_t asteel[4] = { 55.847,51.9961,58.6934,28.0855 };
827 Float_t zsteel[4] = { 26.,24.,28.,14. };
828 Float_t wsteel[4] = { .715,.18,.1,.005 };
1b206195 829
fe4da5cc 830 Float_t acoil[3] = { 26.98,1.01,16. };
831 Float_t zcoil[3] = { 13.,1.,8. };
832 Float_t wcoil[3] = { .66,.226,.114 };
1b206195 833
834 Float_t aresi[3] = { 1.01,12.011,16.};
835 Float_t zresi[3] = { 1.,6.,8. };
836 Float_t wresi[3] = { .0644,.7655,.1701 };
837
838 Float_t aG10[5] = { 1.01,12.011,16.,28.085 ,79.904 };
839 Float_t zG10[5] = { 1.,6.,8.,14.,35. };
840 Float_t wG10[5] = { .02089,.22338,.28493,.41342,.05738 };
841
6a894888 842 // AIR
843
844 Float_t aAir[4]={12.0107,14.0067,15.9994,39.948};
845 Float_t zAir[4]={6.,7.,8.,18.};
846 Float_t wAir[4]={0.000124,0.755267,0.231781,0.012827};
847 Float_t dAir = 1.20479E-3;
848 Float_t dAir1 = 1.20479E-10;
1b206195 849
fe4da5cc 850
851 Float_t epsil, stmin, deemax, tmaxfd, stemax;
852
853 // --- Define the various materials for GEANT ---
854 // Aluminum
c557d782 855 AliMaterial( 9, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2);
fe4da5cc 856 AliMaterial(29, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2);
857 AliMaterial(49, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2);
858
859 // Iron
860 AliMaterial(10, "IRON$ ", 55.85, 26., 7.87, 1.76, 17.1);
861 AliMaterial(30, "IRON$ ", 55.85, 26., 7.87, 1.76, 17.1);
862 AliMaterial(50, "IRON$ ", 55.85, 26., 7.87, 1.76, 17.1);
c557d782 863 // Copper
864 AliMaterial(17, "COPPER$ ", 63.55, 29., 8.96, 1.43, 15.1);
865 AliMaterial(37, "COPPER$ ", 63.55, 29., 8.96, 1.43, 15.1);
866 AliMaterial(57, "COPPER$ ", 63.55, 29., 8.96, 1.43, 15.1);
002b3738 867 // Air
868 AliMixture(15, "AIR$ ", aAir, zAir, dAir, 4, wAir);
869 AliMixture(35, "AIR$ ", aAir, zAir, dAir, 4, wAir);
870 AliMixture(55, "AIR$ ", aAir, zAir, dAir, 4, wAir);
fe4da5cc 871 // Vacuum
6a894888 872 AliMixture(16, "VACUUM$ ", aAir, zAir, dAir1, 4, wAir);
873 AliMixture(36, "VACUUM$ ", aAir, zAir, dAir1, 4, wAir);
874 AliMixture(56, "VACUUM$ ", aAir, zAir, dAir1, 4, wAir);
fe4da5cc 875
876 // stainless Steel
877 AliMixture(19, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel);
878 AliMixture(39, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel);
879 AliMixture(59, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel);
880
881 // Coil
882 AliMixture(14, "Al$", acoil, zcoil, 2.122, 3, wcoil);
883 AliMixture(34, "Al$", acoil, zcoil, 2.122, 3, wcoil);
884 AliMixture(54, "Al$", acoil, zcoil, 2.122, 3, wcoil);
1b206195 885
886 //RESIN
887 AliMixture(13, "RESIN$", aresi, zresi, 1.05, 3, wresi);
888 AliMixture(33, "RESIN$", aresi, zresi, 1.05, 3, wresi);
889 AliMixture(53, "RESIN$", aresi, zresi, 1.05, 3, wresi);
890
891 //G10
892 AliMixture(11, "G10$", aG10, zG10, 1.7, 5, wG10);
893 AliMixture(31, "G10$", aG10, zG10, 1.7, 5, wG10);
894 AliMixture(51, "G10$", aG10, zG10, 1.7, 5, wG10);
895
fe4da5cc 896 // ****************
897 // Defines tracking media parameters.
898 // Les valeurs sont commentees pour laisser le defaut
899 // a GEANT (version 3-21, page CONS200), f.m.
900 epsil = .001; // Tracking precision,
901 stemax = -1.; // Maximum displacement for multiple scat
902 tmaxfd = -20.; // Maximum angle due to field deflection
903 deemax = -.3; // Maximum fractional energy loss, DLS
904 stmin = -.8;
905 // ***************
906
907 // Aluminum
b43eb0dc 908 AliMedium(9, "ALU_C0 ", 9, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
909 AliMedium(29, "ALU_C1 ", 29, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
910 AliMedium(49, "ALU_C2 ", 49, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
fe4da5cc 911
912 // Iron
b43eb0dc 913 AliMedium(10, "FE_C0 ", 10, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
914 AliMedium(30, "FE_C1 ", 30, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
915 AliMedium(50, "FE_C2 ", 50, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
fe4da5cc 916
917 // Air
b43eb0dc 918 AliMedium(15, "AIR_C0 ", 15, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
919 AliMedium(35, "AIR_C1 ", 35, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
920 AliMedium(55, "AIR_C2 ", 55, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
fe4da5cc 921
922 // Vacuum
b43eb0dc 923 AliMedium(16, "VA_C0 ", 16, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
924 AliMedium(36, "VA_C1 ", 36, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
925 AliMedium(56, "VA_C2 ", 56, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
fe4da5cc 926
927 // Steel
b43eb0dc 928 AliMedium(19, "ST_C0 ", 19, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
929 AliMedium(39, "ST_C1 ", 39, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
930 AliMedium(59, "ST_C3 ", 59, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
fe4da5cc 931
932 // Coil
b43eb0dc 933 AliMedium(14, "Coil_C1 ", 14, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
934 AliMedium(34, "Coil_C2 ", 34, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
935 AliMedium(54, "Coil_C3 ", 54, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
1b206195 936
937 // Resin
b43eb0dc 938 AliMedium(13, "RESIN_C0 ", 13, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
939 AliMedium(33, "RESIN_C1 ", 33, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
940 AliMedium(53, "RESIN_C2 ", 53, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
1b206195 941
942 // G10
b43eb0dc 943 AliMedium(11, "G10_C0 ", 11, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
944 AliMedium(31, "G10_C1 ", 31, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
945 AliMedium(51, "G10_C2 ", 51, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
c557d782 946 //
947 // Copper
948 AliMedium(17, "Cu_C0 ", 17, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
949 AliMedium(37, "Cu_C1 ", 37, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
950 AliMedium(57, "Cu_C2 ", 57, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
951
fe4da5cc 952}
953
1b206195 954
955
956
957
958