adding explicit initialization of the field map to cover the online case (Sergey)
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 20 Oct 2009 21:31:33 +0000 (21:31 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 20 Oct 2009 21:31:33 +0000 (21:31 +0000)
(the code is copied from TRD tracker component)

HLT/ITS/tracking/AliHLTITSTrackerComponent.cxx

index 01fb080..3ba8cef 100644 (file)
@@ -276,15 +276,26 @@ int AliHLTITSTrackerComponent::DoInit( int argc, const char** argv )
     AliGeomManager::LoadGeometry();
   }
 
-  fTracker = new AliITStrackerHLT(0);
-
   TString arguments = "";
   for ( int i = 0; i < argc; i++ ) {
     if ( !arguments.IsNull() ) arguments += " ";
     arguments += argv[i];
   }
 
-  return Configure( NULL, NULL, arguments.Data() );
+  int ret = Configure( NULL, NULL, arguments.Data() );
+
+  // set field
+  if (!TGeoGlobalMagField::Instance()->IsLocked()) {
+    AliMagF* field = new AliMagF("Maps","Maps",1.,1.,AliMagF::k5kG);
+    field->SetFactorSol(1);
+    Double_t initialFieldStrengh=field->SolenoidField();
+    field->SetFactorSol(fSolenoidBz/initialFieldStrengh); 
+    TGeoGlobalMagField::Instance()->SetField(field);  
+  }
+
+  fTracker = new AliITStrackerHLT(0);
+
+  return ret;
 }