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