Compiler options needed by the new version of cfortran.h
[u/mrichter/AliRoot.git] / STRUCT / AliABSOv0.cxx
CommitLineData
43d014f0 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$
9e1a0ddb 18Revision 1.8 2001/01/12 13:16:09 morsch
19Store absorber composition information in fMLayers and fZLayers
20Rear 25 cm Fe + 35 cm Cu
21
381ec9af 22Revision 1.7 2000/10/02 21:28:15 fca
23Removal of useless dependecies via forward declarations
24
94de3818 25Revision 1.6 2000/06/15 09:40:31 morsch
26Obsolete typedef keyword removed
27
56f14ac2 28Revision 1.5 2000/06/12 19:39:01 morsch
29New structure of beam pipe and heating jacket.
30
b2ef5f06 31Revision 1.4 2000/04/03 08:13:40 fca
32Introduce extra scope for non ANSI compliant C++ compilers
33
74c0d076 34Revision 1.3 2000/01/18 17:49:56 morsch
35Serious overlap of ABSM with shield corrected
36Small error in ARPB parameters corrected
37
85d164ab 38Revision 1.2 2000/01/13 11:23:59 morsch
39Last layer of Pb outer angle corrected
40
54fba644 41Revision 1.1 2000/01/12 15:39:30 morsch
b2ef5f06 42Standard version of ABSO
54fba644 43
43d014f0 44*/
45
46///////////////////////////////////////////////////////////////////////////////
47// //
48// Muon ABSOrber //
49// This class contains the description of the muon absorber geometry //
50// //
51//Begin_Html
52/*
53<img src="picts/AliABSOClass.gif">
54</pre>
55<br clear=left>
56<font size=+2 color=red>
57<p>The responsible person for this module is
58<a href="mailto:andreas.morsch@cern.ch">Andreas Morsch</a>.
59</font>
60<pre>
61*/
62//End_Html
63// //
64// //
65///////////////////////////////////////////////////////////////////////////////
66
67#include "AliABSOv0.h"
68#include "AliRun.h"
94de3818 69#include "AliMC.h"
43d014f0 70#include "AliConst.h"
b2ef5f06 71
43d014f0 72ClassImp(AliABSOv0)
73
74//_____________________________________________________________________________
75AliABSOv0::AliABSOv0()
76{
77 //
78 // Default constructor
79 //
80}
81
82//_____________________________________________________________________________
83AliABSOv0::AliABSOv0(const char *name, const char *title)
84 : AliABSO(name,title)
85{
86 //
87 // Standard constructor
88 //
89 SetMarkerColor(7);
90 SetMarkerStyle(2);
91 SetMarkerSize(0.4);
92}
93
94//_____________________________________________________________________________
95void AliABSOv0::CreateGeometry()
96{
b2ef5f06 97 //
98 // Creation of the geometry of the muon absorber
99 //
100 //Begin_Html
101 /*
102 <img src="picts/AliABSOv0Tree.gif">
103 */
104 //End_Html
105 //Begin_Html
106 /*
107 <img src="picts/AliABSOv0.gif">
108 */
109 //End_Html
110
111 //
112 //
56f14ac2 113
114 enum {kC=1605, kAl=1608, kFe=1609, kCu=1610, kW=1611, kPb=1612,
b2ef5f06 115 kNiCuW=1620, kVacuum=1615, kAir=1614, kConcrete=1616,
381ec9af 116 kPolyCH2=1617, kSteel=1609, kInsulation=1613, kPolyCc=1619};
b2ef5f06 117
118 Int_t *idtmed = fIdtmed->GetArray()-1599;
43d014f0 119
b2ef5f06 120 Float_t par[24], cpar[5], cpar0[5], pcpar[12], tpar[3], tpar0[3];
121 Float_t dz;
b2ef5f06 122#include "ABSOSHILConst.h"
123#include "ABSOConst.h"
381ec9af 124//
125// Structure of Tracking Region
126//
127 Float_t dzFe = 25.;
128
129// 3 < theta < 9
130 fNLayers[0] = 5;
131 fMLayers[0][0] = kAir; fZLayers[0][0] = zAbsStart;
132 fMLayers[0][1] = kC; fZLayers[0][1] = zAbsCc;
133 fMLayers[0][2] = kConcrete; fZLayers[0][2] = zRear-dRear-dzFe;
134 fMLayers[0][3] = kFe; fZLayers[0][3] = zRear-dRear;
135 fMLayers[0][4] = kCu; fZLayers[0][4] = zRear;
136// 2 < theta < 3
137 fNLayers[1] = 5;
138 fMLayers[1][0] = fMLayers[0][0]; fZLayers[1][0] = fZLayers[0][0];
139 fMLayers[1][1] = fMLayers[0][1]; fZLayers[1][1] = fZLayers[0][1];
140 fMLayers[1][2] = fMLayers[0][2]; fZLayers[1][2] = fZLayers[0][2];
141 fMLayers[1][3] = fMLayers[0][3]; fZLayers[1][3] = fZLayers[0][3];
142 fMLayers[1][4] = kNiCuW; fZLayers[1][4] = fZLayers[0][4];
143//
144
b2ef5f06 145 Float_t dTube=0.1; // tube thickness
146 Float_t dInsu=0.5; // insulation thickness
147 Float_t dEnve=0.1; // protective envelope thickness
148 Float_t dFree=0.5; // clearance thickness
149
150
151// Mother volume and outer shielding: Pb
43d014f0 152 par[0] = 0.;
153 par[1] = 360.;
154 par[2] = 7.;
b2ef5f06 155
156 par[3] = -(zRear-zAbsStart)/2.;
157 par[4] = rAbs;
158 par[5] = zAbsStart * TMath::Tan(theta1);
43d014f0 159
b2ef5f06 160 par[6] = par[3]+(zNose-zAbsStart);
161 par[7] = rAbs;
162 par[8] = zNose * TMath::Tan(theta1);
43d014f0 163
b2ef5f06 164 par[9] = par[3]+(zConeTPC-zAbsStart);
165 par[10] = rAbs;
43d014f0 166 par[11] = par[8] + (par[9] - par[6]) * TMath::Tan(theta2);
167
b2ef5f06 168 par[12] = par[3]+(zOpen-zAbsStart);
169 par[13] = rAbs;
170 par[14] = par[11] + (par[12] - par[9]) * TMath::Tan(accMax);
43d014f0 171
b2ef5f06 172 par[15] = par[3]+(zRear-dRear-zAbsStart);
173 par[16] = rAbs + (par[15] - par[12]) * TMath::Tan(thetaOpen1) ;
174 par[17] = par[14] + (par[15] - par[12]) * TMath::Tan(accMax);
43d014f0 175
b2ef5f06 176 par[18] = par[3]+(zRear-dRear-zAbsStart);
177 par[19] = (zRear-dRear) * TMath::Tan(accMin);
178 par[20] = par[14] + (par[18] - par[12]) * TMath::Tan(accMax);
43d014f0 179
180 par[21] = -par[3];
b2ef5f06 181 par[22] = zRear* TMath::Tan(accMin);
182 par[23] = par[20] + (par[21] - par[18]) * TMath::Tan(accMax);
183 gMC->Gsvolu("ABSS", "PCON", idtmed[kPb], par, 24);
74c0d076 184 { // Begin local scope for i
b2ef5f06 185 for (Int_t i=4; i<18; i+=3) par[i] = 0;
74c0d076 186 } // End local scope for i
b2ef5f06 187 gMC->Gsvolu("ABSM", "PCON", idtmed[kVacuum+40], par, 24);
43d014f0 188 gMC->Gspos("ABSS", 1, "ABSM", 0., 0., 0., 0, "ONLY");
189
190//
191// Steel envelope
192//
b2ef5f06 193 par[4] = par[5] -dSteel;
194 par[7] = par[8] -dSteel;
195 par[10]= par[11]-dSteel;
196 par[13]= par[14]-dSteel;
197 par[16]= par[17]-dSteel;
198 par[19]= par[20]-dSteel;
199 par[22]= par[23]-dSteel;
200 gMC->Gsvolu("ABST", "PCON", idtmed[kSteel], par, 24);
43d014f0 201 gMC->Gspos("ABST", 1, "ABSS", 0., 0., 0., 0, "ONLY");
202//
203// Polyethylene shield
204//
b2ef5f06 205 cpar[0] = (zRear - zConeTPC) / 2.;
206 cpar[1] = zConeTPC * TMath::Tan(accMax);
207 cpar[2] = cpar[1] + dPoly;
208 cpar[3] = zRear * TMath::Tan(accMax);
209 cpar[4] = cpar[3] + dPoly;
210 gMC->Gsvolu("APOL", "CONE", idtmed[kPolyCH2+40], cpar, 5);
211 dz = (zRear-zAbsStart)/2.-cpar[0];
43d014f0 212 gMC->Gspos("APOL", 1, "ABSS", 0., 0., dz, 0, "ONLY");
213
214//
215// Tungsten nose to protect TPC
216//
b2ef5f06 217 cpar[0] = (zNose - zAbsStart) / 2.;
218 cpar[1] = zAbsStart * TMath::Tan(accMax);
219 cpar[2] = zAbsStart * TMath::Tan(theta1)-dSteel;
220 cpar[3] = zNose * TMath::Tan(accMax);
221 cpar[4] = zNose * TMath::Tan(theta1)-dSteel;
222 gMC->Gsvolu("ANOS", "CONE", idtmed[kW], cpar, 5);
223//
224 dz = -(zRear-zAbsStart)/2.+cpar[0];
43d014f0 225 gMC->Gspos("ANOS", 1, "ABSS", 0., 0., dz, 0, "ONLY");
226//
227// Tungsten inner shield
228//
b2ef5f06 229 Float_t zW=zTwoDeg+.1;
230 Float_t dZ = zW+(zRear-dRear-zW)/2.;
43d014f0 231 //
b2ef5f06 232 pcpar[0] = 0.;
233 pcpar[1] = 360.;
234 pcpar[2] = 3.;
235 pcpar[3] = zW-dZ;
236 pcpar[4] = rAbs;
237 pcpar[5] = zW * TMath::Tan(accMin);
238 pcpar[6] = zOpen-dZ;
239 pcpar[7] = rAbs;
240 pcpar[8] = zOpen * TMath::Tan(accMin);
241 pcpar[9] = zRear-dRear-dZ;
242 pcpar[10] = rAbs+(zRear-dRear-zOpen) * TMath::Tan(thetaOpen1);
243 pcpar[11] = (zRear-dRear) * TMath::Tan(accMin);
244
245 gMC->Gsvolu("AWIN", "PCON", idtmed[kNiCuW+40], pcpar, 12);
246 //
247 dz=(zW+zRear-dRear)/2-(zAbsStart+zRear)/2.;
43d014f0 248 gMC->Gspos("AWIN", 1, "ABSS", 0., 0., dz, 0, "ONLY");
249
250 // Inner tracking region
251 //
381ec9af 252 // mother volume: Cu
43d014f0 253 //
254 pcpar[0] = 0.;
255 pcpar[1] = 360.;
256 pcpar[2] = 3.;
b2ef5f06 257 pcpar[3] = -(zRear-zAbsStart)/2.;
258 pcpar[4] = rAbs;
259 pcpar[5] = zAbsStart * TMath::Tan(accMax);
260 pcpar[6] = pcpar[3]+(zTwoDeg-zAbsStart);
261 pcpar[7] = rAbs;
262 pcpar[8] = zTwoDeg * TMath::Tan(accMax);
85d164ab 263 pcpar[9] = -pcpar[3];
b2ef5f06 264 pcpar[10] = zRear * TMath::Tan(accMin);
265 pcpar[11] = zRear * TMath::Tan(accMax);
381ec9af 266 gMC->Gsvolu("AITR", "PCON", idtmed[fMLayers[0][4]], pcpar, 12);
43d014f0 267 //
268 // special Pb medium for last 5 cm of Pb
b2ef5f06 269 Float_t zr=zRear-2.-0.001;
270 cpar[0] = 1.0;
271 cpar[1] = zr * TMath::Tan(thetaR);
272 cpar[2] = zr * TMath::Tan(accMax);
273 cpar[3] = cpar[1] + TMath::Tan(thetaR) * 2;
274 cpar[4] = cpar[2] + TMath::Tan(accMax) * 2;
381ec9af 275 gMC->Gsvolu("ARPB", "CONE", idtmed[fMLayers[0][4]], cpar, 5);
b2ef5f06 276 dz=(zRear-zAbsStart)/2.-cpar[0]-0.001;
43d014f0 277 gMC->Gspos("ARPB", 1, "AITR", 0., 0., dz, 0, "ONLY");
43d014f0 278 //
279 // concrete cone: concrete
280 //
b2ef5f06 281 pcpar[9] = pcpar[3]+(zRear-dRear-zAbsStart);
282 pcpar[10] = (zRear-dRear) * TMath::Tan(accMin);
283 pcpar[11] = (zRear-dRear) * TMath::Tan(accMax);
381ec9af 284 gMC->Gsvolu("ACON", "PCON", idtmed[fMLayers[0][2]+40], pcpar, 12);
43d014f0 285 gMC->Gspos("ACON", 1, "AITR", 0., 0., 0., 0, "ONLY");
381ec9af 286//
287// Fe Cone
288//
289 zr = zRear-dRear-dzFe;
290 cpar[0] = dzFe/2.;
291 cpar[1] = zr * TMath::Tan(accMin);
292 cpar[2] = zr * TMath::Tan(accMax);
293 cpar[3] = cpar[1] + TMath::Tan(thetaR) * dzFe;
294 cpar[4] = cpar[2] + TMath::Tan(accMax) * dzFe;
295 gMC->Gsvolu("ACFE", "CONE",idtmed[fMLayers[0][3]], cpar, 5);
296
297 dz = (zRear-zAbsStart)/2.-dRear-dzFe/2.;
298
299 gMC->Gspos("ACFE", 1, "ACON", 0., 0., dz, 0, "ONLY");
300
301
302 //
43d014f0 303 //
304 // carbon cone: carbon
305 //
b2ef5f06 306 pcpar[9] = pcpar[3]+(zAbsCc-zAbsStart);
307 pcpar[10] = zAbsCc * TMath::Tan(accMin);
308 pcpar[11] = zAbsCc * TMath::Tan(accMax);
381ec9af 309 gMC->Gsvolu("ACAR", "PCON", idtmed[fMLayers[0][1]+40], pcpar, 12);
43d014f0 310 gMC->Gspos("ACAR", 1, "ACON", 0., 0., 0., 0, "ONLY");
b2ef5f06 311 //
312 // carbon cone outer region
313 //
314 cpar[0] = 10.;
315 cpar[1] = rAbs;
316 cpar[2] = zAbsStart* TMath::Tan(accMax);
317 cpar[3] = rAbs;
318 cpar[4] = cpar[2]+2. * cpar[0] * TMath::Tan(accMax);
319
381ec9af 320 gMC->Gsvolu("ACAO", "CONE", idtmed[fMLayers[0][1]], cpar, 5);
b2ef5f06 321 dz=-(zRear-zAbsStart)/2.+cpar[0];
322 gMC->Gspos("ACAO", 1, "ACAR", 0., 0., dz, 0, "ONLY");
43d014f0 323 //
324 // inner W shield
b2ef5f06 325 Float_t epsi=0.;
326 Float_t repsi=1.;
327
328 zr=zRear-(dRear-epsi);
329 cpar[0] = (dRear-epsi)/2.;
330 cpar[1] = zr * TMath::Tan(accMin);
331 cpar[2] = zr * TMath::Tan(thetaR*repsi);
332 cpar[3] = cpar[1] + TMath::Tan(accMin) * (dRear-epsi);
333 cpar[4] = cpar[2] + TMath::Tan(thetaR*repsi) * (dRear-epsi);
381ec9af 334 gMC->Gsvolu("ARW0", "CONE", idtmed[fMLayers[1][4]+40], cpar, 5);
b2ef5f06 335 dz=(zRear-zAbsStart)/2.-cpar[0];
43d014f0 336 gMC->Gspos("ARW0", 1, "AITR", 0., 0., dz, 0, "ONLY");
337 //
338 // special W medium for last 5 cm of W
b2ef5f06 339 zr=zRear-5;
43d014f0 340 cpar[0] = 2.5;
b2ef5f06 341 cpar[1] = zr * TMath::Tan(accMin);
342 cpar[2] = zr * TMath::Tan(thetaR*repsi);
343 cpar[3] = cpar[1] + TMath::Tan(accMin) * 5.;
344 cpar[4] = cpar[2] + TMath::Tan(thetaR*repsi) * 5.;
381ec9af 345 gMC->Gsvolu("ARW1", "CONE", idtmed[fMLayers[1][4]+20], cpar, 5);
b2ef5f06 346 dz=(dRear-epsi)/2.-cpar[0];
43d014f0 347 gMC->Gspos("ARW1", 1, "ARW0", 0., 0., dz, 0, "ONLY");
348 //
381ec9af 349 // Cu
b2ef5f06 350 Float_t drMin=TMath::Tan(thetaR) * 5;
351 Float_t drMax=TMath::Tan(accMax) * 5;
381ec9af 352 gMC->Gsvolu("ARPE", "CONE", idtmed[fMLayers[0][4]], cpar, 0);
43d014f0 353 cpar[0]=2.5;
74c0d076 354 { // Begin local scope for i
b2ef5f06 355 for (Int_t i=0; i<3; i++) {
356 zr=zRear-dRear+5+i*10.;
357 cpar[1] = zr * TMath::Tan(thetaR);
358 cpar[2] = zr * TMath::Tan(accMax);
359 cpar[3] = cpar[1] + drMin;
360 cpar[4] = cpar[2] + drMax;
361 dz=(zRear-zAbsStart)/2.-cpar[0]-5.-(2-i)*10;
362 gMC->Gsposp("ARPE", i+1, "AITR", 0., 0., dz, 0, "ONLY",cpar,5);
363 }
74c0d076 364 } // End local scope for i
43d014f0 365 gMC->Gspos("AITR", 1, "ABSS", 0., 0., 0., 0, "ONLY");
b2ef5f06 366 dz = (zRear-zAbsStart)/2.+zAbsStart;
43d014f0 367 gMC->Gspos("ABSM", 1, "ALIC", 0., 0., dz, 0, "ONLY");
368//
369//
370// vacuum system
371//
372// pipe and heating jackets
373//
374//
375// cylindrical piece
b2ef5f06 376 tpar0[2]=(zOpen-zAbsStart)/2;
377 tpar0[0]=rVacu;
378 tpar0[1]=rAbs;
379 gMC->Gsvolu("AV11", "TUBE", idtmed[kSteel+40], tpar0, 3);
43d014f0 380//
381// insulation
b2ef5f06 382
43d014f0 383 tpar[2]=tpar0[2];
b2ef5f06 384 tpar[0]=rVacu+dTube;
385 tpar[1]=tpar[0]+dInsu;
386 gMC->Gsvolu("AI11", "TUBE", idtmed[kInsulation+40], tpar, 3);
43d014f0 387 gMC->Gspos("AI11", 1, "AV11", 0., 0., 0., 0, "ONLY");
388//
b2ef5f06 389// clearance
390 tpar[0]=tpar[1]+dEnve;
391 tpar[1]=tpar[0]+dFree;
392 gMC->Gsvolu("AP11", "TUBE", idtmed[kAir+40], tpar, 3);
43d014f0 393 gMC->Gspos("AP11", 1, "AV11", 0., 0., 0., 0, "ONLY");
b2ef5f06 394//
395 dz=-(zRear-zAbsStart)/2.+tpar0[2];
43d014f0 396 gMC->Gspos("AV11", 1, "ABSM", 0., 0., dz, 0, "ONLY");
43d014f0 397//
398// conical piece
b2ef5f06 399
400 cpar0[0]=(zRear-dRear-zOpen)/2;
401 cpar0[1]=rVacu-0.05;
402 cpar0[2]=rAbs;
403 Float_t dR=2.*cpar0[0]*TMath::Tan(thetaOpen1);
404 cpar0[3]=cpar0[1]+dR;
405 cpar0[4]=cpar0[2]+dR;
406 gMC->Gsvolu("AV21", "CONE", idtmed[kSteel+40], cpar0, 5);
407 dTube+=0.05;
408
43d014f0 409//
410// insulation
411 cpar[0]=cpar0[0];
b2ef5f06 412 cpar[1]=cpar0[1]+dTube;
413 cpar[2]=cpar0[1]+dTube+dInsu;
414 cpar[3]=cpar0[3]+dTube;
415 cpar[4]=cpar0[3]+dTube+dInsu;
416 gMC->Gsvolu("AI21", "CONE", idtmed[kInsulation+40], cpar, 5);
43d014f0 417 gMC->Gspos("AI21", 1, "AV21", 0., 0., 0., 0, "ONLY");
418//
419// clearance
b2ef5f06 420 cpar[1]=cpar0[1]+dTube+dInsu+dEnve;
421 cpar[2]=rAbs;
422 cpar[3]=cpar0[1]+dTube+dInsu+dEnve+dR;
423 cpar[4]=rAbs+dR;
424
425 gMC->Gsvolu("AP21", "CONE", idtmed[kAir+40], cpar, 5);
43d014f0 426 gMC->Gspos("AP21", 1, "AV21", 0., 0., 0., 0, "ONLY");
427
b2ef5f06 428 dz=(zRear-zAbsStart)/2.-cpar0[0]-dRear;
43d014f0 429 gMC->Gspos("AV21", 1, "ABSM", 0., 0., dz, 0, "ONLY");
381ec9af 430//
431// Support cone
432
433 par[0] = 0.;
434 par[1] = 360.;
435 par[2] = 4.;
436
437 par[3] = zRear;
438 par[4] = 100.;
439 par[5] = 170.;
440
441 par[6] = zRear+2.;
442 par[7] = 100.;
443 par[8] = 170.;
444
445 par[9] = zRear+2.;
446 par[10] = 168.;
447 par[11] = 170.;
448
449 par[12] = 600.;
450 par[13] = 168.;
451 par[14] = 170.;
452
453
454 gMC->Gsvolu("ASSS", "PCON", idtmed[kSteel], par, 25);
455 gMC->Gspos("ASSS", 1, "ALIC", 0., 0., 0., 0, "ONLY");
456
457
43d014f0 458}
459
460//_____________________________________________________________________________
461
462void AliABSOv0::Init()
463{
464 //
465 // Initialisation of the muon absorber after it has been built
466 Int_t i;
467 //
9e1a0ddb 468 if(fDebug) {
469 printf("\n%s: ",ClassName());
470 for(i=0;i<35;i++) printf("*");
471 printf(" ABSOv0_INIT ");
472 for(i=0;i<35;i++) printf("*");
473 printf("\n%s: ",ClassName());
474 //
475 for(i=0;i<80;i++) printf("*");
476 printf("\n");
477 }
43d014f0 478}
479
480
481
482
483
484
485
486
487
488