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