Fix for sign of B field sign in the macro for vertex calculation (F. Prino)
authorprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 4 Sep 2009 16:36:01 +0000 (16:36 +0000)
committerprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 4 Sep 2009 16:36:01 +0000 (16:36 +0000)
ITS/DoVerticesSPD.C

index 0e92f38..acffded 100644 (file)
@@ -86,7 +86,7 @@ Bool_t DoVerticesSPD(Int_t pileupalgo=1, Int_t optdebug=0){
   }
   esd->ReadFromTree(tree);
   tree->GetEvent(0);
-  Int_t fieldkG=(Int_t)(esd->GetMagneticField()+0.001);
+  Int_t fieldkG=(Int_t)(TMath::Abs(esd->GetMagneticField())+0.001);
   
   if(fieldkG==5){
     TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 2, 1., 1., 10., AliMagF::k5kG));