1. Introduction
2. Data
2.1. Photometry
2.2. Spectroscopy
2.3. SED fitting estimates
2.4. Galaxy density contrast
3. Environment and galaxy type classification
3.1. Galaxy environments
3.2. Classification of galaxy types
4. Stellar mass functions in different environments
4.1. Methods
4.2. Results
4.3. Comparison with previous work
5. Discussion
5.1. Comparison with semi-analytical models
5.2. An empirical approach
6. Conclusions