]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STRUCT/AliMAG.cxx
Temporary reverting the changes introduced earlier to store the TGeo geometry. New...
[u/mrichter/AliRoot.git] / STRUCT / AliMAG.cxx
index 7f5d0c7f5d63d4fff5309161c9258f2ce6801314..b878b54a5c89d5aa1ccfd852d0a2c371762196f3 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/*
-$Log$
-Revision 1.9  2001/05/16 14:57:22  alibrary
-New files for folders and Stack
-
-Revision 1.8  2000/10/02 21:28:15  fca
-Removal of useless dependecies via forward declarations
-
-Revision 1.7  2000/06/11 12:35:56  morsch
-Coding rule violations corrected
-
-Revision 1.6  1999/09/29 09:24:30  fca
-Introduction of the Copyright and cvs Log
-
-*/
+/* $Id$ */
 
 ///////////////////////////////////////////////////////////////////////////////
 //                                                                           //
@@ -48,10 +34,11 @@ Introduction of the Copyright and cvs Log
 //                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
  
+#include <TVirtualMC.h>
+
 #include "AliMAG.h"
-#include "AliRun.h"
-#include "AliMC.h"
 #include "AliMagF.h"
+#include "AliRun.h"
  
 ClassImp(AliMAG)
  
@@ -109,7 +96,7 @@ void AliMAG::CreateGeometry()
   //  Define Mother 
   
   par[0] = 22.5;
-  par[1] = 337.5;
+  par[1] = 360.;
   par[2] = 8.;
   par[3] = 2.;
   par[4] = -600.;
@@ -176,7 +163,7 @@ void AliMAG::CreateGeometry()
   //     DOOR OPENING 
   
   dpar[0] = 22.5;
-  dpar[1] = 337.5;
+  dpar[1] = 360;
   dpar[2] = 8.;
   dpar[3] = 3.;
   dpar[4] = 610.;
@@ -213,7 +200,7 @@ void AliMAG::CreateGeometry()
   gMC->Gspos("L3FX", 1, "L3DX", 0., 0., 0., 0, "MANY");
   gMC->Gspos("L3IX", 1, "L3DX", 0., 0., 0., 0, "MANY");
 
-  if (gMC->GetMCGeomType() == kGeant3) {
+  if(!strcmp(gMC->GetName(),"TGeant3") || !strcmp(gMC->GetName(),"TFluka")) {
 
     gMC->Gspos("L3O1", 1, "L3FR", 0., 30., 0., 0, "MANY");
     gMC->Gspos("L3O2", 1, "L3IR", 0., 30., 0., 0, "MANY");
@@ -243,10 +230,17 @@ void AliMAG::CreateMaterials()
   
   Int_t   isxfld = gAlice->Field()->Integ();
   Float_t sxmgmx = gAlice->Field()->Max();
-  
   Float_t epsil, stmin, deemax, tmaxfd, stemax;
+
+
   // --- Define the various materials for GEANT --- 
   
+  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;
+
+
   //     Aluminum 
   AliMaterial(9, "Al$", 26.98, 13., 2.7, 8.9, 37.2);
   AliMaterial(29, "Al$", 26.98, 13., 2.7, 8.9, 37.2);
@@ -256,8 +250,8 @@ void AliMAG::CreateMaterials()
   AliMaterial(30, "Fe$", 55.85, 26., 7.87, 1.76, 17.1);
   
   //     Air 
-  AliMaterial(15, "Air$", 14.61, 7.3, .001205, 30420., 67500);
-  AliMaterial(35, "Air$", 14.61, 7.3, .001205, 30420., 67500);
+  AliMixture(15, "AIR$      ", aAir, zAir, dAir, 4, wAir);
+  AliMixture(35, "AIR$      ", aAir, zAir, dAir, 4, wAir);
   
   // **************** 
   //     Defines tracking media parameters. 
@@ -287,7 +281,7 @@ void AliMAG::CreateMaterials()
 }
 
 //_____________________________________________________________________________
-void AliMAG::DrawModule()
+void AliMAG::DrawModule() const
 {
   //
   // Draw a shaded view of the L3 magnet