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