-//-----------------------------------------------------------------------
-void Prepare()
-{
- /// Set the geometry, the magnetic field, the mapping and the reconstruction parameters
-
- // Import TGeo geometry (needed by AliMUONTrackExtrap::ExtrapToVertex)
- if (!gGeoManager) {
- AliGeomManager::LoadGeometry("geometry.root");
- if (!gGeoManager) {
- Error("MUONRefit", "getting geometry from file %s failed", "generated/galice.root");
- return;
- }
- }
-
- // set mag field
- printf("Loading field map...\n");
- AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 1, 1., 10., AliMagFMaps::k5kG);
- AliTracker::SetFieldMap(field, kFALSE);
- AliMUONTrackExtrap::SetField(AliTracker::GetFieldMap());
-
- // Load mapping
- AliCDBManager* man = AliCDBManager::Instance();
- man->SetDefaultStorage("local://$ALICE_ROOT");
- man->SetRun(0);
- if ( ! AliMpCDB::LoadDDLStore() ) {
- Error("MUONRefit","Could not access mapping from OCDB !");
- exit(-1);
- }
-
- // set reconstruction parameters
- AliMUONRecoParam *muonRecoParam = AliMUONRecoParam::GetLowFluxParam();
- muonRecoParam->CombineClusterTrackReco(kFALSE);
- muonRecoParam->Print("FULL");
- AliRecoParam::Instance()->RegisterRecoParam(muonRecoParam);
-
-}
-