Added test for existence in the dtor
[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$
85d164ab 18Revision 1.2 2000/01/13 11:23:59 morsch
19Last layer of Pb outer angle corrected
20
54fba644 21Revision 1.1 2000/01/12 15:39:30 morsch
22Standar version of ABSO
23
43d014f0 24*/
25
26///////////////////////////////////////////////////////////////////////////////
27// //
28// Muon ABSOrber //
29// This class contains the description of the muon absorber geometry //
30// //
31//Begin_Html
32/*
33<img src="picts/AliABSOClass.gif">
34</pre>
35<br clear=left>
36<font size=+2 color=red>
37<p>The responsible person for this module is
38<a href="mailto:andreas.morsch@cern.ch">Andreas Morsch</a>.
39</font>
40<pre>
41*/
42//End_Html
43// //
44// //
45///////////////////////////////////////////////////////////////////////////////
46
47#include "AliABSOv0.h"
48#include "AliRun.h"
49#include "AliConst.h"
50
51ClassImp(AliABSOv0)
52
53//_____________________________________________________________________________
54AliABSOv0::AliABSOv0()
55{
56 //
57 // Default constructor
58 //
59}
60
61//_____________________________________________________________________________
62AliABSOv0::AliABSOv0(const char *name, const char *title)
63 : AliABSO(name,title)
64{
65 //
66 // Standard constructor
67 //
68 SetMarkerColor(7);
69 SetMarkerStyle(2);
70 SetMarkerSize(0.4);
71}
72
73//_____________________________________________________________________________
74void AliABSOv0::CreateGeometry()
75{
76 //
77 // Creation of the geometry of the muon absorber
78 //
79 //Begin_Html
80 /*
81 <img src="picts/AliABSOv0Tree.gif">
82 */
83 //End_Html
84 //Begin_Html
85 /*
86 <img src="picts/AliABSOv0.gif">
87 */
88 //End_Html
89
90
91 Int_t *idtmed = fIdtmed->GetArray()-1599;
92
93 Float_t par[24], cpar[5], cpar0[5], pcpar[12], tpar[3], tpar0[3];
94 Float_t dz;
95#include "ShieldConst.h"
96// Mother volume and outer shielding: Pb
97
98 par[0] = 0.;
99 par[1] = 360.;
100 par[2] = 7.;
101
102 par[3] = -(abs_l-abs_d)/2.;
103 par[4] = r_abs;
104 par[5] = abs_d * TMath::Tan(theta1);
105
106 par[6] = par[3]+(z_nose-abs_d);
107 par[7] = r_abs;
108 par[8] = z_nose * TMath::Tan(theta1);
109
110 par[9] = par[3]+(z_cone-abs_d);
111 par[10] = r_abs;
112 par[11] = par[8] + (par[9] - par[6]) * TMath::Tan(theta2);
113
114 par[12] = par[3]+(abs_c-abs_d);
115 par[13] = r_abs;
116 par[14] = par[11] + (par[12] - par[9]) * TMath::Tan(acc_max);
117
118 par[15] = par[3]+(abs_l-d_rear-abs_d);
119 par[16] = r_abs + (par[15] - par[12]) * TMath::Tan(theta_open1) ;
120 par[17] = par[14] + (par[15] - par[12]) * TMath::Tan(acc_max);
121
122 par[18] = par[3]+(abs_l-d_rear-abs_d);
123 par[19] = (abs_l-d_rear) * TMath::Tan(acc_min);
85d164ab 124 par[20] = par[14] + (par[18] - par[12]) * TMath::Tan(acc_max);
43d014f0 125
126 par[21] = -par[3];
127 par[22] = abs_l* TMath::Tan(acc_min);
128 par[23] = par[20] + (par[21] - par[18]) * TMath::Tan(acc_max);
129 gMC->Gsvolu("ABSS", "PCON", idtmed[1612], par, 24);
85d164ab 130 for (Int_t i=4; i<18; i+=3) par[i] = 0;
43d014f0 131 gMC->Gsvolu("ABSM", "PCON", idtmed[1655], par, 24);
132 gMC->Gspos("ABSS", 1, "ABSM", 0., 0., 0., 0, "ONLY");
133
134//
135// Steel envelope
136//
137 par[4] = par[5] -d_steel;
138 par[7] = par[8] -d_steel;
139 par[10]= par[11]-d_steel;
140 par[13]= par[14]-d_steel;
141 par[16]= par[17]-d_steel;
142 par[19]= par[20]-d_steel;
143 par[22]= par[23]-d_steel;
144 gMC->Gsvolu("ABST", "PCON", idtmed[1618], par, 24);
145 gMC->Gspos("ABST", 1, "ABSS", 0., 0., 0., 0, "ONLY");
146//
147// Polyethylene shield
148//
149 cpar[0] = (abs_l - z_cone) / 2.;
150 cpar[1] = z_cone * TMath::Tan(acc_max);
151 cpar[2] = cpar[1] + d_poly;
152 cpar[3] = abs_l * TMath::Tan(acc_max);
153 cpar[4] = cpar[3] + d_poly;
154 gMC->Gsvolu("APOL", "CONE", idtmed[1657], cpar, 5);
155 dz = (abs_l-abs_d)/2.-cpar[0];
156 gMC->Gspos("APOL", 1, "ABSS", 0., 0., dz, 0, "ONLY");
157
158//
159// Tungsten nose to protect TPC
160//
161 cpar[0] = (z_nose - abs_d) / 2.;
162 cpar[1] = abs_d * TMath::Tan(acc_max);
163 cpar[2] = abs_d * TMath::Tan(theta1)-d_steel;
164 cpar[3] = z_nose * TMath::Tan(acc_max);
165 cpar[4] = z_nose * TMath::Tan(theta1)-d_steel;
166 gMC->Gsvolu("ANOS", "CONE", idtmed[1611], cpar, 5);
167 //
168 dz = -(abs_l-abs_d)/2.+cpar[0];
169 gMC->Gspos("ANOS", 1, "ABSS", 0., 0., dz, 0, "ONLY");
170//
171// Tungsten inner shield
172//
173 cpar[0] = (abs_l-d_rear - abs_c)/ 2.;
174 cpar[1] = r_abs;
175 cpar[2] = abs_c * TMath::Tan(acc_min);
176 cpar[3] = r_abs + 2. * cpar[0] * TMath::Tan(theta_open1);
177 cpar[4] = (abs_l-d_rear) * TMath::Tan(acc_min);
178 gMC->Gsvolu("AWIN", "CONE", idtmed[1651], cpar, 5);
179 //
180 dz = (abs_l-abs_d)/2.-cpar[0]-d_rear;
181 gMC->Gspos("AWIN", 1, "ABSS", 0., 0., dz, 0, "ONLY");
182
183 // Inner tracking region
184 //
185 // mother volume: Pb
186 //
187 pcpar[0] = 0.;
188 pcpar[1] = 360.;
189 pcpar[2] = 3.;
190 pcpar[3] = -(abs_l-abs_d)/2.;
191 pcpar[4] = r_abs;
192 pcpar[5] = abs_d * TMath::Tan(acc_max);
193 pcpar[6] = pcpar[3]+(z_2deg-abs_d);
194 pcpar[7] = r_abs;
195 pcpar[8] = z_2deg * TMath::Tan(acc_max);
85d164ab 196 pcpar[9] = -pcpar[3];
43d014f0 197 pcpar[10] = abs_l * TMath::Tan(acc_min);
198 pcpar[11] = abs_l * TMath::Tan(acc_max);
199 gMC->Gsvolu("AITR", "PCON", idtmed[1612], pcpar, 12);
200 //
201 // special Pb medium for last 5 cm of Pb
202 zr=abs_l-5;
203 cpar[0] = 2.5;
204 cpar[1] = zr * TMath::Tan(theta_r);
205 cpar[2] = zr * TMath::Tan(acc_max);
85d164ab 206 cpar[3] = cpar[1] + TMath::Tan(theta_r) * 5;
54fba644 207 cpar[4] = cpar[2] + TMath::Tan(acc_max) * 5;
43d014f0 208 gMC->Gsvolu("ARPB", "CONE", idtmed[1632], cpar, 5);
209 dz=(abs_l-abs_d)/2.-cpar[0];
210 gMC->Gspos("ARPB", 1, "AITR", 0., 0., dz, 0, "ONLY");
211
212 //
213 // concrete cone: concrete
214 //
215 pcpar[9] = par[3]+(abs_l-d_rear-abs_d);
216 pcpar[10] = (abs_l-d_rear) * TMath::Tan(acc_min);
217 pcpar[11] = (abs_l-d_rear) * TMath::Tan(acc_max);
218 gMC->Gsvolu("ACON", "PCON", idtmed[1616], pcpar, 12);
219 gMC->Gspos("ACON", 1, "AITR", 0., 0., 0., 0, "ONLY");
220 //
221 // carbon cone: carbon
222 //
223 pcpar[9] = pcpar[3]+(abs_cc-abs_d);
224 pcpar[10] = abs_cc * TMath::Tan(acc_min);
225 pcpar[11] = abs_cc * TMath::Tan(acc_max);
226 gMC->Gsvolu("ACAR", "PCON", idtmed[1605], pcpar, 12);
227 gMC->Gspos("ACAR", 1, "ACON", 0., 0., 0., 0, "ONLY");
228 //
229 // inner W shield
230 zr=abs_l-d_rear;
231 cpar[0] = d_rear/2.;
232 cpar[1] = zr * TMath::Tan(acc_min);
233 cpar[2] = zr * TMath::Tan(theta_r);
85d164ab 234 cpar[3] = cpar[1] + TMath::Tan(acc_min) * d_rear;
235 cpar[4] = cpar[2] + TMath::Tan(theta_r) * d_rear;
43d014f0 236 gMC->Gsvolu("ARW0", "CONE", idtmed[1611], cpar, 5);
237 dz=(abs_l-abs_d)/2.-cpar[0];
238 gMC->Gspos("ARW0", 1, "AITR", 0., 0., dz, 0, "ONLY");
239 //
240 // special W medium for last 5 cm of W
241 zr=abs_l-5;
242 cpar[0] = 2.5;
243 cpar[1] = zr * TMath::Tan(acc_min);
244 cpar[2] = zr * TMath::Tan(theta_r);
245 cpar[3] = cpar[1] + TMath::Tan(acc_min) * 5.;
246 cpar[4] = cpar[2] + TMath::Tan(theta_r) * 5.;
247 gMC->Gsvolu("ARW1", "CONE", idtmed[1631], cpar, 5);
248 dz=d_rear/2.-cpar[0];
249 gMC->Gspos("ARW1", 1, "ARW0", 0., 0., dz, 0, "ONLY");
250 //
251 // PolyEthylene Layers
252 Float_t dr_min=TMath::Tan(theta_r) * 5;
253 Float_t dr_max=TMath::Tan(acc_max) * 5;
254 gMC->Gsvolu("ARPE", "CONE", idtmed[1617], cpar, 0);
255 cpar[0]=2.5;
256 for (Int_t i=0; i<3; i++) {
257 zr=abs_l-d_rear+5+i*10.;
258 cpar[1] = zr * TMath::Tan(theta_r);
259 cpar[2] = zr * TMath::Tan(acc_max);
260 cpar[3] = cpar[1] + dr_min;
261 cpar[4] = cpar[2] + dr_max;
262 dz=(abs_l-abs_d)/2.-cpar[0]-5.-(2-i)*10;
263 gMC->Gsposp("ARPE", i+1, "AITR", 0., 0., dz, 0, "ONLY",cpar,5);
264 }
265 gMC->Gspos("AITR", 1, "ABSS", 0., 0., 0., 0, "ONLY");
266 dz = (abs_l-abs_d)/2.+abs_d;
267 gMC->Gspos("ABSM", 1, "ALIC", 0., 0., dz, 0, "ONLY");
268//
269//
270// vacuum system
271//
272// pipe and heating jackets
273//
274//
275// cylindrical piece
276 tpar0[2]=(abs_c-abs_d)/2;
277 tpar0[0]=r_vacu;
278 tpar0[1]=r_abs;
279 gMC->Gsvolu("AV11", "TUBE", idtmed[1658], tpar0, 3);
280//
281// insulation
282 tpar[2]=tpar0[2];
283 tpar[0]=tpar0[0]+d_tube;
284 tpar[1]=tpar0[0]+d_tube+d_insu;
285 gMC->Gsvolu("AI11", "TUBE", idtmed[1653], tpar, 3);
286 gMC->Gspos("AI11", 1, "AV11", 0., 0., 0., 0, "ONLY");
287//
288// clearance
289 tpar[0]=tpar0[1]-d_prot-d_free;
290 tpar[1]=tpar0[1]-d_prot;
291 gMC->Gsvolu("AP11", "TUBE", idtmed[1655], tpar, 3);
292 gMC->Gspos("AP11", 1, "AV11", 0., 0., 0., 0, "ONLY");
293
294 dz=-(abs_l-abs_d)/2.+tpar0[2];
295 gMC->Gspos("AV11", 1, "ABSM", 0., 0., dz, 0, "ONLY");
296
297//
298// conical piece
299 cpar0[0]=(abs_l-d_rear-abs_c)/2;
300 cpar0[1]=r_vacu;
301 cpar0[2]=r_abs;
302 cpar0[3]=cpar0[1]+2.*cpar0[0]*TMath::Tan(theta_open1);
303 cpar0[4]=cpar0[2]+2.*cpar0[0]*TMath::Tan(theta_open1);
304 gMC->Gsvolu("AV21", "CONE", idtmed[1658], cpar0, 5);
305//
306// insulation
307 cpar[0]=cpar0[0];
308 cpar[1]=cpar0[1]+d_tube;
309 cpar[2]=cpar0[1]+d_tube+d_insu;
310 cpar[3]=cpar0[3]+d_tube;
311 cpar[4]=cpar0[3]+d_tube+d_insu;
312 gMC->Gsvolu("AI21", "CONE", idtmed[1653], cpar, 5);
313 gMC->Gspos("AI21", 1, "AV21", 0., 0., 0., 0, "ONLY");
314//
315// clearance
316 cpar[1]=cpar0[2]-d_prot-d_free;
317 cpar[2]=cpar0[2]-d_prot;
318 cpar[3]=cpar0[4]-d_prot-d_free;
319 cpar[4]=cpar0[4]-d_prot;
320 gMC->Gsvolu("AP21", "CONE", idtmed[1655], cpar, 5);
321 gMC->Gspos("AP21", 1, "AV21", 0., 0., 0., 0, "ONLY");
322
323 dz=(abs_l-abs_d)/2.-cpar0[0]-d_rear;
324 gMC->Gspos("AV21", 1, "ABSM", 0., 0., dz, 0, "ONLY");
325
326}
327
328//_____________________________________________________________________________
329
330void AliABSOv0::Init()
331{
332 //
333 // Initialisation of the muon absorber after it has been built
334 Int_t i;
335 //
336 printf("\n");
337 for(i=0;i<35;i++) printf("*");
338 printf(" ABSOv0_INIT ");
339 for(i=0;i<35;i++) printf("*");
340 printf("\n");
341 //
342 for(i=0;i<80;i++) printf("*");
343 printf("\n");
344}
345
346
347
348
349
350
351
352
353
354