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