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