the police detective was grooming an informant , gaining the chaps confidence and paving the way towards a very public trial on a charge that would shred the doctors reputation for all time and see him in the state penitentiary .