(a) General rule.--Notwithstanding any other statute, rule or provision of law to the contrary, in the trial of a defendant accused of an offense, including an offense subject to sentence under section 9711 (relating to sentencing procedure for murder of the first degree), a court shall not order the exclusion of any victim of the offense from the trial on the basis that the victim may, during the sentencing phase of the proceedings:
(1) make a victim impact statement or present any victim impact information in relation to the sentence to be imposed on the defendant; or
(2) testify as to the effect of the offense on the victim or the family of the victim.
(b) Definition.--As used in this section, the term "victim" shall mean a "victim" as defined in:
(1) 18 Pa.C.S. § 1106 (relating to restitution for injuries to person or property); or
(2) 18 Pa.C.S. § 3001 (relating to definitions).