Asymptotic Analysis of a Class of Minimization Problems in a Thin Multidomain