Monitoring of hadrontherapy treatments by means of charged particle detection