Other detectors track the particle (before it enters the calorimeter) and its track, through a magnetic field, gives the particle's momentum p and charge. From the relativistic relationship between energy, mass, and momentum, E2=p2c2+m2c4, where c is the speed of light, the mass of the particle, m, is determined. The mass and the charge uniquely identify the particle--e.g, hey, that was a proton! This particle identification (PID as we call it) is vital part of the data analysis.
Here is a picture of a new calorimeter being developed here at Jefferson Lab for our new Hall D experimental hall and suite of detectors.