Introducing Copyright include file
[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/*
1439f98e 8<img src="picts/AliBODYClass.gif">
fe4da5cc 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
fe4da5cc 22#include "AliRun.h"
b8032157 23#include "AliBODY.h"
fe4da5cc 24
25ClassImp(AliBODY)
26
27//_____________________________________________________________________________
b8032157 28AliBODY::AliBODY()
fe4da5cc 29{
30 //
31 // Default constructor
32 //
33}
34
35//_____________________________________________________________________________
36AliBODY::AliBODY(const char *name, const char *title)
b8032157 37 : AliModule(name,title)
fe4da5cc 38{
39 //
40 // Standard constructor of the Alice external volume
41 //
42 SetMarkerColor(7);
43 SetMarkerStyle(2);
44 SetMarkerSize(0.4);
45}
46
47//_____________________________________________________________________________
fe4da5cc 48void AliBODY::CreateGeometry()
49{
50 //
51 // Create the geometry of the Alice external body
52 //
53 //Begin_Html
54 /*
1439f98e 55 <img src="picts/AliBODYTree.gif">
fe4da5cc 56 */
57 //End_Html
58 //
59 // If the ZDC is present we have an asymmetric box
60 // made by a four sides polygone
61 //
62 //Begin_Html
63 /*
1439f98e 64 <img src="picts/AliBODYLarge.gif">
fe4da5cc 65 */
66 //End_Html
67 //
68 // If the ZDC is not present make just a BOX
69 //
70 //Begin_Html
71 /*
1439f98e 72 <img src="picts/AliBODYSmall.gif">
fe4da5cc 73 */
74 //End_Html
75
76 Float_t DALIC[10];
ad51aeb0 77 Int_t *idtmed = fIdtmed->GetArray()+1;
fe4da5cc 78 //
b8032157 79 if(gAlice->GetModule("ZDC")) {
fe4da5cc 80 //
81 // If the ZDC is present we have an asymmetric box
82 // made by a four sides polygone
83 //
84 DALIC[0]=45;
85 DALIC[1]=360;
86 DALIC[2]=4;
87 DALIC[3]=2;
88 DALIC[4]=-3000;
89 DALIC[5]=0;
90 DALIC[6]=2000;
91 DALIC[7]=15000;
92 DALIC[8]=0;
93 DALIC[9]=2000;
cfce8870 94 gMC->Gsvolu("ALIC","PGON",idtmed[1],DALIC,10);
fe4da5cc 95 } else {
96 //
97 // If the ZDC is not present make just a BOX
98 //
99 DALIC[0]=2000;
100 DALIC[1]=2000;
101 DALIC[2]=3000;
cfce8870 102 gMC->Gsvolu("ALIC","BOX ",idtmed[1],DALIC,3);
fe4da5cc 103 }
104}
105
106//_____________________________________________________________________________
107void AliBODY::CreateMaterials()
108{
109 Int_t ISXFLD = gAlice->Field()->Integ();
110 Float_t SXMGMX = gAlice->Field()->Max();
111 //
112 AliMaterial(1,"Vacuum $",1.e-16,1.e-16,1.e-16,1.e16,1.e16);
113 AliMaterial(2,"Air $",14.61,7.3,0.001205,30420,67500);
114 AliMaterial(3,"Be $", 9.01,4 ,1.848 ,35.30,36.70);
115 //
116 AliMedium(1,"Vacuum $",1,0,ISXFLD,SXMGMX,10,1,0.1,0.1,10);
117 AliMedium(2,"Air $",2,0,ISXFLD,SXMGMX,10,-1,-0.1,0.1 ,-10);
118 AliMedium(3,"Be pipe $",3,0,ISXFLD,SXMGMX,10,0.1,0.1,0.01,0.01);
119}
120
121//_____________________________________________________________________________
b8032157 122void AliBODY::DrawModule()
fe4da5cc 123{
124 //
125 // Draw a view of the Alice outside box
126 //
fe4da5cc 127 // Set everything unseen
cfce8870 128 gMC->Gsatt("*", "seen", -1);
fe4da5cc 129 //
130 // Set ALIC mother visible
cfce8870 131 gMC->Gsatt("ALIC","SEEN",1);
fe4da5cc 132 //
133 // Set the volumes visible
134 //
cfce8870 135 gMC->Gdopt("hide","off");
b8032157 136 if(gAlice->GetModule("ZDC")) {
fe4da5cc 137 //
138 // ZDC is present
139 //
cfce8870 140 gMC->DefaultRange();
141 gMC->Gdraw("alic", 40, 30, 0, 15, 10, .0014, .0014);
142 gMC->Gdhead(1111, "Aice Main body with Zero Degree Calorimeter");
fe4da5cc 143 } else {
144 //
145 // ZDC is not present
146 //
cfce8870 147 gMC->Gdraw("alic", 40, 30, 0, 10, 9, .0027, .0027);
148 gMC->Gdhead(1111, "Aice Main body");
fe4da5cc 149 }
cfce8870 150 gMC->Gdman(18, 4, "MAN");
fe4da5cc 151}
152
b8032157 153