Deep pellet fueling depth is necessary to achieve a high-density high confinement operation and to conduct some pellet-related researches in current devices, such as trigger of internal transport barrier, and to achieve high fusion power and tritium burn-up fraction in future fusion devices. The newly developed PAM code which can make a fast evaluation on pellet ablation and deposition is applied to optimize injection parameters to achieve deep pellet fueling. Systematic scans on pellet injection parameters including pellet injection positions, injection angles, sizes and speeds are performed for optimization purpose, while at the same time demonstrating flexibility and time efficiency of the PAM code. Dependences of the pellet fueling depth on these injection parameters are revealed by simulation results and analyzed. Simulation results indicate that pellet penetration contributes more to the deep pellet deposition than the ∇B -induced plasmoid drifts in low temperature plasmas, while deep pellet fueling in reactor relevant high temperature plasmas has to rely on plasmoid drifts. Though a shallow penetration is expected in high temperature plasmas, the ∇B -induced plasmoid drift is expected to be larger than that in relatively low temperature plasmas.