{'fraction_non_alphanumeric': 0.034786142077275053, 'fraction_numerical': 0.02793138172888363, 'mean_word_length': 4.311936936936937, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
The Massive Star Forming Region, Cygnus OB2

We present results from a catalogue of 1696 X-ray point sources detected in the massive star forming region (SFR) Cygnus OB2, the majority of which have optical or near-IR associations. We derive ages of 3.5 and 5.25 Myrs for the stellar populations in our two fields, in agreement with recent studies that suggest that the central 1-3 Myr OB association is surrounded and contaminated by an older population with an age of 5-10 Myrs. The fraction of sources with proto-planetary disks, as traced by K-band excesses, are unusually low. Though this has previously been interpreted as due to the influence of the large number of OB stars in Cyg OB2, contamination from an older population of stars in the region could also be responsible. An initial mass function is derived and found to have a slope of Gamma = -1.27, in agreement with the canonical value. Finally we introduce the recently approved Chandra Cygnus OB2 Legacy Survey that will image a 1 square degree area of the Cygnus OB2 association to a depth of 120 ks, likely detecting ~10,000 stellar X-ray sources.

value estimated by Kroupa (2002). A steepening of the slope at higher masses is observed and suggested as due to the presence of the previous generation of stars that have lost their most massive members. Finally, combining our mass function and an estimate of the radial density profile of the association suggests a total mass of Cyg OB2 of ∼ 3 × 10 4 M ⊙ , similar to that of many of our Galaxy's most massive star forming regions.

Introduction
Stars do not form individually but in groups, with sizes ranging from small star forming regions (SFRs) to the massive superstar clusters seen in merging galaxies (Lada & Lada 2003). Our current understanding of star formation is mainly derived from observations of nearby small star forming regions such as Taurus or Ophiuchus. However the conditions of star formation vary considerably between these regions and the massive SFRs that contain hundreds to thousands of OB stars and millions of low-mass stars. High stellar densities, strong stellar winds from OB stars and a large UV flux are likely to influence the products of the star formation process such as the initial mass function (IMF), the binary fraction and the evolution of protostellar disks. Our understanding of the influence of environment on these products is currently poor, and needs to improve if we are to develop a global understanding of star formation that can relate the small-scale properties with the evolution of galaxies and the survival of planetary systems.
The majority of massive SFRs are found in external galaxies, or close to the center of our own Galaxy. Their rarity and great distances therefore make them difficult objects to study. The one exception to this is Cygnus OB2, which, at a distance of only 1.45 kpc (Hanson 2003) is the closest known massive SFR. Early surveys of the region revealed the presence of ∼300 OB stars (Reddish et al. 1967), a number that has grown as deeper surveys have penetrated the high extinction in its direction (e.g. Massey & Thompson 1991;Comerón et al. 2002;Hanson 2003). There are currently 65 known O-type stars in the region making it the largest known concentration of spectroscopically confirmed O-type stars.
From a near-IR photometric study Knödlseder (2000) estimated the region contained over 100 O-type stars, ∼2600 OB stars, and had a total mass of 4-10 ×10 4 M ⊙ . However, the complications of background subtraction in the Galactic plane, combined with strongly variable extinction in the vicinity of Cyg OB2, give cause to doubt such an estimate. Further-more the question of the extent of Cyg OB2 is made more complex by the growing evidence for stars older than the 1-3 Myr age appropriate to the OB stars: Drew et al. (2008) found a concentration of 5-7 Myr old A stars in 1 sq. deg just to the south of Cyg OB2, while Comerón et al. (2008) identified an unclustered spread of evolved stars up to ∼10 Myrs old over a wider area, 2 degrees in radius. In this study we obtain further evidence that would favour the present-day OB stars as the products of the latest but most certainly not the only phase of star formation.
Recent deep photometric surveys of the Galactic plane in the optical and near-IR have penetrated much of the extinction toward the region and are advancing our understanding of this massive association (e.g. Drew et al. 2008;Vink et al. 2008). The combination of data from these surveys with that at other wavelengths is vital for studying the star formation process, particularly in the dense and highly obscured regions of the Galactic plane, and one that this work makes particular use of.
One of the objectives of this work is to measure the IMF down to low masses. The IMF is one of the most important measurable quantities in star formation studies. Combined with the time-variable star formation rate, the IMF determines the evolution of stellar systems ranging from small SFRs to entire galaxies. Measurements of the IMF have shown it to be highly uniform at high and intermediate masses (Luhman et al. 2000;Massey 1998) with a power law slope above 1 M ⊙ with an index of Γ = −1.35 (Salpeter 1955) for intermediate mass stars, possibly steepening to Γ = −1.7 for the most massive stars (Scalo 1986). At lower masses the IMF is less well constrained, but appears to flatten below 0.5 M ⊙ and exhibits a 'turnover' around 0.1 -0.3 M ⊙ , with less stars of the lowest masses (Kroupa 2001).
Deviations from this uniformity are becoming increasingly rare as deeper and more complete observations overturn previous measurements and the majority of remaining observations have been shown to be within the statistical uncertainties of the seemingly universal mean (e.g. Kroupa 2002). While some theoretical models predict a shallower IMF in regions of high density or pressure, only a small number of observations in the vicinity of the Galactic Center (e.g. Stolte et al. 2006) or in starburst regions (e.g. Smith & Gallagher 2001) support this and more measurements of the IMF in massive SFRs are necessary to resolve this. The most recent measurement of the IMF in Cyg OB2, due to Kiminki et al. (2007), suggests that at high masses it is in fact steeper than the canonical value (though they estimate their spectroscopic sample becomes incomplete at masses below ∼15 M ⊙ ). This further supports the need for a thorough and complete measurement of the IMF in Cyg OB2 down to lower masses.
In this paper we present an analysis and discussion of the stellar properties of sources in Cygnus OB2 taken from the X-ray derived catalogue presented by Wright & Drake (2009, hereafter Paper 1). In Section 2 we discuss the source catalogue and the various cuts applied to it to remove foreground and background contaminants. In Section 3 we present the near-IR properties of these sources, in Section 4 we study their X-ray properties and in Section 5 we derive mass functions for the sources. Finally, in Section 6 we discuss the implications of our findings on our understanding of Cygnus OB2 and compare it to other massive SFRs.

Cyg OB2 membership and foreground contamination
The location of Cygnus OB2 in the Galactic Plane introduces the non-trivial issue of contamination from foreground and background sources. This problem is further complicated by the high and variable extinction toward and throughout the Cygnus region. There are many methods that have been used to select members of a star forming region while minimizing the contamination from the field population, but one of the most effective and efficient is to use X-ray emission as a tracer of youth, since young pre-MS stars are orders of magnitude more luminous in X-rays than their MS equivalents (Preibisch & Feigelson 2005). In Paper 1 a catalogue of 1696 sources X-ray sources was presented, extracted from Chandra observations of two fields in the center of Cyg OB2. The catalogue also included optical and near-IR associations taken from the IPHAS (INT Photometric Hα Survey, Drew et al. 2005), 2MASS (Two Micron All Sky Survey, Skrutskie et al. 2006) and UKIDSS (United Kingdom Infrared Deep Sky Survey, Lucas et al. 2008) photometric catalogues. This work is based on this catalogue and principally the 1501 sources with either optical or near-IR counterparts that represents the main stellar sample.
The completeness of this catalogue is dependent on both the X-ray detections and the associations at other wavelengths. In Section 4.2 we show, by comparison with deeper X-ray stellar catalogues, that the completeness limit for this catalogue is ∼1 M ⊙ . In Paper 1 it was shown that the near-IR photometry combined from 2MASS and UKIDSS observations will allow pre-MS stars down to 0.2 M ⊙ to be detected at an extinction of A V ∼ 7. In the north-western field, where some UKIDSS data is lacking, it was estimated in Paper 1 that the 2MASS observations reach a pre-MS depth of 1 M ⊙ at A V ∼ 7, though the lower extinction in this field means the observations will be slightly deeper than this.
Since not all young stars emit X-rays we must also be aware of the limits of X-ray emission mechanisms. O and early B-type stars (earlier than type B2, >10 M ⊙ are expected to generate X-rays in their radiatively-driven stellar winds (e.g. Berghoefer et al. 1997), while, at ages of ∼5 Myr, lower mass stars (<3.3 M ⊙ ) have substantial convective envelopes that produce X-ray emission through magnetic dynamo activity (e.g. Pallavicini et al. 1981). Intermediate mass stars do not have deep convective layers or strong stellar winds and are -IPHAS (r ′ −Hα, r ′ − i ′ ) color-color diagrams for all IPHAS sources in the Chandra observational footprints (left-hand panels) and only for sources associated with Chandra sources (right-hand panels) for the central (upper panels) and north-western fields (lower panels). Only sources with r ′ ≤ 20 and magnitude errors ≤ 0.1 are shown. Blue dashed lines show unreddened main-sequences (Drew et al. 2005), while red dashed lines are the mainsequence tracks for reddenings of A V = 4.0 and 7.0 (central field) and A V = 2.5 and 5.0 (north-western field), illustrating the region approximately encompassing the Cygnus OB2 population. Sources removed from the catalogue as foreground sources are shown as red crosses.
therefore not expected to emit X-rays. Studies that have observed X-ray emission from late B and A-type stars have attributed this to coronal emission from unresolved late-type companions (e.g. Stelzer et al. 2006). The intermediate-mass completeness regime can be determined by counting the number of spectroscopically known OB stars in our field of view with X-ray detections. We find that the fraction of OB stars detected in X-rays decreases from 100% for all O-type stars to 64% at B0, 36% at B1 and 20% for all later intermediatemass stars. This suggests we are incomplete for the majority of B-type stars, and also most early A-type stars.
Finally, crowding is likely to have only a minor effect on completeness, because only the very central regions of the association are particularly crowded and these were observed close to on-axis with Chandra and have complete UKIDSS coverage, therefore allowing them the maximum possible spatial resolution in both X-rays and in the near-IR.

Removal of foreground sources
While X-ray observations are excellent at separating young sources from older field stars, this method is not infallible since late-type main-sequence (MS) stars of all ages have been observed to have X-ray emission (e.g. Vaiana et al. 1981), albeit at generally lower levels. Nearby MS stars, although intrinsically fainter, could therefore have similar X-ray brightnesses as distant pre-MS stars, and thus be a potential contaminant in our catalogue. To remove any foreground sources, we employ one of the interesting features of the IPHAS (r ′ −Hα, r ′ − i ′ ) color-color diagram (CCD) where the main sequence does not redden onto itself like it does in the near-IR CCD, but sweeps out an area in the color-color plane (Drew et al. 2005). This allows differently reddened stellar populations along the line of sight to be separated (e.g. Drew et al. 2008;Sale et al. 2009).
In sightlines towards the Cygnus region, McCuskey & Houk (1971) found a high concentration of stellar sources between 200 and 300 pc and a strong decline in stellar density between 500 pc and 1 kpc, with the stellar populations making up Cygnus OB2 and Cygnus X beyond that. Figure 1 shows IPHAS CCDs for all IPHAS sources and for just those with Chandra X-ray counterparts in the areas covered by the Chandra observational footprints. It is clear from the CCD, as noted by Drew et al. (2008), that the majority of foreground stars in the direction of Cyg OB2 are nearby and only mildly reddened. The main Cyg OB2 population, as traced by Chandra, can clearly be seen at between A V = 4-7 in the central field and A V = 2.5-5 in the north-western field.
It is possible that pre-MS members of Cyg OB2 with Hα emission may appear above the reddened main-sequences and closer to the foreground population (Hα emission, frequently observed in young stars, causes the r ′ −Hα color to increase). To preclude the removal of genuine members of Cyg OB2 we compare the positions of candidate foreground stars in the near-IR color-magnitude diagram (CMD) with a foreground MS. Those sources whose positions in both diagrams were appropriate for pre-MS sources at the distance of Cyg OB2 and potentially experiencing Hα emission were retained. It should be noted that the majority of removed sources fall on a thin strip in the IPHAS CCD that would exhibit a larger spread if their positions in the CCD were due to the effects of Hα emission.
For sources with only near-IR associations this method was not available to us and we had to rely on the positions of sources in the near-IR CMD. Due to the smaller effects of extinction in the near-IR and the fact that near-IR isochrones redden onto themselves it is not simple to separate the foreground population in a similar manner. Instead we may only identify sources with very blue colors as likely foreground sources and we have removed a small number of outlying sources in this way. In total we removed 46 sources (∼3%) from our catalogue as likely X-ray emitting foreground sources, which are listed in Table 1. These were predominantly removed from the 757 sources (∼50% of the original catalogue) with IPHAS photometry. Based on the fraction of IPHAS sources removed and the number of sources without IPHAS photometry we estimate that a small fraction <1% of foreground contaminants may remain in the catalogue, but will be impossible to identify without spectra or further photometry. Finally we note that the spatial distribution of sources removed is uniform and does not exhibit a clustered distribution as the overall X-ray source distribution does (see Paper 1). We therefore confidently remove these sources from further consideration.

Near-IR stellar properties
We now consider the near-IR properties of the remaining 1497 Chandra sources with 2MASS or UKIDSS associations that we believe to be members of Cygnus OB2. We will consider only those 2MASS sources with valid quality detections (photometric quality flags "A" to "D") and both 2MASS and UKIDSS sources with magnitude errors <1%, in the relevant bands. Applying these restrictions to all three bands we are left with 1067 and 290 sources in the two fields, losing 50 (4%) and 90 (24%) sources in the central and northwestern fields respectively. We lose a larger fraction of sources in the north-western field because the UKIDSS survey has yet to take data in this region and the fraction of 2MASS sources in this area with bad quality K s -band photometric flags is high. However this should not affect the completeness limit of 1 M ⊙ since the available 2MASS photometry is deep enough to detect a one solar mass star at the distance and extinction of Cyg OB2 (c.f. Paper 1). For ease of comparison between the two near-IR surveys and previous work in the literature all UKIDSS photometry was converted onto the 2MASS photometric system in Paper 1 using the conversions given by Hewett et al. (2006). These conversions were used instead of the more accurate extinction-dependent transformations presented by Lucas et al. (2008) because of the inhomogeneous extinction across the region (the expected systematic difference in the use of these transformations will be ∼0.03 mag at J, but only ∼0.01 mag at H and K). Figure 2 shows (J, J − H) CMDs for sources in the two fields. We use the J − H color instead of the H − K color because it is less affected by circumstellar dust and has a smaller degeneracy between color and magnitude for pre-MS isochrones. Applying the photometric criteria discussed above to the J-and H-band photometry, there are 1076 and 325 valid sources, 96% and 86% of sources in each field. Both CMDs show a clear sequence with large numbers of sources down to J ∼ 19. The greater depth in the central field is due primarily to the longer exposure of the Chandra observation, although the completeness of the UKIDSS survey in this field is also a benefit. The sources in the central field are also redder, as expected considering the greater extinction in this direction.

Near-IR color-magnitude diagram
To determine stellar properties of the population of X-ray sources we have attempted to fit a number of pre-MS isochrones to our data, as shown in Figure 2. We used Siess et al. (2000) isochrones for late spectral types (M < 8 M ⊙ ) converted onto the 2MASS system using the data given by Kenyon & Hartmann (1995) and Bessell (2005). For earlier types we used the MS absolute magnitudes in Cramer (1997) and Martins et al. (2005) and colors from Koornneef (1983) and Kenyon & Hartmann (1995). Goodness-of-fit tests, weighting each source using its color and magnitude errors, were performed to estimate the best-fitting isochrone and mean extinction of the sources in each field. Fits were attempted at a range of ages (at intervals of 0.25 Myrs) and reddenings (at intervals in A V of 0.25). To assess the validity of these results, 95% confidence intervals were calculated for all fitted ages and extinctions using a bootstrapping technique in which our dataset was resampled 1000 times and refit. The range of fitted values provides a reliable estimate of the confidence intervals on each fit. Both the age and extinction were left as free parameters during the refitting.
We note first that, regardless of age, the lower mass stars are better fit by a slightly redder isochrone than the higher mass stars. This effect is most prominent for stars < 2 M ⊙ , and is apparent in both fields, although it is stronger in the north-western field. This could be attributed to inaccuracies in the isochrones or near-IR colors for massive stars and north-western (right) fields for all sources that meet the photometric requirements described above. Pre-MS isochrones (from Siess et al. 2000) are shown using the best fit parameters described in the text (3.5 Myrs, A V = 7.5 for the central field and 5.25 Myrs, A V = 5.5 for the northwestern field), and at a distance of 1.45 kpc (DM = 10.8, Hanson 2003). For masses above 8 M ⊙ we use absolute magnitudes from Martins et al. (2005) and Cramer (1997) and near-IR colors from Koornneef (1983) and Kenyon & Hartmann (1995), for the O-and B-type stars respectively. The MS and pre-MS were converted onto the 2MASS system using the data and relations given by Kenyon & Hartmann (1995) and Bessell (2005) and then reddened using a standard Galactic extinction law (Howarth 1983) and relative extinction relations given by Schlegel et al. (1998) and Hanson (2003). Mean photometric errors for each magnitude interval are shown as red crossed along the right-hand side of each figure.
(particularly since a set of empirical 2MASS colours for massive stars does not exist in the literature), but we note that such a discrepancy has not been noted for other star forming regions. The use of two different sources for the near-IR photometry raises the question of whether the different photometric systems may have caused this discrepancy, but since the discrepancy is apparent in both fields and the north-western field uses primarily 2MASS photometry, the different photometric catalogues are unlikely to be responsible. The effect is also visible in the CMD presented by Albacete Colombo et al. (2007, their Figure 4), who used only 2MASS photometry in their analysis of the central Chandra field. The origin of this discrepancy is unclear. The high and variable extinction toward Cyg OB2 and complex star formation history (see discussion in Section 6.1) makes this difficult to resolve. Despite the apparent difference in reddening however, we show below that the difference between the fitted extinctions of the high-and low-mass populations are not significant.
Because of this we fit the high-(8-20 M ⊙ ) and low-mass (<8 M ⊙ ) populations separately. The extinction was allowed to vary for both fits, while the age of the region was only varied for the low-mass population because the high-mass population should already be on the MS and therefore, excluding the highest mass stars which may have evolved off the MS and which we do not include in our fit, are insensitive to age variations. In the central field the high-mass stars are best fit at a reddening of A V ∼ 7.25 +0.5 −0.5 , with the lower-mass stars redder with A V ∼ 7.5 +0.5 −0.75 . In the north-western field the high-mass stars are fit with A V ∼ 4.75 +0.5 −0.75 with the low-mass stars having A V ∼ 5.5 +1.5 −1.0 . Since there is no degeneracy between extinction and assumed distance, these values are independent of our choice of distance modulus. Compared to the mean extinctions calculated in Paper 1 from X-ray spectral fits these values are slightly larger, though within the uncertainties calculated here.
When fitting the low-mass component with pre-MS isochrones we attempted fits at both the older distance of 1.8 kpc (DM=11.2, Massey & Thompson 1991) and the revised distance of 1.45 kpc (DM=10.8) estimated by Hanson (2003). Using DM=11.2 the low-mass stars are best fit with a 2.5 +1.0 −1.25 Myr pre-MS isochrone, in agreement with previous studies based on the evolutionary state of the most massive stars in Cyg OB2 (e.g. Hanson 2003). At DM=10.8 the population is better fit with a slightly older 3.5 +0.75 −1.0 Myr isochrone (as shown in Figure 2). This is older than the upper limit determined by Hanson (2003) based on main-sequence O6 and O7 dwarfs, but within the 95% confidence interval.
In the north-western field we find consistently older ages for the stellar populations. At DM=11.2 the low-mass population is best fit at an age of 4.0 +1.75 −1.25 Myrs and at DM=10.8 at an age of 5.25 +1.5 −1.0 Myrs. For both fields the use of the closer distance proposed by Hanson (2003) requires an older pre-MS isochrone to fit the data. These ages will be discussed in more detail in Section 6.1. Figure 3 shows the (J − H, H − K s ) CCD for the 1357 sources that meet our photometric requirements (fewer stars than present in the CMD in Figure 2, on account of requiring satisfactory K s magnitudes also). For reference we also show the MS track from Kenyon & Hartmann (1995) and the classical T-Tauri star (CTTS) locus from Meyer et al. (1997), both with reddening vectors extending from them. As noted above the majority of sources trace a reddened main-sequence, with a number of sources significantly more reddened still. The higher photometric errors of the 2MASS-dominated north-western field photometry is also evident when comparing the two fields and from the mean color error shown in each figure. In the central field there are two sources with large J − H colors and low H − K s colors that do not correspond to plausible stellar colors and as such may have spurious photometry.

Near-IR color-color diagram
The near-IR CCD is often useful for estimating the evolutionary class of young stellar objects because sources with circumstellar material will be shifted to higher H − K s colors due to near-IR excesses in the K s band. These are Class ii objects (Lada 1987), such as T-Tauri or Herbig Ae/Be stars, which are pre-MS stars with circumstellar accretion disks that are less evolved than the Class iii objects that have lost their inner circumstellar disks and clearly dominate our sample. We find 63 and 23 sources that fall within this region of the color-color plane, 5.9% and 7.9% of our catalogue for the central and north-western fields respectively. The fraction for the central field is slightly larger than the 4.4% determined by Albacete Colombo et al. (2007), which can likely be attributed to our use of UKIDSS data to probe lower-mass stars that retain circumstellar disks for longer periods of time (e.g. Haisch et al. 2001a). To the right of the reddened CTTS is a region typically occupied by less evolved Class i protostars, or evolved stars, with significant amounts of circumstellar material. We find only one object in this region, and from its isolation and lack of IPHAS photometry we are unable to determine whether it is a true member of Cyg OB2 or a background source.
The fractions of Class i and ii sources are significantly lower than that found from studies of other similar age star forming regions in the near-IR such as M17 (37%, Hoffmeister et al. 2008) and the Orion Nebula Cluster (>55%, ) 1 . Albacete Colombo et al. (2007) suggested that the low fraction of circumstellar disks in Cyg OB2 was due to the strong UV radiation field from the large number of OB stars in the vicinity that causes photoe- Fig. 3.-Near-IR CCDs for Cygnus OB2 sources in the central (left) and north-western (right) fields for all sources that meet the photometric requirements described above. The Kenyon & Hartmann (1995) main-sequence is shown as a blue line, transformed onto the 2MASS photometric system using the relations given by Bessell (2005). Reddening vectors with length A V = 15 mag are shown extending from the MS at types K7V (M ∼ 0.6 M ⊙ ) and M6V (M ∼ 0.2 M ⊙ ) using the reddening relations described in Figure 2. The classical T-Tauri star locus of Meyer et al. (1997) is shown as a straight red line, also with a reddening vector extending from it, and sources falling within this region are marked as crosses. The highly reddened object in the central field is shown as a large dot. The mean photometric errors on the two colors is shown in the top left corner of each figure in red.
vaporation of the disk material. Although predicted by theory (e.g. Johnstone et al. 1998), an inverse relationship between disk fractions and UV radiation field has only been mildly observed in star forming regions to date (e.g. Balog et al. 2007;Guarcello et al. 2007). To a certain extent our results support such a theory, with the fraction of circumstellar disks lower in the center of the star forming region where the UV radiation field from OB stars is stronger. However the difference is both statistically small and this interpretation oversimplifies the dynamical and 3-dimensional structure of the region (e.g. Balog et al. 2007) and therefore does not allow an accurate comparison between disk fractions and the UV radiation field. However, If Cyg OB2 contains a significant fraction of sources with ages ≥ 5 Myr, then the disk fractions of 5 -10% found here are perfectly reasonable (e.g. Hillenbrand 2005). Given the growing evidence for an older generation of star formation in the region (see discussion in Section 6.1) we suggest that this is a more likely explanation for the low fraction of circumstellar disks than invoking UV photoevaporation from OB stars.
The use of near-IR colors is however an imprecise method of tracing the population of disk bearing stars since a K s -band excess will only reveal hot dust from the inner parts of a circumstellar disk. The combination of near-and mid-IR photometry is necessary to produce a more complete picture of the evolution of circumstellar disks in a star forming region. Forthcoming observations of the Cygnus region from the Spitzer Space Telescope will allow this matter to be probed in more detail.

X-ray stellar properties
In this section we discuss how the integrated X-ray properties of sources in Cyg OB2 may be used to study the star forming region as a whole, and make comparisons with the properties of X-ray sources in other star forming regions. Feigelson et al. (2005) showed that the median energy of X-ray sources is a reliable indicator for the absorbing column density, log N H , obtained from spectral fitting procedures. In Figure 4 we show the distribution of median energies of Chandra sources in Cygnus OB2 compared to that of the well-studied Chandra Ultra-deep Orion Project (COUP, Getman et al. 2005b) of the Orion Nebula Cluster (ONC). The peak median energy of Cygnus OB2 sources is higher than that of Orion because of the higher extinction toward Cyg OB2 compared to Orion.

Median X-ray photon energy
The COUP sample also shows a smaller population with a higher median energy around 3 keV that is indicative of a population of embedded sources with higher extinction. However, such a second population is not clearly visible in the Cyg OB2 distribution with the high median energy sources appearing to constitute the tail-end of the standard distribution. This can be quantified as the fraction of sources in the two catalogues that would be classed as "heavily obscured" by some authors, i.e. with E ≥ 3.0 keV. In Cyg OB2 only 10% of the 1696 sources fall in this class, compared to 21% of Orion sources. This relative lack of embedded sources is observed in both Chandra fields. It is also not a property of the typically higher mass of our Cyg OB2 sources compared to those in the deeper low-mass COUP sample: filtering both samples on X-ray luminosity (which correlates well with stellar mass) and comparing only those sources with L X > 29.5 erg s −1 (our approximate X-ray completeness limit, see Section 4.2) also shows a deficit of embedded Cyg OB2 sources.
While it appears there is a moderate evolution in stellar X-ray luminosity with age (L X decreasing with age, but L X /L bol increasing, Preibisch & Feigelson 2005), and there might also be an associated change in spectral hardness as stars age, we expect such effects to be very small compared to the gross changes observed in median photon energy as a result of the different absorption characteristics of the ONC and Cygnus OB2 regions. We conclude that the relative lack of sources with high median X-ray energies indicates that, unlike the ONC, the central region of Cyg OB2 does not contain an embedded population of recently formed stars and that star formation in the vicinity of Cyg OB2 has declined significantly.

The X-ray luminosity function
Different young star forming regions, such as Cepheus OB3 (Getman et al. 2006), M17 , and NGC 6357 , have all been observed to have Xray luminosity functions (XLFs) that exhibit similar lognormal shapes. Since the XLF is effectively a convolution of the IMF and the X-ray luminosity -mass relation for pre-MS stars, it may be used to study the properties of a stellar population without making any assumptions about the region or the objects being studied (e.g. by using pre-MS evolution models). Furthermore, if we assume that the IMF is invariant in young clusters, at least as far as can be measured, the completeness of our sample may be estimated by comparing the XLF with that determined from deeper observations of other clusters, such as the COUP study which is complete to ∼0.1 M ⊙ . Figure 5 shows a comparison between the XLF of lightly obscured ( E ≤ 3.0 keV) Cygnus OB2 sources and those from the well-studied Orion Nebula (we show only the lightly obscured populations since Cyg OB2 has a smaller heavily obscured population compared to   Getman et al. 2005a), which has been adjusted to the revised distance of 400 pc for the ONC (Muench et al. 2008). The COUP XLF has been renormalized to fit the high-mass Cyg OB2 XLF. All Cyg OB2 X-ray luminosities are scaled to a distance of 1.45 kpc. XLF 1σ error bars for the Cyg OB2 sample are also shown. the ONC, and this will influence the XLF). Error bars for the Cyg OB2 XLF showing the 1σ confidence level were estimated from Monte Carlo simulations of the XLF, where individual X-ray luminosities were drawn from a Gaussian distribution with mean equal to the measured X-ray luminosity and variances based on the X-ray luminosity error. The COUP XLF has been renormalized to fit the Cyg OB2 XLF at the intermediate-to high-mass end.
Between log L X ∼ 29.5 -31.5 erg s −1 the ONC and Cyg OB2 XLFs are in good agreement. At lower luminosities the two XLFs differ, with fewer Cyg OB2 X-ray sources compared to the ONC. This represents our completeness limit, from which we determine a mass limit of 1 M ⊙ using the X-ray luminosity to mass correlation in Preibisch et al. (2005). 2 . Beyond this our completeness drops off rapidly towards lower masses with our sample only 50% complete at 0.75M ⊙ and < 20% complete at 0.5M ⊙ . Considered separately the two fields show similar XLFs down a similar completeness limit, despite an exposure difference of a factor of two. This is a product of the L X -mass relation which is level between 1 -10 M ⊙ and then drops rapidly at lower masses with a high dispersion . Beyond the completeness limit, the XLF falls off quicker in the north-western field than it does in the central field due to the different in X-ray exposure and the lack of

Stellar masses and mass functions
The compilation of a large sample of cluster members with near-IR photometry and fitted pre-MS isochrones allows stellar masses to be estimated for a large and relatively complete sample. This then allows the mass function of sources in Cyg OB2 to be determined.
Individual stellar masses were calculated based on the positions of the sources in the (J, J − H) CMD by tracing an extinction vector back to the theoretical MS or pre-MS isochrones described in Section 3.1. For this purpose we assume a distance to Cyg OB2 of 1.45 kpc Hanson (2003). We will initially assume that all stars in each field were born coevally, ignoring any possible age spread, therefore allowing a direct relationship between the position of the source in the CMD and its mass and extinction. For this we will use the best-fitting ages determined in Section 3.1 for DM = 10.8. Because of the form of the pre-MS isochrone in the near-IR CMD a number of sources have degenerate solutions for their masses. This degeneracy was removed by dereddening these sources using their X-ray spectral-fitted hydrogen column densities and the relation N H = 2.2 × 10 21 A V cm −2 (e.g. Gorenstein 1975;Ryter 1996) and then finding the closest solution on their reddening locus. Table 1 lists the masses and extinctions for all sources in Cyg OB2 with near-IR photometry determined using this method.
Masses derived using this method will be dependent on a number of factors. The Jband magnitude errors, as shown in Figure 2, are small, and will therefore produce only a small error in the derived mass (at J ∼ 17, where M = 0.65M ⊙ , the typical J-band error of 0.024 mags corresponds to an error of only 0.02 M ⊙ ). Other photometric "discrepancies", such as treating a binary star as a single star or not considering the effects of variability will affect the derived stellar mass slightly more. The influence of circumstellar material on the stellar masses is reduced by our use of the J − H color as opposed to the H − K s color in deriving masses from near-IR colors. The age of the region, estimated in Section 3.1, will also affect the derived masses, and this is discussed later. Finally, the choice of pre-MS isochrones could potentially have a significant effect. Studies show that using different isochrones can produce mass differences of up to a factor two (Hillenbrand & White 2004), though this effect is strongest at low masses.
For many of the most massive stars in Cyg OB2 a considerable body of spectroscopic observations exists that may be used to derive spectral types and masses. In Paper 1, 54 sources with spectroscopic observations in the literature were associated with Chandra sources of which 51 have full spectral types. We determined zero-age masses for all these sources using the zero-age masses from the published parameters of Martins et al. (2005) for O-type stars and from the collated information presented by Kiminki et al. (2007) for B-type stars (primarily from stellar evolutionary models).

The mass function of Cygnus OB2
The mass functions (MFs) of very young SFRs are often described as initial mass functions, although this is rarely true. The IMF may be disrupted within as little as ∼1-2 Myr due to the ejection of members through interactions and the demise of the highest mass members. Considering the ages estimated in Section 3.1 and evidence in the literature for ejected massive stars from Cyg OB2 (e.g. Comerón & Pasquali 2007), it is important to make this distinction and understand its implications. Figure 6 shows mass functions for both fields in Cyg OB2 and for the combined fields, all of which reach a maximum at ∼1 M ⊙ , our estimated completeness limit (Section 4.2). Excluding the bins spanning the range 3 -10 M ⊙ that contain A and late B-type stars not  (7): Method by which mass and extinction were determined. For sources with spectral information in the literature a reference is provided, while sources where masses were determined from the CMD are listed as "CMD". expected to emit X-rays (see Section 2 and our discussion of the completeness of our sample) the mass functions show a clear power law slope, steepening at higher masses. Excluding the most massive stars we find a power-law slope of Γ = −1.09 ± 0.13 in the combined fields, in agreement with the value of Γ = −1.3 ± 0.3 estimated by Kroupa (2001) from accumulated observations, and only slightly shallower than the canonical Salpeter value. When the two fields are considered separately we find negligibly different slopes of Γ = −1.08 ± 0.15 in the central field and Γ = −1.09 ± 0.10 in the north-western field. When considering only the O-type stars we find a much steeper slope with Γ = −2.72 ± 0.52.
Previous measurements of the MF 3 in Cyg OB2 have mostly been derived from spectroscopy of the massive stars. Massey & Thompson (1991) measured Γ = −1.0 ± 0.3 for all stars more massive than 9 M ⊙ and Γ = −0.9 ± 0.5 using only the highest quality photometry and stars more massive than 15 M ⊙ . Compared to our high-mass MF this is a much shallower slope, although the masses used were derived from older models for massive stars. More recently, Kiminki et al. (2007) derived a slope of Γ = −2.2 ± 0.1 for spectroscopically studied stars more massive than 15 M ⊙ across a wide area of Cyg OB2, deriving masses from updated stellar evolutionary models and the revised O star stellar parameters presented by Martins et al. (2005). Our high-mass MF is in good agreement with their value, mainly because of our use of similar models and stellar parameters. However, we have shown here that the MF at lower masses is not as steep and is closer to the canonical value. We suggest that the steep high-mass slope of the MF is not intrinsic but is a product of the older stellar populations in the region having lost their most massive members, thereby steepening the mass function.
The only previous measurement of the mass function at lower masses is due to Knödlseder (2000) who found Γ = −1.6±0.1 down to 2 M ⊙ from a photometric analysis of 2MASS observations in Cyg OB2. However, his use of main-sequence magnitudes and colors for a pre-MS stellar population puts the derived masses into question. Our measurement is therefore the first deep measurement of the pre-MS mass function in Cygnus OB2 and its agreement with the Kroupa (2001) value, supporting the view that the IMF is invariant.

Effect of age uncertainties on mass function slope
The uncertainty in our estimation of the age of Cyg OB2 has repercussions for stellar masses derived from fitting pre-MS isochrones to the near-IR CMD. We also cannot assume that all the stars within a single field were formed coevally (see the discussion in Section 6.1). To test the impact on the MF slope of this age uncertainty we altered the estimated age and regenerated the individual stellar masses and the MF. We find that when the estimated age is varied by ±1 Myr the derived MF slope changes by less than 10%, with the MF in the north-western field varying much less than in the central field. Even varying the age over a large range (by ±2 Myr) only causes a MF slope variation of ∼20% (for the central field) and < 10% in the north-western field. Age variations larger than this cause much greater variations in the mass function slope, particularly in the central field, but are well outside the 95% confidence intervals.
We also studied how the MF would vary if all the stars were not formed coevally but formed over a range of ages (an age spread that might explain the wide spread in the CMD, see discussion in Section 6.1). Since the spread in the CMD could be caused by both a spread in extinction and a spread in ages we did this by selecting ages for each sources that would minimize the resulting spread in extinction. This is the opposite process to that used above where a single age was used, thereby minimizing the spread in ages (the true situation is likely to be somewhere between these two extremes). The resulting MF has a slope of Γ = −1.03 ± 0.11 in the combined fields, Γ = −0.98 ± 0.13 in the central field, and Γ = −1.05 ± 0.06 in the north-western field. These small variations in the slope of the MF strengthen its validity despite the uncertainty over the age of the region.

Discussion
In this section we discuss the results obtained here in the context of our current understanding of Cygnus OB2, its size, age, and star formation history. We also compare the derived properties of the region with those of the small but growing number of massive SFRs that have been studied.

The age of Cygnus OB2
The main constraints we have on the age of Cyg OB2 are derived from observations of its most massive stars. Hanson (2003) estimated an age of 2 ± 1 Myrs to accommodate the observed mix of main sequence and evolved OB stars: very young sources such as #A37 from Comerón et al. (2002), which Hanson (2003) classified as an O5V((f)), cannot be older than 1 Myr (based on evolutionary tracks); while supergiants such as Cyg OB2 #9, type O3If (Massey & Thompson 1991), are believed to be at least 3 Myrs old. The presence of a main sequence extending from type O6, which also cannot be older than 3 Mys, supports this age estimate.
There has been growing evidence for a large number of evolved supergiant stars in the region (Massey & Thompson 1991;Comerón et al. 2002). Hanson (2003) noted that as the search for OB stars in the region was extended to larger radii the fraction of evolved massive stars increased, leading her to suggest that our view of Cyg OB2 is becoming contaminated by non-members. Many of the new evolved massive stars identified by Comerón et al. (2002) were found to the south of the original association in a region where Drew et al. (2008) have since uncovered a population of A-type dwarf stars with an age of 5 -7 Myr. Drew et al. (2008) suggest that this region may represent a larger and older parent cluster.
In Section 3.1 we derived ages of 3.5 +0.75 −1.0 and 5.25 +1.5 −1.0 Myrs for the central and northwestern fields, both with large spreads in the CMD that cannot solely be explained by photometric errors. Such wide spreads in CMDs have previously been interpreted as due to wide age spreads in association members (e.g. Palla & Stahler 2000). However other authors have suggested that the observed CMD spreads are due to a mixture of photometric errors, variability in pre-MS stars (up to several magnitudes for classical T-Tauri stars, Herbst et al. 1994), binarity (Preibisch & Zinnecker 1999), episodic accretion phases (Baraffe et al. 2009) or a spread in line-of-sight distances or extinctions. Many of these factors are not well understood, and in the case of Cyg OB2 particularly the spread in extinction. Sale et al. (2009) measured the rise of extinction with distance towards Cyg OB2 and found a substantial increase in extinction at ∼1.5 kpc, which they estimate could be confined to a depth of ≤ 100 pc. If a significant spread of extinction did exist across Cyg OB2, it could, combined with the effects of binarity and pre-MS variability, explain a large proportion of the spread in the CMD. Furthermore, given the uncertainties on the two ages derived in this work, the age difference between the two fields is not significant in itself and could fit with a picture of a single burst of star formation in the region.
However, combining the ages derived here with the existing evidence for very young (∼1 Myr) and slightly older (∼5 -7 Myr) populations in Cyg OB2 suggests a picture of a region with a large spread in ages. In such a picture the central field, for which we derived an age of 3.5 +0.75 −1.0 Myr, merges with the young OB-star dominated association, while the north-western field is biased to a greater age. We cannot yet know to what extent there are two distinct generations of stars present, or whether there is a real age spread (with the youngest stars co-located with the OB stars).

The size and mass of Cygnus OB2
As shown in Section 2, the catalogue presented in Paper 1 is complete to 1 M ⊙ within the caveats of X-ray emitting stars. We can therefore combine the MF determined here and the stellar density within our completeness limits to estimate the total size and mass of the entire Cyg OB2 association. For the purposes of this exercise we will consider the Cygnus OB2 association to consist of all sources young enough to be detected in X-rays (i.e. < 100 Myrs). While this may include multiple generations of star formation that may have occurred on different spatial scales, until the different populations can be separated this is the only option available to us. Also, because our observations only sample two small fields in the center of the association, we must combine our results with previous estimates of the total spatial extent of the SFR available in the literature. Knödlseder (2000) analysed the morphology of Cyg OB2 by fitting a King profile (King 1962) to 2MASS star count data, estimating it to be a spherically symmetric association of ∼ 2 • diameter. This analysis necessarily relied heavily on performing a background subtraction using the stellar content of a nearby field, despite the inherent difficulties involved in doing this along complicated sightlines in the Galactic plane. An improved morphological analysis may be made using the radial stellar density of Chandra sources in the direction of the north-western field where a radial length of 30 ′ is possible using the two fields (see Figure 1 in Paper 1).
We find that the stellar density drops off much more quickly than estimated by Knödlseder (2000), with approximately one third as many stars detected by us in the 1 -2.5 M ⊙ mass range (where our data remain complete) at distances of >15 ′ , compared with the King profile determined by Knödlseder (2000). Using our radial density profile and assuming that Cyg OB2 is spherically symmetric we have estimated a new King profile for Cyg OB2. Using our peak stellar density and the mass function slope estimated above, extrapolated down to 0.01 M ⊙ using the multi-stage power-law IMF from Kroupa (2001) we calculate a total stellar content of 5.7 × 10 4 stars and a total mass of 2.8 × 10 4 M ⊙ . However it is clear from the spatial distribution of A-type dwarfs in Cyg OB2 presented by Drew et al. (2008) that the structure of Cyg OB2 is far from spherical. The authors note a distinct lack of A-type dwarfs to the east of Cyg OB2 and a pronounced concentration towards the southern part of the cluster that may increase the size of the association. We therefore estimate a total stellar mass of (3 ± 1) × 10 4 M ⊙ for the entire association.
Using this estimated density profile and our derived MF we can estimate the expected number of stars of different masses in Cyg OB2. A total mass of 3 × 10 4 M ⊙ implies a total of ∼1200 OB stars, approximately half that predicted by Knödlseder (2000). Our current MF predicts a total number of O-type stars of ∼75, only slightly larger than the currently known number of 65 O-type stars in Cyg OB2 (Massey & Thompson 1991;Hanson 2003;Kiminki et al. 2007;Comerón et al. 2008;Negueruela et al. 2008). This may suggest that there are more O-type stars to be discovered in Cyg OB2. If we assume that the high-mass MF slope has been influenced by the demise of the most massive stars in the region and that it was originally Γ = −1.3 (Massey 1998), we estimate the number of stars that have evolved to their end states to be ∼12. There are no known supernova remnants in Cyg OB2, although there is some evidence for stellar remnants: Bednarek (2003) and Abdo et al. (2009) identify two pulsars within Cyg OB2, with ages ∼ 2×10 4 yr (Camilo et al. 2009), that likely represent recently expired massive stars, while Comerón & Pasquali (2007) identified an O4If runaway star that appears to have been ejected from Cyg OB2 ∼1.6 Myr ago, possibly following the supernova explosion of a more massive binary companion. Table 2 lists some of the properties of Cyg OB2 estimated in this work along with those of a number of other massive star forming regions. With the exception of the ONC the majority of these regions have not been studied to as low a stellar mass, with properties determined in different ways by different authors (the number of O-type stars is particularly poorly known for many of these regions). Despite this some comparisons may be made. Cyg OB2 is certainly a very high-mass cluster, comparable to the Arches and Quintuplet clusters near the Galactic center or the giant H ii regions Westerlund 2 and NGC 3603 in the Carina spiral arm. Only regions such as Westerlund 1 cluster, W49A, and R136 in the Large Magellanic Cloud appear to be more massive.

Comparison with other massive star forming regions
Despite their similar masses, these SFRs show significant differences in their stellar densities, ranging from ∼ 10 2 M ⊙ pc −3 for Cyg OB2 and the Quintuplet cluster to ∼ 10 5 M ⊙ pc −3 for NGC 3603 and the Arches cluster. This may represent an inherent difference between two varieties of massive star forming region: that of the compact, massive cluster with a very high density core on one hand and the lower density and spatially more extended region on the other. This could be an evolutionary effect since Cyg OB2 and the Quintuplet cluster are both older than NGC 3603 and the Arches cluster, although the age differences are much shorter than the time periods necessary for such a change (Gieles & Bastian 2008). It is more likely that these differences are real and are related to how the molecular cloud collapsed: low density cores suggest formation by triggering or the interaction of gas motions, while gravitational collapse typically results in higher densities (Smith 2008). Homeier & Alves (2005) note that W49A, which also has a low core density, has a very subclustered structure, a picture that could apply to the wider Cygnus X giant molecu- 2.0 ± 0.3 7.0 × 10 3 -0.002-0.2 > 24 Quintuplet Cluster c 4.0 ± 2.0 6-10 ×10 3 2.5 × 10 2 1.0 -NGC 3603 d 1.0 ± 0.35 1.0 × 10 4 1 × 10 5 0.23 ∼40 Arches Cluster e 2.5 ± 0.5 > 1 × 10 4 3 × 10 5 0.034-0.30 120-160 Cygnus OB2 ∼1-7 3 × 10 4 1 × 10 2 1.3 65 Westerlund 1 f 3.6 ± 0.7 5 × 10 4 > 3.6 × 10 3 0.4 > 50 W49A g 1.0 ± 1.0 6 × 10 4 --> 100 R136 g 3.0 ± 2.0 > 1 × 10 5 --> 150 lar cloud (GMC) with subclusters such as Cyg OB2 (Bica et al. 2003) and Cyg OB9 (e.g. Uyanıker et al. 2001). This structure supports the hierarchical picture of star formation where young clusters and associations represent the dense inner regions of a hierarchy emerging from the GMC in which they formed (e.g. Elmegreen et al. 2006).

Conclusions
We have analysed the integrated stellar properties of young stars in the massive SFR Cygnus OB2 using the recently published catalogue of Chandra X-ray point sources detected in the region. We find that our sample is complete down to ∼1 M ⊙ , excluding A and B-type stars that are not expected to emit X-rays, making this one of the deepest surveys of the region. Ages for sources in the two fields studied were estimated from pre-MS isochrone fits to the near-IR CMD and found to be 3.5 +0.75 −1.0 and 5.25 +1.5 −1.0 Myrs, both with significant spreads around the isochrones that cannot solely be explained by photometric errors. Given that the most massive stars in the region have an age of 2 ± 1 Myrs (Massey & Thompson 1991;Hanson 2003), we suggest that this supports recent evidence for an older generation of stars in the region (e.g. Drew et al. 2008;Comerón et al. 2008) that either represent a significant age spread or multiple epochs of star formation. Additionally, the lack of sizable population of highly embedded sources suggests that star formation in the region studied has declined significantly.
Assuming that a significant fraction of sources in Cyg OB2 are older than the previously accepted age of 2 Myrs, many of the unique properties of the region may be explained. As noted by Drew et al. (2008), the distinct lack of a bright Hii region surrounding Cyg OB2 is perfectly reasonable if the clearing timescale has been greater than 5 Myrs. Furthermore, we propose that the low fraction of sources with K-band excesses found by Albacete Colombo et al. (2007, and confirmed from our larger sample) is less abnormal if a significant fraction of sources are older than previously believed.
We measure the stellar mass functions for stars within our completeness limits and find a slope of Γ = −1.09 ± 0.13, in good agreement with the potentially universal value estimated by Kroupa (2002). This is the deepest and most accurate measurement of the mass function in Cyg OB2, building on previously measurements that have found either steeper (Knödlseder 2000) or shallower (Massey & Thompson 1991) slopes. A steepening of the mass function is observed at high masses, as found by Kiminki et al. (2007), which we attribute to the demise of the highest mass members of the older generations in the region.
An estimation of the total size of the region suggests that the stellar density drops off faster than estimated by Knödlseder (2000). This, combined with our mass function estimate, reveals a total mass of ∼ 3 × 10 4 M ⊙ . This makes Cyg OB2 similar in mass to many of the recently discovered massive clusters in our Galaxy such as the Arches and Quintuplet clusters. However, we note that comparing other properties of these massive star forming regions, such as their central densities, reveals differences that may hint at different formation mechanisms.
Past studies of Cyg OB2 have clearly been complicated by an uncertain star formation history and a large spatial extent in a crowded region of the Galactic Plane. These are likely to be inherent properties of massive star forming regions in galactic spiral arms where star formation continues for longer periods and across larger areas, propagated through entire GMCs by continued rejuvenation and feedback triggering. These findings support the need to fully understand the full star formation history of a region before if its observed properties are to be correctly interpreted. Cygnus OB2 is clearly a very important region to study, not only because of its proximity and size, but also because of the insights it will give us into galactic-scale star formation and the evolution of GMCs. for all sources in Cygnus OB2 with stellar masses derived from near-IR photometry and existing spectroscopic observations. Left: MF for both fields combined; right: MF for the central (full line) and north-western (dashed line) fields. χ 2 fits to the MFs within the completeness limits (M > 1M ⊙ and excluding early A and late B-type stars) are shown as red lines, with slopes of Γ = −1.09 ± 0.13 (combined field), Γ = −1.08 ± 0.15 (central field), and Γ = −1.09 ± 0.10 (north-western field).