Monte Carlo code G3sim for simulation of plastic scintillator detectors with wavelength shifter fiber readout.