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