Section 41. In sentencing a person for a violation of any provision of this chapter, the penalty for which includes imprisonment, a judge sitting in superior court or in a jury of six session who does not impose such sentence of imprisonment shall include in the record of the case specific reasons for not imposing a sentence of imprisonment. Notwithstanding any general or special law to the contrary, the record of such reasons shall be a public record.