]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STRUCT/AliBODY.cxx
Overlaps corrected.
[u/mrichter/AliRoot.git] / STRUCT / AliBODY.cxx
CommitLineData
4c039060 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
eeacf08b 16/* $Id$ */
4c039060 17
fe4da5cc 18///////////////////////////////////////////////////////////////////////////////
19// //
20// Alice external volume //
21// This class contains the description of the Alice external volume //
22// //
23//Begin_Html
24/*
1439f98e 25<img src="picts/AliBODYClass.gif">
fe4da5cc 26</pre>
27<br clear=left>
28<font size=+2 color=red>
29<p>The responsible person for this module is
30<a href="mailto:andreas.morsch@cern.ch">Andreas Morsch</a>.
31</font>
32<pre>
33*/
34//End_Html
35// //
36// //
37///////////////////////////////////////////////////////////////////////////////
38
88cb7938 39#include <TVirtualMC.h>
40
b8032157 41#include "AliBODY.h"
88cb7938 42#include "AliMagF.h"
43#include "AliRun.h"
fe4da5cc 44
45ClassImp(AliBODY)
46
47//_____________________________________________________________________________
b8032157 48AliBODY::AliBODY()
fe4da5cc 49{
50 //
51 // Default constructor
52 //
53}
54
55//_____________________________________________________________________________
56AliBODY::AliBODY(const char *name, const char *title)
b8032157 57 : AliModule(name,title)
fe4da5cc 58{
59 //
60 // Standard constructor of the Alice external volume
61 //
e939a978 62 //PH SetMarkerColor(7);
63 //PH SetMarkerStyle(2);
64 //PH SetMarkerSize(0.4);
fe4da5cc 65}
66
fe4da5cc 67//_____________________________________________________________________________
68void AliBODY::CreateGeometry()
69{
70 //
71 // Create the geometry of the Alice external body
72 //
73 //Begin_Html
74 /*
1439f98e 75 <img src="picts/AliBODYTree.gif">
fe4da5cc 76 */
77 //End_Html
78 //
79 // If the ZDC is present we have an asymmetric box
80 // made by a four sides polygone
81 //
82 //Begin_Html
83 /*
1439f98e 84 <img src="picts/AliBODYLarge.gif">
fe4da5cc 85 */
86 //End_Html
87 //
88 // If the ZDC is not present make just a BOX
89 //
90 //Begin_Html
91 /*
1439f98e 92 <img src="picts/AliBODYSmall.gif">
fe4da5cc 93 */
94 //End_Html
95
b43eb0dc 96 Float_t dALIC[10];
ad51aeb0 97 Int_t *idtmed = fIdtmed->GetArray()+1;
fe4da5cc 98 //
b8032157 99 if(gAlice->GetModule("ZDC")) {
fe4da5cc 100 //
101 // If the ZDC is present we have an asymmetric box
102 // made by a four sides polygone
103 //
b43eb0dc 104 dALIC[0]=45;
105 dALIC[1]=360;
106 dALIC[2]=4;
107 dALIC[3]=2;
c3f0b3fd 108
109 dALIC[4]=-15000;
b43eb0dc 110 dALIC[5]=0;
111 dALIC[6]=2000;
c3f0b3fd 112
f5ab84c3 113 dALIC[7]=15000;
b43eb0dc 114 dALIC[8]=0;
115 dALIC[9]=2000;
116 gMC->Gsvolu("ALIC","PGON",idtmed[1],dALIC,10);
b384f8a4 117 } else if ( gAlice->GetModule("ACORDE")) {
e158117c 118 //
119 // If the Cosmic Ray Trigger is present we need a large box
120 //
121 //
00ad641c 122 dALIC[0]=13000.;
e158117c 123 dALIC[1]=5000.;
00ad641c 124 dALIC[2]=13000.;
e158117c 125 gMC->Gsvolu("ALIC","BOX ",idtmed[1],dALIC,3);
126
fe4da5cc 127 } else {
128 //
b384f8a4 129 // If the ZDC and ACORDE are not present make just a BOX
fe4da5cc 130 //
b43eb0dc 131 dALIC[0]=2000;
132 dALIC[1]=2000;
133 dALIC[2]=3000;
134 gMC->Gsvolu("ALIC","BOX ",idtmed[1],dALIC,3);
fe4da5cc 135 }
136}
137
138//_____________________________________________________________________________
139void AliBODY::CreateMaterials()
140{
b43eb0dc 141// Create materials and media
142 Int_t isxfld = gAlice->Field()->Integ();
143 Float_t sxmgmx = gAlice->Field()->Max();
6a894888 144
145 // AIR
146
147 Float_t aAir[4]={12.0107,14.0067,15.9994,39.948};
148 Float_t zAir[4]={6.,7.,8.,18.};
149 Float_t wAir[4]={0.000124,0.755267,0.231781,0.012827};
150 Float_t dAir = 1.20479E-3;
151 Float_t dAir1 = 1.20479E-10;
fe4da5cc 152 //
6a894888 153 AliMixture(1,"Vacuum $",aAir,zAir,dAir1,4,wAir);
154 AliMixture(2,"Air $",aAir,zAir,dAir,4,wAir);
fe4da5cc 155 AliMaterial(3,"Be $", 9.01,4 ,1.848 ,35.30,36.70);
156 //
b43eb0dc 157 AliMedium(1,"Vacuum $",1,0,isxfld,sxmgmx,10,1,0.1,0.1,10);
158 AliMedium(2,"Air $",2,0,isxfld,sxmgmx,10,-1,-0.1,0.1 ,-10);
159 AliMedium(3,"Be pipe $",3,0,isxfld,sxmgmx,10,0.1,0.1,0.01,0.01);
fe4da5cc 160}
161
162//_____________________________________________________________________________
eeacf08b 163void AliBODY::DrawModule() const
fe4da5cc 164{
165 //
166 // Draw a view of the Alice outside box
167 //
fe4da5cc 168 // Set everything unseen
cfce8870 169 gMC->Gsatt("*", "seen", -1);
fe4da5cc 170 //
171 // Set ALIC mother visible
cfce8870 172 gMC->Gsatt("ALIC","SEEN",1);
fe4da5cc 173 //
174 // Set the volumes visible
175 //
cfce8870 176 gMC->Gdopt("hide","off");
b8032157 177 if(gAlice->GetModule("ZDC")) {
fe4da5cc 178 //
179 // ZDC is present
180 //
cfce8870 181 gMC->DefaultRange();
182 gMC->Gdraw("alic", 40, 30, 0, 15, 10, .0014, .0014);
183 gMC->Gdhead(1111, "Aice Main body with Zero Degree Calorimeter");
fe4da5cc 184 } else {
185 //
186 // ZDC is not present
187 //
cfce8870 188 gMC->Gdraw("alic", 40, 30, 0, 10, 9, .0027, .0027);
189 gMC->Gdhead(1111, "Aice Main body");
fe4da5cc 190 }
cfce8870 191 gMC->Gdman(18, 4, "MAN");
fe4da5cc 192}
193
b8032157 194