International audienceContext. Star-forming complexes are large structures exhibiting massive star-formation at different stages of evolution, from dense cores to well-developed H ii regions. They are very interesting for the study of the formation and evolution of stars. NGC 6334 and NGC 6357 are two active and relatively nearby star-forming complexes. From the extinction map and the sub-mm cold dust emission, and because they have similar velocities, these regions are most likely connected. However, located in the direction of the Galactic center their radial velocity is not representative of their distance. An alternative is then to determine the distance of NGC 6334 and NGC 6357 from their stellar content. Aims: Our aim is to perform a census of O-B3 ionising stars in NGC 6334 and NGC 6357, to determine the extinction coefficient, and the distance of both regions. A census of O-B3 stars is an essential basis for estimating the statistical lifetime of the earliest massive star-forming phases. Methods: We performed a U, B, V, and R photometric survey of a large area covering NGC 6334 and NGC 6357 with the VIMOS (ESO-VLT) and the MOSAIC (CTIO) instruments. This allows us to have a complete census of O to B3 stars up to V = 22.6 mag. The OB stars are selected based on their U - B and B - V colors. The most robust extinction coefficient is determined from color - color plots before computing the distance of the OB stars. Results: We find a higher value than typical of the diffuse interstellar medium for RV of 3.53 ± 0.08 and 3.56 ± 0.15 for NGC 6357 and NGC 6334, respectively. Adopting these RV values, the distances of NGC 6357 and NGC 6334 are 1.9 ± 0.4 kpc and 1.7 ± 0.3 kpc. We conclude that, within the error bars, both regions are thus at the same distance of 1.75 kpc (weighted mean). We confirm that the value of RV is linked to the large dust grain content. In particular, we found that there are more very small grains in NGC 6357 than in NGC 6334, suggesting that NGC 6357 could be more evolved than NGC 6334. Placed in the Galactic context, the NGC 6334-NGC 6357 complex appears to be located at the inner edge of the Sagittarius-Carina arm. Our census of O to B3 stars leads to a count of ~230, which allows us to determine the statistical lifetime of the earliest phases of the massive stars. The starless and the protostellar phases have a mean statistical lifetime of ~1.5 × 104 yr and ~2.2 × 105 yr, respectively. Based on observations made with the VIMOS instrument at the VLT-ESO. Based on visiting astronomer observations, at Cerro Tololo Inter-American Observatory, National Optical Astronomy Observatory, which is operated by the Association of Universities for Research in Astronomy, under contract with the National Science Foundation.Appendices are available in electronic form at http://www.aanda.orgFull Tables A.1 and A.2 are only available at the CDS via anonymous ftp to cdsarc.u-strasbg.fr (18.104.22.168) or via http://cdsarc.u-strasbg.fr/viz-bin/qcat?J/A+A/538/A14
To submit an update or takedown request for this paper, please submit an Update/Correction/Removal Request.