Design and performance of the Calorimeter for the FOOT experiment