]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STRUCT/AliBODY.cxx
Position zch1 corrected (529 cm)
[u/mrichter/AliRoot.git] / STRUCT / AliBODY.cxx
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$
18 Revision 1.6  1999/09/29 09:24:30  fca
19 Introduction of the Copyright and cvs Log
20
21 */
22
23 ///////////////////////////////////////////////////////////////////////////////
24 //                                                                           //
25 //  Alice external volume                                                    //
26 //  This class contains the description of the Alice external volume         //
27 //                                                                           //
28 //Begin_Html
29 /*
30 <img src="picts/AliBODYClass.gif">
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
44 #include "AliRun.h"
45 #include "AliBODY.h"
46
47 ClassImp(AliBODY)
48  
49 //_____________________________________________________________________________
50 AliBODY::AliBODY()
51 {
52   //
53   // Default constructor
54   //
55 }
56  
57 //_____________________________________________________________________________
58 AliBODY::AliBODY(const char *name, const char *title)
59        : AliModule(name,title)
60 {
61   //
62   // Standard constructor of the Alice external volume
63   //
64   SetMarkerColor(7);
65   SetMarkerStyle(2);
66   SetMarkerSize(0.4);
67 }
68  
69 //_____________________________________________________________________________
70 void AliBODY::CreateGeometry()
71 {
72   //
73   // Create the geometry of the Alice external body
74   //
75   //Begin_Html
76   /*
77     <img src="picts/AliBODYTree.gif">
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   /*
86     <img src="picts/AliBODYLarge.gif">
87   */
88   //End_Html
89   //
90   // If the ZDC is not present make just a BOX
91   //
92   //Begin_Html
93   /*
94     <img src="picts/AliBODYSmall.gif">
95   */
96   //End_Html
97
98   Float_t dALIC[10];
99   Int_t *idtmed = fIdtmed->GetArray()+1;
100   //
101   if(gAlice->GetModule("ZDC")) {
102     //
103     // If the ZDC is present we have an asymmetric box
104     // made by a four sides polygone
105     //
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);
117   } else {
118     //
119     // If the ZDC is not present make just a BOX
120     //
121     dALIC[0]=2000;
122     dALIC[1]=2000;
123     dALIC[2]=3000;
124     gMC->Gsvolu("ALIC","BOX ",idtmed[1],dALIC,3);
125   }
126 }
127  
128 //_____________________________________________________________________________
129 void AliBODY::CreateMaterials()
130 {
131 // Create materials and media
132   Int_t isxfld = gAlice->Field()->Integ();
133   Float_t sxmgmx = gAlice->Field()->Max();
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   //
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);
142 }
143  
144 //_____________________________________________________________________________
145 void AliBODY::DrawModule()
146 {
147   //
148   // Draw a view of the Alice outside box
149   //
150   // Set everything unseen
151   gMC->Gsatt("*", "seen", -1);
152   // 
153   // Set ALIC mother visible
154   gMC->Gsatt("ALIC","SEEN",1);
155   //
156   // Set the volumes visible
157   //
158   gMC->Gdopt("hide","off");
159   if(gAlice->GetModule("ZDC")) {
160     //
161     // ZDC is present
162     //
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");
166   } else {
167     //
168     // ZDC is not present
169     //
170     gMC->Gdraw("alic", 40, 30, 0, 10, 9, .0027, .0027);
171     gMC->Gdhead(1111, "Aice Main body");
172   }
173   gMC->Gdman(18, 4, "MAN");
174 }
175  
176