(a) Unless waived by the State’s Attorney and defense counsel, before sentencing a defendant who is required to register under § 11–704 of this subtitle for a violation of § 3–602 of the Criminal Law Article, the court shall order the defendant to submit to:
(1) a presentence investigation conducted by the Division of Parole and Probation; and
(2) a mental health assessment, including whether the defendant is a danger to self or others, conducted by a qualified mental health professional employed or engaged by the Maryland Department of Health.
(b) The court shall consider the presentence investigation and mental health evaluation when sentencing the defendant.