OB stars and YSO populations in the region of NGC 6334–NGC 6357 as seen with Gaia DR2

Aims. Our goal is to better understand the origin and the star-formation history of regions NGC6334 and NGC6357. We focus our study on the kinematics of young stars (young stellar objects and OB stars) in both regions mainly on the basis of the Gaia DR2 data. Methods. For both regions, we compiled catalogs of OB stars and young stellar objects from the literature and complemented them using VPHAS + DR2 and Spitzer IRAC / GLIMPSE photometry catalogues. We applied a cross-match with the Gaia DR2 catalog to obtain information on the parallax and transverse motion. Results. We conﬁrm that NGC6334 and NGC6357 are in the far side of the Saggitarius-Carina arm at a distance of 1.76kpc. For NGC6357, OB stars show strong clustering and ordered star motion with Vlon ∼ –10.7kms − 1 and Vlat ∼ 3.7kms − 1 , whereas for NGC6334, no signiﬁcant systemic motion was observed. The OB stars motions and distribution in NGC6334 suggest that it should be classiﬁed as an association. Ten runaway candidates may be related to NGC6357 and two to NGC6334, respectively. The spatial distributions of the runaway candidates in and around NGC6357 favor a dynamical (and early) ejection during the cluster(s) formation. Because such stars are likely to be ejected during a cluster’s formation, the fact that not as many such stars are observed towards NGC6334 suggests di ﬀ erent formation conditions than have been assumed for NGC6357.


Introduction
NGC 6334 and NGC 6357 are two well-studied Galactic, highmass, star-forming regions (see Fig. 1). Because they share the same velocity (Caswell & Haynes 1987), it has been proposed that they can be found at the same distance. However, they show very different morphologies and star-forming histories (e.g., Tigé et al. 2017;Russeil et al. 2019). Based on cold-dust 1.2 mm continuum emission (Russeil et al. 2010) and 13 CO (J = 2−1) line emission (Zernickel 2015), the two regions seem to be connected by a ∼50 pc long filament. For this reason, it has been proposed that the massive star-formation that is observed in these two regions could have been triggered by a cloud-cloud collision process (Fukui et al. 2018a).
NGC 6334 is composed of a very dense and massive filament (André et al. 2016), known as a ridge, which shows a velocity gradient from its ends toward the center (Zernickel et al. 2013). Inside the ridge, a number of fiber-like velocity coherent sub-structures and compact dense cores have been identified (Shimajiri et al. 2019). In addition, seven sites of recent highmass star formation have also been observed (e.g., Loughran et al. 1986), recognizable in terms of water masers, H ii regions (e.g., Carral et al. 2002), and molecular outflows, while six other optical H ii regions are located at both sides of the ridge (Persi et al. 2008) underlying previous high-mass star forma-Full Table B.1 is only available at the CDS via anonymous ftp to cdsarc.u-strasbg.fr (130.79.128.5) or via http://cdsarc. u-strasbg.fr/viz-bin/cat/J/A+A/642/A21 tion. In NGC 6357, no such molecular ridge has been observed, but a large cavity of ionized gas is present, suggesting that the parental molecular cloud has largely been consumed or impacted by OB stars (e.g., Lortet et al. 1984). These differences among both regions, despite their formation from a common filamentary structure, suggest they have evolved in different ways.
In NGC 6357, OB stars are mainly found in the star clusters: Pismis 24 (Pišmiš 1959) and AH03J1525-34.4 (Dias et al. 2002, while in NGC 6334, there are twelve embedded stellar clusters that have been identified (Morales et al. 2013), as shown in Fig. 1. By combining the distance of the young clusters and the spectro-photometric distance of the more disagreggated OB stars, a mean distance of 1.75 kpc was found by Russeil et al. (2017), however, based on the maser parallax of the very young massive star-forming NGC 6334I(N), Chibueze et al. (2014) suggest a distance of 1.35 kpc. In NGC 6357, young stellar objects (YSOs) are mainly found in clusters, the most numerous being Pismis 24 (e.g., Fang et al. 2012), while in NGC 6334, YSOs are distributed throughout the ridge, being more numerous toward its north-east end (Willis et al. 2013). The difference between both regions is also evident from the YSO's age as Getman et al. (2014) have noted an age gradient between 0.7 and 2.3 Myr from north-east to south-west along the ridge, while no such gradient is observed in NGC 6357 (with a mean age of 1.3 Myr).
Our goal is to better understand and to compare the origin and the star-formation history of the regions NGC 6334 and NGC 6357. Because young stars are expected to still keep the imprint of their birthplace kinematics, we focus our study on the young stars' (young stellar objects and OB stars) kinematics in  Morales et al. (2013). The red dashed line displays the coverage of the VPHAS+DR2 survey (areas above the line where not yet observed in the DR2 release). The delimitation area of the regions NGC 6357, NGC 6334 and GM 24 are shown as cyan rectangles. We also note that the Spitzer IRAC survey does not cover galactic latitudes larger than 1.1 • .
both regions mainly based on the Gaia DR2 data. The kinematics of the ionized (Russeil et al. 2016) and molecular gas (André et al. 2016;Zernickel et al. 2013) have been extensively studied before. In this study, we use Gaia DR2 (Gaia Collaboration 2018) proper-motion data to determine if any of the systematic motions of the YSO and OB stellar populations can be used to better understand the star-formation history of these regions. Already, for NGC 6357, Gvaramadze et al. (2011) identified, based on previous astrometric measurements, runaway stars (and their bowshock features), which are important for probing the dynamics of the native condition for massive stars. In the following, we delineate the studied regions as shown in Fig. 1. The spatial limits of the each region is mainly based on the Hα (ionized gas) extension. NGC 6357 coverage is 352.7 • ≤ l ≤ 353.7 • and 0.27 • ≤ b ≤ 1.6 • , for NGC 6334 it is 350.8 • ≤ l ≤ 351.6 • and 0.24 and for GM1-24 (a H ii region centered at l, b ∼ 350.5 • , 0.96 • ), it is 350.2 • ≤ l < 350.8 • and 0.74 • ≤ b ≤ 1.14 • . This paper is organized as follows. In Sect. 2, we present the Gaia DR2 data, the selection criteria used, and the calculated quantities. In Sects. 3 and 4, we present our OB star and YSO samples and we discuss the results in Sect. 5. Section 6 is devoted to the conclusion.
The samples discussed in this paper come from optical data (ESO-VLT VIMOS and VPHAS+ DR2) and the infrared Spitzer IRAC/GLIMPSE survey. The typical seeing was 1.1 and 0.9 and the pixel size was 0.205 and 0.21 for the ESO-VLT VIMOS and VPHAS+ DR2, respectively, while for Spitzer IRAC/GLIMPSE the typical point spread function is 1.8 (Fazio et al. 2004) and pixel size is 0.6 . In parallel, to evaluate the effect of proper motions on the cross-match with Gaia DR2 data, we retrieved the Gaia DR2 sources within a typical cone with a radius of 10 (size chosen to ensure a statistically representative sample) centered on NGC 6334 and NGC 6357 and we transform Gaia J2015.5 coordinates into J2000 (using the dedicated TOPCAT tool). We find a mean separation between J2015.5 and J2000 coordinates of 0.0553 and 0.0558 for NGC 6334 and NGC 6357, respectively, with a maximum separation of 0.85 . This suggests a tolerance radius of 0.7 for the optical data and 1.3 for Spitzer IRAC/GLIMPSE. We also retrieved the Gaia DR2 sources within a cone with radius of 30 (size allowing to probe correctly a representative surface density of the sources) centered on NGC 6334 and NGC 6357 from which we evaluate a mean distance between the sources of 0.8 and 1.4 for a 1 and 2 cone search, respectively. In addition, we estimate that 1.3% of the Gaia sources have at least one neighbor within 1 against 7% within a 2 cone search. Thus, a tolerance radius of 1 seems to be a good compromise between the input data astrometric precision and the typical Gaia sources density in our field. This leads us to do the best cross-matching with the Gaia DR2 catalog, adopting a tolerance radius of 1 . Lindegren et al. (2018) reported a systematic shift in the Gaia DR2 parallaxes corresponding to a zero-point correction of −0.03 mas. However, studies of different types of Galactic objects give zero-point offsets between −0.031 and −0.08 (e.g., Graczyk et al. 2019;Stassun & Torres 2018). For example, Navarete et al. (2019) point out the impact of the parallax zeropoint correction to the distance of W3 complex, showing a distance decrease of up to 15% (with the larger zero-point correction). In this context, we performed no corrections of parallax A21, page 2 of 19 zero-point in this paper. The proper motions were also converted from equatorial to galactic coordinate system (µ l , µ b ), following Vogel (2013).
To properly study the tangential velocity of stars, we have to correct the observed proper motions from the peculiar solar motion and its systematic motion due to the Galactic rotation. This correction was done following Abad & Vieira (2005) and Mignard (2000) adopting the Oort's constants A = 15.1 km s kpc −1 and B = −13.4 km s kpc −1 (Li et al. 2019) and the components for the solar peculiar velocity (U , V , W ) = (11.1,12.24,7.25) km s −1 respectively to the Local Standard of Rest (Schönrich et al. 2010). The corrected proper motions will be noted as µ l cor , µ b cor , from which we calculate Vlon and Vlat (the components of the velocity in the regions Galactic frame). These velocities represent the residual velocities which characterize the non-circular motion in the Galactic disk and also the velocity respectively to the interstellar medium.
With regard to the distance, Bailer-Jones (2015) and Astraatmadja & Bailer-Jones (2016a,b) recall that a star's reliable distances cannot be obtained by simply inverting the parallax when the relative parallax error is larger than 0.2 and for negative parallaxes. In this way, we also retrieved "the best estimate of distance using the exponentially decreasing space density prior" with the standard value L = 1.35 kpc as a scale-length parameter (as recommended by Bailer-Jones 2015; Astraatmadja & Bailer-Jones 2016a) and the 5th and 95th percentile confidence intervals using the TOPCAT tool. This is a probality-based inference approach (Bayesian method) described by Bailer-Jones (2015), Astraatmadja & Bailer-Jones (2016a), and Luri et al. (2018). This distance is noted as d bay .

Sample of spectroscopic OB stars
The spectroscopic catalog consists of the sample of 135 O-B3 stars from Russeil et al. (2017). This sample, listed in Table B.1, is composed of 109 spectroscopic O-B3 stars (identified by a number in Table B.1) supplemented with 26 O-B3 stars (identified by their name 1 in Table B.1) from the literature (listed and referenced in Table A.2 of Russeil et al. 2017) for which we have spectral types, V-band magnitudes, and extinctions, as well as spectro-photometric distance. After cross-matching with Gaia DR2, we compared the Gaia-G and V-band magnitudes (see Fig. 2). Three stars (stars 30, 32 and 82) clearly depart from the trend by more than 2σ (Fig. 2). In order to pinpoint the possible origin of this departure, we cross-matched our OB star sample with the VPHAS-DR2 catalog (Drew et al. 2014).
For stars 82 and 32, the V-band and VPHAS-DR2-g agree well, suggesting that their Gaia-G brightness may not be well determined. Indeed, star 32 has a RUWE larger than 1.4 suggesting binarity and also its parallax error is larger than 20%. Star 82 has no parallax measurement. Thus, we decided to remove these two stars from the rest of the analysis.

Fig. 3.
Parallax versus longitude plot of spectroscopic OB stars. Green, blue, red, and black points are stars belonging (in the area delineated in Fig. 1) to GM1-24, NGC 6334, NGC 6357, and also to none of them, respectively. that the reason for this uncertainty is contamination by a nearby star. Indeed, we found in the Russeil et al. (2017) catalog, a star at less than 1.2 with a brightness in better agreement with Gaia-G. For this star, we then updated the V-band magnitude and, hence, its spectrophotometric distance (changing from 6.94 kpc to 2.47 kpc), placing it in better agreement with the distance of the region.
Since we selected stars with π > 0, RUWE ≤ 1.4, and σ π /π ≤ 0.2 in the following, we have a final sample of 88 spectroscopic OB stars expected to be barely affected by binaries. This selection criteria is applied to all following samples.
In Fig. 3, the final spectroscopic OB stars sample is presented in a parallax versus longitude plot. The mean astrometric parameters are given in Table 1.

Sample of photometric OB stars
To complete the spectroscopic OB stars sample, we used the VPHAS+ DR2 catalog ). We extracted all Notes.
(1) Except for PA and d bay these are 3 σ clipping mean values.
All the uncertainties are computed as the standard deviation.
(2) PA, is the position angle counted from the Galactic north direction toward the increasing longitude axis direction. sources with u, g and r magnitudes in the area covering l = 350 • -354 • and b = −0.5 • -+2 • . However, from Fig. 1, we notice that only a few small areas in our region of interest are not covered by the VPHAS+ DR2 survey. The VPHAS+ DR2 basic caracteristics are: a median seeing bewteen 0.8 and 1.01 , a typical depth of 20 mag in u, g and r and saturation problems, occurring for stars brighter than 13. In addition, due to the uncertainty around the initial calibration, a field-dependent offset has been noted (Drew et al. 2014;Mohr-Smith et al. 2017). This leads to larger uncertainties for the u-band magnitudes. These typical offsets are ∼-0.35, ∼0.05, and ∼0.01 for the u, g, and r magnitudes, respectively (Mohr-Smith et al. 2017). Similarly to Mohr-Smith et al. (2017) and Chen et al. (2019), we plot the stars in the u − g versus g − r plot and select stars above the B3V star reddening law. For this first selection step, we adopted the curve of the B3V stars from Drew et al. (2014). Figure 4 illustrates this process for stars in the direction of NGC 6357 (centered on the Pismis 24 cluster). We then cross- correlated this sample with Gaia DR2 and found 2233 OB stars that have Gaia information. Stars above this reddening law are expected to be normal OB stars but Chen et al. (2019) show that because of the large uncertainties in the u-band magnitudes, they are strongly contaminated by B4 and later type stars, sub-dwarfs, and white dwarfs. Following Chen et al. (2019) we then plot stars in the Gaia color-absolute magnitude diagram and apply a second selection step by keeping only stars above the B3V extinction vector (earlier than B3V) of Maíz Apellániz et al. (2014).
The final reliable photometric OB stars sample contains 174 objects (following π > 0, RUWE ≤ 1.4, and σ π /π ≤ 0.2) which are mostly located towards NGC 6357 and NGC 6334. To estimate the reliability of the photometric catalog, we compared it with the spectroscopic catalogue. We find that 51 spectroscopic OB stars can be paired with a photometric OB star. Among the 84 not paired spectroscopic OB stars, 38 have no u, g, or r magnitudes, which naturally explains why they are not found in the photometric catalog (these stars are mainly bright stars, with V < 13 mag, and then they are in the VPHAS+ DR2 saturation domain), while the remaining 46 stars are all B1 to B3 stars and were missed during the first step selection because they fall below the reddening law due to the u-band photometric uncertainty.
In Fig. 5, the photometric OB stars sample is presented in a parallax versus longitude plot. The mean astrometric parameters are given Table 2.

YSOs samples
YSOs are recently formed stars that are typically found in or very near their parental molecular cloud. During the early-phase of their formation (class 0/I), they are strongly embedded in their accreting envelope, which makes them not easy to observe at the optical wavelengths. During their evolution, they become premain sequence stars with prominent circumstellar disks (class II) whose emission peak moves from the infrared to the visible as the disks dissipate. Marton et al. (2019) found that 55% of the YSOs detected by Spitzer are present in the Gaia DR2 catalog and 68% of them are brigther than Gmag = 17. In the Orion A molecular cloud, Großschedl et al. (2018) found 67% of YSOs with a Gaia DR2 counterpart are mainly Class II sources. However, these fractions are for nearby regions and at the distances of NGC 6334 and NGC 6357, we expect them to be smaller. A direct distance and proper motion determination of YSOs thanks to Gaia DR2 is a new way to determine the distance of their native molecular cloud and to probe their kinematics. This has been done, for instance, by Großschedl et al. (2018), who actually delineated the 3D shape of the Orion A molecular cloud and by Fleming et al. (2019), who identified two groups of YSOs belonging to the Taurus molecular cloud and moving in somewhat different directions.

Previously published YSO catalogs
We consider the infrared-excess source catalog (covering NGC 6334 and NGC 6357) from Povich et al. (2013). This catalogue was constructed by Kuhn et al. (2014), as part of the MYStIX project (Feigelson et al. 2013) which surveyed 20 OB-dominated young clusters using a combination of Spitzer IRAC (Fazio et al. 2004) infrared and Chandra (Weisskopf 2000) X-ray photometry. For NGC 6334 and NGC 6357 the surveyed area is 1 • diameter. Identification and classification of YSOs were carried out by Povich et al. (2013) who used Spitzer IRAC, 2MASS (Skrutskie et al. 2006), and UKIRT (Lawrence et al. 2007) imaging photometry with spectral energy distribution fitting to flag sources as "'0/I", "II/III", "non-YSO (stellar)" or "Ambiguous (YSO)". In addition, they estimated the membership probabilities (Mm = 1 for probable members otherwise Mm = 0) from the spatial distribution. We cross-matched the Povich et al. (2013) catalog with Gaia DR2 and selected only member sources (Mm = 1) flagged "0/I" and "II/III". We obtained a sample of 27 YSOs (10 in NGC 6334 and 17 in NGC 6357). In NGC 6334 all the YSOs are class II/III, while 4 among 17 are class 0/I in NGC 6357. Because class 0/I YSOs are more embedded than class II/III, and because Gaia is an optical telescope and has difficulty accurately measuring parallaxes in areas of high optical extinction, as is the case in star-forming regions, we expect to find fewer counterparts with Gaia DR2 for class 0/I than for class II/III YSOs. This YSO sample is presented as a parallax versus longitude plot in Fig. 6 and the mean astrometric parameters are given in Table 3. The parallax and proper motion (see Sect. 5.3) of several non-member sources (Mm = 0) imply that they should be assigned to the regions that redefine the YSO samples (named NGC 6334-sub and NGC 6357-sub in Table 3). We considered also the YSO catalog (2281 sources) from Willis et al. (2013) covering only NGC 6334. We find only 302 YSOs in common between Willis et al. (2013) and the 688  Povich et al. (2013). The color coding is the same as in Fig. 3. The blue and red lines display the mean parallaxes for NGC 6334 and NGC 6357, respectively (excluding outliers). Black symbols are sources classified as nonmembers by Povich et al. (2013). sources in NGC 6334 from Povich et al. (2013). Willis et al. (2013) find more YSOs in the NGC 6334 ridge and the difference between these two samples certainly resides in the selection process. However, among the 2281 listed YSOs, only 19 follow our full selection criteria. They are presented in the parallax versus longitude plot of Fig. 7. Among them, there is one star with a very large parallax (π = 4.46 mas, not shown on Fig. 7) and 17 appear to be located along the main NGC 6334 molecular ridge. The mean astrometric parameters for this sample are given in Table 3. We wanted to consider the YSOs from Fang et al. (2012), covering only NGC 6357, but their YSO catalog is not publicly available.

Larger scale study of YSOs
Because the catalog of Povich et al. (2013) only probes the central regions in NGC 6334 and NGC 6357, we use the IRAC/GLIMPSE point source catalog to do a larger scale census of the YSOs towards NGC 6334 and NGC 6357.
The most frequently used classification scheme for YSOs is the class 0/I-II system, which characterizes the objects in terms of their IR excesses or SEDs (e.g., Adams et al. 1987;André et al. 1993André et al. , 2000. Class 0 and I objects are understood to be protostars surrounded by dusty infalling envelopes while Class II objects are pre-main-sequence stars with warm optically thick dusty disks orbiting around them. To classify an IRAC source we follow Billot et al. (2010) who show that sources with the following color constraints are considered likely to be YSOs: We further classify the selected objects according to their infrared spectral index α IR = d(log(λF λ ))/d log(λ) as defined by Lada et al. (1987). We compute the spectral index as the slope of the spectral energy distribution (SED) measured from 3.6 to 8.0 µm. Objects with α IR > −0.3 are designated class I YSOs, they have a flat or rising SED indicating the presence of  Because it is difficult to take into account the actual extinction of each source due to local features such as the associated core and disk, we compute the spectral index with a global extinction correction of A V = 6 mag, corresponding to the mean foreground extinction in the direction of NGC 6334 and NGC 6357 (Russeil et al. 2016). Indeed, the extinction, which impacts the shorter wavelengths more than the longer ones, can induce an artificial higher α IR value.
The global spatial distribution of class I and II selected YSOs (3768 sources) is shown in Fig. 8a. Compared with Povich et al. (2013) and Fang et al. (2012) for the central region of NGC 6357 and with Povich et al. (2013) and Willis et al. (2013) for NGC 6334, we find that our Spizer-IRAC-selected YSOs distribution is in agreement with their results.
For NGC 6334, considering the same area, there are 2228, 644 and 900 YSOs found by Willis et al. (2013), Povich et al. (2013), and this work, respectively. As already noted, Willis et al. (2013) found more sources in the ridge than Povich et al. (2013) and than we have. We have 328 (36%) and 466 (52%) sources in common with Povich et al. (2013) and Willis et al. (2013), respectively, most of them located along the ridge. For NGC 6357, we find the same YSO overdensities as Povich et al. (2013) and Fang et al. (2012). which are the clusters Pismis 24 and AH03J1525-34.4, as well as the overdensity around l, b = 353.08 • , +0.63 • . Considering the same area, 670 and 768 YSOs are found by Povich et al. (2013) and our study, respectively, with 347 (45%) of our candidates paired and most of them being in the overdensities. Fang et al. (2012), Willis et al. (2013), and Povich et al. (2013) complemented their IRAC sources classification with J, H and K s observations, which allowed them to detect lower mass and lower luminosity YSO candidates than us and to access sources in bright nebulous regions that are saturated in the IRAC observations. In addition. because Willis et al. (2013) use 24 µm data they are able to detect more embedded sources. However, since Povich et al. (2013) used SED fitting to classify the sources, their evolutionary classification is expected to be better defined. In particular, they have a better determination of the extinction, while our basic extinction correction leads us to overestimate the number of YSOs.
Cross-matching our YSOs sample with Gaia DR2 leaves us with 66 YSOs mainly located in NGC 6334 and NGC 6357 and presented in Fig. 9 as a parallax-longitude plot. Because of the scarce number of confirmations, we mainly used our larger scale YSO sample to identify possible new clusterings (see Sect. 5.5).

Extinction
In this section, we present an analysis of the A G extinction 2 dependency with the distance in order to make a first order determination of the distance to the molecular cloud complex where our regions of interest are located. Indeed, the variation of the optical extinction with respect to the distance provides information about the distance of the different extinction layers present along the line of sight. This well-known method (e.g., Magnani et al. 1985;Schlafly et al. 2014) was recently used for Gaia DR2 data by Yan et al. (2019) to determine the distance of high latitude molecular clouds. However, Andrae et al. (2018) recall that A G has large uncertainties and that extinction is then only reliable on average.
To produce the A G -distance plots, we extracted the Gaia DR2 data within a 1 • radius area centered on the four following positions: (1) NGC 6334, (2) NGC 6357, (3) at l,b = 352.2 • , +0 • a position towards the Galactic plane and in longitude midway (to minimize contamination from both regions) between NGC 6334 and NGC 6357, and (4) in a reference direction (off cloud) pointing at l, b = 352.2 • , +3 • a relatively high latitude position (see Appendix A). We selected stars with π > 0, σ π /π ≤ 0.2, and A G > 0. We then calculated the errorweighted average and standard deviation of A G in 0.05 mas parallax bins and plotted the extinction versus distance in Fig. 10. In Fig. 10a, we note that around 2 kpc A G decreases instead of increasing. This is caused by the combination of the magnitude limit (G ≤ 17) and the dwarf-giant bimodality in the stellar distribution. These effects are illustrated by Fig. 18 in Andrae et al. (2018) and Fig. 8.20 in the Gaia data release documentation 3 . In particular Andrae et al. (2018) show that the A G is limited to 3.5 mag for low temperature stars and falls down to ∼1 mag for hot stars. That color effect strongly impacts the  extinction curve, explaining the systematic curve decreasing after a certain distance around ∼1 kpc. In practice, this means that this method is not reliable for regions farther than ∼2 kpc and then, it is scarcely valid here for NGC 6334 and NGC 6357 which are located around 1.7 kpc. To remove these systematic effects (see Appendix A), we produce the extinction curve relatively to an off cloud position (Fig. 10b). In addition, due to the position of the regions, close to the galacic plane, we can expect that the line of sight will cross several and very inhomogeneous extinction layers, making the analysis difficult. From Fig. 10a we notice that the extinction is higher towards NGC 6357 than towards NGC 6334, while from Fig. 10b, which plot ∆A G = A G (region) -A G (off cloud) versus distance, we note a strong extinction feature around 1.3 kpc with possibly a second, smaller extinction bump around 1.7 kpc and around 3 kpc, an other possible extinction layer.
These results are in agreement with Russeil et al. (2016), who also found higher extinction toward NGC 6357 (A V ∼ 6.6 mag) than toward NGC 6334 (A V ∼ 5.1 mag). Our extinction features are consistent with the OB star distribution peaks around 1 kpc, 1.8 kpc, and 2.6 kpc found by Russeil et al. (2012), where the two first stellar peaks are assigned to the Sagittarius-Carina arm and the third one to the Scutum-Crux arm. It is not the first time that observations suggest that the Sagittarius-Carina arm is split into two stellar layers (e.g., Carraro 2011;Russeil et al. 2017;Mel'Nik et al. 1998), where the closer layer (which corresponds to the outer edge of the arm with respect to the galactic rotation) is populated by older stars while the farther layer (corresponding to the inner part of the arm) is more populated by young stars. In addition, Mel'Nik et al. (1998) observed a change in the residual velocities of the associations from the inner to the outer edges of the Carina arm, accompanied by a stellar age stratification, which they find is in agreement with what is expected for spiral density waves within the corotation radius. More recently, Lallement et al. (2019), built a 3D map of the dust distribution within 2 kpc around the Sun, revealing a particularly compact and well-delineated foreground region of the Sagittarius-Carina arm that extends in the fourth quadrant and at 0 • < l < 30 • in the first quadrant. Appearing as a series of compact cloud complexes that are well-aligned in the l = 45 • -225 • direction, they note that the clouds of this region, at the fourth quadrant, may be as close as 1 kpc. They put in evidence of a second and similarly compact outer region (but oriented in the direction of rotation) of Sagittarius-Carina arm located at larger distance (∼2 kpc) and predominantly 50-150 pc above the Galactic plane. They interpret this split of the Sagittarius-Carina arm as a complex wavy structure. With a typical height of 25 pc above the Galactic plane(assuming d = 1.75 kpc and b ∼ 0.8 • for both regions), NGC 6334 and NGC 6357 are located halfway between these two structures.

Distance
The distance to NGC 6334 and NGC 6357 has been discussed in several previous works. From the spectrophotometric study of the O-B3 star sample, a distance of 1.75 kpc was adopted . The studies of individual clusters (e.g., Massey et al. 2001;Kharchenko et al. 2013Kharchenko et al. , 2016 report distances within 1.5 kpc and 2.5 kpc. The maser parallax of the source NGC 6334I(N) gives a distance of 1.35 kpc (Chibueze et al. 2014;Wu et al. 2014). Recently, in the direction of NGC 6357 and NGC 6334, two open clusters, Pismis 24 (l, b = 353.16 • , +0.89 • ) and Bochum 13 (l, b = 351.21 • , +1.38 • ), were studied from Gaia DR2 data by Cantat-Gaudin & Anders (2020). They determined d bay = 1677.5 pc and 1679.4 pc respectively while the cluster Bochum 13 was up to now placed at a distance of 1.34 kpc (Kharchenko et al. 2013). Figure 11 shows that the direct comparison of spectrophotometric stellar distance with the Gaia d bay is not obvious.  Grosbøl & Carraro (2018) noted a similar discrepancy between parallactic and spectroscopic distance of a sample of B and A-type stars, suggesting that multiple-star systems and giants stars can explain shorter and larger spectroscopic distance than Gaia distance, respectively. We roughly find also that most of the giant stars have larger spectro-photometric distance than Gaia distance. This underlines the fact that considering individual stellar Gaia distance is not reliable and that we must always consider them statistically.
Because it is the best-defined sample and because OB stars are more appropriate for statistically determining the distance of the regions, to add constraints on the distance we mainly use the parallax information from the spectroscopic OB star sample (see Fig. 3). For these regions, we find a 3σ clipping mean parallax of 0.575 ± 0.076 (d = 1.74 kpc), a mean parallax of 0.572 ± 0.083 mas (d = 1.75 kpc), a mean d bay of 1.80 ± 0.32 kpc, and an error weighted average of 0.568 ± 0.005 mas (Table 1) corresponding to a distance of 1.76 kpc. These values all agree and confirm the usual adopted distance. We can then define a parallax range for a star to belong to NGC 6334-NGC 6357 layer as: 0.48 < π < 0.67 mas. From the OB star samples, we note few stars with π ∼0.8 mas (these stars are not located at particularly high latitude). This foreground population may be associated with the Sco-OB4 association located at l, b = 352.64 • , +3.23 • (Mel'nik & Dambis 2017) for which Kharchenko et al. (2013) and Mel'nik & Dambis (2017) give a mean distance (and mean proper motion) of 1.1 kpc (µ α , µ δ = 0.50 ± 0.19 mas yr −1 , −2.90 ± 0.19 mas yr −1 ) and 0.96 kpc (µ l , µ b = −1.34±0.42 mas yr −1 , −2.70 ± 0.29 mas yr −1 ), respectively. Indeed, Roslund (1966) found that the Sco-OB4 association extends towards the south with a concentration of high luminosty stars in the H ii regions of NGC 6334 (and suggest that these exciting stars form an association). In this extension, between Sco-OB4 and NGC 6334, there are stars (e.g., Fig. 8 of Roslund 1966) which can now be assigned to the cluster Bochum 13. We can then suspect that our samples might be contaminated by Sco-OB4 stars or that NGC 6334 OB stars could be part of this association. Indeed, studies of the Scorpius-Centauraus (Wright & Mamajek 2018) and Vela-Puppis (Cantat-Gaudin et al. 2019a) stellar complexes have revealed that even very young stellar populations can exhibit sub-structured and non-centrally concentrated spatial distributions (spanning hundreds of parsecs) and that their overall distribution can reflect the primordial gas distribution, rather than the disruption of an initially compact cluster.
Using the YSO parallaxes (Figs. 6,7,9), we can see that most of the YSOs belong to NGC 6334-NGC 6357 and that just a few of them display also a larger parallax (π between 0.8 mas and 1.1 mas). This may suggest that a foreground population of young stars could exist between 0.9 and 1.25 kpc. Finally, Fig. 6 suggests that several YSOs considered as non member in Povich et al. (2013) have a parallax in agreement with NGC 6334 or NGC 6357 and, thus, they may belong to these regions.

Transverse motions
Because stars in clusters and associations share common kinematic properties, in addition to the parallax, proper motions are used to distinguish any different group's members from the background stars. This method was used, for instance, to extract and characterize stellar clusters and associations (e.g., Franciosini et al. 2018;Cantat-Gaudin et al. 2018, 2019bBorissova et al. 2018;Zari et al. 2018), and even young stellar populations (e.g., Fleming et al. 2019). In parallel, any kinematic substructures can be assumed to be the remnant of the primordial phasespace structure during the formation stages, as has been suggested for OB associations (e.g., Wright et al. 2016;Wright & Mamajek 2018). Also, the stars, particularly the massive stars, are expected to be born in motion with respect to their surroundings because they keep the momentum that is gained during their star-formation process, where turbulence is needed, with velocities of 2-5 km s −1 (e.g., Peters et al. 2010;Dale & Bonnell 2011). More recently, Kounkel & Covey (2019), identified 1900 clusters and comoving groups within 1 kpc around the Sun (and |b|< 30 • ), showing that many of these groups present filamentary or string-like morphologies that are oriented parallel to the Galactic plane and preferentially oriented perpendicular to the stellar streams. They suggest that the strings, which are most prominent in the youngest populations, are primordial and mirror the shape of the stellar parental molecular cloud. At this step, we note that none of their cataloged groups are in front of NGC 6334 and NGC 6357. The spatially closest group (Theia 290) is below the Galactic plane (l, b = 352.597 • ,−0.850 • ) with π = 1.1827 mas (which can be converted to a distance of ∼845 pc). Figures 12 and 13 show the sample distribution of OB stars and YSOs in the proper motion and transverse velocities planes. In such plots, stars belonging to NGC 6334 and NGC 6357 show distinct mean proper motions. The mean values are summarized in Tables 1-3 and the individual star transverse motion vectors is presented in Fig. 14.
For NGC 6334, Dias et al. (2014), Kharchenko et al. (2013) and Sampedro et al. (2017) give very different values (−1.32 < µ α < −0.75 mas yr −1 and −3.32 < µ δ < 0.09 mas yr −1 ), however their values were estimated from the UCAC4 (Zacharias et al. 2013) or PPMXL (Roeser et al. 2010) catalogs. Shi et al. (2019) identify systematic errors in the position and proper-motion sys-tems of the PPMXL and UCAC5 compared with the Gaia DR2. It is also important to notice that the works on NGC 6334 that we reference focus on a more contained area towards the region H ii 351.2+0.5, while our sample is more extended on the sky plane. However, the large spatial and kinematical dispersion of OB stars in NGC 6334 are more characteristic of an OB association (e.g., Mel'nik & Dambis 2017).
In NGC 6357, stars have a relatively ordered overall motion while in NGC 6334 stars show random direction of their motions (Fig. 14). Globally NGC 6357 stars seem to move along the Galactic planein the direction of NGC 6334 with a relative velocity of ∼9 km s −1 (and in the opposite direction of the galactic circular rotation). Assuming that the OB stars still keep the kinematic signature from their birth places, this sets constraints on the star formation origin. The fact that OB stars in NGC 6357 and NGC 6334 show different motions and spatial distribution suggest that they were formed independently from each other and under different conditions, with OB stars in NGC 6334 resembling more an OB association while they form clusters in NGC 6357.
For regions farther than 1 kpc, Cantat-Gaudin & Anders (2020) show that group proper motion dispersions (measured from Gaia DR2 data) are dominated by measurement uncertainties with a typical value around 0.2 mas yr −1 , while groups with large proper motion dispersion are either non-physical cluster or substructured aggregates (see Fig. 1 in Cantat-Gaudin & Anders 2020). Here the mean proper motion dispersion for OB stars of 0.86 mas yr −1 and 0.74 mas yr −1 for NGC 6357 and NGC 6334, respectively, suggesting some substructuring. The substructuring is confirmed for NGC 6357 by Kuhn et al. (2019) who used Gaia DR2 to study the kinematic properties of the young stellar groups, Pismis 24, G353.1+0.6, and G353.2+0.7 located in NGC 6357. They show a possible expansion of Pismis 24 and G353.1+0.6 and they find that the subclusters motions are divergent, rather than convergent (expected for assembling from smaller components), with relative motions randomly oriented and with velocity between 2 and 5 km s −1 (relative to the center of mass of the entire group). This shows that the subclusters are not in the way of assembling and they suggest that their motions are more linked to the large-scale kinematics of the parental molecular cloud.
Despite the low number of sources, YSOs in NGC 6334 and NGC 6357 show, as the OB stars, respective distinct motions (Table 3). From Fig. 13c, we can exclude the evident outliers and define new sub-samples of sources (named NGC 6334-sub and NGC 6357-sub in Table 3). In NGC 6357, YSOs are spatially coincident with OB stars and follow similar motion. In NGC 6334, YSOs are mainly concentrated into the molecular ridge (Willis et al. 2013) contrary to OB stars while their mean motion is different from that of the OB stars.

Runaway candidates
Runaway stars are typically massive stars that move at large peculiar velocity with respect to the surrounding stars and interstellar medium. Observationally, if runaway stars are detected by their large proper motions or radial velocities with respect to the surrounding stars (Tetzlaff et al. 2011), they can also be evidenced from dusty bow shock features (observed on mid-IR images) formed ahead of their motion direction by the interaction between stellar winds and the surrounding medium where the relative velocity between the two is supersonic (e.g., Mac Low et al. 1991  In these plots, green, red, blue, or black symbols are stars belonging to GM1-24, NGC 6357, NGC 6334, and field stars, respectively. In panels (c) and (f), the box displays the limits from outside which a star can be considered as runaway (see Sect. 5.4). features can also be formed when a star is overrun by an ouflow of hot gas coming from a H ii/star-forming region (Henney & Arthur 2019). In this case, the bow-shock is expected to face the H ii region/star-forming region as it is observed in M16 (e.g., Kobulnicky et al. 2016). They are classified as "in situ" bowshocks (Kobulnicky et al. 2016) and, thus, they are not related to any runaway aspect.
Since runaway stars can be explained by different scenarios, namely: (i) the binary supernova scenario (e.g., Blaauw 1961;Renzo et al. 2019), which happens when the more massive primary star in a close binary undergoes a core-collapse supernova; (ii) the dynamical (and early) ejection in a cluster (e.g., Poveda et al. 1967;Allison et al. 2010;Banerjee et al. 2012); and (iii) ejection during a cluster merger process (e.g., Lucas et al. 2018), we want to use the detected runaway stars in NGC 6357 and NGC 6334 to add some constraints on the stellar formation conditions in these regions. Indeed, Lucas et al. (2018) underline that stars ejected during the cluster merger process are expected A21, page 10 of 19 to be dispersed in tidal tails, whereas for the dynamical ejection process, they should be ejected without any directional preference. In parallel, Farias et al. (2019) show, in their modeling, that even though the fraction of massive runaway stars appears to be relatively constant with the star-formation efficiency, the number of massive star ejections are larger in the fast formation regime and that dynamical ejections in slowly forming star clusters are more energetic but less numerous than in the fast for-mation regime. During the formation of the clusters, the ejection rate remains high and is closely correlated to the number densities. As stars are formed, the central number densities grow, along with the ejection rates.
As was highlighted previously by several authors (e.g., Tetzlaff et al. 2011;Maíz Apellániz et al. 2018), the main impediment is having a robust selection criteria for finding runaway stars. The selection criteria for runaway stars in such earlier studies were either based on spatial velocities (e.g., Blaauw 1961), tangential velocities (e.g., Moffat et al. 1998), or radial velocities (e.g., Cruz-González et al. 1974) alone. Tetzlaff et al. (2011) used a sample of 7663 young stars from the Hipparcos catalog to lead several approaches aimed at defining runaway stars. Plotting the distribution of the peculiar 3D space velocity (absolute value of the velocity) of the stars, they show the existence of a low-velocity group and a high-velocity group (containing the runaway stars), both fitted with a Maxwellian function. Following Stone (1979), we assume that a star is a probable member of the high-velocity group (thus, a runaway) if the velocity is larger than the intersection of the two curves which is 28 km s −1 . Because for lot of stars either the radial or the tangential velocity is measured, to define the runaway criteria, Tetzlaff et al. (2011) also determined the intersection of the two curves for the 1D cases, as well as the tangential velocity. They obtained: |Vlat| > 11 km s −1 , |Vlon| > 19 km s −1 , and |Vtot| > 20 km s −1 respectively. In addition, since stars in clusters and associations share a common motion, Tetzlaff et al. (2011) add another criteria to define runaway stars as stars clearly pointing away from the cluster mean motion. This allows them to identify low-velocity runaway stars.
Here, given that radial velocity is not available for most of the sources, we base our selection of runaway stars on the transverse velocity, which inevitably leads to us missing some of them. To select possible runaway stars in our OB stars sample, we combined the velocity criteria with the departure to the common motion by selecting stars with |Vlat| >11 km s −1 or |Vlon| > 19 km s −1 , respectively, to the mean transverse velocity values.
In the spectroscopic and photometric catalogs, we find 14 and 13 runaway candidates, respectively. Among them, there are 5 in common, adding up to a final sample of 22 runaway candidates (listed Table B.2), among which three were previously identified by Gvaramadze et al. (2011). For nine of them, their runaway status is confirmed by the presence of a dust bow-shock feature ahead their motion (Figs. B.1 and B.2).
These candidates have parallaxes between 0.27 and 0.76 mas, and 15 and 7 of them, respectively, are found in the direction of NGC 6357 and NGC 6334. Keeping stars with 0.48 < π < 0.67 mas, we count 10 and 2 stars toward NGC 6357 and NGC 6334, respectively (see Fig. 14). Based on these subsamples, we note that runaway candidates in NGC 6357 indicate a common motion away from a rough position around l, b = 353.3 • , 0.63 • , while the two stars identified towards NGC 6334 show no common origin. Still, we have to keep in mind that, as underlined by Banerjee et al. (2012), for about 1% to 4% of the OB stars ejected from a young cluster, their motion cannot be traced back to their parent clusters because of the two-step ejection process (Pflamm-Altenburg & Kroupa 2010), in which a massive binary is first ejected from its cluster and when the primary explodes as a supernova, the secondary OB star continues on a diverted trajectory.
Since most of runaway candidates are found towards NGC 6357, we can suspect a link between stellar clustering and runaway stars while their spatial distribution, around NGC 6357 (Fig. 14), favors the early dynamical ejection process in a A21, page 11 of 19 A&A 642, A21 (2020)  cluster. If such stars are related to the formation of clusters, the fact that many of them have not been observed towards NGC 6334 is surely because it is an OB association and this suggests different formation conditions than for NGC 6357. As underlined for the association Cyg OB2 by Wright et al. (2014), stellar ejection via dynamical encounters requires much higher stellar densities than are believed to have existed in Cyg OB2. Figure 8a shows some obvious agregates that underline possible YSOs clustering. To quantify this clustering we use the Python density-based spatial clustering (DBSCAN) algorithm from the scikit-learn package (Ester et al. 1996;Schubert et al. 2017). This algorithm finds core samples of high density and builds clusters from them. This algorithm was previously used by Castro-Ginard et al. (2018) to find clusters based on the Gaia DR2 data. We divided the area of study (350 • < l < 354 • ) into three sub-areas of ∆l = 2 • which, as explained by Castro-Ginard et al. (2018), allow the DBSCAN algorithm to define a more representative averaged density of stars required as a starting point. The definition of the DBSCAN cluster depends on two main parameters; one is the maximum distance (md) between two samples for one to be considered in the neighborhood of the other; the other parameter is the number of elements (minPts) in a neighborhood required for a position to be considered as a core point. These parameters have been set to md between 0.05 • and 0.135 • (depending on the sub-area) and minPts = 20. Figure 8b shows the 15 resultant groups (with more than 30 stars) which have been extracted and they are listed in Table 4. Some of these groups were already identified and classified as embedded clusters or embedded groups by Bica et al. (2019). Group 7 is clearly related to GM1-24. In NGC 6357, our YSOs aggregates correspond well to clusters found by Kuhn et al. (2014) and Massi et al. (2015), as well as with the three YSOs overdense regions identified by Fang et al. (2012). In NGC 6334, we are not able to find the clusters identified by Kuhn et al. (2014) in the ridge. This can be explained by incompletness due to the high intensity level of the nebular emission in this part of the region, which makes the point source detection difficult at IRAC bands. Our sample is better at probing the YSO population near the edges of the ridge while a few additional aggregates are detected in the region between NGC 6334 and NGC 6357.

YSO larger scale study
To better characterize these aggregates, we computed their corresponding Minimum Spanning Tree (MST, e.g., Adami & Mazure 1999). The MST algorithm builds a tree joining all the points of a given set by a segment, without a loop and with a minimal length (each point being visited by the tree only one time). This tree is not unique, but the histogram of the segment's length is unique. This allows us to characterize the set of points giving the mean, the dispersion (σ) and the skewness of the histogram of the segments which are shown in the plots of Fig. 15. The MST analysis allows us to compare the YSO aggregates with typical distribution structures: core (King profile, used for stellar cluster, e.g., Bica & Bonatto 2011), cusp, filamentary (established from extragalactic studies, Adami et al. 2010), and random. In the s-σ plot (Fig. 15), the backgrounds are close to the filamentary distribution, suggesting that somewhat filamentary structure could be an intrinsic mode for the general YSOs distribution. We note that groups number 12 and 13 are well defined as core like clusters. It is not surprising as they correspond to the well-known clusters AH03J1525-34.4 and Pismis 24, respectively. Group 11, falling close to the random position, cannot be considered as a real structure, whereas group 1, despite its possible association with a cataloged cluster (Table 4), seems to follow a random-type distribution. The position of aggregates in the plots with respect to the cusp and core boxes can also be due to incompletness, sub-structure, or evolution effect. This can be argued for group 8 which, despite its clear filamentary morphology, is far from the filamentary box.
In order to determine the distance of these clusters, we crossmatched their members with Gaia DR2. Because less than four YSOs per cluster have Gaia counterparts, this prevents distance determination. Then we used the python-DBSCAN algorithm to all Gaia DR2 stars in each cluster area (0.2 • square), running it with the five Gaia parameters (l, b, π, µ α , µ δ ) in order to   Bica et al. (2019) find clustering in this five-parameter space. Because there is no dimension preferred in the 5D parameter space, and following Castro-Ginard et al. (2018), at this step, DBSCAN runs on the Gaia parameters which have been rescaled to the mean so their weights in the process are equalized. The resultant clusters are displayed in Fig. 8c. Despite a small shift for some of them, only seven YSO clusters are also clustered in the five Gaia-parameter space. The disagreement between clusters defined from YSOs and from normal stars can be due to the extinction effect or because they are probing stars at different evolutionnary stage. We estimated for these few groups the mean parallax and proper motions ( Table 4). The groups 15 and 6 are not associated with NGC 6334 and NGC 6357 because of their low Galactic latitude and their larger distances. The groups belonging to NGC 6334 and NGC 6357 have parallaxes between 0.480 and 0.644 mas (ploted Fig. 14). Unfortunately, we were not able to constrain the distance of the groups found between NGC 6334 and NGC 6357 (groups 1, 2, 8, and 10). However, this suggests that star formation is already in process along the molecular filament that is suspected to connect both regions (Russeil et al. 2010).

Discussion and conclusion
NGC 6357 and NGC 6334 seem to originate from a long, ∼100 pc, filament parallel to the Galactic plane (e.g., Russeil et al. 2019). This situation is not unique as in, for example, Serpens, where distinct sites of star formation are noted across a region of 100 pc in length (Herczeg et al. 2019). Fukui et al. (2018a,b) suggest that the formation of massives stars in NGC 6357, NGC 6334, and GM1-24 have been triggered by a cloud-cloud collision. However, while NGC 6357 and GM1-24 show the typical depression feature (cavity) and velocity bridge (between the molecular emission at the two velocity components assigned to the two colliding clouds), signature expected from cloud-cloud collision models (e.g., Fukui et al. 2018c), this is not so clear for NGC 6334 because the molecular emission at the velocity components assigned to the two colliding clouds show similar spatial distributions. Fukui et al. (2018a) estimated that in NGC 6334 and NGC 6357 a cloud of V LSR ∼ −16 km s −1 collided with a main cloud at V LSR ∼ −4 km s −1 (relative collision radial veloc-ity of 12 km s −1 ) while for GM1-24, Fukui et al. (2018b) estimate that the colliding and the main clouds have V LSR ∼ −10 km s −1 and −6 km s −1 respectively (relative collision radial velocity of 4 km s −1 ). Considering the age difference between NGC 6334 (between 0.7 and 2.3 Myr, Getman et al. 2014) and NGC 6357 (1-1.3 Myr, Fang et al. 2012;Getman et al. 2014), Fukui et al. (2018b propose that the main part of NGC 6357 collided first and only then did the collision toward NGC 6334 occur and it is still developing. In parallel, Russeil et al. (2017), showed that NGC 6357 seems to have experienced a first star-forming event ∼4.5 Myr ago, with a SFR ∼ 1.7 × 10 3 M Myr −1 and a second more recent event (∼1.5 Myr ago), which explains the young stellar population observed by Getman et al. (2014). The first star-forming event would be at the origin of the shock heated filamentary structures . However, YSOs are mainly associated to clusters Pismis 24 or AH03J1725-34.4 and the YSOs in these clusters as well as the ones in the uniformly distributed stellar population have similar ages (between 1.0 and 1.5 Myr), suggesting that the recent star formation proceeded nearly simultaneously across NGC 6357. From the high-mass protostellar cores study, Russeil et al. (2019) suggested that the massive star formation has then stopped for at least the last Myr and that NGC 6357 will not form massive stars anymore. The starformation stoppping can also be seen because only 4% of the mass is in the form of filaments and 9% of the filament mass is in the form of MDCs. The previous and present feedback from O-type stars in Pismis 24 have certainty halted star formation by dispersing its molecular cloud.
For NGC 6334, because the past SFR ∼ 1.1 × 10 3 M Myr −1 ) is similar to the recent SFR ∼ 1 × 10 3 M Myr −1 estimated from YSOs by Willis et al. (2013), it may be suggested that star formation progressively continued in NGC 6334, especially along the ridge. From the most massive star-formation studies, Tigé et al. (2017) show (from the Herschel-HOBYS project) that the region is presently experiencing a star formation burst as underlined by the present SFR ∼ 1.6 × 10 4 M Myr −1 . Because the young stellar clusters, identified by Kuhn et al. (2015), and the massive dense cores (MDCs) identified by Tigé et al. (2017) are mainly located along the NGC 6334's ridge and hub, the ridge is, thus, the location of the recent and present star-formation. This is not surprising given that about 25% of the mass is in the form of filaments in NGC 6334, while 14% of the filament mass is in the form of MDCs. The YSO age gradient along the ridge, between 0.7 and 2.3 Myr from south-west to north east, observed by Getman et al. (2014) is in agreement with a continuous starformation process along the ridge.
Within this framework, we summarize our conclusions on the main findings of this study below: Distance. We used the Gaia DR2 data to obtain accurate distances to the star-forming regions NGC 6334 and NGC 6357. The extinction analysis (Sect. 5.1) shows that NGC 6334 and NGC 6357 are in the far part of the Saggitarius-Carina arm while the parallaxes of OB stars confirm a distance of 1.76 kpc. From spectroscopic OB stars we suggest a parallax range of 0.48 < π < 0.67 mas to define the distance range for an objet to be associated with NGC 6334 and NGC 6357. We noted that towards NGC 6334 and NGC 6357 there is a clear extinction peak around 1.3 kpc, which could be indicative of a ∼0.5 pc width of the spiral arm in the foreground. This can also be associated to a peak in the cluster distribution at d bay = 1.25 kpc found from the compilation of the 25 clusters within 347 • < l < 356 • and −3.5 • < b < 3.5 • as listed by Cantat-Gaudin et al. (2018). From numerical simulations, Duarte-Cabral & Dobbs (2016) found that the long molecular filaments are situated either in the interarm region or in the process of joining the arm and that they have low inclinations with respect to the galaxy plane while they are increasingly aligned with the spiral arms as they approach them. It could be the case for the parental filament of NGC 6334 and NGC 6357 as it is behind the Carina arm and probably on the way to join it (regarding the Galactic rotation direction) at the positon of NGC 6357.
Transverse motion. For NGC 6357, the spectroscopic and photometric OB star samples are in agreement, showing a strong spatial clustering and an ordered motion with Vlon ∼ −10.7 km s −1 and Vlat ∼ 3.7 km s −1 (and PA ∼ 282 • ), which is similar to what we found for YSO groups 12, 13 and 14 (mean values for Vlon, Vlat, and PA are −8.9 km s −1 , 4.6 km s −1 and 297 • , respectively). For NGC 6334, no systemic motion is observed. The velocity directions of OB stars, as well as YSOs, appear random while no spatial clustering can be noted. Let us note that we have a limited completeness as several embedded young stellar clusters identified by Kuhn et al. (2014) along the molecular rigde are not observable with Gaia due to the strong extinction. Gouliermis (2018) recalls that more and more theoretical and observational studies favor a hierarchical picture of star formation in which stars are formed across a continuous distribution of gas densities. In this picture supersonic turbulence introduces fluctuations in the density distribution of the giant molecular cloud, with localized high-density regions producing bound clusters, while low-density regions drive the formation of dispersed unbound stellar populations. In this way, most OB associations were never bound clusters, but instead, they were formed in situ in low-density environments following the fractal and velocity structure of the gas from which they form (e.g., Ward et al. 2020;Gouliermis 2018), as was already observed by Wright et al. (2014), who find for Cyg OB2 that massive stars can form in relatively low-density environments. In this frame, because OB stars in NGC 6357 are clustered while they distribute more as an association in NGC 6334, we can speculate that NGC 6357 OB stars originate from denser conditions than the ones in NGC 6334. On the other hand, Fujii & Portegies Zwart (2016) argue that massive star clusters form from cloudcloud collisions. Then the common velocity direction of the stars in NGC 6357 could suggest that the colliding cloud should have arrived from a trajectory roughly parallel to the galactic plane. In cloud-cloud models it is expected that the compressed layer has a typical velocity which is half the initial impact velocity (e.g., Haworth et al. 2015), which we estimate to give a radial velocity of −6 km s −1 for NGC 6357. Assuming that stars have been formed in this layer and have similar radial velocity (as suggested by Lepine & Duvert 1994) we can estimate, combining the tranverse and radial velocity components, a line of sight direction angle of the collision of 62 • for NGC 6357. In NGC 6334, Fukui et al. (2018a) (who already noted that O star formation is extended over 10 pc) suggest that the extent of O stars distribution reflects the area of collisional shock compression (Fukui et al. 2016) which could suggest an extended cloud-cloud collision across a region 10 pc in length. However, for NGC 6334, the observed random motion and the spatial spread distribution of OB stars does not suggest any cloud-cloud collision.
Runaway candidates. Despite their low number, their spatial distribution all around NGC 6357 suggests they have been probably produced by dynamical and early ejection processes during the cluster formation. The fact that we find only two runaway candidates assigned to NGC 6334 may suggest that OB stars formed from a low-density medium (OB association), where dynamical encounters are not likely to happen. In addition to the dynamical ejected runaway candidates in NGC 6357, the ones ejected by supernova event in a binary system must be added. This latter process can also explain the larger number of runaway stars in NGC 6357. Indeed, the presence of shock heated filamentary structures ) and the presence of the wolf-rayet star WR 93 4 (Lortet et al. 1982) both suggest that some massive stars have already evolved into SNe.
YSO large scale distribution. Previously published works probe YSOs distribution in the central part of NGC 6357 and NGC 6334. Here, thanks to a larger scale study, we confirm the previous studies but we also find YSOs groups (groups 1, 2, 8, and 10) in the filament connecting both regions, which suggests that star formation is already in progress in this filament. Unfortunatelly, no astrometric information, nor distance and proper motions, could be determined for these groups.
Acknowledgements. DR thanks the "The Milky Way in the age of Gaiaψ DR thanks the "The Milky Way in the age of Gaia -ψ2 program meeting" led in october 2018 at Paris-Saclay University in Orsay during which this work was initiated. AZ thanks the support of the Institut Universitaire de France. This work has made use of data from the European Space Agency (ESA) mission Gaia (https://www.cosmos.esa.int/gaia), processed by the Gaia Data Processing and Analysis Consortium (DPAC, https://www. cosmos.esa.int/web/gaia/dpac/consortium). Funding for the DPAC has been provided by national institutions, in particular the institutions participating in the Gaia Multilateral Agreement. Based on data products from observations made with ESO Telescopes at the La Silla Paranal Observatory under programme ID 177.D-3023, as part of the VST Photometric Halpha Survey of the Southern Galactic Plane and Bulge (VPHAS+, www.vphas.eu). program meeting" led in october 2018 at Paris-Saclay University in Orsay during which this work was initiated. AZ thanks the support of the Institut Universitaire de France. This work has made use of data from the European Space Agency (ESA) mission Gaia (https://www.cosmos.esa.int/gaia), processed by the Gaia Data Processing and Analysis Consortium (DPAC, https://www. cosmos.esa.int/web/gaia/dpac/consortium). Funding for the DPAC has been provided by national institutions, in particular the institutions participating in the Gaia Multilateral Agreement. Based on data products from observations made with ESO Telescopes at the La Silla Paranal Observatory under programme ID 177.D-3023, as part of the VST Photometric Halpha Survey of the Southern Galactic Plane and Bulge (VPHAS+, www.vphas.eu). To produce the A G -distance plots, we extracted the Gaia DR2 data (in a 1 • radius area) in the direction of NGC 6334 and NGC 6357, in a Galactic plane direction and midway through the regions in longitude (at l, b = 352.2 • , +0 • ), and in a reference direction (off cloud) pointing at l, b = 352.2 • , +3 • . We selected stars with π > 0, σ π /π ≤ 0.2 and A G > 0. We then calculated the average (weighted by their errors) and standard deviation of A G in 0.05 mas parallax bins. We do the same for several other Galactic plane directions at b = +3 • and l = 300 • , 320 • , 340 • , and 350 • respectively and l, b = 352.2 • , −3 • (see Fig. A.1). Because the shape of the curve beyond 1 kpc is mainly driven by the combination of the brightness limit (G ≤ 17) and the dwarf-giant bimodality in the stellar distribution (as illustrated by Fig. 18 in Andrae et al. 2018 and Fig. 8.20 in the Gaia data release documentation), we see that the shape depends strongly on the galactic longitude. There is also a latitude dependency but the global shape is preserved with a A G reached for different distances. Here, the l, b = 352.2 • , −3 • direction has been chosen as off cloud (reference direction). Notes. (a) It is the Bayesian distance. (b) In this column we give the star identification and in parenthesis is runaway star identificatioon from Gvaramadze et al. (2011).