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