]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STRUCT/AliBODY.cxx
Bigger volume for CRT.
[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.9  2002/06/20 15:33:13  morsch
19 Larger BOX in case CRT is present.
20
21 Revision 1.8  2000/10/02 21:28:15  fca
22 Removal of useless dependecies via forward declarations
23
24 Revision 1.7  2000/06/11 12:32:51  morsch
25 Coding rule violations corrected
26
27 Revision 1.6  1999/09/29 09:24:30  fca
28 Introduction of the Copyright and cvs Log
29
30 */
31
32 ///////////////////////////////////////////////////////////////////////////////
33 //                                                                           //
34 //  Alice external volume                                                    //
35 //  This class contains the description of the Alice external volume         //
36 //                                                                           //
37 //Begin_Html
38 /*
39 <img src="picts/AliBODYClass.gif">
40 </pre>
41 <br clear=left>
42 <font size=+2 color=red>
43 <p>The responsible person for this module is
44 <a href="mailto:andreas.morsch@cern.ch">Andreas Morsch</a>.
45 </font>
46 <pre>
47 */
48 //End_Html
49 //                                                                           //
50 //                                                                           //
51 ///////////////////////////////////////////////////////////////////////////////
52
53 #include "AliRun.h"
54 #include "AliMC.h"
55 #include "AliMagF.h"
56 #include "AliBODY.h"
57
58 ClassImp(AliBODY)
59  
60 //_____________________________________________________________________________
61 AliBODY::AliBODY()
62 {
63   //
64   // Default constructor
65   //
66 }
67  
68 //_____________________________________________________________________________
69 AliBODY::AliBODY(const char *name, const char *title)
70        : AliModule(name,title)
71 {
72   //
73   // Standard constructor of the Alice external volume
74   //
75   SetMarkerColor(7);
76   SetMarkerStyle(2);
77   SetMarkerSize(0.4);
78 }
79  
80 //_____________________________________________________________________________
81 void AliBODY::CreateGeometry()
82 {
83   //
84   // Create the geometry of the Alice external body
85   //
86   //Begin_Html
87   /*
88     <img src="picts/AliBODYTree.gif">
89   */
90   //End_Html
91   //
92   // If the ZDC is present we have an asymmetric box
93   // made by a four sides polygone
94   //  
95   //Begin_Html
96   /*
97     <img src="picts/AliBODYLarge.gif">
98   */
99   //End_Html
100   //
101   // If the ZDC is not present make just a BOX
102   //
103   //Begin_Html
104   /*
105     <img src="picts/AliBODYSmall.gif">
106   */
107   //End_Html
108
109   Float_t dALIC[10];
110   Int_t *idtmed = fIdtmed->GetArray()+1;
111   //
112   if(gAlice->GetModule("ZDC")) {
113     //
114     // If the ZDC is present we have an asymmetric box
115     // made by a four sides polygone
116     //
117     dALIC[0]=45;
118     dALIC[1]=360;
119     dALIC[2]=4;
120     dALIC[3]=2;
121     dALIC[4]=-3000;
122     dALIC[5]=0;
123     dALIC[6]=2000;
124     dALIC[7]=15000;
125     dALIC[8]=0;
126     dALIC[9]=2000;
127     gMC->Gsvolu("ALIC","PGON",idtmed[1],dALIC,10);
128   } else if ( gAlice->GetModule("CRT")) {
129     //
130     // If the Cosmic Ray Trigger  is present we need a large box
131     // 
132     //
133     dALIC[0]=13000.;
134     dALIC[1]=5000.;
135     dALIC[2]=13000.;
136     gMC->Gsvolu("ALIC","BOX ",idtmed[1],dALIC,3);
137       
138   } else {
139     //
140     // If the ZDC and CRT are not present make just a BOX
141     //
142     dALIC[0]=2000;
143     dALIC[1]=2000;
144     dALIC[2]=3000;
145     gMC->Gsvolu("ALIC","BOX ",idtmed[1],dALIC,3);
146   }
147 }
148  
149 //_____________________________________________________________________________
150 void AliBODY::CreateMaterials()
151 {
152 // Create materials and media
153   Int_t isxfld = gAlice->Field()->Integ();
154   Float_t sxmgmx = gAlice->Field()->Max();
155   //
156   AliMaterial(1,"Vacuum  $",1.e-16,1.e-16,1.e-16,1.e16,1.e16);
157   AliMaterial(2,"Air     $",14.61,7.3,0.001205,30420,67500);
158   AliMaterial(3,"Be      $", 9.01,4 ,1.848   ,35.30,36.70);
159   //
160   AliMedium(1,"Vacuum  $",1,0,isxfld,sxmgmx,10,1,0.1,0.1,10);
161   AliMedium(2,"Air     $",2,0,isxfld,sxmgmx,10,-1,-0.1,0.1 ,-10);
162   AliMedium(3,"Be pipe $",3,0,isxfld,sxmgmx,10,0.1,0.1,0.01,0.01);
163 }
164  
165 //_____________________________________________________________________________
166 void AliBODY::DrawModule()
167 {
168   //
169   // Draw a view of the Alice outside box
170   //
171   // Set everything unseen
172   gMC->Gsatt("*", "seen", -1);
173   // 
174   // Set ALIC mother visible
175   gMC->Gsatt("ALIC","SEEN",1);
176   //
177   // Set the volumes visible
178   //
179   gMC->Gdopt("hide","off");
180   if(gAlice->GetModule("ZDC")) {
181     //
182     // ZDC is present
183     //
184     gMC->DefaultRange();
185     gMC->Gdraw("alic", 40, 30, 0, 15, 10, .0014, .0014);
186     gMC->Gdhead(1111, "Aice Main body with Zero Degree Calorimeter");
187   } else {
188     //
189     // ZDC is not present
190     //
191     gMC->Gdraw("alic", 40, 30, 0, 10, 9, .0027, .0027);
192     gMC->Gdhead(1111, "Aice Main body");
193   }
194   gMC->Gdman(18, 4, "MAN");
195 }
196  
197