AMS02 is a particle physics detector designed for 3 years of data taking abroad the International Space Station. Equipped with a superconducting magnet, it will allow to measure gamma and cosmic ray fluxes in the GeV to TeV region with high particle identification capabilities. Its performance is based on the redundancy of measurements in specific sub-detectors : a Time-Of-Flight counter, a Transition Radiation Detector, a Silicon Tracker, a Ring Imaging CHerenkov counter and an Electromagnetic calorimeter (Ecal).The Ecal is studied in details, in particular with the qualification of a stand-alone trigger devoted to gamma ray astronomy. This system allows to increase the AMS02 sensitivity photons, and to improve the reconstruction of electr...