Feasibility study of cosmic-ray components measurement by using a scintillating fiber tracker in space