GetBZ (using in real tracking) was returning hardwired 5kGauss for +30kA etc. Changed...
authorshahoian <shahoian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 8 Jun 2009 15:38:34 +0000 (15:38 +0000)
committershahoian <shahoian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 8 Jun 2009 15:38:34 +0000 (15:38 +0000)
STEER/AliMagF.cxx
STEER/AliMagF.h

index 7185213..c99e898 100644 (file)
@@ -92,26 +92,20 @@ AliMagF::AliMagF(const char *name, const char* title, Int_t integ,
   //
   const char* parname = 0;
   //  
-  if (fMapType == k2kG) {
-    fSolenoid = 2.;
-    parname = fDipoleOFF ? "Sol12_Dip0_Hole":"Sol12_Dip6_Hole";
-  } else if (fMapType == k5kG) {
-    fSolenoid = 5.;
-    parname = fDipoleOFF ? "Sol30_Dip0_Hole":"Sol30_Dip6_Hole";
-  } else if (fMapType == k5kGUniform) {
-    fSolenoid = 5.;
-    parname = "Sol30_Dip6_Uniform";
-  } else {
-    AliFatal(Form("Unknown field identifier %d is requested\n",fMapType)); 
-  }
+  if      (fMapType == k2kG) parname = fDipoleOFF ? "Sol12_Dip0_Hole":"Sol12_Dip6_Hole";
+  else if (fMapType == k5kG) parname = fDipoleOFF ? "Sol30_Dip0_Hole":"Sol30_Dip6_Hole";
+  else if (fMapType == k5kGUniform) parname = "Sol30_Dip6_Uniform";
+  else AliFatal(Form("Unknown field identifier %d is requested\n",fMapType));
   //
   SetDataFileName(path);
   SetParamName(parname);
   //
-  SetFactorSol(factorSol);
-  SetFactorDip(factorDip);
   LoadParameterization();
   InitMachineField(fBeamType,fBeamEnergy);
+  double xyz[3]={0.,0.,0.};
+  fSolenoid = GetBz(xyz);
+  SetFactorSol(factorSol);
+  SetFactorDip(factorDip);
 }
 
 //_______________________________________________________________________
index 7b7df43..b7694b3 100644 (file)
@@ -53,7 +53,7 @@ class AliMagF : public TVirtualMagField
   Double_t     Max()                                            const {return fMax;}
   Int_t        Integ()                                          const {return fInteg;}
   Int_t        PrecInteg()                                      const {return fPrecInteg;}  
-  Double_t     SolenoidField()                                  const {return -fFactorSol*fSolenoid;}
+  Double_t     SolenoidField()                                  const {return fFactorSol*fSolenoid;}
   //
   Char_t*      GetDataFileName()                                const {return (Char_t*)fParNames.GetName();}
   Char_t*      GetParamName()                                   const {return (Char_t*)fParNames.GetTitle();}