; and (B) by inserting after the subsection (c) the following new subsection (d): (d) Referral to Office of the Chief Prosecutor (1) In the case of a charge relating to a sex-related offense, in addition to referring the charge to the staff judge advocate under subsection (a), the convening authority shall refer, as soon as reasonably practicable, the charge to the Office of the Chief Prosecutor of the armed force of which the accused is a member to make the determination required by paragraph (3). The actions of the Office of the Chief Prosecutor under this subsection whether or not to try charges by court-martial shall be free of unlawful or unauthorized influence or coercion. (2) For purposes of this subsection, the term sex-related offense means any of the following: (A) An offense covered by section 920, 920a, 920b, 920c, or 920d of this title (article 120, 120a, 120b, 120c, or 120d). (B) A conspiracy to commit an offense specified in subparagraph (A) as punishable under section 881 of this title (article 81). (C) A solicitation to commit an offense specified in subparagraph (A) as punishable under section 882 of this title (article 82). (D) An attempt to commit an offense specified in subparagraphs (A) through (C) as punishable under section 880 of this title (article 80). (3) The Office of the Chief Prosecutor shall make a determination regarding whether a charge relating to a sex-related offense should be referred to trial. If the Office of the Chief Prosecutor makes a determination to try the charge by court-martial, the Office of the Chief Prosecutor also shall determine whether to try the charge by a general court-martial convened under section 822 of this title (article 22) or a special court-martial convened under section 823 of this title (article 23). (4) A determination under paragraph (3) to try a charge relating to a sex-related offense by court-martial shall include a determination to try all known offenses, including lesser included offenses. (5) The determination to try a charge relating to a