Fix for the loophole in the magnets currents check: the L3Off/DipON was passing the...
authorshahoian <shahoian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 15 Dec 2009 12:52:14 +0000 (12:52 +0000)
committershahoian <shahoian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 15 Dec 2009 12:52:14 +0000 (12:52 +0000)
STEER/AliMagF.cxx

index b8b03c7e3098b909e6a7abb1b8791012b800748b..a0fa318227dbf44b63fb633a73ddabbd5016915a 100644 (file)
@@ -473,12 +473,12 @@ AliMagF* AliMagF::CreateFieldMap(Float_t l3Cur, Float_t diCur, Int_t convention,
     }
   }
   //
-  if (sclDip!=0 && (map==k5kG || map==k2kG) &&
-      ((convention==kConvLHC     && l3Pol!=diPol) ||
-       (convention==kConvDCS2008 && l3Pol==diPol)) ) { 
-    AliErrorGeneral("AliMagF",Form("Wrong combination for L3/Dipole polarities (%c/%c) for convention %d",
-                                  l3Pol>0?'+':'-',diPol>0?'+':'-',GetPolarityConvention()));
-    return 0;
+  if (sclDip!=0 && map!=k5kGUniform) {
+    if ( (l3Cur<=zero) || ((convention==kConvLHC && l3Pol!=diPol) || (convention==kConvDCS2008 && l3Pol==diPol)) ) { 
+      AliErrorGeneral("AliMagF",Form("Wrong combination for L3/Dipole polarities (%c/%c) for convention %d",
+                                    l3Pol>0?'+':'-',diPol>0?'+':'-',GetPolarityConvention()));
+      return 0;
+    }
   }
   //
   if (l3Pol<0) sclL3  = -sclL3;