Event generation for beam dump experiments