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