Response to electrons and pions of the calorimeter for the CHORUS experiment