Monte Carlo computation of photon energy spectra in central axis of flattened and unflattened beams and doses in critical organs in a water phantom model of prostate radiotherapy