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