Issue 
A&A
Volume 619, November 2018



Article Number  A105  
Number of page(s)  16  
Section  Astrophysical processes  
DOI  https://doi.org/10.1051/00046361/201732023  
Published online  15 November 2018 
MoCA: A Monte Carlo code for Comptonisation in Astrophysics
I. Description of the code and first results
^{1}
Astronomical Institute of the Czech Academy of Sciences, Boční II 1401/1, 14100 Prague, Czech Republic
email: francesco.tamborra@asu.cas.cz
^{2}
Dipartimento di Fisica e Matematica,Università degli Studi Roma Tre, via della Vasca Navale 84, 00146 Roma, Italy
Received:
2
October
2017
Accepted:
6
August
2018
We present a new Monte Carlo code for Comptonisation in Astrophysics (MoCA). To our knowledge MoCA is the first code that uses a single photon approach in a full special relativity scenario, and including also Klein–Nishina effects as well as polarisation. In this paper we describe in detail how the code works, and show first results from the case of extended coronae in accreting sources Comptonising the accretion disc thermal emission. We explored both a slab and a spherical geometry, to make comparison with public analytical codes more easy. Our spectra are in good agreement with those from analytical codes for low/moderate optical depths, but differ significantly, as expected, for optical depths larger than a few. Klein–Nishina effects become relevant above 100 keV depending on the optical thickness and thermal energy of the corona. We also calculated the polarisation properties for the two geometries, which show that Xray polarimetry is a very useful tool to discriminate between them.
Key words: polarization / accretion / accretion disks / galaxies: active / stars: black holes
© ESO 2018
1. Introduction
Upscattering of lowenergy photons by Inverse Compton on a hot gas of electrons (i.e. Comptonisation) is an important mechanism in astrophysics. In particular, in accreting sources such as Xray Binaries (XRBs) and Active Galactic Nuclei (AGN) this mechanism is believed to be responsible for their hard Xray emission (Sunyaev & Titarchuk 1980): soft photons produced by the accretion disc are Comptonised by a corona of hot electrons. The typical Comptonisation spectrum of AGN can be approximated well by a powerlaw with photon energy index Γ ∼ 1.5 − 2.0 extending from a few to hundreds keV with an exponential cutoff at high energies (e.g. Perola et al. 2002; Dunn et al. 2010). The corona of electrons is characterised by its temperature, kT_{e}, its geometry and its density (or optical depth, τ). Thanks to the NuSTAR (Harrison et al. 2013) high quality broadband (3–79 keV) spectra, the coronal properties of AGN have been the subject of several studies in the last years (e.g. Fabian et al. 2015; Tortosa et al. 2018, and references therein). The measured cutoff energies, even if with a large scatter and in some cases with only lower limits, cluster to values between 100 and 250 keV, in agreement with previous measurements performed by BeppoSAX (e.g Perola et al. 2002), INTEGRAL and Swift missions (Molina et al. 2013). Using the approximate relation stating that the observed highenergy cutoff correspond to approximately two to three times the thermal energy of the corona (Petrucci et al. 2000, 2001; which has been proved to be accurate for an extended slab geometry but it is often used for coronae of any geometry and size), the extrapolated kT_{e} is of the order of ∼50 − 150 keV. Furthermore, if the corona is really compact as evidence, mainly from timing arguments (Uttley et al. 2014, and reference therein), suggests, these values would put the coronal parameters very close to the boundary for pair production (Fabian et al. 2015). XRBs, on the other hands, do not in general have stable Xray emission and cycle from a state in which the thermal emission of the disc is dominant over a steep powerlaw tail at highenergy with typical spectral index Γ ∼ 2.5 (the socalled softstate) and a state characterised by a strong and flatter powerlaw emission with a spectral indices and high energy cutoffs similar to those observed in AGN (i.e. Γ ∼ 1.5 − 2.0, Fabian et al. 2015) but often associated with the presence of a jet observed in the radio which correlates nonlinearly with the Xray luminosity (the socalled hardstate; Fender 2001). One of the most popular interpretations, also supported by the study of the variability of these sources in the two states, is that in the hard state the accretion disc is truncated at some radius and the inner flow is filled by the corona which Comptonises the thermal emission producing the strong powerlaw emission at high energies and a stable jet is also formed. As the accretion rate increases, the accretion disc extends up to the innermost stable circular orbit (ISCO) and a very small but hot corona produces a much steeper powerlaw at high energies and the Lorentz factor of the jet rises sharply, before the jet is suppressed in a soft discdominated state (Fender et al. 2004).
In the last three decades, the Comptonisation problem has been addressed by many authors in different ways and the results of these studies are now often available in the form of XSPEC^{1} models which are widely used by astronomers to fit Xray spectra. Most, if not all, of these XSPEC models have been obtained by analytically or numerically solving the nonlinear radiative transfer equations under certain approximations and/or simplifying assumptions. Different approaches were adopted, from solving the Kompaneets equations in the diffusion regime (τ ≫ 1) and in the optically thin regime (τ < 1) and then combining the asymptotic solutions to using iterative procedures to solve the radiative transfer equations for consecutive scattering orders. The advantage of a semianalytical approach is its capacity to build a grid of solutions for a large range of coronal parameters in order to fit the data. The comparison made between this approach and the first Monte Carlo simulations (Stern et al. 1995) was showing a good agreement in most regimes while offering a much faster method with respect to the computational time needed on the most advanced calculators at that time. However, this approach has several limitations. In particular it is less reliable for specific combinations of coronal parameters and it basically consists in a monodimensional description of the radiative process. It is beyond the purposes of this paper to discuss in detail all the semianalytical methods for solving the Comptonisation problem and we refer the reader to the complete analysis made by Poutanen & Svensson (1996) who, while presenting their calculations (which led to compPS XSPEC model), also analysed the different approaches and results of their predecessors (e.g. Titarchuk & Lyubarskij 1995; Hua & Titarchuk 1995).
In the context of this scenario we developed MoCA: a Monte Carlo code for Comptonisation in Astrophysics. Our code differs from other models because instead of solving radiative transfer equations we followed every photon from the source to the observer using the Monte Carlo method. This approach allows to explore the whole space of parameters characterising the Comptonising medium without any particular limitation. MoCA includes special relativity and all quantum effects such as the Klein–Nishina differential crosssection and scattering angles distribution and the Maxwell–Jüttner electron distribution. The code is modular and, even if in this paper we discuss only the case of the hot coronae around accreting black holes, it can be easily modified to be applied to different Comptonisation problems in astrophysics. An important feature of MoCA is polarisation: for every photon we register its Stokes parameters, which allows us to calculate the polarisation degree and polarisation angle. This feature is particularly relevant now that the SMEX NASA mission IXPE (Weisskopf et al. 2016) has been approved, as onboard it will have the first new generation Xray polarimeter after 40 years since the last Xray polarisation measurements. Polarimetry combined to spectroscopical analysis has the potential to infer the geometry of the corona which can help to understand its origin. For this work we have considered two geometries for the corona: a spherical corona and a slab corona. In the first case (if it is very compact) one might expect the corona to be the base of a jet (or an aborted jet) while in the latter scenario it can be originated by perturbations in the disc. This version of the code does not include General Relativity (GR) effects therefore, even if we consider the geometrical effect of a compact corona on the spectrum and polarisation signal, we mostly focus on the case of extended coronae (this allows us to compare with the above mentioned XSPEC models which do not include GR as well and consider only extended coronae). Nonetheless a version of MoCA coupled with a GR raytracing code is being developed and will be the subject of a future paper.
MoCa is not the first code to deal with Comptonisation (including polarisation) with a Monte Carlo approach. A similar approach was used a few years ago by Schnittman and collaborators (Schnittman & Krolik 2010). However, to increase the computational efficiency of the calculations they used photon packets that include the entire broadband spectrum instead of a single photon. For this reason their code works in Thomson regime and the energy exchange is taken into account only by the boost in the reference frame of the rotating corona and then in the reference frame of the electron while the scattering is always elastic. More recently, Beheshtipour and collaborators (Beheshtipour et al. 2017) expanded upon the work of Krawczynski (Krawczynski 2012) and manage to include proper Klein–Nishina treatment for Comptonisation in their code (among other things such as the contribution of nonthermal electrons in the corona and cyclotron photons in addition to thermal photons as seeds) following the same photon packets approach as in Schnittmann.
The paper is organised as follows: a brief description of the code is given in Sect. 2, with full details in the Appendix. In the following sections we show the results obtained with MoCA when applied to the case of Comptonisation for accreting sources: Sect. 3 is focussed on spectra while in Sect. 4 we focus on the polarisation signal. Lastly, in Sect. 5, we summarise our work.
2. The code
MoCA is written in Fortran 2003 and it is modular, allowing for applications to different systems of astrophysical interest with minor changes. In this section we give a brief description of how the code works when applied to accreting systems while a more detailed description and all the formulae and test we performed can be found in the Appendix.
We have implemented two different geometries for the source of the seed photons: either a pointlike along the symmetry axis of the system, or an accretion disc. For the pointlike source the emission can be monochromatic or a power law or a Wien tail while for the disc it is a multitemperature black body (MTBB from now on), with the radial dependence of the temperature as for a Shakura–Sunyaev (Shakura & Sunyaev 1973) geometrically thin and optically thick disc. The seed photons can be emitted isotropically at a given radius or, as for infinitely thick atmospheres, they can be emitted mostly perpendicularly to the plane of the disc (i.e. limb darkening effect). When polarisation calculations are turned on, a polarisation vector, always perpendicular to the wave vector of the seed photons, is created and it can be randomly orientated (for unpolarised radiation) when the emission is isotropic or polarised accordingly to Chandrasekhar predictions (Chandrasekhar 1960) for infinitely thick atmospheres when the emission is limb darkened.
The corona of electrons surrounding the disc and responsible for the Comptonisation of seed photons is characterised by its thermal energy, kT_{e}, its geometry and its density (or optical depth). The first type of geometry we implemented in the code is the spheroid, characterised by the semidiameter along the spin axis, H_{cor}, and the semidiameter along the azimuthal plane, R_{cor}. As an illustration, we have considered two geometries for the corona: a very oblate spheroid with H_{cor}/R_{cor} = 0.01 (to which we refer as a slab) and a spherical one (H_{cor} = R_{cor}), both covering the entire disc (see Fig. 1, not to scale). Our simulations considered only one side, assuming the disc being infinite. We selected these two geometries because they are the geometries implemented in XSPEC models and also because they represent a good choice for testing the polarisation having different symmetry properties. The velocity of free electrons composing the corona is calculated using the Maxwell–Jüttner distribution as given in Titarchuk & Lyubarskij (1995) which naturally reduces to the classic Maxwell–Boltzmann distribution for nonrelativistic electrons.
Fig. 1.
Sketch of the corona geometries implemented in MoCA, compatible with those implemented in most of the analytical Comptonisation models available for XSPEC. 

Open with DEXTER 
MoCA treats the scattering with Klein–Nishina corrections which makes the computation more timedemanding mainly because of the switching between the reference frame of the disc and the reference frame of the electron and also because of the complexity of the distributions of the scattering angles. However, this approach allows us to explore the full parameter space without any particular limitation and as we show in the next section that it can affect the shape of the spectrum in particular scenarios.
For each photon which reaches the observer at infinity the Stokes parameters Q and U are calculated and registered together with the direction, energy, and number of scatterings experienced by the photon before escaping. In principle, however, any additional information can be recorded if needed.
3. The spectrum
As an illustration, in this section we show some of the results which can be obtained with MoCA. We focus here on the spectral results while in the next chapter we focus on the polarisation signal.
In Fig. 2 we show the spectrum (photon counts in arbitrary units) produced by Comptonisation of soft disc photons from a slab corona with τ = 1 and kT_{e} = 100 keV. The corona covers the whole disc, R_{cor} = 1000 r_{g}, while on the spinaxis the height is H_{cor} = 10 r_{g}. We chose such a large value for R_{cor} because we wanted the corona to cover the whole disc (as in XSPEC Comptonisation models). This value is the one we chose for the disc and it is large enough to be considered infinite (another assumption made by the models we want to compare to) and therefore avoid edge effects at lower energies. The pink line shows the unscattered component reaching the observer and arising from a disc with inner and outer radius equal to 6 and 1000 r_{g} respectively, surrounding a 10 M_{⊙} black hole accreting at ṁ = 0.1 in Eddington luminosity units. Coloured lines show the different scattering order components forming the total powerlaw spectrum with a highenergy cutoff (black line). The spectrum in Fig. 2 was obtained integrating along all lines of sight (to increase the statistics) so it is not an observable. However from the spectroscopic point of view the inclination does not change the shape of the spectrum significantly.
Fig. 2.
Spectrum of a 10 M_{⊙} black hole accreting at ṁ = 0.1 in Eddington luminosity units and Comptonised by a slab corona with τ = 1 and kT_{e} = 100 keV. The pink line represents the unscattered component (i.e. the soft Xrays disc emission reaching the observer) while the coloured lines represent the different scattering order components as specified in the figure. The total spectrum observed at infinity (black line) is a powerlaw with a high energy cutoff. 

Open with DEXTER 
We compared our spectrum with three of the most commonly used Comptonisation models in XSPEC: compPS (Poutanen & Svensson 1996), compTT (Titarchuk & Lyubarskij 1995; Hua & Titarchuk 1995) and Nthcomp (Zdziarski et al. 1996). The former two models include the geometry of the corona as one of their parameters, while Nthcomp uses the geometryindependent photon index Γ. The comparison has been performed by fitting each model on MoCA “data” between 2 and 800 keV keeping frozen all the parameters at the value we used in our MoCA simulations (i.e. τ, kT_{e}, and the geometry of the corona) with the exception of the normalisation. We decided to cutoff from the fit the thermal component because some models such as compTT use a simple Wien tail while we use the more accurate MTBB profile (as in compPS). Even choosing a value for compTT putting the peak of thermal emission coincident with the one in MoCA (kT_{bb} ∼ 0.02 keV in this particular case) the profiles are quite different and we did not wanted the fit to be driven by differences in the thermal component because we are interested in comparing the slope of the powerlaw and the highenergy cutoff (i.e. the Comptonisation spectrum). For Nthcomp we inverted the relation used in the code which links τ to Γ and kT_{e} (in the Appendix of Zdziarski et al. 1996) in order to calculate the spectral index as a function of the other two parameters and we kept it frozen. However, to our understanding, that relation is valid in a uniform sphere, so we performed the comparison with Nthcomp only for the spherical corona. In Fig. 3 we show the comparison between MoCA (black line) and the two Comptonisation models as indicated inside the figure for the case of a slab corona with τ = 1 and kT_{e} = 100 keV. In this regime we see a good agreement between MoCA, compPS and compTT: all of them reproduce the same slope for the powerlaw as well as the highenergy cutoff. On the other hand, in Fig. 4, we show two cases in which the models are quite different from MoCA results, specifically for a slab corona with τ = 5 and kT_{e} = 50 keV in the upper panel and for a spherical corona with τ = 4 and kT_{e} = 20 keV in the lower panel. In the latter case we performed the comparison with Nthcomp as well. In the top panel of Fig. 4compTT reproduces the slope observed in MoCA while compPS do not. While compTT supports such high values for the optical thickness, in compPS we had to force the insertion of the parameter if optical thickness was higher than 1.5, therefore it is not surprising that it cannot properly reproduce the spectral shape in this regime. Both models however create a bump around 200 keV which is not observed in MoCA. In the lower panel of the figure compPS reproduces the slope below 10 keV while the other two models do not. However, none of the three models reproduce the highenergy cutoff obtained with MoCA.
Fig. 3.
Spectral comparison between MoCA (black line) and the two semianalytical Comptonisation model compPS and compTT as indicated inside the figure for the case of a slab corona with τ = 1 and kT_{e} = 100 keV observed at an inclination of 60°. See text for more details. 

Open with DEXTER 
Fig. 4.
Spectral comparison between MoCA (black line) and the semianalytical Comptonisation model available in XSPEC as indicated inside the figure. Upper panel: case of a slab corona with τ = 5 and kT_{e} = 50 keV observed at an inclination of 60°; lower panel: case of a spherical corona with τ = 4 and kT_{e} = 40 keV at the same inclination. In the latter case we performed the comparison with Nthcomp as well. 

Open with DEXTER 
3.1. Klein–Nishina effects on the spectrum
In Sect. 2 we mentioned that MoCA uses Klein–Nishina crosssection and scattering angle distribution which may affect the shape of Comptonisation spectrum with respect to the Thomson case, especially at high inclinations where we can look at the photons travelling trough the optically thick slab corona. When the energy of the photon in the reference frame of the electron is negligible with respect to the rest mass energy of the electron, all our formulae naturally tends to Thomson. However, in order to test the discrepancy between our approach and the use of Thomson approximation, we forced our code to use Thomson scattering angle distribution, Θ_{sc} (Eq. (A.19) instead of Eq. (A.17)), Thomson crosssection (which affects the MFP, Eq. (A.15)) and we considered elastic scattering in the reference frame of the electron (instead of Compton scattering, Eq. (A.20)), regardless of the energy of the photons. In Fig. 5 we show the spectra obtained by Comptonisation from a slab with kT_{e} = 100 keV and increasing τ = 0.5, 1, 2, 10 and solid and dashed lines correspond to Klein–Nishina and Thomson approximation, respectively. In the box inside the figure we zoomed the high energy band. We notice that the discrepancies start to appear around 10 keV with the spectra produced in Thomson approximation showing a pure power law profile without any curvature leading to an highenergy cutoff. When τ ≤ 1 (green and orange lines) Thomson spectra are harder than K–N spectra. For τ = 2 (red lines) we see the opposite effect with Thomson spectra being softer than K–N spectra and for the extreme τ = 10 case (purple lines) the Comptonisation bump around the thermal energy of the corona as well as the cutoff are completely missing in Thomson spectra. We tested also the more energetic case of a slab corona with kT_{e} = 200 keV for τ = 1, 2 as shown in Fig. 6. In this case we see a larger discrepancy which is much more noticeable even for τ = 1 (orange lines). For τ = 2 the differences are relevant even below 100 keV which can be important to consider when using, for example, NuSTAR data up to 80 keV in order to measure the highenergy cutoff and therefore the thermal energy of the corona. Beheshtipour et al. (2017) performed a similar test but for a very compact and thick spherical corona lying within 15 r_{g} from the central object and their spectra are in the form of histograms. However, they found a qualitatively similar result with Thomson spectra being steeper than K–N ones (model 1 VS model 3 in Fig. 4 of their paper). We defer the analysis of K–N effects on the polarisation to Sect. 4.4.
Fig. 5.
Comptonisation spectrum from a slab corona with kT_{e} = 100 keV and increasing τ = 0.5, 1, 2, 10 and for an inclination of 75°. Solid and dashed lines correspond to K–N effects on and off, respectively. In the box we zoomed the highenergy band of the spectra. 

Open with DEXTER 
Fig. 6.
Comptonisation spectrum from a slab corona with kT_{e} = 200 keV and τ = 1, 2 and for an inclination of 75°. Solid and dashed lines correspond to K–N effects on and off, respectively. In the box we magnified the highenergy band of the spectra. 

Open with DEXTER 
3.2. Effect of coronal size on the spectrum
In the previous sections we focussed our attention to the case of extended coronae covering the whole accretion disc. This allowed us to perform a comparison between MoCA and the Comptonisation models available in XSPEC. However, as said before, the corona is expected to be very compact within few gravitational radii from the central compact object and at such small distance, GR effects cannot be neglected and the difference between observed and intrinsic energy can be as large as two to eight times depending on the geometry and size of the corona as well as its inclination (Tamborra et al. 2018). Nonetheless, even without GR effects, the size of the corona has an impact on both the spectrum and the polarisation signal just from a geometrical point of view. In Fig. 7 we show the spectra obtained for different sizes of the corona. Black line is the extended slab corona we described in detail in the previous section with height 10 r_{g} covering the whole disc from the ISCO, 6 r_{g}, up to 1000 r_{g}. We kept the same height and ISCO and we shrunk the outer radius to 100, 50, 20 and 10 r_{g} as indicated inside the figure; in all cases the optical depth (defined by the fixed height) is τ = 1 and the thermal energy is kT_{e} = 100 keV. It can be seen that the spectrum softens with decreasing size of the corona. Photons travelling tangentially to the disc will see a thinner corona with respect to the case of an extended corona (black line) and multiscattered radiation, which dominates at higher energies, has less probability of being produced. For the corona with outer radius 20 r_{g} (red line) we considered also the Kerr case with the ISCO at 1.237 r_{g} (orange line). In the latter case the emission originates closer to the central object and the effective optical depth seen by the photons is larger than the Schwarzschild case. The resulting spectrum becomes harder and comparable with more extended coronae. We defer the effects of coronal size on the polarisation signal to Sect. 4.5.
Fig. 7.
Comptonisation spectrum from a corona with τ = 1 and kT_{e} = 100 keV. The black line correspond to the extended slab corona covering the whole disc up to 1000 r_{g}. Coloured lines show the spectra as we shrink the outer radius of the corona until we reach a compact spherical corona with radius 10 r_{g} (green line). Orange line represents a special case in which we reduced the ISCO to the value corresponding to a Kerr BH (see text for more details). 

Open with DEXTER 
4. Polarisation signal
One of the key features of MoCA is that it includes polarisation. Comptonisation (like any scattering process) induces a polarisation signature in scattered radiation whose net result depends, mainly, on the (inclination at which we look at the) geometry of the scattering material and less prominently on the relative energy of the seed photons with respect to the energy of the scattering material. Radiation scattered several times in a medium will show a polarisation perpendicular to the plane in which it scattered. In Sect. 4.1 we will talk in general about how the scatteringinduced polarisation is build in order to understand our results which will be shown in Sect. 4.2. In Sect. 4.3 we compare the polarisation signal for the two geometries we are taking into account in this paper and in Sect. 4.4 we consider the Klein–Nishina effects on the polarisation signal similarly to what we have shown on the spectrum in Sect. 3.1. Finally, in Sect. 4.5 we show how the coronal size influences the polarisation signal.
4.1. Understanding polarisation
Before showing our results, we note that for the axisymmetric geometries we chose (see Fig. 1) we expect the polarisation angle to be 0 or 90° with only the Stokes parameter Q, which describes these two polarisation state, playing any role while the Stokes parameter U, describing polarisation angles at 45° with respect of the symmetry axis, being irrelevant. This might not have been the case if GR effects were included due to the rotation of the polarisation vector along geodesics in a strong gravitational field which might lead to a net polarisation signal with intermediate angles even for axisymmetric geometries. Also, the polarisation vector is a pseudovector with defined orientation but not defined sign so when Eq. (A.7) is applied to derive the polarisation angle, χ, +90 and −90 degrees are equivalent and we then take the absolute value. Finally, we address the way in which we build the Stokes parameters in MoCA. A polarisation angle of 0° corresponds with having the photons polarised perpendicularly to the spin axis (or parallel to the plane of the disc) and from here on we refer to this polarisation as “horizontal”. On the other hand, a polarisation angle of 90° correspond to a polarisation parallel to the spin axis and we refer to it as “vertical”. In Fig. 8 we show the polarisation signal as a function of the inclination ( μ = cos(θ)) for different optical thickness of a slab corona with kT_{e} = 100 keV. The initial radiation coming from the disc is unpolarised (Q, U = 0) and isotropically emitted at any given radius. The first thing to notice is that the polarisation signal disappear if we look at the system faceon (i.e. μ = 1) and that is always true, being all the geometries we considered axissymmetric. As we move from a completely faceon view to intermediate inclinations, the polarisation signal for a given value of μ strongly depends on the optical thickness of the scattering material. When the slab corona is thin (τ = 0.5, blue line) or moderately thick (τ = 1, green line) the polarisation is vertical (i.e. χ = 90°) because the photons will travel and scatter through the horizontal slab before escaping to the observer. As the corona becomes thicker we see a transition from vertical to horizontal polarisation if we look at the system edgeon (i.e. μ ≤ 0.4). This is due to the fact that at such high optical depths only the photons travelling upwards (i.e. from the bottom to the top of the slab corona) are able to escape while those travelling along the slab will never reach the observer. The photons which escape the thick coronae and reach the observer looking at the system edgeon will then be horizontally polarised. For τ = 10 (red line) one might expect a Chandrasekhar horizontal polarisation reaching 12% for μ = 0 while in Fig. 8 it reaches only ∼3%. This is mainly due to the Klein–Nishina regime of the scattering between soft photons emitted from the disc around 0.1 keV for a stellar BH and the highly energetic corona at 100 keV and it is also partially due to the finiteness of the corona (and the fact that the source, the disc, is extended below the scattering material). We performed some tests with a point source emitting 1 keV isotropic unpolarised radiation at the centre of the slab with the same thermal energy, kT_{e} = 1 keV. In Fig. 9 we show the resulting polarisation signal for this test case, similarly to Fig. 8. Qualitatively the results are very similar to the more realistic case of an emitting disc showed previously. However in Thomson regime we see that for τ = 5 (orange line) and for τ = 10 as well (red line) we already find Chandrasekhar results: the horizontal polarisation increases from 0% to ∼12% when moving from a faceon to edgeon view. These results are in good agreement with the first Monte Carlo simulations performed on polarisation by Angel (1969) and later by Dovčiak et al. (2008).
Fig. 8.
Polarisation signal as a function of the cosine of inclination with respect to the spinaxis for different values of τ for a slab corona with kT_{e} = 100 keV. Upper panel: polarisation degree. Lower panel: absolute value of the corresponding polarisation angle. 

Open with DEXTER 
Fig. 9.
Polarisation signal as a function of μ and for different values of τ, similar to Fig. 8 but for the test case of a pointlike source emitting at 1 keV at the centre of a a slab corona with kT_{e} = 1 keV. Upper panel: polarisation degree. Lower panel: absolute value of the corresponding polarisation angle. 

Open with DEXTER 
4.2. Polarisation vs energy
In Fig. 10 we show the polarisation signal as a function of energy for the case of a slab corona with τ = 1 and kT_{e} = 100 keV decomposed in scattering orders as indicated inside the figure, for an observer at 75° (almost edgeon). In this first example the seed photons produced by the Shakura–Sunyaev disc are initially unpolarised, as can be clearly seen by the pink line representing the unscattered component reaching the observer at infinity: the polarisation degree is zero, with the polarisation angle being random.
Fig. 10.
Polarisation signal as a function of the energy for the case of a slab corona with τ = 1 and kT_{e} = 100 keV decomposed in scattering orders as indicated inside the figure. The seed photons produced by the disc are unpolarised and the system is observed at 75° inclination. Upper panel: polarisation degree. Lower panel: absolute value of the corresponding polarisation angle. 

Open with DEXTER 
In this scenario we expect to end up with a vertical polarisation ( χ = 90°) which reflects the geometry of the scattering material (a moderately thick horizontal slab, where the scatterings happen). The multiscattered component (red line) formed by photons which traveled the most trough the slab corona becomes dominant at higher energies and as a consequence the total polarisation degree increases (black line). If we look at the system almost faceon, it is much more symmetric and the expected polarisation degree is very low. We do not show the decomposed polarisation signal in this case but we consider different inclinations later. Anyway, if we look at it almost edgeon (Fig. 10), we can reach 8% of polarisation degree at high energies. It is also interesting to notice the special behaviour of the onescattered component represented by the purple line in the figure: these photons are collected by an edgeon observer and they experienced only one scattering. The only way it can happen is if the photons are emitted upwards and then scatter at ∼90° which explain the horizontal polarisation (being the scattering plane vertical, or more precisely perpendicular to the disc plane).
In the previous section, as well as in the second section, we mentioned the possibility of the disc emitting radiation which might be initially polarised according to Chandrasekhar calculations in the approximation of an infinitely thick disc atmosphere (see Sect. 2). In Fig. 11 we show the polarisation signals decomposed in scattering orders, as in Fig. 10 for an observer at 75° inclination. In this second example we gave initial horizontal polarisation up to 12% to the few (because we included limb darkening as well, as described in Sect. 2) seed photons arising tangentially from the disc, according to Chandrasekhar calculations. The unscattered component described by the pink line in the figure shows this initial horizontal polarisation ( χ = 0°). The most important thing to notice is that the initial polarisation completely change the outcome of the total polarisation (black line): at lower energy, where unscattered and fewscattered components dominate we have an horizontal polarisation which then flips to vertical where the photons experiencing three or more scattering start to dominate the energy band. For an edgeon view, however, we can observe a quite high polarisation degree of 6–8% flipping from horizontal to vertical around 3 keV for this particular case.
Fig. 11.
As Fig. 10 but we included limb darkening and the correspondent initial Chandrasekhar polarisation to the seed photons. Upper panel: polarisation degree. Lower panel: absolute value of the corresponding polarisation angle. 

Open with DEXTER 
Once again, thanks to the singlephotons approach we use in MoCA we can access information such as the scattering order of the photons, which allows us to deeply understand the complex mechanism in play to form the polarisation signal. In Fig. 12 we show the observed polarisation signal for our template case of a slab corona with τ = 1 and kT_{e} = 100 keV observed at different inclinations as indicated inside the figure. The seed photons are unpolarised and isotropically emitted at a given radius. In Fig. 13 we show the same signal as in Fig. 12 but this time we include limb darkening and the seed photons have initial Chandrasekhar polarisation.
Fig. 12.
Observed polarisation signal for a slab corona with τ = 1 and kT_{e} = 100 keV observed at different inclinations as indicated inside the figure. The seed photons are unpolarised and isotropically emitted at a given radius. Upper panel: polarisation degree. Lower panel: corresponding polarisation angle. 

Open with DEXTER 
Fig. 13.
As Fig. 12 but we applied limb darkening and the corresponding initial polarisation to seed photons according to Chandrasekhar calculations. Upper panel: polarisation degree. Lower panel: absolute value of the corresponding polarisation angle. 

Open with DEXTER 
The two signals are completely different. If the seed photons are unpolarised we expect to observe only vertical polarisation (lower panel of Fig. 12) with the polarisation degree being higher as we move towards higher inclinations and reaching 6–7% for 75°. On the other hand, if the seed photons are initially polarised as for Chandrasekhar optically thick atmospheres, we see a characteristic flip in the polarisation angle from horizontal to vertical when the multiscattered (three or more scatterings) component begins to dominate the energy band which in this particular case happens around 3 keV. The results shown in Fig. 13 are very similar to the findings of Schnittman & Krolik (2010; Fig. 3 in their paper) even though they use a different approach and their code includes all GR effects as well (but in Thomson regime). This shows that GR effects are not playing a dramatic role in this scenario. However it is not surprising considering that in both works the Comptonisation (and the relative polarisation signal) comes from very extended coronae and GR effects are expected to be negligible at several r_{g} distance from the central compact object.
4.3. Polarisation for different geometries
Up to now, we have focussed entirely on the case of a slab corona because it represents a much more interesting and instructive case when studying the polarisation signal, appearing completely symmetric if observed faceon and very axisymmetric if observed edgeon. In the trivial tests we performed with a pointlike source inside a sphere, being the system completely symmetric by definition from any angle of view, the polarisation is always zero regardless the optical thickness or the energy of the spherical Comptonising medium. In the more realistic case of a hemispherical corona covering the whole disc (Fig. 1), the presence of the disc (and hence the base of the hemisphere) introduces the only asymmetry which in the end makes the hemisphere behave like a slab corona but much less efficient in term of Comptonisation (because the optical thickness in the slab is defined vertically while in the hemisphere is defined radially) and polarisation (because, of course, the slab deviates more from spherical symmetry). In Fig. 14 we show the comparison between the observed polarisation signal for a sphere and a slab (both with τ = 1 and kT_{e} = 100 keV) for two different inclinations as indicated inside the figure. The seed photons are unpolarised.
Fig. 14.
Comparison between the polarisation signal for a slab and a spherical corona (both with τ = 1 and kT_{e} = 100 keV) for two different inclinations as indicated inside the figure. The seed photons are isotropically emitted from a given radius and they are unpolarised. Upper panel: polarisation degree. Lower panel: absolute value of the corresponding polarisation angle. 

Open with DEXTER 
In all cases the observed polarisation is vertical (lower panel of Fig. 14) but for the slab we have a larger degree of polarisation, which can reach 4–5% at higher energies (blue line) versus a 2–3% for the sphere (cyan line) if we look at the system at 45° inclination. For a higher inclination of 75°, however, we can have up to 7% polarisation degree for the slab (red line) while for the much more symmetrical sphere it remains around 2–3% (orange line). In Fig. 15 we show a similar plot but this time we included limb darkening and the seed photons have initial Chandrasekhar polarisation.
Fig. 15.
As Fig. 14 but with limb darkening and the corresponding initial polarisation for the seed photons according to Chandrasekhar calculations. Upper panel: polarisation degree. Lower panel: absolute value of the corresponding polarisation angle. 

Open with DEXTER 
In this case the slab corona shows the typical transition between horizontal and vertical polarisation explained in the previous section (red and blue lines for the two inclinations). For the sphere (orange and cyan lines), however, this transition is almost not happening: at lower energies up to ∼10 keV unscattered and fewscattered photons completely dominate and we see horizontal polarisation which can reach 7–8% if seen at 75° inclination and 3–4% at 45°. Above 10 keV we have multiscattered components even in the sphere but the vertical polarisation struggles to reach more than 1% polarisation degree for both inclinations.
The spectral resolution of the next generation Xray polarimeters such as the one proposed for the IXPE mission, estimated around 1 keV at 6 keV, will be essential to discriminate between coronal geometries especially in the limb darkening scenario (Fig. 15). However, even integrating the polarisation signal in the IXPE polarimeter band between 2 and 8 keV, the two geometries we consider in this work can still be distinguishable. In Fig. 16 we show the 2–8 keV signal in ten bins of inclination for the two geometries as indicated inside the figure and for the case of unpolarised seed photons in the upper panel and for the Chandrasekhar case in the lower one. For the initially unpolarised scenario, for both geometries the polarisation is vertical (as indicated by the value of the polarisation angle, χ, inside the figure equal to 90°) but the slab shows a much higher degree of polarisation at any inclination.
Fig. 16.
Polarisation degree integrated between 2 and 8 keV (IXPE energy band) for the two coronal geometries as indicated inside the figure as a function of the inclination (10μ bins). Upper panel: case of initially unpolarised photons. Lower panel: Chandrasekhar scenario. We report the absolute values of the corresponding polarisation angle, χ, inside the figures. 

Open with DEXTER 
Even more interesting is the same comparison but for the case of initially Chandrasekhar polarised radiation shown in the lower panel of Fig. 16. In this case for the slab (blue line) we still have vertical polarisation but the polarisation degree is quite low, below 1%. The reason is that between 2 and 8 keV we are integrating the region in energy where we have the flip of the polarisation angle (see Fig. 15) so the average polarisation degree will be very low. On the other hand the polarisation angle, by definition, does not take into account the photon counts Eq. (A.7) so because for most of the energy bins between 2 and 8 keV we have vertical polarisation for any inclinations, the integrated polarisation angle will still be vertical. For the sphere (red line) instead we have a quite strong horizontal polarisation as expected by integrating between 2 and 8 keV (see orange and cyan lines in Fig. 15). For both scenarios, at least for the parameters we have chosen in the simulations, IXPE polarimeter will be able to discriminate between the two geometries even integrating the signal in the whole operating energy band.
4.4. Klein–Nishina effects on the polarisation
In Sect. 3.1 we described how we tested the effect of using the Klein–Nishina crosssection, scattering angle distribution and Compton energy shift on the spectra and we found that the deviations from the Thomson approximation were slightly visible below 100 keV (for not extreme optical depths or very hot coronae). We performed those tests for the polarisation as well and we show them in Fig. 17 for a slab corona with kT_{e} = 100 keV and increasing τ = 0.5, 1, 2, 10 and for an inclination of 75°; solid and dashed lines correspond to K–N effects on and off, respectively, and the seed photons are initially unpolarised.
Fig. 17.
Polarisation signal from a slab corona with kT_{e} = 100 keV and increasing τ = 0.5, 1, 2, 10 and for an inclination of 75°. Solid and dashed lines correspond to K–N effects on and off, respectively. Upper panel: polarisation degree. Lower panel: absolute value of the corresponding polarisation angle. 

Open with DEXTER 
As expected, the polarisation signal does not change much. The K–N effects are well visible above 100 keV which is above the band in which we plotted the polarisation signal. We do not find it useful to report the polarisation signal above 100 keV because (i) the noise due to low photon counts will dominate with respect to the small variation on the polarisation signal in the two regimes and (ii) also because the next generation polarimeters will work in the soft Xrays. Nonetheless one can imagine a scenario in which the seed photons are much less energetic (for example the UV photons arising from the accretion disc of an AGN) and the corona having a thermal energy of few tens of keV. In this case we expect to see a (probably still small) difference in the polarisation signal in the IXPE band for the two regimes but we defer this study to future papers focussed on the exploration of the coronal parameters space in AGN. Beheshtipour et al. (2017) found an interesting difference in the polarisation signal when comparing the proper K–N treatment VS the Thomson one but they compared models which were giving the same spectral index in the 2–10 keV energy band leading to an optical depth per proper length which is more than two times larger for the Thomson case with respect to the K–N one (Fig. 6 in their paper).
4.5. The effect of coronal size on the polarisation
In Sect. 3.2 we showed how the spectrum changes as we shrink the extended slab corona covering the whole disc to a compact spherical corona with radius 10 r_{g} around the central object. The main effect from the spectroscopical point of view was a significant reduction of the Comptonising power of the corona and the result was a softer spectrum. On the other hand the polarisation signal is much more sensitive to the geometry of the scattering material. In Fig. 18 we show the polarisation signal at 75° inclination for different truncation radius of the slab corona similarly to Fig. 7 for the case of Chandrasekhar initially polarised photons.
Fig. 18.
Polarisation signal from a corona with τ = 1 and kT_{e} = 100 keV observed at 75° inclination with seed photons initially polarised according to Chandrasekhar calculations. The black line correspond to the extended slab corona covering the whole disc up to 1000 r_{g}. Coloured lines show the signal as we shrink the outer radius of the corona until we reach a compact spherical corona with radius 10 r_{g} (green line). Orange line represents a special case in which we reduced the ISCO to the value corresponding to a Kerr BH (see text for further detail). 

Open with DEXTER 
We see that as we shrink the corona the flip in the polarisation angle moves to higher energies. When we reach the spherical corona (green line) the flip happens above 10 keV and we have a very low vertical polarisation of few %. Comparing the signal in Fig. 18 with the polarisation signal we showed for the two geometries in Sect. 4.3, shrinking the corona is equivalent to moving form the red to the orange line in Fig. 15 with the difference that the spherical corona in this case is very compact instead of covering the whole disc and the resulting signal is much more noisy. For a truncation radius of 20 r_{g} (red line) we included also our special Kerr case in which we set the ISCO at 1.237 r_{g} (orange line). While the spectrum in the Kerr case was much harder and comparable to more extended coronae, the polarisation signal is very similar with the flip in the polarisation angle moved at slightly higher energies. This is not surprising because the geometry of the corona is quasispherical in both cases and the only difference is that for the Kerr case the innermost and more active region of the disc is well inside the corona making the corona behave as if it was just slightly thicker.
5. Summary and discussion
We have presented MoCA, a Monte Carlo code for Comptonisation in Astrophysics which includes polarisation. To our knowledge MoCA is the first code operating with single photons and including all special relativity and quantum effects. The main disadvantage of this approach is the long computing time, which implies the need to parallelise the code on clusters of computers. The advantage with respect to pure analytical models such as those available in XSPEC is that we can explore the totality of the parameters space for the Comptonising medium (i.e. thermal energy and optical thickness of the corona) without any restriction and this approach will also allow a better understanding of the whole process. We also included all corrections such as Klein–Nishina crosssection and scattering angle distribution. These effects, small below 100 keV, must nonetheless be taken into account when inferring the thermal energy of the corona from observations. In some sources it has been found that coronae can have extremely high energy cutoff (e.g. NGC 5506, Matt et al. 2015) and therefore thermal energy, which is inferred by measuring the curvature of NuSTAR spectra at high energy and in this context K–N effects cannot be neglected. From the polarimetric point of view we did not seen any deviation due to K–N effects, but this was to expected as we focussed our attention below 100 keV where these effects are small. However, one can imagine a scenario in which the thermal energy of the corona is few tens of keV and in that case we expect to see a difference both on the spectrum and the polarisation but we defer such investigation to future papers focussed on the exploration of the coronal parameters space. In its actual form the code is fast enough to explore different geometries of the corona with different parameters. Spectra can then be compared with those obtained by NuSTAR to derive coronal parameters, especially in the high optical depth regime where analytical models are not reliable. As already mentioned, much observational evidence points in the direction of compact coronae above or around the compact object. In order to properly treat such coronae, gravitational effects must be taken into account. We have recently included a raytracing routine to take into account GR effects: this new version of MoCA, and applications of the code to different astrophysical scenarios, will be discussed in future papers. Nonetheless we have shown the geometrical effect of more compact coronae on the spectra and the polarisation signal: the spectra become softer as the corona shrinks and the polarisation changes dramatically as we approach a more symmetrical shape of the corona. The study we performed will also be useful to quantify the impact of GR effects on compact coronae with respect to a purely geometrical effect.
In a few years, when the NASA Imaging Xray Polarisation Explorer, IXPE, is launched, it will be possible to use our code to simulate the polarisation signal expected in different scenarios and to compare our results with the observation. We show that polarimetry has the potential to discriminate between different geometries of the corona shedding a light on the possible origin of the corona itself. Even integrating the polarisation signal in the next generation Xray polarimeters energy band the two geometries we considered in this work are expected to produce different signals at any inclinations. We also show that if the photons arising from the disc are initially polarised, the final signal can be very different from the unpolarised seed photons scenario. It will be fundamental to verify the nature of the polarisation expected from the accretion disc by observing a very bright XRB in a clean soft state before observing the polarisation of Comptonised radiation in hard state. MoCA is a Comptonisation code which calculate the scatteringinduced polarisation produced by such mechanism. Nonetheless if magnetic fields are present, synchrotron Xray radiation is expected to be polarised as well. However we show that scatteringinduced polarisation is of the order of few % while synchrotron radiation is expected to be polarised up to several tens % so the two mechanisms should be clearly distinguishable.
XSPEC is a commanddriven, interactive, Xray spectralfitting programme. More information can be found at: http://heasarc.gsfc.nasa.gov/xanadu/xspec/
Acknowledgments
We would like to thank Rene Goosmann for very useful and stimulating discussions. We acknowledge financial support from the European Union Seventh Framework Programme (FP7/20072013) under grant agreement n.312789. FT would like to thank the anonymous referee for the constructive discussions which significantly improved the quality of the paper.
References
 Angel, J. R. P. 1969, in BAAS, 1, 180 [NASA ADS] [Google Scholar]
 Beheshtipour, B., Krawczynski, H., & Malzac, J. 2017, ApJ, 850, 14 [NASA ADS] [CrossRef] [Google Scholar]
 Chandrasekhar, S. 1960, Radiative Transfer (Dover Publications) [Google Scholar]
 Connors, P. A., Stark, R. F., & Piran, T. 1980, ApJ, 235, 224 [NASA ADS] [CrossRef] [Google Scholar]
 Dovčiak, M., Muleri, F., Goosmann, R. W., Karas, V., & Matt, G. 2008, MNRAS, 391, 32 [NASA ADS] [CrossRef] [Google Scholar]
 Dunn, R. J. H., Fender, R. P., Körding, E. G., Belloni, T., & Cabanac, C. 2010, MNRAS, 403, 61 [NASA ADS] [CrossRef] [Google Scholar]
 Fabian, A. C., Lohfink, A., Kara, E., et al. 2015, MNRAS, 451, 4375 [NASA ADS] [CrossRef] [Google Scholar]
 Fender, R. 2001, in AIP Conf. Ser., 558, 221 [NASA ADS] [CrossRef] [Google Scholar]
 Fender, R. P., Belloni, T. M., & Gallo, E. 2004, MNRAS, 355, 1105 [NASA ADS] [CrossRef] [Google Scholar]
 Harrison, F. A., Craig, W. W., Christensen, F. E., et al. 2013, ApJ, 770, 103 [NASA ADS] [CrossRef] [Google Scholar]
 Hua, X.M., & Titarchuk, L. 1995, ApJ, 449, 188 [NASA ADS] [CrossRef] [Google Scholar]
 Krawczynski, H. 2012, ApJ, 754, 133 [NASA ADS] [CrossRef] [Google Scholar]
 Laor, A., Netzer, H., & Piran, T. 1990, MNRAS, 242, 560 [NASA ADS] [CrossRef] [Google Scholar]
 Matt, G., Feroci, M., Rapisarda, M., & Costa, E. 1996, Radiation Physics and Chemistry, 48, 403 [NASA ADS] [CrossRef] [Google Scholar]
 Matt, G., Baloković, M., Marinucci, A., et al. 2015, MNRAS, 447, 3029 [NASA ADS] [CrossRef] [Google Scholar]
 Molina, M., Bassani, L., Malizia, A., et al. 2013, MNRAS, 433, 1687 [NASA ADS] [CrossRef] [Google Scholar]
 Perola, G. C., Matt, G., Cappi, M., et al. 2002, A&A, 389, 802 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
 Petrucci, P. O., Haardt, F., Maraschi, L., et al. 2001, in Xray Astronomy 2000, eds. R. Giacconi, S. Serio, & L. Stella, ASP Conf. Ser., 234, 445 [NASA ADS] [Google Scholar]
 Petrucci, P. O., Haardt, F., Maraschi, L., et al. 2000, ApJ, 540, 131 [NASA ADS] [CrossRef] [Google Scholar]
 Poutanen, J., & Svensson, R. 1996, ApJ, 470, 249 [NASA ADS] [CrossRef] [Google Scholar]
 Rybicki, G. B., & Lightman, A. P. 1979, Radiative Processes in Astrophysics (Wiley) [Google Scholar]
 Schnittman, J. D., & Krolik, J. H. 2010, ApJ, 712, 908 [NASA ADS] [CrossRef] [Google Scholar]
 Shakura, N. I., & Sunyaev, R. A. 1973, A&A, 24, 337 [NASA ADS] [Google Scholar]
 Stern, B. E., Begelman, M. C., Sikora, M., & Svensson, R. 1995, MNRAS, 272, 291 [NASA ADS] [CrossRef] [Google Scholar]
 Sunyaev, R. A., & Titarchuk, L. G. 1980, A&A, 86, 121 [NASA ADS] [Google Scholar]
 Tamborra, F., Papadakis, I., Dovčiak, M., & Svoboda, J. 2018, MNRAS, 475, 2045 [NASA ADS] [CrossRef] [Google Scholar]
 Titarchuk, L., & Lyubarskij, Y. 1995, ApJ, 450, 876 [NASA ADS] [CrossRef] [Google Scholar]
 Tortosa, A., Bianchi, S., Marinucci, A., Matt, G., & Petrucci, P. O. 2018, A&A, 614, A37 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
 Uttley, P., Cackett, E. M., Fabian, A. C., Kara, E., & Wilkins, D. R. 2014, A&ARv, 22, 72 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
 Weisskopf, M. C., Ramsey, B., & O’Dell, S., et al. 2016, in Space Telescopes and Instrumentation 2016: Ultraviolet to Gamma Ray, Proc. SPIE, 9905, 990517 [Google Scholar]
 Zdziarski, A. A., Johnson, W. N., & Magdziarz, P. 1996, MNRAS, 283, 193 [NASA ADS] [CrossRef] [Google Scholar]
Appendix A: Description of the code
In this Appendix we give a detailed description of how the code works when applied to accreting systems by dividing the process in three main steps: the production of seed photons from the accretion disc, the parametrisation of the scattering material and the treatment of the scattering.
A.1. Seed photons
Up to now, we have implemented two different geometries for the source of the seed photons: either a pointlike along the symmetry axis of the system, or an accretion disc. The pointsource have been used only for testing in this work while the disc produces an MTBB , with the radial dependence of the temperature as for a Shakura–Sunyaev (Shakura & Sunyaev 1973) geometrically thin and optically thick disc:
where G is the gravitational constant, σ_{SB} the StefanBoltzmann constant, M the mass of the central compact object, ṁ the accretion rate and R_{in} the inner radius of the disc, often assumed to be coincident with the ISCO (the innermost stable circular orbit). The first routine involved in the production of seed photons is devoted to extract the radius at which the photon is emitted, in order to calculate the temperature at that radius Eq. (A.1), thence the energy of the photon (see below).
In our code we have made extensive use of what we call the fundamental Monte Carlo approach which consists in randomly extracting the continuous variable x according to its probability distribution, F(x), within the interval [x_{min},x_{max}]. This can be expressed by the following formula:
where P(x) is the probability density function (PDF) of x, normalised to one and hence associated with a random number, ξ, belonging to the interval [0,1]. If F(x) is analytically integrable and the integral is invertible, the aleatory variable, x, is a function of the random number and it can be easily calculated with an extraction of ξ. On the other hand if the integral is not invertible we can still build a grid of value for P(x)∈[0,1] as a function of x and then extract a random number (ξ = P(x)) which can be associated to the corresponding value of x in the grid; we will refer to the latter procedure as the tabular approach.
The number of photons arising from an annulus RdR emitting as a black body is proportional to T(R)^{3} so Eq. (A.2) becomes
where R_{in} and R_{out} are the inner and outer radius of the disc respectively and T(R) is given by Eq. (A.1). Integration of Eq. (A.3) gives
where Γ is the Gamma function and B is the incomplete beta function. Once the radius is determined, the energy of the seed photon, hν, is extracted from the corresponding Planck distribution as a function of the temperature at that radius Eq. (A.1):
where c is the speed of light and k_{B} the Boltzmann constant. Integration of Eq. (A.5) gives the Error function, a nonelementary function defined only in integral form or by Taylor expansion of the integrand. We used therefore the rejection method (also known as acceptancerejection sampling) in order to extract the energy of the photon from Eq. (A.5) once the peak energy at that temperature has been calculated. After the energy of the seed photon is calculated, the fourwavevector, and the polarisation fourvector, P^{μ} = (0,p) are calculated by another routine. The direction of the emitted photon, k, is randomly chosen for isotropic emission. The unit fourvector P^{μ} is only defined to within a multiple of K^{μ} and its temporal component can always be made equal to zero (Connors et al. 1980). When interested only in spectra, polarisation calculations can be turned off to save computing time, otherwise p is randomly chosen on a plane normal to the direction of the photon, k, in case of unpolarised radiation or it is chosen according to some initial polarisation but always keeping p and k perpendicular. In the case of optically thick atmosphere (τ → ∞) the photons are no more isotropically emitted but are instead preferentially emitted perpendicularly to the plane of the disc, the socalled limb darkening effect. In this case we used the analytical expression given in Laor et al. (1990) which represents a good approximation:
where μ is the cosine of the polar angle, θ = arccos( μ), measured from the axis normal to the disc surface, F is the flux and a = 2.06 for an optically thick atmosphere of electrons. Moreover the optically thick atmosphere of the disc has also the effect of linearly polarise the emitted photon with the polarisation vector parallel to the plane of the disc, with a degree which is ∼12% for μ = 0 and decreases down to zero for photons emitted perpendicularly to the disc ( μ = 1) as in Table XXVI in Chandrasekhar (1960).
Finally, the Stokes parameters Q and U which describe the degree and angle of linear polarisation:
can be calculated from the polarisation vector by making use of auxiliary unit vectors following the approach of Matt et al. (1996).
A.2. Corona parametrisation
The corona of electrons surrounding the disc and responsible for the Comptonisation of seed photons is characterised by its thermal energy, kT_{e}, its geometry and its density (or optical depth). We considered two geometries for the corona: a sphere and a very oblate spheroid which we will refer to as a slab (both sketched in Fig. 1, not to scale). Instead of using a value for the density of the free electrons composing the corona, n_{e}, we can work with the optical depth τ whose definition (from e.g. Rybicki & Lightman 1979) is:
where σ_{sc} is the scattering crosssection (Klein–Nishina, in our case) and dx is the space travelled by the photon. For both the slab and spherical geometry the optical depth, τ is defined along the vertical of the symmetry axis, as in compPS. This means that a photon travelling parallel to the disc in the slab corona will see a much higher optical thickness while for the spherical corona it will be the same, being radially symmetric by definition. In our simulations the slab corona has an height of 10 r_{g} and covers the whole accretion disc up to 1000 r_{g}. This, in turn, means that a photon travelling through the corona parallel to the disc will see an optical depth 100 times larger than if it travels vertically. Lastly, to determine the velocity of free electrons composing the corona we used the Maxwell–Jüttner distribution as given in Titarchuk & Lyubarskij (1995)
where γ is the Lorentz factor of the electron in mc^{2} units and K_{2} is the modified Bessel function of the second type.
A.3. Coronal scattering
The Compton scattering differential crosssection for unpolarised radiation is given by the Klein–Nishina formula:
where r_{0} is the classical radius of the electron, ϵ′ and are the energies of the incident and scattered photons in the reference frame of the electron^{2} and Θ_{sc} is the scattering angle. The differential Compton scattering crosssection for a free electron at rest in the case of a 100% polarised incident beam can be written as
where Φ_{sc}, the azimuthal scattering angle, is defined as the angle between the polarisation vector of the incident photon and the plane of scattering (defined by the directions of the incident and scattered photons). The fourwavevector , and the polarisation fourvector P^{μ} = (0,p), are Lorentz transformed in the reference frame of the electron (see Connors et al. 1980). The first transformation was needed in order to obtain the energy of the incident photon in the reference frame of the electron, ϵ′, necessary to calculate the Klein–Nishina crosssection Eq. (A.10) and therefore the mean free path (MFP) of the photon.
The MFP is defined as the average distance a photon can travel through an absorbing or scattering material without being absorbed or scattered. Assuming that the electrons are spatially Poisson (i.e. randomly) distributed, the probability that a scattering happens is
where τ is the optical depth of the medium defined previously (see Eq. (A.8)). The inverse of the product between the density and the crosssection of the scattering material is nothing else that the MFP . On the other hand, the MFP can also be geometrically defined as the ratio between the size of the scattering medium and its optical depth, which allows us to work without explicitly using the electron density, n_{e}. In the case of the slab corona, the optical depth of the medium was defined with respect to the semidiameter of the spheroid along the spinaxis while for the spherical corona is defined with respect to the semidiameter on the azimuthal plane. We can therefore define l, respectively, as
Combining the definition of τ and l in Eq. (A.12) and inverting we can derive the space, x, travelled by the photon before the scattering happens:
Finally, the photon energy dependence on the MFP is taken into account by weighting the travelled space with the ratio between the total Thomson crosssection and the total Klein–Nishina crosssection, so that the MFP increases with energy because σ_{KN} decreases. Therefore, the travelled space, x, is calculated as
where ξ is a random number between 0 and 1, l is calculated from Eq. (A.13) and σ_{KN} is the total Klein–Nishina crosssection obtained by integration of Eq. (A.10), explicitly
where is the ratio between the energy of the incident photon in the reference frame of the electron and the rest mass energy of the electron.
The new coordinates of the photon were then calculated. If the arrival point falls within R_{in}, the photon is considered lost inside the black hole. If the arrival point is on the disc, the photon is absorbed and considered lost as well (no reflection from the accretion disc is, at moment, included). If the arrival point falls outside the corona, the photon escapes towards the observer with no scattering. The Stokes parameters Q and U were calculated and saved together with the energy and direction of the photon. Lastly, if the arrival point falls within the corona, the scattering happens.
In the latter case, the first quantity to be calculated is the polar scattering angle Θ_{sc}. Θ_{sc} is independent of the polarisation status of the incident photon and it is obtained by Eq. (A.10) following Matt et al. (1996). The probability, P, for a photon to scatter at an angle, Θ_{sc} is
where μ = cos(Θ_{sc}). P can always be associated to a random number ξ belonging to the interval [0,1], as usual. Equation (A.17) cannot be analytically inverted so we follow the tabular approach by building a grid of values for P as a function of μ and then, by extracting a random number between 0 and 1 we get the corresponding cosine of the scattering polar angle. On the other hand, when we use Thomson approximation the polar scattering angle is calculated integrating the wellknown Thomson scattering crosssection:
where q and m are the charge and mass of the electron and ϵ′ the energy of the photon in the reference frame of the electron. Integration of Eq. (A.18) over dΩ gives the probability, P, for a photon to scatter at an angle, Θ_{sc}:
We performed some tests using a point source at the origin (no compact object present) emitting monochromatic photons at 1 keV and surrounded by a slab corona with H_{cor}/R_{cor} = 0.01. In Fig. A.1 we show the distribution of cos(Θ_{sc}) for the subsample of photons which had already experienced ten scattering events. The black line shows the distribution in Thomson regime Eq. (A.19) which gives equal probability of having forward ( μ = 1) or backward ( μ = −1) scattering, this probability being about twice the probability of having a 90° scattering angle (i.e. μ = 0). In coloured lines the same distribution in K–N regime Eq. (A.17) for increasing energy of the electron as indicated in the figure. When the energy of the electron is comparable with the energy of the photon (yellow line) we are naturally in Thomson regime and Eq. (A.17) reduces to Eq. (A.19) giving the same distribution. As the energy of the electrons increases, forward scattering is favoured with respect to backward scattering (red line), as expected.
Fig. A.1.
μ = cos(Θ_{sc}) distribution for our test case (see text for more details) applied to photons which experienced already 10 scattering events. Black line correspond to Thomson formula while coloured lines correspond to K–N formula. In Thomson regime forward and backward scattering are equally probable and twice as likely to happen than a 90° scattering. In K–N regime, as the energy of the electrons increases with respect to the energy of the photon, forward scattering is favoured with respect to backward scattering (red line). 

Open with DEXTER 
Once Θ_{sc} is calculated, the energy exchange can be easily derived by the Compton formula as
where ϵ′ and are, respectively, the energies of the incident and scattered photon in the reference frame of the electron. Then, once Θ_{sc} and are known, we use Eq. (A.11) to derive the azimuthal scattering angle as in Matt et al. (1996).
We note that in a singlephoton approach each photon is polarised. If the radiation is overall unpolarised, it simply means that photons will have random polarisation which will give a zero net polarisation (Angel 1969). Equation (A.21) describes the azimuthal modulation. This equation cannot be analytically inverted and we use the same tabular approach to obtain the azimuthal scattering angle. In Fig. A.2 we show the azimuthal scattering angle distribution Eq. (A.21) similarly to Fig. A.1.
Fig. A.2.
Φ_{sc} distribution for our test case similarly to Fig. A.1. The azimuthal scattering angle distribution does not depend on the energy but it is dramatically reduce as Θ_{sc} tends to zero. We did, indeed, notice a slight reduction of the modulation for the photons which are more likely forward scattered (red line). However this effect is is significant only for photons scattered at Θ_{sc} ∼ 0. 

Open with DEXTER 
The modulation of Φ_{sc} does not depend on the relative energy between the photon and the electron (see e.g. Fig. 3 in Matt et al. 1996) but it is strongly affected by Θ_{sc}. When this is zero the modulation decreases (Fig. 1 in Matt et al. 1996) and we slightly see this effect by looking at the red line in Fig. A.2 which belongs to the photons with a higher probability of being scattered forwards. However, this effect is significant only for photons scattered at Θ_{sc} ∼ 0.
Once the scattering angles are calculated, by making use of auxiliary vectors as described in Matt et al. (1996), the direction of the scattered photon can be calculated in the reference frame of the electron. The scattering angles, together with the energy of the scattered photon, allow us also to calculate the degree of polarisation induced by Compton scattering:
If the value of a random number is greater than Π, the scattered photon’s polarisation vector, , is randomly chosen on a plane perpendicular to its direction, otherwise the polarisation vector is calculated using Angel (1969):
where is the spatial part of the scattered photon’s fourwavevector in the reference frame of the electron. Eventually, the fourwavevector and the polarisation vector of the photon are antitransformed to the reference frame of the disc and the photon keeps travelling until the next scattering happens or until it falls into the compact object, onto the disc or until it reaches the observer at infinity. For each photon which reaches the observer at infinity the Stokes parameters Q and U are calculated and registered together with the direction, energy and number of scatterings experienced by the photon before escaping.
All Figures
Fig. 1.
Sketch of the corona geometries implemented in MoCA, compatible with those implemented in most of the analytical Comptonisation models available for XSPEC. 

Open with DEXTER  
In the text 
Fig. 2.
Spectrum of a 10 M_{⊙} black hole accreting at ṁ = 0.1 in Eddington luminosity units and Comptonised by a slab corona with τ = 1 and kT_{e} = 100 keV. The pink line represents the unscattered component (i.e. the soft Xrays disc emission reaching the observer) while the coloured lines represent the different scattering order components as specified in the figure. The total spectrum observed at infinity (black line) is a powerlaw with a high energy cutoff. 

Open with DEXTER  
In the text 
Fig. 3.
Spectral comparison between MoCA (black line) and the two semianalytical Comptonisation model compPS and compTT as indicated inside the figure for the case of a slab corona with τ = 1 and kT_{e} = 100 keV observed at an inclination of 60°. See text for more details. 

Open with DEXTER  
In the text 
Fig. 4.
Spectral comparison between MoCA (black line) and the semianalytical Comptonisation model available in XSPEC as indicated inside the figure. Upper panel: case of a slab corona with τ = 5 and kT_{e} = 50 keV observed at an inclination of 60°; lower panel: case of a spherical corona with τ = 4 and kT_{e} = 40 keV at the same inclination. In the latter case we performed the comparison with Nthcomp as well. 

Open with DEXTER  
In the text 
Fig. 5.
Comptonisation spectrum from a slab corona with kT_{e} = 100 keV and increasing τ = 0.5, 1, 2, 10 and for an inclination of 75°. Solid and dashed lines correspond to K–N effects on and off, respectively. In the box we zoomed the highenergy band of the spectra. 

Open with DEXTER  
In the text 
Fig. 6.
Comptonisation spectrum from a slab corona with kT_{e} = 200 keV and τ = 1, 2 and for an inclination of 75°. Solid and dashed lines correspond to K–N effects on and off, respectively. In the box we magnified the highenergy band of the spectra. 

Open with DEXTER  
In the text 
Fig. 7.
Comptonisation spectrum from a corona with τ = 1 and kT_{e} = 100 keV. The black line correspond to the extended slab corona covering the whole disc up to 1000 r_{g}. Coloured lines show the spectra as we shrink the outer radius of the corona until we reach a compact spherical corona with radius 10 r_{g} (green line). Orange line represents a special case in which we reduced the ISCO to the value corresponding to a Kerr BH (see text for more details). 

Open with DEXTER  
In the text 
Fig. 8.
Polarisation signal as a function of the cosine of inclination with respect to the spinaxis for different values of τ for a slab corona with kT_{e} = 100 keV. Upper panel: polarisation degree. Lower panel: absolute value of the corresponding polarisation angle. 

Open with DEXTER  
In the text 
Fig. 9.
Polarisation signal as a function of μ and for different values of τ, similar to Fig. 8 but for the test case of a pointlike source emitting at 1 keV at the centre of a a slab corona with kT_{e} = 1 keV. Upper panel: polarisation degree. Lower panel: absolute value of the corresponding polarisation angle. 

Open with DEXTER  
In the text 
Fig. 10.
Polarisation signal as a function of the energy for the case of a slab corona with τ = 1 and kT_{e} = 100 keV decomposed in scattering orders as indicated inside the figure. The seed photons produced by the disc are unpolarised and the system is observed at 75° inclination. Upper panel: polarisation degree. Lower panel: absolute value of the corresponding polarisation angle. 

Open with DEXTER  
In the text 
Fig. 11.
As Fig. 10 but we included limb darkening and the correspondent initial Chandrasekhar polarisation to the seed photons. Upper panel: polarisation degree. Lower panel: absolute value of the corresponding polarisation angle. 

Open with DEXTER  
In the text 
Fig. 12.
Observed polarisation signal for a slab corona with τ = 1 and kT_{e} = 100 keV observed at different inclinations as indicated inside the figure. The seed photons are unpolarised and isotropically emitted at a given radius. Upper panel: polarisation degree. Lower panel: corresponding polarisation angle. 

Open with DEXTER  
In the text 
Fig. 13.
As Fig. 12 but we applied limb darkening and the corresponding initial polarisation to seed photons according to Chandrasekhar calculations. Upper panel: polarisation degree. Lower panel: absolute value of the corresponding polarisation angle. 

Open with DEXTER  
In the text 
Fig. 14.
Comparison between the polarisation signal for a slab and a spherical corona (both with τ = 1 and kT_{e} = 100 keV) for two different inclinations as indicated inside the figure. The seed photons are isotropically emitted from a given radius and they are unpolarised. Upper panel: polarisation degree. Lower panel: absolute value of the corresponding polarisation angle. 

Open with DEXTER  
In the text 
Fig. 15.
As Fig. 14 but with limb darkening and the corresponding initial polarisation for the seed photons according to Chandrasekhar calculations. Upper panel: polarisation degree. Lower panel: absolute value of the corresponding polarisation angle. 

Open with DEXTER  
In the text 
Fig. 16.
Polarisation degree integrated between 2 and 8 keV (IXPE energy band) for the two coronal geometries as indicated inside the figure as a function of the inclination (10μ bins). Upper panel: case of initially unpolarised photons. Lower panel: Chandrasekhar scenario. We report the absolute values of the corresponding polarisation angle, χ, inside the figures. 

Open with DEXTER  
In the text 
Fig. 17.
Polarisation signal from a slab corona with kT_{e} = 100 keV and increasing τ = 0.5, 1, 2, 10 and for an inclination of 75°. Solid and dashed lines correspond to K–N effects on and off, respectively. Upper panel: polarisation degree. Lower panel: absolute value of the corresponding polarisation angle. 

Open with DEXTER  
In the text 
Fig. 18.
Polarisation signal from a corona with τ = 1 and kT_{e} = 100 keV observed at 75° inclination with seed photons initially polarised according to Chandrasekhar calculations. The black line correspond to the extended slab corona covering the whole disc up to 1000 r_{g}. Coloured lines show the signal as we shrink the outer radius of the corona until we reach a compact spherical corona with radius 10 r_{g} (green line). Orange line represents a special case in which we reduced the ISCO to the value corresponding to a Kerr BH (see text for further detail). 

Open with DEXTER  
In the text 
Fig. A.1.
μ = cos(Θ_{sc}) distribution for our test case (see text for more details) applied to photons which experienced already 10 scattering events. Black line correspond to Thomson formula while coloured lines correspond to K–N formula. In Thomson regime forward and backward scattering are equally probable and twice as likely to happen than a 90° scattering. In K–N regime, as the energy of the electrons increases with respect to the energy of the photon, forward scattering is favoured with respect to backward scattering (red line). 

Open with DEXTER  
In the text 
Fig. A.2.
Φ_{sc} distribution for our test case similarly to Fig. A.1. The azimuthal scattering angle distribution does not depend on the energy but it is dramatically reduce as Θ_{sc} tends to zero. We did, indeed, notice a slight reduction of the modulation for the photons which are more likely forward scattered (red line). However this effect is is significant only for photons scattered at Θ_{sc} ∼ 0. 

Open with DEXTER  
In the text 
Current usage metrics show cumulative count of Article Views (fulltext article views including HTML views, PDF and ePub downloads, according to the available data) and Abstracts Views on Vision4Press platform.
Data correspond to usage on the plateform after 2015. The current usage metrics is available 4896 hours after online publication and is updated daily on week days.
Initial download of the metrics may take a while.