How can i get the material of the trace hit ?

you can set the physical material per MATERIAL you assign you do that in the material setup since you seem to use multible materials this should be the best way to deal with