Small angle absorber in offficial coordinate system for physics.
[u/mrichter/AliRoot.git] / STRUCT / AliDIPOv1.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/*
1439f98e 24<img src="picts/AliDIPOv1Class.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// //
36///////////////////////////////////////////////////////////////////////////////
37
88cb7938 38#include <TVirtualMC.h>
39
fe4da5cc 40#include "AliDIPOv1.h"
94de3818 41#include "AliMagF.h"
88cb7938 42#include "AliRun.h"
fe4da5cc 43
44ClassImp(AliDIPOv1)
45
46//_____________________________________________________________________________
b8032157 47AliDIPOv1::AliDIPOv1()
fe4da5cc 48{
49 //
50 // Default constructor for the magnetic dipole version 1
51 //
52}
53
54//_____________________________________________________________________________
55AliDIPOv1::AliDIPOv1(const char *name, const char *title)
56 : AliDIPO(name,title)
57{
58 //
59 // Standard constructor for magnetic dipole version 1
60 //
61 SetMarkerColor(7);
62 SetMarkerStyle(2);
63 SetMarkerSize(0.4);
64}
65
66//_____________________________________________________________________________
67void AliDIPOv1::CreateGeometry()
68{
69 //
70 // Creation of the geometry of the magnetic DIPOLE version 1
71 //
72 //Begin_Html
73 /*
1439f98e 74 <img src="picts/AliDIPOv1Tree.gif">
fe4da5cc 75 */
76 //End_Html
77 //Begin_Html
78 /*
1439f98e 79 <img src="picts/AliDIPOv1.gif">
fe4da5cc 80 */
81 //End_Html
82
fe4da5cc 83 Float_t par[5];
84
ad51aeb0 85 Int_t *idtmed = fIdtmed->GetArray()-1799;
fe4da5cc 86
87 //abs_d = 90.; // DEFINES DRIFT LENGTH
88 //z_nose = 102.;
89 //z_cone = 285.;
90 //theta1 = 24.; // 1. angle defining the front absorber
91 //theta2 = 5.; // 2. angle defining the front absorbe
92 //acc_max = 9.; // ANGLE POLAIRE MAXIMUM
93 //acc_min = 2.; // ANGLE POLAIRE MINIMUM DE DETECTION
94 //abs_l = 503.;
95 //d_steel = 1.; // THICKNESS OF STEEL SUPPORT
96 //d_poly = 7.5;
97 //d_pb = 2.5;
98 //abs_cc = 315.; // DEFINES LENGTH OF CARBON
99 //abs_c = 358.;
100 //abs_s = 150.; // DEFINES W-SHIELD LENGTH
101 //abs_n = 80.; // START OF NOSE
102 //r_abs = 4.;
103 //r_pb = .1;
104 //epsilon = .01;
105 //theta_r = 3.;
106 //d_rear = 35.;
107 //theta_open = .75;
108
109 //z_l3 = 700.;
110 //zmag_in = 725.;
111 //zmag_out = 1225.;
112 //zfil_in = 1471.;
113 //zfil_out = 1591.;
114 //zcon_in = 1900.;
115 //zcon_out = 2e3;
116 //zcone_e = 859.0875;
117 //spec_l = 1800.;
118 //zplug_in = 1780.;
119 //zplug_out = 1900.;
120
121 // Chamber position
122 // CZ1=515.5
123 //cz1 = 511.;
124 //cz2 = 686.;
125 //cz3 = 971.;
126 //cz4 = 1245.;
127 //cz5 = 1445.;
128 //cz6 = 1610.;
129 //cz7 = 1710.;
130
131
132 // DIPOLE MAGNET
133 par[0] = 0.;
134 par[1] = 280.;
135 par[2] = 250.;
cfce8870 136 gMC->Gsvolu("DDIP", "TUBE", idtmed[1801], par, 3);
fe4da5cc 137
138 // COIL
139 par[0] = 250.;
140 par[1] = 125.;
141 par[2] = 165.;
142 par[3] = 204.;
143 par[4] = 244.;
144
cfce8870 145 gMC->Gsvolu("DIPC", "CONE", idtmed[1810], par, 5);
146 gMC->Gspos("DIPC", 1, "DDIP", 0., 0., 0., 0, "ONLY");
fe4da5cc 147 par[0] = 250.;
148 par[1] = 115.;
149 par[2] = 125.;
150 par[3] = 194.;
151 par[4] = 204.;
cfce8870 152 gMC->Gsvolu("DIIC", "CONE", idtmed[1807], par, 5);
153 gMC->Gspos("DIIC", 1, "DDIP", 0., 0., 0., 0, "ONLY");
fe4da5cc 154
155 // YOKE
156 par[0] = 250.;
157 par[1] = 165.;
158 par[2] = 195.;
159 par[3] = 244.;
160 par[4] = 274.;
161
cfce8870 162 gMC->Gsvolu("DIPY", "CONE", idtmed[1834], par, 5);
163 gMC->Gspos("DIPY", 1, "DDIP", 0., 0., 0., 0, "ONLY");
164 gMC->Gspos("DDIP", 1, "ALIC", 0., 0., 725.+250, 0, "ONLY");
fe4da5cc 165}
166
167//_____________________________________________________________________________
eeacf08b 168void AliDIPOv1::DrawModule() const
fe4da5cc 169{
170 //
171 // Draw a shaded view of the muon absorber
172 //
173
fe4da5cc 174 // Set everything unseen
cfce8870 175 gMC->Gsatt("*", "seen", -1);
fe4da5cc 176 //
177 // Set ALIC mother transparent
cfce8870 178 gMC->Gsatt("ALIC","SEEN",0);
fe4da5cc 179 //
180 // Set the volumes visible
cfce8870 181 gMC->Gsatt("DDIP","seen",1);
182 gMC->Gsatt("DIPC","seen",1);
183 gMC->Gsatt("DIIC","seen",1);
184 gMC->Gsatt("DIPY","seen",1);
fe4da5cc 185 //
cfce8870 186 gMC->Gdopt("hide", "on");
187 gMC->Gdopt("shad", "on");
188 gMC->Gsatt("*", "fill", 7);
189 gMC->SetClipBox(".");
190 gMC->SetClipBox(".");
191 gMC->DefaultRange();
192 gMC->Gdraw("alic", 30, 30, 0, 17, 13.5, .019, .019);
193 gMC->Gdhead(1111, "Magnetic Dipole Version 1");
194 gMC->Gdman(16, 4, "MAN");
fe4da5cc 195}
196
197//_____________________________________________________________________________
198void AliDIPOv1::CreateMaterials()
199{
200 //
201 // Create Materials for Dipole Magnet version 1
202 //
203
b43eb0dc 204 Int_t isxfld = gAlice->Field()->Integ();
205 Float_t sxmgmx = gAlice->Field()->Max();
fe4da5cc 206
207 Float_t asteel[4] = { 55.847,51.9961,58.6934,28.0855 };
208 Float_t zsteel[4] = { 26.,24.,28.,14. };
209 Float_t wsteel[4] = { .715,.18,.1,.005 };
210 Float_t epsil, stmin, deemax, tmaxfd, stemax;
211
212 // STEEL
213
214
215 // --- Define the various materials for GEANT ---
ad51aeb0 216 AliMaterial(9, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2);
217 AliMaterial(15, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500);
218 AliMaterial(10, "IRON$ ", 55.85, 26., 7.87, 0, 17.1);
219 AliMaterial(16, "VACUUM$ ", 1e-16, 1e-16, 1e-16, 1e16, 1e16);
220 AliMixture(24, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel);
fe4da5cc 221
222 // ****************
223 // Defines tracking media parameters.
224 // Les valeurs sont commentees pour laisser le defaut
225 // a GEANT (version 3-21, page CONS200), f.m.
226 epsil = .001; // Tracking precision,
227 stemax = -1.; // Maximum displacement for multiple scat
228 tmaxfd = -20.; // Maximum angle due to field deflection
229 deemax = -.3; // Maximum fractional energy loss, DLS
230 stmin = -.8;
231 // ***************
232
233 // Air
234
b43eb0dc 235 AliMedium(1, "AIR_DI_US ", 15, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
236 AliMedium(2, "AIR_DI_US ", 15, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
237 AliMedium(3, "AIR_L3_US ", 15, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
fe4da5cc 238
239 // Aluminum
240
b43eb0dc 241 AliMedium(8, "ALU_DI_US ", 9, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
242 AliMedium(11, "ALU_DI_SH ", 9, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
fe4da5cc 243
244 // Iron
245
b43eb0dc 246 AliMedium(31, "FE_NF_US ", 10, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
247 AliMedium(32, "FE_DI_US ", 10, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
248 AliMedium(33, "FE_L3_US ", 10, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
249 AliMedium(34, "FE_NF_SH ", 10, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
250 AliMedium(35, "FE_DI_SH ", 10, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
251 AliMedium(36, "FE_L3_SH ", 10, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
fe4da5cc 252
253 // Vacuum
254
b43eb0dc 255 AliMedium(37, "VA_NF_US ", 16, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
256 AliMedium(38, "VA_DI_US ", 16, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
257 AliMedium(39, "VA_L3_US ", 16, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
fe4da5cc 258
259 // Steel
260
b43eb0dc 261 AliMedium(75, "ST_L3_US ", 24, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
fe4da5cc 262}
263