Monte Carlo Simulation for the Measurement of Charged Pion Lifetime