]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STRUCT/AliDIPOv2.cxx
Bug fix: savannah 99025
[u/mrichter/AliRoot.git] / STRUCT / AliDIPOv2.cxx
index f396510280beb3494e1d033ac52bf19a04a2ed0a..b6594a3bc260b131306fdaf8e282f09b7c9f6f51 100644 (file)
 //                                                                           //
 //                                                                           //
 
-#include <TVirtualMC.h>
+#include <TGeoManager.h>
+#include <TGeoGlobalMagField.h>
 #include <TGeoVolume.h>
+#include <TVirtualMC.h>
+#include <TArrayI.h>
 
 #include "AliConst.h"
 #include "AliDIPOv2.h"
@@ -614,7 +617,7 @@ void AliDIPOv2::CreateSpectrometerDipole()
   
   AliMatrix(idrotm[1811], 270., 0., 90., 90., 180., 0.);
   gMC->Gspos("DDIP", 1, "ALIC", 0., 0., 0., idrotm[1811], "ONLY");
-  gMC->Gsatt("DDIP", "SEEN", 0);
+  gGeoManager->SetVolumeAttribute("DDIP", "SEEN", 0);
 }
 
 
@@ -650,7 +653,7 @@ void AliDIPOv2::CreateCompensatorDipole()
     Float_t pbox[3];
 //  Mother volumes
     TGeoVolumeAssembly* asDCM0 = new TGeoVolumeAssembly("DCM0");
-    gMC->Gsatt ("DCM0", "SEEN", 0);
+    asDCM0->SetName("DCM0");
     
 //
 //  Mother volume containing lower coil
@@ -802,53 +805,6 @@ void AliDIPOv2::CreateCompensatorDipole()
     gMC->Gspos("DCM0", 1, "ALIC",  0., -12.,  1075., idrotm[1816], "ONLY");
 }
 
-//_____________________________________________________________________________
-void AliDIPOv2::DrawModule() const
-{
-  //
-  // Draw a shaded view of the muon absorber
-  //
-
-  // Set everything unseen
-  gMC->Gsatt("*", "seen", -1);
-  // 
-  // Set ALIC mother transparent
-  gMC->Gsatt("ALIC","SEEN",0);
-  //
-  // Set the volumes visible
-  gMC->Gsatt("DDIP","seen",0);
-  gMC->Gsatt("DC1 ","seen",1);
-  gMC->Gsatt("DC2 ","seen",1);
-  gMC->Gsatt("DC3 ","seen",1);
-  gMC->Gsatt("DC4 ","seen",1);
-  gMC->Gsatt("DC11","seen",1);
-  gMC->Gsatt("DC21","seen",1);
-  gMC->Gsatt("DC12","seen",1);
-  gMC->Gsatt("DC22","seen",1);
-  gMC->Gsatt("DL1 ","seen",1);
-  gMC->Gsatt("DL2 ","seen",1);
-  gMC->Gsatt("DY1 ","seen",1);
-  gMC->Gsatt("DY2 ","seen",1);
-  gMC->Gsatt("DYL ","seen",1);
-  gMC->Gsatt("DY3 ","seen",1);
- // gMC->Gsatt("DY4 ","seen",1);
- // gMC->Gsatt("DY5 ","seen",1);
- // gMC->Gsatt("DY6 ","seen",1);
-//  gMC->Gsatt("DY7 ","seen",1);
-  //
-  gMC->Gdopt("hide", "on");
-  gMC->Gdopt("shad", "on");
-  gMC->Gsatt("*", "fill", 7);
-  gMC->SetClipBox(".");
-  gMC->SetClipBox(".");
-  gMC->DefaultRange();
-  gMC->Gdraw("alic", 30, 30, 0, 17, 13.5, .019, .019);
-  gMC->Gdhead(1111, "Magnetic Dipole Version 2");
-  gMC->Gdman(16, 4, "MAN");
-}
-
-
-
 
 //_____________________________________________________________________________
 void AliDIPOv2::CreateMaterials()
@@ -857,9 +813,9 @@ void AliDIPOv2::CreateMaterials()
   // Create Materials for Magnetic Dipole version 2
   //
   
-  Int_t isxfld1   = gAlice->Field()->Integ();
-  Int_t isxfld2   = gAlice->Field()->PrecInteg();
-  Float_t sxmgmx  = gAlice->Field()->Max();
+  Int_t isxfld1   = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Integ();
+  Int_t isxfld2   = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->PrecInteg();
+  Float_t sxmgmx  = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Max();
   
   
   Float_t asteel[4] = { 55.847,51.9961,58.6934,28.0855 };