A phenomenological model to study the energy discrimination potential of GEM detectors in the X-ray range