Disclosed is a beam shaping assembly, including a beam inlet; a target, wherein the target has nuclear reaction with the incident proton beam; a moderator adjoining to the target, wherein the neutrons are moderated by the moderator to epithermal neutrons; a reflector surrounding the moderator, and leads the deflected neutrons back to the moderator to enhance the epithermal neutron beam intensity; and a cooling system, wherein the cooling system comprises a first cooling part for cooling target, a second cooling part and a third cooling part connecting with the first cooling part and extending in a direction parallel to the axis of the accelerating tube respectively, the first cooling part connects with the target in a face to face manner, the cooling medium is inputted into the first cooling part from the second cooling part and is outputted from first cooling part through the third cooling part.