A large electromagnetic shower detector with high rejection power against pions