Geant4 based cosmic-ray background simulator for balloon experiments