Store absorber composition information in fMLayers and fZLayers
[u/mrichter/AliRoot.git] / STRUCT / AliABSOvF.cxx
CommitLineData
5aba2f60 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$
18*/
19
20// //
21// //
22///////////////////////////////////////////////////////////////////////////////
23
24#include "AliABSOvF.h"
25#include "AliRun.h"
fb25e598 26#include "AliMC.h"
5aba2f60 27#include "AliConst.h"
28#include "AliALIFE.h"
29
30ClassImp(AliABSOvF)
31
32//_____________________________________________________________________________
33AliABSOvF::AliABSOvF()
34{
35 //
36 // Default constructor
37 //
38}
39
40//_____________________________________________________________________________
41AliABSOvF::AliABSOvF(const char *name, const char *title)
42 : AliABSO(name,title)
43{
44 //
45 // Standard constructor
46 //
47 SetMarkerColor(7);
48 SetMarkerStyle(2);
49 SetMarkerSize(0.4);
50}
51
52//_____________________________________________________________________________
53void AliABSOvF::CreateGeometry()
54{
55// Create the absorber geometry
56// The inner part of the absorber (shield) is written also in ALIFE format
57//
58 enum {kC=1605, kAl=1608, kFe=1609, kCu=1610, kW=1611, kPb=1612,
59 kNiCuW=1620, kVacuum=1615, kAir=1614, kConcrete=1616,
60 kPolyCH2=1617, kSteel=1609, kInsulation=1613, kPolyCc=1619};
61
62 Int_t *idtmed = fIdtmed->GetArray()-1599;
63
64 Float_t par[24], cpar[5], cpar0[5], pcpar[12], tpar[3], tpar0[3];
65 Float_t dz;
66
67 AliALIFE* flukaGeom = new AliALIFE("frontshield.alife", "abso_vol.inp");
68
69#include "ABSOSHILConst.h"
70#include "ABSOConst.h"
fb25e598 71 Float_t dzFe = 11.;
72//
73// 3 < theta < 9
74 fNLayers[0] = 11;
75 fMLayers[0][ 0] = kAir; fZLayers[0][ 0] = zAbsStart;
76 fMLayers[0][ 1] = kC; fZLayers[0][ 1] = zAbsCc;
77 fMLayers[0][ 2] = kConcrete; fZLayers[0][ 2] = zRear-dRear-dzFe;
78 fMLayers[0][ 3] = kFe; fZLayers[0][ 3] = zRear-dRear;
79 fMLayers[0][ 4] = kPb; fZLayers[0][ 4] = fZLayers[0][3] + 5.;
80 fMLayers[0][ 5] = kPolyCH2; fZLayers[0][ 5] = fZLayers[0][4] + 5.;
81 fMLayers[0][ 6] = kPb; fZLayers[0][ 6] = fZLayers[0][5] + 5.;
82 fMLayers[0][ 7] = kPolyCH2; fZLayers[0][ 7] = fZLayers[0][6] + 5.;
83 fMLayers[0][ 8] = kPb; fZLayers[0][ 8] = fZLayers[0][7] + 5.;
84 fMLayers[0][ 9] = kPolyCH2; fZLayers[0][ 9] = fZLayers[0][8] + 5.;
85 fMLayers[0][10] = kPb; fZLayers[0][10] = zRear;
86// 2 < theta < 3
87 fNLayers[1] = 5;
88 fMLayers[1][0] = fMLayers[0][0]; fZLayers[1][0] = fZLayers[0][0];
89 fMLayers[1][1] = fMLayers[0][1]; fZLayers[1][1] = fZLayers[0][1];
90 fMLayers[1][2] = fMLayers[0][2]; fZLayers[1][2] = fZLayers[0][2];
91 fMLayers[1][3] = fMLayers[0][3]; fZLayers[1][3] = fZLayers[0][3];
92 fMLayers[1][4] = kNiCuW; fZLayers[1][4] = zRear;
93//
5aba2f60 94 Float_t dTube=0.1; // tube thickness
95 Float_t dInsu=0.5; // insulation thickness
96 Float_t dEnve=0.1; // protective envelope thickness
97 Float_t dFree=0.5; // clearance thickness
98
99
100// Mother volume and outer shielding: Pb
101 par[0] = 0.;
102 par[1] = 360.;
103 par[2] = 7.;
104
105 par[3] = -(zRear-zAbsStart)/2.;
106 par[4] = rAbs;
107 par[5] = zAbsStart * TMath::Tan(theta1);
108
109 par[6] = par[3]+(zNose-zAbsStart);
110 par[7] = rAbs;
111 par[8] = zNose * TMath::Tan(theta1);
112
113 par[9] = par[3]+(zConeTPC-zAbsStart);
114 par[10] = rAbs;
115 par[11] = par[8] + (par[9] - par[6]) * TMath::Tan(theta2);
116
117 par[12] = par[3]+(zOpen-zAbsStart);
118 par[13] = rAbs;
119 par[14] = par[11] + (par[12] - par[9]) * TMath::Tan(accMax);
120
121 par[15] = par[3]+(zRear-dRear-zAbsStart);
122 par[16] = rAbs + (par[15] - par[12]) * TMath::Tan(thetaOpen1) ;
123 par[17] = par[14] + (par[15] - par[12]) * TMath::Tan(accMax);
124
125 par[18] = par[3]+(zRear-dRear-zAbsStart);
126 par[19] = (zRear-dRear) * TMath::Tan(accMin);
127 par[20] = par[14] + (par[18] - par[12]) * TMath::Tan(accMax);
128
129 par[21] = -par[3];
130 par[22] = zRear* TMath::Tan(accMin);
131 par[23] = par[20] + (par[21] - par[18]) * TMath::Tan(accMax);
132 gMC->Gsvolu("ABSS", "PCON", idtmed[kPb], par, 24);
133 { // Begin local scope for i
134 for (Int_t i=4; i<18; i+=3) par[i] = 0;
135 } // End local scope for i
136 gMC->Gsvolu("ABSM", "PCON", idtmed[kVacuum+40], par, 24);
137 gMC->Gspos("ABSS", 1, "ABSM", 0., 0., 0., 0, "ONLY");
138
139//
140// Steel envelope
141//
142 par[4] = par[5] -dSteel;
143 par[7] = par[8] -dSteel;
144 par[10]= par[11]-dSteel;
145 par[13]= par[14]-dSteel;
146 par[16]= par[17]-dSteel;
147 par[19]= par[20]-dSteel;
148 par[22]= par[23]-dSteel;
149 gMC->Gsvolu("ABST", "PCON", idtmed[kSteel], par, 24);
150 gMC->Gspos("ABST", 1, "ABSS", 0., 0., 0., 0, "ONLY");
151//
152// Polyethylene shield
153//
154 cpar[0] = (zRear - zConeTPC) / 2.;
155 cpar[1] = zConeTPC * TMath::Tan(accMax);
156 cpar[2] = cpar[1] + dPoly;
157 cpar[3] = zRear * TMath::Tan(accMax);
158 cpar[4] = cpar[3] + dPoly;
159 gMC->Gsvolu("APOL", "CONE", idtmed[kPolyCH2+40], cpar, 5);
160 dz = (zRear-zAbsStart)/2.-cpar[0];
161 gMC->Gspos("APOL", 1, "ABSS", 0., 0., dz, 0, "ONLY");
162
163//
164// Tungsten nose to protect TPC
165//
166 cpar[0] = (zNose - zAbsStart) / 2.;
167 cpar[1] = zAbsStart * TMath::Tan(accMax);
168 cpar[2] = zAbsStart * TMath::Tan(theta1)-dSteel;
169 cpar[3] = zNose * TMath::Tan(accMax);
170 cpar[4] = zNose * TMath::Tan(theta1)-dSteel;
171 gMC->Gsvolu("ANOS", "CONE", idtmed[kW], cpar, 5);
172//
173 dz = -(zRear-zAbsStart)/2.+cpar[0];
174 gMC->Gspos("ANOS", 1, "ABSS", 0., 0., dz, 0, "ONLY");
175//
176// Tungsten inner shield
177//
178 Float_t zW=zTwoDeg+.1;
179 Float_t dZ = zW+(zRear-dRear-zW)/2.;
180 //
181 pcpar[0] = 0.;
182 pcpar[1] = 360.;
183 pcpar[2] = 3.;
184 pcpar[3] = zW-dZ;
185 pcpar[4] = rAbs;
186 pcpar[5] = zW * TMath::Tan(accMin);
187 pcpar[6] = zOpen-dZ;
188 pcpar[7] = rAbs;
189 pcpar[8] = zOpen * TMath::Tan(accMin);
190 pcpar[9] = zRear-dRear-dZ;
191 pcpar[10] = rAbs+(zRear-dRear-zOpen) * TMath::Tan(thetaOpen1);
192 pcpar[11] = (zRear-dRear) * TMath::Tan(accMin);
193
194 gMC->Gsvolu("AWIN", "PCON", idtmed[kNiCuW+40], pcpar, 12);
195 //
196 dz=(zW+zRear-dRear)/2-(zAbsStart+zRear)/2.;
197 gMC->Gspos("AWIN", 1, "ABSS", 0., 0., dz, 0, "ONLY");
198
199 // Inner tracking region
200 //
201 // mother volume: Pb
202 //
203 pcpar[0] = 0.;
204 pcpar[1] = 360.;
205 pcpar[2] = 3.;
206 pcpar[3] = -(zRear-zAbsStart)/2.;
207 pcpar[4] = rAbs;
208 pcpar[5] = zAbsStart * TMath::Tan(accMax);
209 pcpar[6] = pcpar[3]+(zTwoDeg-zAbsStart);
210 pcpar[7] = rAbs;
211 pcpar[8] = zTwoDeg * TMath::Tan(accMax);
212 pcpar[9] = -pcpar[3];
213 pcpar[10] = zRear * TMath::Tan(accMin);
214 pcpar[11] = zRear * TMath::Tan(accMax);
fb25e598 215 gMC->Gsvolu("AITR", "PCON", idtmed[fMLayers[0][4]], pcpar, 12);
5aba2f60 216 //
217 // special Pb medium for last 5 cm of Pb
218 Float_t zr=zRear-2.-0.001;
219 cpar[0] = 1.0;
220 cpar[1] = zr * TMath::Tan(thetaR);
221 cpar[2] = zr * TMath::Tan(accMax);
222 cpar[3] = cpar[1] + TMath::Tan(thetaR) * 2;
223 cpar[4] = cpar[2] + TMath::Tan(accMax) * 2;
fb25e598 224 gMC->Gsvolu("ARPB", "CONE", idtmed[fMLayers[0][4]], cpar, 5);
5aba2f60 225 dz=(zRear-zAbsStart)/2.-cpar[0]-0.001;
226 gMC->Gspos("ARPB", 1, "AITR", 0., 0., dz, 0, "ONLY");
227 //
228 // concrete cone: concrete
229 //
230 pcpar[9] = pcpar[3]+(zRear-dRear-zAbsStart);
231 pcpar[10] = (zRear-dRear) * TMath::Tan(accMin);
232 pcpar[11] = (zRear-dRear) * TMath::Tan(accMax);
fb25e598 233 gMC->Gsvolu("ACON", "PCON", idtmed[fMLayers[0][2]+40], pcpar, 12);
5aba2f60 234 gMC->Gspos("ACON", 1, "AITR", 0., 0., 0., 0, "ONLY");
fb25e598 235//
236// Fe Cone
237//
238 zr = zRear-dRear-dzFe-1.;
239 cpar[0] = dzFe/2.;
240 cpar[1] = zr * TMath::Tan(accMin);
241 cpar[2] = zr * TMath::Tan(accMax);
242 cpar[3] = cpar[1] + TMath::Tan(thetaR) * dzFe;
243 cpar[4] = cpar[2] + TMath::Tan(accMax) * dzFe;
244 gMC->Gsvolu("ACFE", "CONE",idtmed[fMLayers[0][3]], cpar, 5);
245
246 dz = (zRear-zAbsStart)/2.-dRear-dzFe/2.-1.;
247
248 gMC->Gspos("ACFE", 1, "ACON", 0., 0., dz, 0, "ONLY");
249
250
5aba2f60 251 //
252 // carbon cone: carbon
253 //
254 pcpar[9] = pcpar[3]+(zAbsCc-zAbsStart);
255 pcpar[10] = zAbsCc * TMath::Tan(accMin);
256 pcpar[11] = zAbsCc * TMath::Tan(accMax);
fb25e598 257 gMC->Gsvolu("ACAR", "PCON", idtmed[fMLayers[0][1]+40], pcpar, 12);
5aba2f60 258 gMC->Gspos("ACAR", 1, "ACON", 0., 0., 0., 0, "ONLY");
259 //
260 // carbon cone outer region
261 //
262 cpar[0] = 10.;
263 cpar[1] = rAbs;
264 cpar[2] = zAbsStart* TMath::Tan(accMax);
265 cpar[3] = rAbs;
266 cpar[4] = cpar[2]+2. * cpar[0] * TMath::Tan(accMax);
267
fb25e598 268 gMC->Gsvolu("ACAO", "CONE", idtmed[fMLayers[0][1]], cpar, 5);
5aba2f60 269 dz=-(zRear-zAbsStart)/2.+cpar[0];
270 gMC->Gspos("ACAO", 1, "ACAR", 0., 0., dz, 0, "ONLY");
271 //
272 // inner W shield
273 Float_t epsi=0.;
274 Float_t repsi=1.;
275
276 zr=zRear-(dRear-epsi);
277 cpar[0] = (dRear-epsi)/2.;
278 cpar[1] = zr * TMath::Tan(accMin);
279 cpar[2] = zr * TMath::Tan(thetaR*repsi);
280 cpar[3] = cpar[1] + TMath::Tan(accMin) * (dRear-epsi);
281 cpar[4] = cpar[2] + TMath::Tan(thetaR*repsi) * (dRear-epsi);
fb25e598 282 gMC->Gsvolu("ARW0", "CONE", idtmed[fMLayers[1][4]+40], cpar, 5);
5aba2f60 283 dz=(zRear-zAbsStart)/2.-cpar[0];
284 gMC->Gspos("ARW0", 1, "AITR", 0., 0., dz, 0, "ONLY");
285 //
286 // special W medium for last 5 cm of W
287 zr=zRear-5;
288 cpar[0] = 2.5;
289 cpar[1] = zr * TMath::Tan(accMin);
290 cpar[2] = zr * TMath::Tan(thetaR*repsi);
291 cpar[3] = cpar[1] + TMath::Tan(accMin) * 5.;
292 cpar[4] = cpar[2] + TMath::Tan(thetaR*repsi) * 5.;
fb25e598 293 gMC->Gsvolu("ARW1", "CONE", idtmed[fMLayers[1][4]+20], cpar, 5);
5aba2f60 294 dz=(dRear-epsi)/2.-cpar[0];
295 gMC->Gspos("ARW1", 1, "ARW0", 0., 0., dz, 0, "ONLY");
296 //
297 // PolyEthylene Layers
298 Float_t drMin=TMath::Tan(thetaR) * 5;
299 Float_t drMax=TMath::Tan(accMax) * 5;
fb25e598 300 gMC->Gsvolu("ARPE", "CONE", idtmed[fMLayers[0][5]], cpar, 0);
5aba2f60 301 cpar[0]=2.5;
302 { // Begin local scope for i
303 for (Int_t i=0; i<3; i++) {
304 zr=zRear-dRear+5+i*10.;
305 cpar[1] = zr * TMath::Tan(thetaR);
306 cpar[2] = zr * TMath::Tan(accMax);
307 cpar[3] = cpar[1] + drMin;
308 cpar[4] = cpar[2] + drMax;
309 dz=(zRear-zAbsStart)/2.-cpar[0]-5.-(2-i)*10;
310 gMC->Gsposp("ARPE", i+1, "AITR", 0., 0., dz, 0, "ONLY",cpar,5);
311 }
312 } // End local scope for i
313 gMC->Gspos("AITR", 1, "ABSS", 0., 0., 0., 0, "ONLY");
314 dz = (zRear-zAbsStart)/2.+zAbsStart;
315 gMC->Gspos("ABSM", 1, "ALIC", 0., 0., dz, 0, "ONLY");
316//
317//
318// vacuum system
319//
320// pipe and heating jackets
321//
322//
323// cylindrical piece
324 tpar0[2]=(zOpen-zAbsStart)/2;
325 tpar0[0]=rVacu;
326 tpar0[1]=rAbs;
327 gMC->Gsvolu("AV11", "TUBE", idtmed[kSteel+40], tpar0, 3);
328//
329// insulation
330
331 tpar[2]=tpar0[2];
332 tpar[0]=rVacu+dTube;
333 tpar[1]=tpar[0]+dInsu;
334 gMC->Gsvolu("AI11", "TUBE", idtmed[kInsulation+40], tpar, 3);
335 gMC->Gspos("AI11", 1, "AV11", 0., 0., 0., 0, "ONLY");
336//
337// clearance
338 tpar[0]=tpar[1]+dEnve;
339 tpar[1]=tpar[0]+dFree;
340 gMC->Gsvolu("AP11", "TUBE", idtmed[kAir+40], tpar, 3);
341 gMC->Gspos("AP11", 1, "AV11", 0., 0., 0., 0, "ONLY");
342//
343 dz=-(zRear-zAbsStart)/2.+tpar0[2];
344 gMC->Gspos("AV11", 1, "ABSM", 0., 0., dz, 0, "ONLY");
345
346//
347// begin Fluka
348// Float_t zTwoDeg1=zTwoDeg-0.9/TMath::Tan(accMin);
349 Float_t pos[3]={0.,0.,0.};
350 Float_t r[8];
351 r[0]=0.;
352 r[1]=rVacu;
353 r[2]=r[1]+0.1;
354 r[3]=r[2]+0.5;
355 r[4]=r[3]+0.1;
356 r[5]=r[4]+0.5;
357
358 char* materialsA[7]
359 = {"VACUUM", "STEEL", "PIPEINSU", "STEEL", "AIR", "AIR"};
360 char* fieldsA[7]
361 = {"MF", "MF", "MF", "MF", "MF", "MF"};
362 char* cutsA[7]
363 = {"$SHH", "$SHH", "$SHH", "$SHH", "$SHH", "$SHH"};
364 char* materialsB[7]
365 = {"VACUUM", "STEEL", "PIPEINSU", "STEEL", "AIR", "CARBON"};
366 char* fieldsB[7]
367 = {"MF", "MF", "MF", "MF", "MF", "MF"};
368 char* cutsB[7]
369 = {"$SHH", "$SHH", "$SHH", "$SHH", "$SHH", "$SHS"};
370
371 flukaGeom->Comment("Front Absorber Cylyndrical Section");
372 flukaGeom->SetDefaultVolume("*ACR02","*ACR02" );
373 flukaGeom->OnionCylinder(r, 6 , zAbsStart, zOpen, pos, materialsB, fieldsB, cutsB);
374 flukaGeom->Cone(rAbs, rAbs, -rAbs, -rAbs, zTwoDeg, zOpen, pos,
0cc503f6 375 "NIW", "MF", "$SHH");
5aba2f60 376//
377// end Fluka
378
379//
380// conical piece
381
382 cpar0[0]=(zRear-dRear-zOpen)/2;
383 cpar0[1]=rVacu-0.05;
384 cpar0[2]=rAbs;
385 Float_t dR=2.*cpar0[0]*TMath::Tan(thetaOpen1);
386 cpar0[3]=cpar0[1]+dR;
387 cpar0[4]=cpar0[2]+dR;
388 gMC->Gsvolu("AV21", "CONE", idtmed[kSteel+40], cpar0, 5);
389 dTube+=0.05;
390
391//
392// insulation
393 cpar[0]=cpar0[0];
394 cpar[1]=cpar0[1]+dTube;
395 cpar[2]=cpar0[1]+dTube+dInsu;
396 cpar[3]=cpar0[3]+dTube;
397 cpar[4]=cpar0[3]+dTube+dInsu;
398 gMC->Gsvolu("AI21", "CONE", idtmed[kInsulation+40], cpar, 5);
399 gMC->Gspos("AI21", 1, "AV21", 0., 0., 0., 0, "ONLY");
400//
401// clearance
402 cpar[1]=cpar0[1]+dTube+dInsu+dEnve;
403 cpar[2]=rAbs;
404 cpar[3]=cpar0[1]+dTube+dInsu+dEnve+dR;
405 cpar[4]=rAbs+dR;
406
407 gMC->Gsvolu("AP21", "CONE", idtmed[kAir+40], cpar, 5);
408 gMC->Gspos("AP21", 1, "AV21", 0., 0., 0., 0, "ONLY");
409
410 dz=(zRear-zAbsStart)/2.-cpar0[0]-dRear;
411 gMC->Gspos("AV21", 1, "ABSM", 0., 0., dz, 0, "ONLY");
412//
413// begin Fluka
414//
415 Float_t r1[7], r2[7];
416 r1[0]=0.;
417 r2[0]=0.;
418 r1[1]=rVacu-0.05;
419 r2[1]=cpar0[3];
420
421 r1[2]=r1[1]+0.15;
422 r1[3]=r1[2]+0.5;
423 r1[4]=r1[3]+0.1;
424 r1[5]=r1[4]+0.5;
425 r1[6]=cpar0[2];
426
427 r2[2]=r2[1]+0.15;
428 r2[3]=r2[2]+0.5;
429 r2[4]=r2[3]+0.1;
430 r2[5]=r2[4]+0.5;
431 r2[6]=cpar0[4];
432
433 flukaGeom->Comment("Front Absorber Conical Section");
434 flukaGeom->OnionCone(r1, r2, 7 , zOpen, zRear-dRear, pos, materialsA, fieldsA, cutsA);
435 flukaGeom->Cone(r1[6], r2[6], -1., -1.,
0cc503f6 436 zOpen, zRear-dRear, pos, "NIW", "MF", "$SHH");
5aba2f60 437
438 flukaGeom->Finish();
439 delete flukaGeom;
440
441//
442// end Fluka
443}
444
445//_____________________________________________________________________________
446
447void AliABSOvF::Init()
448{
449 //
450 // Initialisation of the muon absorber after it has been built
451 Int_t i;
452 //
453 printf("\n");
454 for(i=0;i<35;i++) printf("*");
455 printf(" ABSOvF_INIT ");
456 for(i=0;i<35;i++) printf("*");
457 printf("\n");
458 //
459 for(i=0;i<80;i++) printf("*");
460 printf("\n");
461}
462
463
464
465
466
467
468
469
470
471