The electromagnetic calorimeter of the HERA-B experiment