Simulation of MSGC signals and application to the front-end electronics for LHC experiments