I want to calculate the mass distribution of galaxies for each redshift. I have information about the redshift in each snapshot, but i can not find information about the masses of galaxies.
I did some tries using the field which refers to the "Masses" of gas(PartType0), but not successfully yet.
You want to use the "group catalog", in particular the subhalos. Each subhalo, assuming it has at least some stars, corresponds to a luminous galaxy (roughly speaking). Note that these include both central and satellite galaxies.
A galaxy can have many mass measurements/definitions. For instance, the field SubhaloMassInRadType is one we often use. The 0th entry gives gas mass, and the 4th entry stellar mass.
Ok, I understand