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