Gheisha corrections suggested by Gary Bower (FNAL).
[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$
e158117c 18Revision 1.8 2000/10/02 21:28:15 fca
19Removal of useless dependecies via forward declarations
20
94de3818 21Revision 1.7 2000/06/11 12:32:51 morsch
22Coding rule violations corrected
23
b43eb0dc 24Revision 1.6 1999/09/29 09:24:30 fca
25Introduction of the Copyright and cvs Log
26
4c039060 27*/
28
fe4da5cc 29///////////////////////////////////////////////////////////////////////////////
30// //
31// Alice external volume //
32// This class contains the description of the Alice external volume //
33// //
34//Begin_Html
35/*
1439f98e 36<img src="picts/AliBODYClass.gif">
fe4da5cc 37</pre>
38<br clear=left>
39<font size=+2 color=red>
40<p>The responsible person for this module is
41<a href="mailto:andreas.morsch@cern.ch">Andreas Morsch</a>.
42</font>
43<pre>
44*/
45//End_Html
46// //
47// //
48///////////////////////////////////////////////////////////////////////////////
49
fe4da5cc 50#include "AliRun.h"
94de3818 51#include "AliMC.h"
52#include "AliMagF.h"
b8032157 53#include "AliBODY.h"
fe4da5cc 54
55ClassImp(AliBODY)
56
57//_____________________________________________________________________________
b8032157 58AliBODY::AliBODY()
fe4da5cc 59{
60 //
61 // Default constructor
62 //
63}
64
65//_____________________________________________________________________________
66AliBODY::AliBODY(const char *name, const char *title)
b8032157 67 : AliModule(name,title)
fe4da5cc 68{
69 //
70 // Standard constructor of the Alice external volume
71 //
72 SetMarkerColor(7);
73 SetMarkerStyle(2);
74 SetMarkerSize(0.4);
75}
76
77//_____________________________________________________________________________
fe4da5cc 78void AliBODY::CreateGeometry()
79{
80 //
81 // Create the geometry of the Alice external body
82 //
83 //Begin_Html
84 /*
1439f98e 85 <img src="picts/AliBODYTree.gif">
fe4da5cc 86 */
87 //End_Html
88 //
89 // If the ZDC is present we have an asymmetric box
90 // made by a four sides polygone
91 //
92 //Begin_Html
93 /*
1439f98e 94 <img src="picts/AliBODYLarge.gif">
fe4da5cc 95 */
96 //End_Html
97 //
98 // If the ZDC is not present make just a BOX
99 //
100 //Begin_Html
101 /*
1439f98e 102 <img src="picts/AliBODYSmall.gif">
fe4da5cc 103 */
104 //End_Html
105
b43eb0dc 106 Float_t dALIC[10];
ad51aeb0 107 Int_t *idtmed = fIdtmed->GetArray()+1;
fe4da5cc 108 //
b8032157 109 if(gAlice->GetModule("ZDC")) {
fe4da5cc 110 //
111 // If the ZDC is present we have an asymmetric box
112 // made by a four sides polygone
113 //
b43eb0dc 114 dALIC[0]=45;
115 dALIC[1]=360;
116 dALIC[2]=4;
117 dALIC[3]=2;
118 dALIC[4]=-3000;
119 dALIC[5]=0;
120 dALIC[6]=2000;
121 dALIC[7]=15000;
122 dALIC[8]=0;
123 dALIC[9]=2000;
124 gMC->Gsvolu("ALIC","PGON",idtmed[1],dALIC,10);
e158117c 125 } else if ( gAlice->GetModule("CRT")) {
126 //
127 // If the Cosmic Ray Trigger is present we need a large box
128 //
129 //
130 dALIC[0]=5000.;
131 dALIC[1]=5000.;
132 dALIC[2]=15000.;
133 gMC->Gsvolu("ALIC","BOX ",idtmed[1],dALIC,3);
134
fe4da5cc 135 } else {
136 //
e158117c 137 // If the ZDC and CRT are not present make just a BOX
fe4da5cc 138 //
b43eb0dc 139 dALIC[0]=2000;
140 dALIC[1]=2000;
141 dALIC[2]=3000;
142 gMC->Gsvolu("ALIC","BOX ",idtmed[1],dALIC,3);
fe4da5cc 143 }
144}
145
146//_____________________________________________________________________________
147void AliBODY::CreateMaterials()
148{
b43eb0dc 149// Create materials and media
150 Int_t isxfld = gAlice->Field()->Integ();
151 Float_t sxmgmx = gAlice->Field()->Max();
fe4da5cc 152 //
153 AliMaterial(1,"Vacuum $",1.e-16,1.e-16,1.e-16,1.e16,1.e16);
154 AliMaterial(2,"Air $",14.61,7.3,0.001205,30420,67500);
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//_____________________________________________________________________________
b8032157 163void AliBODY::DrawModule()
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