]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STRUCT/AliPIPEv1.cxx
- Bug in volume YGO2 corrected: PCON started with twice the same z-value.
[u/mrichter/AliRoot.git] / STRUCT / AliPIPEv1.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
16/*
17$Log$
b43eb0dc 18Revision 1.6 1999/09/29 09:24:30 fca
19Introduction of the Copyright and cvs Log
20
4c039060 21*/
22
fe4da5cc 23///////////////////////////////////////////////////////////////////////////////
24// //
25// Beam pipe class //
26// //
27//Begin_Html
28/*
1439f98e 29<img src="picts/AliPIPEClass.gif">
fe4da5cc 30*/
31//End_Html
32// //
33///////////////////////////////////////////////////////////////////////////////
34
35#include "AliPIPEv1.h"
36#include "AliRun.h"
37#include "AliMC.h"
38
39ClassImp(AliPIPEv1)
40
41//_____________________________________________________________________________
b8032157 42AliPIPEv1::AliPIPEv1()
fe4da5cc 43{
44 //
45 // Default constructor for beam pipe
46 //
47}
48
49//_____________________________________________________________________________
50AliPIPEv1::AliPIPEv1(const char *name, const char *title)
51 : AliPIPE(name,title)
52{
53 //
54 // Standard constructor for beam pipe
55 //
56}
57
58//_____________________________________________________________________________
59void AliPIPEv1::CreateGeometry()
60{
61 //
62 // Create Beam Pipe geometry
63 //
64 //Begin_Html
65 /*
1439f98e 66 <img src="picts/AliPIPE.gif">
fe4da5cc 67 */
68 //End_Html
69 //Begin_Html
70 /*
1439f98e 71 <img src="picts/AliPIPETree.gif">
fe4da5cc 72 */
73 //End_Html
74
b43eb0dc 75 Float_t tpar[3], dzmo, zpos, absorberDistance, absorberEnd;
fe4da5cc 76 Float_t r2, dr;
77
b43eb0dc 78 const Double_t kZFlange = 150;
fe4da5cc 79
ad51aeb0 80 Int_t *idtmed = fIdtmed->GetArray()-1999;
fe4da5cc 81
82
b43eb0dc 83 absorberDistance = 90.; // DEFINES DRIFT LENGTH
fe4da5cc 84 //z_nose = 102.;
85 //z_cone = 285.;
86 //theta1 = 24.; // 1. angle defining the front absorber
87 //theta2 = 5.; // 2. angle defining the front absorbe
88 //acc_max = 9.; // ANGLE POLAIRE MAXIMUM
89 //acc_min = 2.; // ANGLE POLAIRE MINIMUM DE DETECTION
b43eb0dc 90 absorberEnd = 503.;
fe4da5cc 91 //d_steel = 1.; // THICKNESS OF STEEL SUPPORT
92 //d_poly = 7.5;
93 //d_pb = 2.5;
94 //abs_cc = 315.; // DEFINES LENGTH OF CARBON
95 //abs_c = 358.;
96 //abs_s = 150.; // DEFINES W-SHIELD LENGTH
97 //abs_n = 80.; // START OF NOSE
98 //r_abs = 4.;
99 //r_pb = .1;
100 //epsilon = .01;
101 //theta_r = 3.;
102 //d_rear = 35.;
103 //theta_open = .75;
104
105 //z_l3 = 700.;
106 //zmag_in = 725.;
107 //zmag_out = 1225.;
108 //zfil_in = 1471.;
109 //zfil_out = 1591.;
110 //zcon_in = 1900.;
111 //zcon_out = 2e3;
112 //zcone_e = 859.0875;
113 //spec_l = 1800.;
114 //zplug_in = 1780.;
115 //zplug_out = 1900.;
116
117 // Chamber position
118 // CZ1=515.5
119 //cz1 = 511.;
120 //cz2 = 686.;
121 //cz3 = 971.;
122 //cz4 = 1245.;
123 //cz5 = 1445.;
124 //cz6 = 1610.;
125 //cz7 = 1710.;
126
127
128 // the mother of all beam pipes
129
130 tpar[0] = 0.;
131 tpar[1] = 3.;
b43eb0dc 132 tpar[2] = (absorberDistance + 700.) / 2.;
133 dzmo = tpar[2] - absorberDistance;
cfce8870 134 gMC->Gsvolu("QQMO", "TUBE", idtmed[2015], tpar, 3);
135 gMC->Gspos("QQMO", 1, "ALIC", 0., 0., -dzmo, 0, "ONLY");
fe4da5cc 136
137 // BEAM PIPE IN DRIFT SPACE
138
b43eb0dc 139 // -30-kZFlange
fe4da5cc 140 tpar[0] = 0.;
141 tpar[1] = 3.;
142 tpar[2] = 30;
cfce8870 143 gMC->Gsvolu("QDT1", "TUBE", idtmed[2015], tpar, 3);
fe4da5cc 144
145 tpar[0] = 2.9;
cfce8870 146 gMC->Gsvolu("QTB1", "TUBE", idtmed[2004], tpar, 3);
147 gMC->Gspos("QTB1", 1, "QDT1", 0., 0., 0., 0, "ONLY");
148 gMC->Gspos("QDT1", 1, "QQMO", 0., 0., dzmo, 0, "ONLY");
fe4da5cc 149
150
151 // 30-90
152 tpar[0] = 0.;
153 tpar[1] = 3.;
154 tpar[2] = 30.;
cfce8870 155 gMC->Gsvolu("QDT2", "TUBE", idtmed[2015], tpar, 3);
fe4da5cc 156
157 tpar[0] = 2.9;
cfce8870 158 gMC->Gsvolu("QTB2", "TUBE", idtmed[2004], tpar, 3);
159 gMC->Gspos("QTB2", 1, "QDT2", 0., 0., 0., 0, "ONLY");
160 gMC->Gspos("QDT2", 1, "QQMO", 0., 0., dzmo, 0, "ONLY");
fe4da5cc 161
162 // beam pipe outside absorber on the left side
163
164
165
b43eb0dc 166 // -30 - kZFlange
fe4da5cc 167 tpar[0] = 0.;
168 tpar[1] = 3.;
b43eb0dc 169 tpar[2] = (kZFlange - 30)/2;
cfce8870 170 gMC->Gsvolu("QDT5", "TUBE", idtmed[2015], tpar, 3);
fe4da5cc 171
172 tpar[0] = 2.9;
173 zpos = -30. - tpar[2] + dzmo;
cfce8870 174 gMC->Gsvolu("QTB5", "TUBE", idtmed[2004], tpar, 3);
175 gMC->Gspos("QTB5", 1, "QDT5", 0., 0., 0., 0, "ONLY");
176 gMC->Gspos("QDT5", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
fe4da5cc 177
178 // STRAIGHT STEEL PIECE
179
b43eb0dc 180 zpos = -kZFlange;
fe4da5cc 181 r2 = 2.9;
182 dr = .015;
183 tpar[0] = 0.;
184 tpar[1] = r2 + dr;
185 tpar[2] = (zpos + 700.) / 2.;
cfce8870 186 gMC->Gsvolu("QDT7", "TUBE", idtmed[2015], tpar, 3);
fe4da5cc 187 tpar[0] = r2;
cfce8870 188 gMC->Gsvolu("QTB7", "TUBE", idtmed[2018], tpar, 3);
189 gMC->Gspos("QTB7", 1, "QDT7", 0., 0., 0., 0, "ONLY");
fe4da5cc 190 zpos = zpos - tpar[2] + dzmo;
cfce8870 191 gMC->Gspos("QDT7", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
fe4da5cc 192
193 // flange dn 63
194
195 tpar[0] = 3.;
196 tpar[1] = 5.7;
197 tpar[2] = 2.;
cfce8870 198 gMC->Gsvolu("QN63", "TUBE", idtmed[2018], tpar, 3);
b43eb0dc 199 zpos = tpar[2] - kZFlange;
cfce8870 200 gMC->Gspos("QN63", 1, "ALIC", 0., 0., zpos, 0, "ONLY");
fe4da5cc 201
202
203 // Replace Absorber or Shield by Beam-Pipe
204 // in case they are not selected
205
b8032157 206 if (gAlice->GetModule("ABSO") == 0) {
fe4da5cc 207
b43eb0dc 208 gMC->Gspos("QN63", 2, "ALIC", 0., 0., kZFlange, 0, "ONLY");
fe4da5cc 209 r2 = 2.9;
210 dr = .1;
211 tpar[0] = 0.;
212 tpar[1] = r2 + dr;
b43eb0dc 213 tpar[2] = (kZFlange - absorberDistance) / 2.;
cfce8870 214 gMC->Gsvolu("QDT8", "TUBE", idtmed[2015], tpar, 3);
fe4da5cc 215 tpar[0] = r2;
cfce8870 216 gMC->Gsvolu("QTB8", "TUBE", idtmed[2004], tpar, 3);
217 gMC->Gspos("QTB8", 1, "QDT8", 0., 0., 0., 0, "ONLY");
b43eb0dc 218 zpos = absorberDistance + tpar[2];
cfce8870 219 gMC->Gspos("QDT8", 1, "ALIC", 0., 0., zpos, 0, "ONLY");
fe4da5cc 220 dr = .015;
221 tpar[0] = 0.;
222 tpar[1] = r2 + dr;
b43eb0dc 223 tpar[2] = (absorberEnd - kZFlange) / 2.;
cfce8870 224 gMC->Gsvolu("QDTS", "TUBE", idtmed[2015], tpar, 3);
fe4da5cc 225 tpar[0] = r2;
cfce8870 226 gMC->Gsvolu("QTBS", "TUBE", idtmed[2018], tpar, 3);
227 gMC->Gspos("QTBS", 1, "QDTS", 0., 0., 0., 0, "ONLY");
b43eb0dc 228 zpos = tpar[2] + kZFlange;
cfce8870 229 gMC->Gspos("QDTS", 1, "ALIC", 0., 0., zpos, 0, "ONLY");
fe4da5cc 230 }
b8032157 231 if (gAlice->GetModule("SHIL") == 0) {
fe4da5cc 232 r2 = 2.9;
233 dr = .015;
234 tpar[0] = 0.;
235 tpar[1] = r2 + dr;
b43eb0dc 236 tpar[2] = (700. - absorberEnd) / 2.;
cfce8870 237 gMC->Gsvolu("QDT9", "TUBE", idtmed[2015], tpar, 3);
fe4da5cc 238 tpar[0] = r2;
cfce8870 239 gMC->Gsvolu("QTB9", "TUBE", idtmed[2018], tpar, 3);
240 gMC->Gspos("QTB9", 1, "QDT9", 0., 0., 0., 0, "ONLY");
b43eb0dc 241 zpos = absorberEnd + tpar[2];
cfce8870 242 gMC->Gspos("QDT9", 1, "ALIC", 0., 0., zpos, 0, "ONLY");
fe4da5cc 243 }
244}
245
246//_____________________________________________________________________________
b8032157 247void AliPIPEv1::DrawModule()
fe4da5cc 248{
249 //
250 // Draw a shaded view of the Beam Pipe
251 //
252
fe4da5cc 253 // Set everything unseen
cfce8870 254 gMC->Gsatt("*", "seen", -1);
fe4da5cc 255 //
256 // Set ALIC mother transparent
cfce8870 257 gMC->Gsatt("ALIC","SEEN",0);
fe4da5cc 258 //
259 // Set the volumes visible
cfce8870 260 gMC->Gsatt("QQMO","seen",1);
261 gMC->Gsatt("QDT1","seen",1);
262 gMC->Gsatt("QTB1","seen",1);
263 gMC->Gsatt("QDT2","seen",1);
264 gMC->Gsatt("QTB2","seen",1);
265 gMC->Gsatt("QDT5","seen",1);
266 gMC->Gsatt("QTB5","seen",1);
267 gMC->Gsatt("QDT7","seen",1);
268 gMC->Gsatt("QTB7","seen",1);
269 gMC->Gsatt("QN63","seen",1);
fe4da5cc 270 //
cfce8870 271 gMC->Gdopt("hide", "on");
272 gMC->Gdopt("shad", "on");
273 gMC->Gsatt("*", "fill", 7);
274 gMC->SetClipBox(".");
275 gMC->SetClipBox("*", 0, 3000, -3000, 3000, -6000, 6000);
276 gMC->DefaultRange();
277 gMC->Gdraw("alic", 40, 30, 0, 3, 5, .04, .04);
278 gMC->Gdhead(1111, "Beam Pipe");
279 gMC->Gdman(16, 6, "MAN");
280 gMC->Gdopt("hide","off");
fe4da5cc 281}
282
283//_____________________________________________________________________________
284void AliPIPEv1::CreateMaterials()
285{
286 //
287 // Create materials for beam pipe
288 //
289
b43eb0dc 290 Int_t isxfld = gAlice->Field()->Integ();
291 Float_t sxmgmx = gAlice->Field()->Max();
fe4da5cc 292
293 Float_t asteel[4] = { 55.847,51.9961,58.6934,28.0855 };
294 Float_t zsteel[4] = { 26.,24.,28.,14. };
295 Float_t wsteel[4] = { .715,.18,.1,.005 };
296
297 Float_t epsil, stmin, tmaxfd, deemax, stemax;
298
299 // STEEL
300
301
302 // --- Define the various materials for GEANT ---
303 AliMaterial(5, "BERILLIUM$", 9.01, 4., 1.848, 35.3, 36.7);
304 AliMaterial(16, "VACUUM$ ", 1e-16, 1e-16, 1e-16, 1e16, 1e16);
305 AliMaterial(15, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500);
306 AliMixture(19, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel);
307
308 // ****************
309 // Defines tracking media parameters.
310 // Les valeurs sont commentees pour laisser le defaut
311 // a GEANT (version 3-21, page CONS200), f.m.
312 epsil = .001; // Tracking precision,
313 stemax = -1.; // Maximum displacement for multiple scat
314 tmaxfd = -20.; // Maximum angle due to field deflection
315 deemax = -.3; // Maximum fractional energy loss, DLS
316 stmin = -.8;
317
318 // Air
319
b43eb0dc 320 AliMedium(15, "AIR_L3_US", 15, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
fe4da5cc 321
322 // Beryllium
323
b43eb0dc 324 AliMedium(5, "BE_L3_US", 5, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
fe4da5cc 325
326 // Vacuum
327
b43eb0dc 328 AliMedium(16, "VA_L3_US", 16, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
fe4da5cc 329
330 // Steel
331
b43eb0dc 332 AliMedium(19, "ST_L3_US", 19, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
fe4da5cc 333}
334