Fixes for bug #52499: Field polarities inconsistiency
[u/mrichter/AliRoot.git] / prod / LHC08d17 / Config.C
index a49246d47c62ab0742983d2112fbdb79883d51ea..fad5ca80486e5bc3600da5efd48466df04565918 100644 (file)
@@ -19,7 +19,7 @@
 #include "STEER/AliConfig.h"
 #include "PYTHIA6/AliDecayerPythia.h"
 #include "PYTHIA6/AliGenPythia.h"
-#include "STEER/AliMagWrapCheb.h"
+#include "STEER/AliMagF.h"
 #include "STRUCT/AliBODY.h"
 #include "STRUCT/AliMAG.h"
 #include "STRUCT/AliABSOv3.h"
@@ -383,19 +383,20 @@ void Config()
 
   // FIELD
   //
-  AliMagWrapCheb* field = 0x0;
-  if (mag == kNoField) {
-    comment = comment.Append(" | L3 field 0.0 T");
-    field = new AliMagWrapCheb("Maps","Maps", 2, 0., 10., AliMagWrapCheb::k2kG);
-  } else if (mag == k5kG) {
-    comment = comment.Append(" | L3 field 0.5 T");
-    field = new AliMagWrapCheb("Maps","Maps", 2, 1., 10., AliMagWrapCheb::k5kG,
-                              kTRUE,"$(ALICE_ROOT)/data/maps/mfchebKGI_sym.root");
-  }
-  printf("\n \n Comment: %s \n \n", comment.Data());
-
-   rl->CdGAFile();
-   gAlice->SetField(field);
+  
+       AliMagF* field = 0x0;
+       if (mag == kNoField) {
+         comment = comment.Append(" | L3 field 0.0 T");
+         field = new AliMagF("Maps","Maps", 2, 0., 0., 10., AliMagF::k5kGUniform);
+       } else if (mag == k5kG) {
+         comment = comment.Append(" | L3 field 0.5 T");
+         field = new AliMagF("Maps","Maps", 2, -1., -1., 10., AliMagF::k5kG);
+       }
+       printf("\n \n Comment: %s \n \n", comment.Data());
+       TGeoGlobalMagField::Instance()->SetField(field);
+       
+       rl->CdGAFile();
+       gAlice->SetField(field);
 
        
        Int_t iABSO   = 1;