Programs within the formal criminal justice system that provide facilities for the detention of people who have been charged with a crime and are awaiting trial, and/or the confinement, treatment, employment, training and discipline of people who have been sentenced to imprisonment after conviction for a criminal offense.