When directed by the court, the probation department shall make an investigation and take into consideration the defendant's age, employment and service records, educational background, community and family ties, prior controlled substance use, treatment history, if any, demonstrable motivation, and other mitigating factors in determining whether the defendant is a person who would be benefited by