Fixing problems dscovered by test/gun
[u/mrichter/AliRoot.git] / prod / LHC08d15 / Config.C
index a49246d47c62ab0742983d2112fbdb79883d51ea..2b430bacbf0a20dec4a4b455b71160a0c3427b7d 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"
@@ -203,7 +203,7 @@ void Config()
        gAlice->SetRunLoader(rl);
        
        // Set the trigger configuration
-       gAlice->SetTriggerDescriptor(TrigConfName[trig]);
+       AliSimulation::Instance()->SetTriggerConfig(TrigConfName[trig]);
        cout<<"Trigger configuration is set to  "<<TrigConfName[trig]<<endl;
        
        //
@@ -383,17 +383,19 @@ void Config()
 
   // FIELD
   //
-  AliMagWrapCheb* field = 0x0;
+
+  AliMagWrapCheb* field = 0x0;  
+  AliMagF* field = 0x0;
   if (mag == kNoField) {
     comment = comment.Append(" | L3 field 0.0 T");
-    field = new AliMagWrapCheb("Maps","Maps", 2, 0., 10., AliMagWrapCheb::k2kG);
+    field = new AliMagF("Maps","Maps", 0., 0., AliMagF::k5kGUniform);
   } 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");
+    field = new AliMagF("Maps","Maps", -1., -1., AliMagF::k5kG);
   }
   printf("\n \n Comment: %s \n \n", comment.Data());
-
+  TGeoGlobalMagField::Instance()->SetField(field);
+    
    rl->CdGAFile();
    gAlice->SetField(field);