]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STRUCT/AliBODY.cxx
Containers definition
[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
16/*
17$Log$
94de3818 18Revision 1.7 2000/06/11 12:32:51 morsch
19Coding rule violations corrected
20
b43eb0dc 21Revision 1.6 1999/09/29 09:24:30 fca
22Introduction of the Copyright and cvs Log
23
4c039060 24*/
25
fe4da5cc 26///////////////////////////////////////////////////////////////////////////////
27// //
28// Alice external volume //
29// This class contains the description of the Alice external volume //
30// //
31//Begin_Html
32/*
1439f98e 33<img src="picts/AliBODYClass.gif">
fe4da5cc 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
fe4da5cc 47#include "AliRun.h"
94de3818 48#include "AliMC.h"
49#include "AliMagF.h"
b8032157 50#include "AliBODY.h"
fe4da5cc 51
52ClassImp(AliBODY)
53
54//_____________________________________________________________________________
b8032157 55AliBODY::AliBODY()
fe4da5cc 56{
57 //
58 // Default constructor
59 //
60}
61
62//_____________________________________________________________________________
63AliBODY::AliBODY(const char *name, const char *title)
b8032157 64 : AliModule(name,title)
fe4da5cc 65{
66 //
67 // Standard constructor of the Alice external volume
68 //
69 SetMarkerColor(7);
70 SetMarkerStyle(2);
71 SetMarkerSize(0.4);
72}
73
fe4da5cc 74//_____________________________________________________________________________
75void AliBODY::CreateGeometry()
76{
77 //
78 // Create the geometry of the Alice external body
79 //
80 //Begin_Html
81 /*
1439f98e 82 <img src="picts/AliBODYTree.gif">
fe4da5cc 83 */
84 //End_Html
85 //
86 // If the ZDC is present we have an asymmetric box
87 // made by a four sides polygone
88 //
89 //Begin_Html
90 /*
1439f98e 91 <img src="picts/AliBODYLarge.gif">
fe4da5cc 92 */
93 //End_Html
94 //
95 // If the ZDC is not present make just a BOX
96 //
97 //Begin_Html
98 /*
1439f98e 99 <img src="picts/AliBODYSmall.gif">
fe4da5cc 100 */
101 //End_Html
102
b43eb0dc 103 Float_t dALIC[10];
ad51aeb0 104 Int_t *idtmed = fIdtmed->GetArray()+1;
fe4da5cc 105 //
b8032157 106 if(gAlice->GetModule("ZDC")) {
fe4da5cc 107 //
108 // If the ZDC is present we have an asymmetric box
109 // made by a four sides polygone
110 //
b43eb0dc 111 dALIC[0]=45;
112 dALIC[1]=360;
113 dALIC[2]=4;
114 dALIC[3]=2;
115 dALIC[4]=-3000;
116 dALIC[5]=0;
117 dALIC[6]=2000;
118 dALIC[7]=15000;
119 dALIC[8]=0;
120 dALIC[9]=2000;
121 gMC->Gsvolu("ALIC","PGON",idtmed[1],dALIC,10);
fe4da5cc 122 } else {
123 //
124 // If the ZDC is not present make just a BOX
125 //
b43eb0dc 126 dALIC[0]=2000;
127 dALIC[1]=2000;
128 dALIC[2]=3000;
129 gMC->Gsvolu("ALIC","BOX ",idtmed[1],dALIC,3);
fe4da5cc 130 }
131}
132
133//_____________________________________________________________________________
134void AliBODY::CreateMaterials()
135{
b43eb0dc 136// Create materials and media
137 Int_t isxfld = gAlice->Field()->Integ();
138 Float_t sxmgmx = gAlice->Field()->Max();
fe4da5cc 139 //
140 AliMaterial(1,"Vacuum $",1.e-16,1.e-16,1.e-16,1.e16,1.e16);
141 AliMaterial(2,"Air $",14.61,7.3,0.001205,30420,67500);
142 AliMaterial(3,"Be $", 9.01,4 ,1.848 ,35.30,36.70);
143 //
b43eb0dc 144 AliMedium(1,"Vacuum $",1,0,isxfld,sxmgmx,10,1,0.1,0.1,10);
145 AliMedium(2,"Air $",2,0,isxfld,sxmgmx,10,-1,-0.1,0.1 ,-10);
146 AliMedium(3,"Be pipe $",3,0,isxfld,sxmgmx,10,0.1,0.1,0.01,0.01);
fe4da5cc 147}
148
149//_____________________________________________________________________________
b8032157 150void AliBODY::DrawModule()
fe4da5cc 151{
152 //
153 // Draw a view of the Alice outside box
154 //
fe4da5cc 155 // Set everything unseen
cfce8870 156 gMC->Gsatt("*", "seen", -1);
fe4da5cc 157 //
158 // Set ALIC mother visible
cfce8870 159 gMC->Gsatt("ALIC","SEEN",1);
fe4da5cc 160 //
161 // Set the volumes visible
162 //
cfce8870 163 gMC->Gdopt("hide","off");
b8032157 164 if(gAlice->GetModule("ZDC")) {
fe4da5cc 165 //
166 // ZDC is present
167 //
cfce8870 168 gMC->DefaultRange();
169 gMC->Gdraw("alic", 40, 30, 0, 15, 10, .0014, .0014);
170 gMC->Gdhead(1111, "Aice Main body with Zero Degree Calorimeter");
fe4da5cc 171 } else {
172 //
173 // ZDC is not present
174 //
cfce8870 175 gMC->Gdraw("alic", 40, 30, 0, 10, 9, .0027, .0027);
176 gMC->Gdhead(1111, "Aice Main body");
fe4da5cc 177 }
cfce8870 178 gMC->Gdman(18, 4, "MAN");
fe4da5cc 179}
180
b8032157 181