Initialization of magnetic field fixed
authorprsnko <Dmitri.Peressounko@cern.ch>
Sun, 1 Jun 2014 11:05:29 +0000 (15:05 +0400)
committerprsnko <Dmitri.Peressounko@cern.ch>
Sun, 1 Jun 2014 12:14:32 +0000 (16:14 +0400)
ANALYSIS/TenderSupplies/AliPHOSTenderSupply.cxx
PWGGA/PHOSTasks/PHOS_PbPb/AddAODPHOSTender.C

index 0d1dd1c..ac77835 100644 (file)
@@ -463,6 +463,7 @@ void AliPHOSTenderSupply::FindTrackMatching(Int_t mod,TVector3 *locpos,
   if(magF<0)magSign = -1.0;
   
   if (!TGeoGlobalMagField::Instance()->GetField()) {
+    AliError("Margnetic filed was not initialized, use default") ;
     AliMagF* field = new AliMagF("Maps","Maps", magSign, magSign, AliMagF::k5kG);
     TGeoGlobalMagField::Instance()->SetField(field);
   }
index bf2733d..f8d461a 100644 (file)
@@ -32,6 +32,10 @@ AliPHOSTenderTask* AddAODPHOSTender(const char* taskName = "PHOSTenderTask",
   if(isMC) //handle MC data
     PHOSSupply->SetMCProduction(options) ;
 
+
+  //Need MagFeild
+  ((AliInputEventHandler*)mgr->GetInputEventHandler())->SetNeedField(kTRUE);
+
   mgr->AddTask(tenderTask);
 
   // Connect input/output