]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TFluka/macro/FlukaConfig.C
Extacting the OCDB in a separate module. The detectors have write permission in the...
[u/mrichter/AliRoot.git] / TFluka / macro / FlukaConfig.C
index c41cde79179b9c221cc02c5cfa25e203fba10ab3..ed73a617cd641638b0fd8060ac812583ad527e0b 100644 (file)
@@ -9,16 +9,10 @@ enum PprRad_t
     kGluonRadiation, kNoGluonRadiation
 };
                                                                                 
-enum PprMag_t
-{
-    k2kG, k4kG, k5kG
-};
-                                                                                
-                                                                                
 // This part for configuration
 static PprGeo_t sgeo = kHoles;
 static PprRad_t srad = kGluonRadiation;
-static PprMag_t smag = k5kG;
+static AliMagF::BMap_t smag = AliMagF::k5kG;
                                                                                 
 // Comment line
 static TString  comment;
@@ -26,7 +20,6 @@ static TString  comment;
 // Functions
 Float_t EtaToTheta(Float_t arg);
 
-
 void Config()
 {
   cout << "==> Config.C..." << endl;
@@ -60,7 +53,7 @@ void Config()
   }
   
   if(!AliCDBManager::Instance()->IsDefaultStorageSet()){
-      AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT");
+      AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
       AliCDBManager::Instance()->SetRun(0);
   }
 
@@ -153,11 +146,9 @@ void Config()
   //
 
 
-     if (smag == k2kG) {
+    if (smag == AliMagF::k2kG) {
         comment = comment.Append(" | L3 field 0.2 T");
-    } else if (smag == k4kG) {
-        comment = comment.Append(" | L3 field 0.4 T");
-    } else if (smag == k5kG) {
+    } else if (smag == AliMagF::k5kG) {
         comment = comment.Append(" | L3 field 0.5 T");
     }
                                                                                 
@@ -182,10 +173,10 @@ void Config()
                                                                                 
                                                                                 
 // Field (L3 0.4 T)
-    AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., smag);
+    AliMagF *field = new AliMagF("Maps","Maps", 2, 1., 1., 10., smag);
     field->SetL3ConstField(0); //Using const. field in the barrel
+    TGeoGlobalMagField::Instance()->SetField(field);
     rl->CdGAFile();
-    gAlice->SetField(field);
  
   Int_t   iABSO    = 0; 
   Int_t   iACORDE  = 0; 
@@ -380,7 +371,7 @@ void Config()
      if (iACORDE)
     {
         //=================== ACORDE parameters ============================
-        AliACORDE *ACORDE = new AliACORDEv0("ACORDE", "normal ACORDE");
+        AliACORDE *ACORDE = new AliACORDEv1("ACORDE", "normal ACORDE");
     }
 
      if (iVZERO)