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