]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STRUCT/AliBODY.cxx
//
[u/mrichter/AliRoot.git] / STRUCT / AliBODY.cxx
index 35f40c00749c50952d0c9961f83a046e1c7e70df..3347e42fbf37116405e860cfb29e3b701a6ecaa1 100644 (file)
@@ -1,3 +1,20 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/* $Id$ */
+
 ///////////////////////////////////////////////////////////////////////////////
 //                                                                           //
 //  Alice external volume                                                    //
@@ -5,7 +22,7 @@
 //                                                                           //
 //Begin_Html
 /*
-<img src="gif/AliBODYClass.gif">
+<img src="picts/AliBODYClass.gif">
 </pre>
 <br clear=left>
 <font size=+2 color=red>
 //                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
 
-#include "AliRun.h"
+#include <TGeoGlobalMagField.h>
+#include <TVirtualMC.h>
+#include <TArrayI.h>
+
 #include "AliBODY.h"
+#include "AliMagF.h"
+#include "AliRun.h"
 
 ClassImp(AliBODY)
  
@@ -39,9 +61,9 @@ AliBODY::AliBODY(const char *name, const char *title)
   //
   // Standard constructor of the Alice external volume
   //
-  SetMarkerColor(7);
-  SetMarkerStyle(2);
-  SetMarkerSize(0.4);
+  //PH  SetMarkerColor(7);
+  //PH  SetMarkerStyle(2);
+  //PH  SetMarkerSize(0.4);
 }
  
 //_____________________________________________________________________________
@@ -52,7 +74,7 @@ void AliBODY::CreateGeometry()
   //
   //Begin_Html
   /*
-    <img src="gif/AliBODYTree.gif">
+    <img src="picts/AliBODYTree.gif">
   */
   //End_Html
   //
@@ -61,7 +83,7 @@ void AliBODY::CreateGeometry()
   //  
   //Begin_Html
   /*
-    <img src="gif/AliBODYLarge.gif">
+    <img src="picts/AliBODYLarge.gif">
   */
   //End_Html
   //
@@ -69,88 +91,61 @@ void AliBODY::CreateGeometry()
   //
   //Begin_Html
   /*
-    <img src="gif/AliBODYSmall.gif">
+    <img src="picts/AliBODYSmall.gif">
   */
   //End_Html
 
-  Float_t DALIC[10];
-  Int_t *idtmed = gAlice->Idtmed();
-  AliMC *pMC = AliMC::GetMC();
+  Float_t dALIC[10];
+  Int_t *idtmed = fIdtmed->GetArray()+1;
   //
   if(gAlice->GetModule("ZDC")) {
     //
-    // If the ZDC is present we have an asymmetric box
-    // made by a four sides polygone
+    dALIC[0]=2500.;
+    dALIC[1]=2500.;
+    dALIC[2]=15000.;
+    gMC->Gsvolu("ALIC","BOX ",idtmed[1],dALIC,3);
+  } else if ( gAlice->GetModule("ACORDE")) {
+    //
+    // If the Cosmic Ray Trigger  is present we need a large box
+    // 
     //
-    DALIC[0]=45;
-    DALIC[1]=360;
-    DALIC[2]=4;
-    DALIC[3]=2;
-    DALIC[4]=-3000;
-    DALIC[5]=0;
-    DALIC[6]=2000;
-    DALIC[7]=15000;
-    DALIC[8]=0;
-    DALIC[9]=2000;
-    pMC->Gsvolu("ALIC","PGON",idtmed[1],DALIC,10);
+    dALIC[0]=13000.;
+    dALIC[1]=5000.;
+    dALIC[2]=13000.;
+    gMC->Gsvolu("ALIC","BOX ",idtmed[1],dALIC,3);
+      
   } else {
     //
-    // If the ZDC is not present make just a BOX
+    // If the ZDC and ACORDE are not present make just a BOX
     //
-    DALIC[0]=2000;
-    DALIC[1]=2000;
-    DALIC[2]=3000;
-    pMC->Gsvolu("ALIC","BOX ",idtmed[1],DALIC,3);
+    dALIC[0]=2000;
+    dALIC[1]=2000;
+    dALIC[2]=3000;
+    gMC->Gsvolu("ALIC","BOX ",idtmed[1],dALIC,3);
   }
 }
  
 //_____________________________________________________________________________
 void AliBODY::CreateMaterials()
 {
-  Int_t ISXFLD = gAlice->Field()->Integ();
-  Float_t SXMGMX = gAlice->Field()->Max();
-  //
-  AliMaterial(1,"Vacuum  $",1.e-16,1.e-16,1.e-16,1.e16,1.e16);
-  AliMaterial(2,"Air     $",14.61,7.3,0.001205,30420,67500);
-  AliMaterial(3,"Be      $", 9.01,4 ,1.848   ,35.30,36.70);
-  //
-  AliMedium(1,"Vacuum  $",1,0,ISXFLD,SXMGMX,10,1,0.1,0.1,10);
-  AliMedium(2,"Air     $",2,0,ISXFLD,SXMGMX,10,-1,-0.1,0.1 ,-10);
-  AliMedium(3,"Be pipe $",3,0,ISXFLD,SXMGMX,10,0.1,0.1,0.01,0.01);
-}
-//_____________________________________________________________________________
-void AliBODY::DrawModule()
-{
-  //
-  // Draw a view of the Alice outside box
-  //
-  AliMC* pMC = AliMC::GetMC();
+// Create materials and media
+  Int_t isxfld = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Integ();
+  Float_t sxmgmx = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Max();
   
-  // Set everything unseen
-  pMC->Gsatt("*", "seen", -1);
-  // 
-  // Set ALIC mother visible
-  pMC->Gsatt("ALIC","SEEN",1);
-  //
-  // Set the volumes visible
+  // AIR
+
+  Float_t aAir[4]={12.0107,14.0067,15.9994,39.948};
+  Float_t zAir[4]={6.,7.,8.,18.};
+  Float_t wAir[4]={0.000124,0.755267,0.231781,0.012827};
+  Float_t dAir = 1.20479E-3 * 960./1014.;
+  Float_t dAir1 = 1.20479E-10;
+  //
+  AliMixture(1,"Vacuum  $",aAir,zAir,dAir1,4,wAir);
+  AliMixture(2,"Air     $",aAir,zAir,dAir,4,wAir);
+  AliMaterial(3,"Be      $", 9.01,4 ,1.848   ,35.30,36.70);
   //
-  pMC->Gdopt("hide","off");
-  if(gAlice->GetModule("ZDC")) {
-    //
-    // ZDC is present
-    //
-    pMC->DefaultRange();
-    pMC->Gdraw("alic", 40, 30, 0, 15, 10, .0014, .0014);
-    pMC->Gdhead(1111, "Aice Main body with Zero Degree Calorimeter");
-  } else {
-    //
-    // ZDC is not present
-    //
-    pMC->Gdraw("alic", 40, 30, 0, 10, 9, .0027, .0027);
-    pMC->Gdhead(1111, "Aice Main body");
-  }
-  pMC->Gdman(18, 4, "MAN");
+  AliMedium(1,"Vacuum  $",1,0,isxfld,sxmgmx,10,1,0.1,0.1,10);
+  AliMedium(2,"Air     $",2,0,isxfld,sxmgmx,10,-1,-0.1,0.1 ,-10);
+  AliMedium(3,"Be pipe $",3,0,isxfld,sxmgmx,10,0.1,0.1,0.01,0.01);
 }
  
-