Modeling the chemical impact and the optical emissions produced by lightning-induced electromagnetic fields in the upper atmosphere: the case of halos and elves triggered by different lightning discharges