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