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