Measurement of trapped and quasitrapped deuteron populations in PAMELA experiment