Simple numerical X-ray polarization models of reflecting axially symmetric structures around accreting compact objects

We present a series of numerical models suitable for X-ray polarimetry of accreting systems. Firstly, we provide a spectropo-larimetric routine that integrates reflection from inner optically thick walls of a geometrical torus of arbitrary size viewed under general inclination. In the studied example, the equatorial torus surrounding an accreting compact object is illuminated by a central isotropic source of X-ray power-law emission, representing a hot corona. Nearly neutral reprocessing inside the walls is precomputed by Monte Carlo code STOKES that incorporates both line and continuum processes, including multiple scatterings and absorption. Applying a conversion script to the torus reflection output, we created tabular dependencies for a new XSPEC model, called xsstokes . In this version, xsstokes enables efficient X-ray polarimetric fitting of the torus parameters, observer’s inclination and primary emission properties, interpolating for arbitrary state of primary polarization. We provide comparisons of the results to a more sophisticated Monte Carlo simulation. Since the polarization interpolation routine works for any axially symmetric reflecting structure, we provide another version of xsstokes that is suitable for approximating nearly neutral reflection from a distant optically thick disc of small geometrical thickness. The second version uses the same precomputed Monte Carlo reprocessing, but assumes local illumination averaged for a range of high incident angles, representing a toy model of a diffuse, vertically extended hot inner accretion flow. Assessing both model variants, we conclude that the resulting polarization can be tens of % and perpendicularly/parallelly oriented towards the axis, if the reflecting medium is rather vertically/equatorially distributed.


INTRODUCTION
X-ray polarimetry is undergoing a rebirth due to the successful launch and operation of the Imaging X-ray Polarimetry Explorer (IXPE) (Weisskopf et al. 2022).Out of many scientific cases of X-ray polarimetry, where reflection from axially symmetric structures plays a role, we name the extragalactic active galactic nuclei (AGN) with a central supermassive black hole, and the Galactic accreting stellarmass black holes, neutron stars and white dwarfs.Apart from the polar scatterers, such as jets and ionization cones, the compact accreting objects are often surrounded by distant equatorial reprocessing material that changes the properties of the central X-ray emission.This can be the broad line regions or the dusty parsec-scale torus of AGNs (Antonucci 1993;Urry & Padovani 1995), or equatorial outflows arising from outer accretion disc surrounding the supermassive black holes or orders-of-magnitude lighter objects (see e.g.Koljonen & Tomsick 2020;Neilsen et al. 2020;Miller et al. 2020;Ratheesh et al. 2021).A hot coronal plasma producing primary X-ray powerlaw emission is located in the inner-most accretion regions (Sunyaev & Titarchuk 1980;Haardt & Maraschi 1991;Haardt 1993).Various ★ E-mail: jakub.podgorny@asu.cas.czgeometries of the corona are continuously considered in literature with theoretical polarization typically up to a few % (Beheshtipour et al. 2017;Tamborra et al. 2018;Marinucci et al. 2018;Poutanen et al. 2018;Krawczynski & Beheshtipour 2022;Ursini et al. 2022).These predictions are observationally confirmed by IXPE with a preference for equatorially elongated coronae for particular sources (Krawczynski et al. 2022;Marinucci et al. 2022;Tagliacozzo et al. 2023;Ingram et al. 2023;Gianolli et al. 2023).
The spectropolarimetric modelling of distant reprocessing of the coronal emission reaches a range in complexity and computational effectivity.From analytical and semi-analytical models (e.g.Chandrasekhar 1960;Brown & McLean 1977;Sunyaev & Titarchuk 1985;Matt 1993;Poutanen & Svensson 1996;Poutanen et al. 1996;Bianchi & et al. 2010;Veledina et al. 2023) to complex radiative transfer equation solvers (Matt et al. 1993;Dorodnitsyn & Kallman 2010, 2011) to Monte Carlo (MC) simulations (e.g.Matt et al. 1989;Ghisellini et al. 1994;Matt et al. 1996;Goosmann & Matt 2011;Marin et al. 2016Marin et al. , 2018a,b;,b;Ratheesh et al. 2021;Ursini et al. 2023).Admittedly, the new models presented in this paper are serving as first-order predictions and represent a largely simplistic, yet computationally efficient scenario.No special-or general-relativistic effects are taken into account.We study a nearly neutral toroidal geometry that re-flects a point-like isotropic power-law emission located in the center.Only a single reprocessing at one part of the optically thick inner walls is taken into account, although locally, the effects of multiple scatterings and energy-dependent absorption are treated.Across the geometrical torus surface, we numerically integrate precomputed local spectropolarimetric tables that were originally developed for reflection from accretion discs in AGNs.We refer the reader to Podgorný et al. (2022) for a full description of these tables.The aim of this work is to achieve an approximative model enabling fast estimates with the data fitting tool XSPEC (Arnaud 1996).We compare these results to more sophisticated MC results of partially ionized equatorial obscurers presented in (Podgorný et al. 2023a) (hereafter Paper I.) that used the STOKES code (Goosmann & Gaskell 2007;Marin et al. 2012Marin et al. , 2015;;Marin 2018) for the same radiative transfer problem self-consistently, i.e. without the need for precomputation.In this way, we examine to what extent the reflection on the inner walls of an accreting funnel determines the output polarization properties, depending on geometrical properties of the scattering region and primary radiation characteristics.
Apart from a general numerical integrator across a toroidal structure, we use a convertor of American Standard Code for Information Interchange (ASCII) tables to Flexible Image Transport System (FITS) format (Hanisch et al. 2001) in the Office for Guest Investigator Programs (OGIP) standard (Arnaud 1995) suitable for XSPEC in its latest version that includes polarization.This results in the above mentioned torus reflection model suitable for XSPEC.
One other variant of the XSPEC model is presented, achieved in a similar manner.It approximates net polarization from centrally illuminated faraway regions of cold matter distributed near the equatorial plane with low height relative to the radius.Given the averaging across high impinging angles of the local reflection tables computed in Podgorný et al. (2022), this model also approximates the emitter of X-ray power-law with low or moderate vertical extension.
The paper is organized as follows.In Section 2 and Appendices A, B, C and D we describe the new models developed, i.e. the torus reflection integrator, the table conversion routine, and the two XSPEC fitting models: for reflection from a torus and for reflection from a distant disc.In Section 3 we discuss the results of the torus reflection model and compare them to a detailed MC approach.In Section 4 we discuss the results of the disc reflection model.In Section 5 we conclude.

MODELLING
We define the linear polarization degree  and polarization position angle Ψ in the usual way from the Stokes parameters ,  and where arctan 2 denotes the quadrant-preserving inverse of a tangent function and Ψ = 0 means that the polarization vector is oriented parallel to the system axis of symmetry projected to the polarization plane.Ψ increases in the counter-clockwise direction from the point of view of an incoming photon.Due to symmetry, the polarization genesis from axially symmetric reflecting surface is such that the observed photons are polarized on average parallel or perpendicular to the main axis.Thus, we will use the notation of positive or negative polarization degree  for such resulting Ψ, respectively.When describing the polarization of the source emission, we will use Ψ 0 and  0 -with the same positive or negative notation for polarization fraction inside figures, as only parallelly or perpendicularly oriented polarization with respect to the principal axis will be used in the provided examples.Note that due to general-relativistic effects in the close vicinity of the black hole, this might not always be the case for realistic central emission (see e.g.Krawczynski & Beheshtipour 2022;Ursini et al. 2022).

Simple toroidal reflector
Paper I. introduced various geometrical archetypes for studying reprocessing of a central power-law with a power-law index Γ in a distant equatorial scattering region.The simulations were done using the STOKES code: an MC method with various X-ray line and continuum processes implemented with a focus on absorption and multiple Compton down-scatterings.A broad parametric range was explored in Paper I., including the effects of partial transparency and partial ionization.Here we will take just part of this work and compare it to a much simpler approach, trying to capture the main polarization driving mechanisms.We will use an identical geometrical setup to the Case C described in Paper I. for easy one-to-one comparisons.This means a perfectly circular torus profile ( =  subcase of an elliptical torus, see Podgorný et al. 2023a, for the model parameters and details) with a half-opening angle Θ viewed under some inclination  from the pole.The emission is isotropic, and is located in the center of the torus and is approximated as a point source.Note that this is again a huge simplification to more realistic hot X-ray emitting coronae near the central accreting engine (see references in Section 1).Direct emission is not added to the reflected component.
Figure 1 shows the torus reflection setup.We refer to Appendices A, B and C for detailed numerical implementation of the resulting XSPEC model xsstokes, in this variant named xsstokes_torus, and description of the corresponding routines.The assumption of axial symmetry allows swift interpolation for arbitrary state of the primary polarization given by  0 and Ψ 0 , along with system orientation ΔΨ.Only a single reprocessing from the surface is calculated.In other words we only account for those photons that reach the inner walls of the torus from the central source, they are locally reprocessed by means of precomputed nearly neutral multiple-scattering reflection tables, they emerge at the same surface location, and reach the observer under the assumed global inclination angle .No selfirradiation of the torus is allowed, nor partial transparency effects.The torus is optically thick.This allows to study the impact of multiple scatterings between different torus surface regions when the photon escapes the scattering medium in between two scattering events and the impact of partial transparency of the surface layers near grazing angles that were both accounted for in Paper I.
The integrating routine takes into account only the illumination of an upper plane of the torus (expecting some optically thick absorbing material extending from the outer accretion disc to the inner torus boundary).It illuminates up to the tangent point between the torus and a photon direction emitted in a Newtonian picture from the center under the half-opening angle Θ, i.e. the shadow boundary given by the opaque toroidal structure.The viewing angle given by  can span any value from type-1 ( < Θ) to type-2 ( > Θ) values.But note that the visible fraction of the illuminated part of the inner surface gets shrinked considerably for high inclinations. 1This allows to estimate Figure 1.A circular toroidal reflector that is considered for the results presented in Section 3. Being located in the center of the coordinate system, the X-ray power-law of arbitrary incident polarization and power-law index Γ is isotropically illuminating the inner side of the torus surface.We neglect the half-space below the equator for any generally inclined observer with 0 • <  < 90 • .The observer is viewing the source in the -plane.The material only reflects once and the surface regions not directly illuminated by the central source are not accounted for, i.e. the  values lower than reaching the tangent points of the torus with the half-opening angle cone that are represented by the yellow shadow boundary.The illuminated part has to be in addition visible in the observer's line of sight to be accounted for in the integration.The lower boundaries of the areas that are obscured by the opaque torus for an observer in two generic  type-1 and  type-2 inclinations are schematically drawn in orange and pink colors, respectively.The visible reflecting areas for a generic type-1 and type-2 observer are then shaded in orange and pink, respectively.
the polarized flux contribution from reflection off the opposite side of the torus for highly obscured type-2 AGNs or ultra-luminous X-ray sources (ULX).
For the local reflection at each infinitesimal surface area (in the code numerically approximated by a small rectangular area with an orientation locally tangent to the torus surface) on the inner illuminated part of the torus surface, we used the most neutral version of the X-ray spectropolarimetric reflection tables created for constantdensity plane-parallel accretion discs of AGNs.These tables, fully described in Podgorný et al. (2022), were computed combining the non-LTE radiative transfer iterator TITAN (Dumont et al. 2003) and STOKES.The reflection includes multiple Compton down-scatterings and photoelectric absorption with high accuracy.The X-ray illuminated partially ionized slab is computed all the way until optical depths of  e ≈ 7, while we only count the photons that are eventually not absorbed and escape back to the surface.Hence, we obtain a more detailed "reflection" (a reprocessing) from an infinitesimal surface on the torus than by a single-scattering reflector.
1 and type-2 viewing angle.The reflecting region that the integrating routine accounts for to compute the total output is then given by the intersection of the illuminated part (given by the equatorial plane from one side and the torus half-opening angle grazing boundary -displayed in yellow in Figure 1 -from the other) and the visible part to an observer inclined at .

Simple disc reflector
The second version of the xsstokes model, named xsstokes_disc, is intended to approximate X-ray polarization due to reflection from a static distant disc in the equatorial plane for unobscured AGNs.Its numerical implementation, which follows similar steps to the torus reflection variant, is described in Appendix D. We assume uniform integration (i.e. with no weighting) of the same nearly neutral local reflection tables from Podgorný et al. (2022) in all azimuthal emission angles, Φ e , and in a selected range of high incident angles,  i : 0 ≤  i = cos  i ≤ 0.3.This choice of irradiation represents a case of a distant or truncated disc, as if it was illuminated by e.g. a vertically extended corona or hot inner accretion flow in the central parts, and/or if the disc in the outer rings had a considerable elevation with respect to the equatorial plane.But note that the latter scenario produces a range of emission inclination angles for a particular distant observer, if the reflecting medium deviates non-linearly from the equatorial plane, while we keep a particular emission angle  (adopted as  e from the original tables) as a free parameter, which drives the polarization results to a significant extent.Such thick disc scenarios should be rather approximated by the reflecting torus model.The remaining free parameters of the reflecting disc model are then the power-law index Γ and arbitrary incident polarization  0 and Ψ 0 with system orientation ΔΨ, for which we interpolate in the same way as for the torus reflection.

REFLECTION FROM A TORUS
In this section, we will show the results of the new model xsstokes_torus, representing reflection from a circular torus, and compare it to the MC results extensively discussed in Paper I. Figure 2 shows the energy-dependence of flux and polarization from xsstokes_torus, plotted in the same way and for the same parameter values, as the MC simulations in figure 2 in Paper I. Despite much lower numerical noise in xsstokes_torus and despite the generally higher predicted polarization fraction that we discuss below, we see qualitatively similar dependency of polarization degree and angle on inclination and half-opening angle.We see the expected depolarization in spectral lines, and similar energy profile of polarization.From the soft spectra it is visible that even the most neutral reflection tables from Podgorný et al. (2022) that we adopted do not represent completely absorbed soft X-rays that we see in the MC simulations in figure 2 in Paper I., especially for high densities.The circular torus in xsstokes_torus is in general better approximating in polarization the elliptical tori class (Cases B and C) from Paper I. compared to the wedge-shaped geometries (Case A) from Paper I. We obtain highest deviations for the dark blue curve, representing a high inclination and small half-opening angle case.A likely reason for that is the zero transparency condition in xsstokes_torus and high reflection fraction from the thin sector of the inner wall visible on the furthermost side from the observer.It varies from a more realistic partly transparent situation.The curvature and relative size effects of the torus surface are eliminated from comparisons with the Case C in Paper I., because the torus in xsstokes_torus has identical meridional profile, albeit sharp shadow boundaries.
In order to provide an easy comparison of inclination and halfopening angle dependencies in the absence of spectral lines, we show in Figures 3 and 4  MC simulations of the most relevant Case C for low, moderate and high partial ionization levels (see Paper I. for details), which allows to see the resemblance of MC simulations to the new model with respect to ionization.The highest resemblance happens for the high ionization case.With high free electron density in the MC model we obtain high perpendicular polarization from the opposite side of the reflecting inner torus surface, which provides relatively strong flux contribution with respect to angular distributions of photons per visible surface area.This becomes noticeable only for the high density cases computed by the MC model, when partial ionization plays role due to high obscuration, caused even by the shallowest, yet dense enough layers of the circular tori.
The xsstokes_torus model is thus representing the limiting case of complete obscuration and reflection only on the opposite inner side, albeit nearly neutral local reflection is assumed and high local absorption is present (Podgorný et al. 2022).Such contribution alone to the total AGN emission is difficult to estimate when decomposing observational signal in type-2 AGNs.Qualitatively similar polarization behavior across the entire range of inclinations and halfopening angles cross-validates the implementation of relative size and position parameters of the equatorial scatterer in both models.For low half-opening angles we see two local maxima in polarization degree with inclination, which is different from the MC simulations, because for very high inclinations the geometry behaves differently with respect to transparency of the shallowest layers.For high halfopening angles and all viewing angles, the reprocessing provides the same net parallel polarization angle and the same increasing dependency on inclination as the MC simulations, although we observe lower polarization fraction by more than half due to still relatively strong flux of the highly polarized perpendicular component arising from reflection on the furthermost side, which depolarizes the result.The energy-dependence in the shown continuum energy bands is qualitatively different in the parallelly polarized results, which can be attributed to lower soft X-ray flux contribution in the MC simulations compared to the xsstokes_torus model.At 3.5-6 keV energies we see lower polarization than in the 30-60 keV due to absorption (see figure 5 in Podgorný et al. 2022), which takes place in the depolarizing reflection component with perpendicular polarization position angle.
Other reasons for the observed discrepancies can be mutual irradiation of different toroidal surface regions and the flux contributions from regions below the equatorial plane, which are both forbidden in the xsstokes_torus model.However, if this was important, we would see the primary polarization changes less visible and more washed out in the resulting polarization signal for the MC simulations compared to the xsstokes_torus model.Figure 5 shows for xsstokes_torus the same dependencies on changing primary polarization and Γ as in figure 10 of Paper I. for Case C therein (provided for two different equatorial column densities of the MC simulation).The effects on polarization have comparable extent and the same qualitative behavior.This also cross-validates the new model.The dependency of the net polarization on changing primary polarization state is natural from the scattering theory and we see similar results for reflection from accretion discs (see Section 4 or the results in Podgorný et al. (2023b)).We only see a different output polarization response to primary polarization state for very high inclinations and low half-opening angles, where the xsstokes_torus model switches to the new regime with perpendicular polarization increasing again with inclination and where we expect the highest deviations from the MC simulations for the reasons mentioned above.The remaining differences between the results of xsstokes_torus and the MC simulations can be also due to different absorber structure, which affects both continuum and spectral lines.The local reflection tables used in xsstokes_torus were computed for high-density AGN accretion discs with fixed  H = 10 15 cm −3 , but dusty tori of AGNs are estimated to have clumpy structure with average densities  H ≈ 10 5 − 10 6 cm −3 (Siebenmorgen et al. 2015;Furui et al. 2016;Buchner et al. 2019).Keeping the near neutrality observed in AGN dusty tori, it is difficult to estimate what effect would a pure density change cause.But if orders of magnitude lower densities were considered for the same central luminosity, then according to the ratio of photoionization rate (proportional to ∼  H ) to recombination rate (proportional to ∼  2 H ), i.e. the ionization parameter dependency  ∼ 1  H for constant-density slabs (Tarter et al. 1969), we would expect higher ionization on the front side of the scattering medium and consequently less energydependent polarization in our approximation (see e.g.Ratheesh et al. 2021;Podgorný et al. 2022).The differences between the MC results in Paper I. and xsstokes_torus cannot be due to insufficient resolution of the numerical integration in the torus_integrator routine, used for the presented xsstokes_torus model, which is discussed in Appendix C. But we note that for the comparisons in between the two numerical methods the pure MC results instead show significant numerical noise at soft energies and for high  H , low ionizations, low Θ and high , albeit being more physical.

REFLECTION FROM A FARAWAY DISC
In this section we briefly discuss the results of the xsstokes_disc routine, suitable for studying X-ray polarization signatures from distant rings of AGN accretion discs without any special-or generalrelativistic distortion.Figure 6 shows the resulting polarization with energy for various model parameters.Unlike the polarization from geometrically thick equatorial obscurers described previously and in Paper I., which can produce either parallel or perpendicular polarization angle with respect to the principal axis depending on the conditions, the xsstokes_disc routine always predicts parallel (i.e.positive) polarization, because the reflecting matter is distributed equatorially, which forms the dominant plane of scattering (and polarization direction from Compton effect perpendicular to it).The level of received net polarization fraction can be from 0% up to ∼ 30%, mainly depending on the inclination of the observer, which is the main driver of polarization in this simplistic model.The spectral lines are depolarized, as expected, and the energy profile of polar- = 75°= 2.0, p0 = 2%, 3.5 6 keV = 2.0, p0 = 0%, 3.5 6 keV = 2.0, p0 = 2%, 3.5 6 keV = 1.2, p0 = 2%, 3.5 6 keV = 2.8, p0 = 2%, 3.5 6 keV = 2.0, p0 = 2%, 30 60 keV = 2.0, p0 = 0%, 30 60 keV = 2.0, p0 = 2%, 30 60 keV = 1.2, p0 = 2%, 30 60 keV = 2.8, p0 = 2%, 30 60 keV Figure 5.The xsstokes_torus results for different cases of primary radiation, portrayed in the same way as in figure 10 in Paper I. for easy comparisons with the STOKES MC simulations.We plot the energy-averaged polarization degree, , versus inclination  for Θ = 25 • (left), Θ = 45 • (middle), and Θ = 75 • (right).We show the results integrated in 3.5-6 keV (solid) and 30-60 keV (dashed).The magenta curves correspond to the 2% parallelly polarized primary with Γ = 2.0.The red and yellow correspond to the unpolarized and 2% perpendicularly polarized primary with Γ = 2.0, respectively.The green and black curves correspond to the 2% parallelly polarized primary with Γ = 1.2 and Γ = 2.8, respectively.ization degree follows that of the xsstokes_torus model, seen in Figure 2.
The effects of changing primary power-law index are negligible in majority of the studied energy band, accounting for up to ∼ 2% difference in polarization around 30 keV for very high inclinations only.Thus, compared to the reflection from spatially extended and partially transparent obscurers, the power-law index Γ plays a much smaller role in the resulting polarization for geometrically thin and optically thick discs residing in the equatorial plane.The obtained linear difference in polarization degree is expected on the output for changing the incident emission by additional polarized fraction  0 .The received emission has enhanced polarization compared to unpolarized case, if the incident polarization is oriented parallelly, and is depolarized compared to unpolarized case, if the incident polarization is oriented perpendicularly.This is consistent with the impact of primary polarization on reflected emission from the accretion disc that was presented for inner regions of the disc including generalrelativistic effects in the lamp-post disc-corona system in Podgorný et al. (2023b).
Last but not least, to see the inclination dependence of polarization clearly, Figure 7 shows these results integrated in 2 different energy bands with absence of spectral lines and for one chosen Γ.For the distant disc reflection, we obtain a monotonous dependency, unlike the results from significantly vertically extended tori.The result is consistent with the high half-opening angle limit seen in the MC simulations and in the xsstokes_torus model in Figure 3 (right panels), i.e. a linearly increasing polarization fraction with inclination and parallel polarization angle in all subcases.The reflection from the distant disc provides only a higher polarization fraction due to effectively higher asymmetry of the system compared to the circular tori.The results are consistent with figure 11 from Ratheesh et al. (2021), which attempted for a similar reflection scenario with the models of Matt et al. (1989); Matt et al. (1991).The geometrical difference with respect to our case was higher isotropy in illumination of the disc, hence receiving about 50% lower net polarization compared to our results.
The simulations in simple geometries can be also compared to analytical approximations.In Figure 8 we show the Chandrasekhar's single-scattering results for reflection (Chandrasekhar 1960) for the same three cases of incident polarization and displayed in the same manner as in Figure 7.We numerically integrated the analytical predictions in all azimuthal emission angles Φ e and selected ranges of incident angles.The case of 0 ≤  i ≤ 0.3 matches the polariza-tion degree and angle predictions by xsstokes_disc, which was computed for the same range of incident angles.If we enlarge this range, the resulting polarization degree drops.The analytical formulae predict zero net polarization around uniform illumination in 0 ≤  i ≲ 0.8 and then the resulting polarization fraction increases again, obtaining a net polarization angle parallel to the disc, orthogonally to the results in reduced geometry of scattering, as the photons arriving vertically to the disc begin to dominate the resulting polarization.Thus, we plot the absolute value of polarization in Figure 8, also to note that the response of polarization degree to the incident polarization orientation is then inverted accordingly.

CONCLUSIONS
We developed a series of new routines that help to predict X-ray polarization arising from reflection on distant axially symmetric scatterers illuminated by a central isotropic power-law emission of arbitrary polarization.A simple non-relativistic integration across the inner walls of a circular torus, using local reflection tables originally computed for coronal power-law impinging on constant-density AGN accretion disc, can in some configurations well represent the expected outcome from reprocessing in cold AGN dusty tori.This was tested against more physical MC simulations that in addition to our new simple model allow for partial transparency, partial ionization and self-irradiation effects.
Using a much simpler approach, we obtained qualitatively comparable behavior of polarization with energy, inclination, half-opening angle of the torus, primary power-law index Γ and primary polarization state.Quantitatively, however, we obtained about twice higher net polarization fraction with the simple integrator, if the dominant resulting polarization angle was perpendicular to the axis of symmetry, and about twice lower, if the net polarization angle was parallel.This can be explained by the zero transparency, high density, and "singlereprocessing" conditions adopted in the simple approach, although multiple scattering and absorption effects were locally considered.From the direct comparisons with the MC simulations for various density and ionization levels, we observe different contributions of the competing parallelly or perpendicularly polarized photons between the configurations, originating in the left and right sides or the furthermost side from the observer, respectively.Thus, the main driving mechanisms of polarization genesis are understood for both models.From the remaining differences one can estimate the impact of pure reflection on the inner side of nearly neutral matter appear- ing faraway in the equatorial plane around X-ray emitting coronae.This impact will be larger for type-2 viewing angles when the primary source of emission is hidden.These effects can be a useful diagnostic tool for the 3D geometry of spatially unresolved structures near compact accreting objects in the era of observational X-ray polarimetry and multi-wavelength campaigns.
The routines developed for these estimates can be of wider use.The torus integrating routine is wavelength independent and the calculations can be easily modified to elliptical torus profiles and other spectral energy distributions.The local reflection tables from Podgorný et al. ( 2022) used for the distant X-ray reprocessing discussed in this paper can be also easily replaced by any other reflection tables in a similar FITS format.For example, by ionization-dependent tables, or the same nearly neutral computations but for order-of-magnitude lower densities, or analytical prescriptions.Therefore, we suggest a possible usefulness of the torus integration routine for studying physical objects also other than dusty AGN tori, such as thick accretion discs or obscuring outflows of accreting stellar-mass black holes, neutron stars or white dwarfs.
One could also separately precompute the resulting FITS spectropolarimetric tables for arbitrary axially symmetric reflector for three independent incident polarization states, using any method and e.g. the ASCII to FITS convertor that we applied.Employing new model parameters, it is then easy to adapt the follow-up xsstokes interpolation routine, which represents a fast XSPEC compatible fitting model interpolating for arbitrary incident polarization state.In order to test such possibility, we provided another example of a simple nonrelativistic distant disc reflector of a central power-law originating in a moderately vertically extended inner coronal region.The results are consistent with the reflecting toroidal structures studied for large half-opening angles and with other X-ray polarization studies of reflection from accretion discs.p (%) p0 = 0%, 3.5 6 keV p0 = 2%, 3.5 6 keV p0 = -2%, 3.5 6 keV p0 = 0%, 30 60 keV p0 = 2%, 30 60 keV p0 = -2%, 30 60 keV Figure 7.The computed energy-averaged polarization fraction, , with xsstokes_disc in 3.5-6 keV (solid lines) and 30-60 keV (dashed lines) versus observer's inclination  for Γ = 2.The color code represents different incident polarizations of the primary power-law: unpolarized (red), 2% parallelly polarized (green), and 2% perpendicularly polarized (blue).
The absolute value of polarization, |  |, versus observer's inclination .The results are from Chandrasekhar's single-scattering approximation integrated uniformly in all azimuthal emission angles Φ e and in selected ranges of cosines of incident angles 0 ≤  i ≤ 0.3 (solid lines, as in xsstokes_disc displayed in Figure 7), 0 ≤  i ≤ 0.8 (dashed lines) and 0 ≤  i ≤ 1 (dotted lines).The color code represents different incident polarizations of the primary: unpolarized (red), 2% parallelly polarized (green), and 2% perpendicularly polarized (blue).For restricted illumination angles, the resulting polarization is perpendicular to the disc and the inclination dependence matches our simulation.If the incident illumination angle limit is raised above  i ∼ 0.8, the resulting polarization angle switches orientation and is parallel to the disc, which is the reason for the reverse response of the emergent polarization degree to the incident polarization state in the dotted lines compared to the two other cases.

APPENDIX B: TOROIDAL INTEGRATING ROUTINE: DETAILED DESCRIPTION
We will provide a few computational details of the routine torus_integrator that is introduced in Appendix A. The code uses standard relations between the cartesian coordinate system {, , } given by the base vectors ì  x = (1, 0, 0), ì  y = (0, 1, 0), ì  z = (0, 0, 1) and the torus surface coordinates {, } given by the base vectors   = (− sin , cos , 0),   = (− sin  cos , − sin  sin , cos ) (see Figure 1): where  =  +  in is the distance between (0,0,0) and the center of the toroidal circle, and is the radius of the toroidal circles in the meridional plane.The surface is given by another standard implicit formula The local reflection tables need to be interpolated at each point in the {, } grid in their three angular dependencies  i = cos  i ,  e = cos  e , and Φ e properly defined in Dovčiak et al. (2011) and depicted here in Figure B1 (left).The code precomputes these angles at each grid point given their definitions in the local frame and given the local surface normal ì  = ∇Φ | ∇Φ| , the incident vector ì  = (, , ), the emission vector ì  = (0, sin , cos ), and their respective projections to the local tangent plane through scalar products.
The code ensures that the grid points with  i ∉ [0,  2 ] and  e ∉ [0,  2 ] are not accounted for.We limit  − Θ ≤  ≤ , i.e. we do not account for those regions that lie below the equatorial plane where some outer disc material could be extending, and for any  smaller than the shadow boundary given by Θ.The region of integration has to be also visible by the observer, which is for each  and  given by the limiting curve of zero transparency condition 0 = ì • ì .Therefore, after a few simple steps we obtain a prescription for this curve  limit (, ) = − arctan(2 sin  tan ) +  . (B4) Lastly, we also have to account for self-obscuration of the reflected rays by the opposite side of the torus, closer to the observer (the scenario for highly inclined observers).To find such region, we define  that begins at ì  1 = ( 1 ,  1 ,  1 ) at the opposite half-space from the observer given by  ≤  ≤ 2 and some  self-obs per each .The grazing vector points in the ì  direction towards the observer and ends at a point ì  2 = ( 2 ,  2 ,  2 ) tangential to the torus surface, i.e. defined by  limit for unknown 0 ≤  t ≤ .Each local scattering surface in the user-defined grid is given by boundaries  1 (, ),  2 (, ),  1 (, ),  2 (, ) that are defined in linear binning via  v and 2 u points (the number of bins in  covers only the [/2, 3/2] interval, because the other half is symmetrically added).Or the local surface is set to zero, if the central bin point {, } does not fall within the restricting boundary conditions above, which is a good approximation for sufficiently high resolution.We then approximate the contributing local scattering surfaces by a tangent rectangle and compute its area: At each {, } we perform a tri-linear interpolation in  i ,  e , and Φ e of the tabular Stokes parameters ,  and , commonly denoted as ( i ,  e , Φ e ; , Γ,  0 , Ψ 0 ), in order to obtain Su,v ( i (, ),  e (, ), Φ e (, ); , Γ,  0 , Ψ 0 ).The Stokes parameters stored in the tables from Podgorný et al. (2022) also depend on energy , power-law index Γ and primary polarization state ( 0 , Ψ 0 ), but in the current version we require the exact stored values to be requested for the final ASCII files in torus_integrator, in order not to interpolate further in these for computational efficiency.
The polarization vector of the interpolated reflected rays is in addition transformed from the local frame to conform to the photon momentum direction in the global system.In global coordinates, the Stokes parameters are set with respect to the torus axis of symmetry.The incident electric vector orientation does not have to be rotated to conform to the polarization definition in the local frame due to the axial symmetry of the entire torus surface and emission placed in the central point.It holds that the polarization fraction after the rotation  1 is equal to the  0 in the local reflection frame, and similarly for the intensity:  1 =  0 .Thus, for the remaining Stokes parameters we compute  1 = √︃  2 0 +  2 0 cos (2Ψ 1 ) and  1 = √︃  2 0 +  2 0 sin (2Ψ 1 ).In order to obtain the Ψ 1 (Ψ 0 ) function we will use Definition (1).See Figure B1 (right) for a schematic drawing of the angles and vectors in the polarization plane.We define Ψ 0 with respect to the projected normal ì and ì ẽz = ì  are the base vectors in the polarization plane and the polarization vector is locally given by ì  loc = (cos Ψ 0 , sin Ψ 0 , 0).The conditions cos Hence, we need to invert this matrix equation to obtain ì We finish by numerically integrating the Stokes parameters from locally tangent planes projected to the line of sight across all {, } that fulfill the aforementioned shadow and visibility conditions: with weighting according to the locally illuminating flux dependent on distance from the center (, ) as ∼ 1  (,) 2 .Because of the weighting with (, ) that scales linearly with  in , the results are independent of  in .In our approximation, we take for all surface points the most neutral version of the local reflection tables and the ionization parameter is not dependent on the local flux received.The output  tot is renormalized via  constant for storage convenience.We save the results in a user-defined directory in the ASCII file format.Such  tot tables, if converted to FITS, are then ready to be used inside xsstokes_torus for any incident polarization, following Equation (A1).

APPENDIX C: TOROIDAL INTEGRATING ROUTINE: PERFORMANCE
Before using the torus_integrator routine, one should ensure that the convergence is sufficient.Especially for any desired high inclinations and low half-opening angles, i.e. with low reflecting surface area.In this section we will provide a few examples on numerical convergence efficiency of the torus_integrator.Figures C1 and C2 give energy-integrated polarization results from the resulting (fast) xsstokes_torus routine for various  and  resolutions, given by number of bins in the corresponding ranges inside torus_integrator.We purposely show the inclinations and half-opening angles close to the limits where the efficiency of torus_integrator dramatically decreases.We have selected 8 different linear binnings in the {, } grid, of which the highest one was used for the results shown in Section 3.
The code is not parallelized.To give the reader an estimate on CPU time efficiency on average institutional cluster, where the results for this paper were computed, we state the CPU time needed to produce the results in 20 inclination bins and 13 half-opening angles per 1 Γ and 2 incident polarization states.We spent less than 3 days on a single core to produce the highest resolution displayed in Figure C1 and less than 150 days on a single core for the highest resolution displayed in Figure C2.However, the algorithm's performance depends on many parameters and the code is typically slower for higher half-opening angles and lower inclinations, as less local areas are skipped in the adopted visibility conditions.Clearly, apart from the improvements proposed in Section 5, the routine could also be upgraded in the future by defining non-linear binning with higher grating towards the more exposed torus surface parts.Due to large computational times needed for the most extreme corners of the parametric grid, we provide an access in the Data Availability section to precomputed full tables for xsstokes_torus that are described in Table A1 with  u = 400 and  v = 1000.While the results for figures in this paper, where only part of the parameter space was needed, were computed with  u = 1000 and  v = 2000.The code's memory usage is optimized for a personal laptop.

APPENDIX D: NUMERICAL IMPLEMENTATION OF THE DISC REFLECTION
In this section, we provide details on the computations that lead to the physical model of reflection on a distant accretion disc, described in Section 2.2.We first created an ASCII version of the most neutral part of the disc reflection tables from Podgorný et al. (2022) that store the original tables uniformly added in all Φ e and 0 ≤  i = cos  i ≤ 0.3 for three independent incident polarization states.Then they were converted to FITS using the XSPEC Table Model Generator.We preserved the energy binning and dependency on  e = cos() and Γ.These constitute the XSPEC fitting parameters in the follow-up xsstokes_disc C routine, alongside polarization.This routine operates on the same basis as the xsstokes_torus routine and requires the aforementioned FITS tables as dependencies.It interpolates for arbitrary incident polarization  0 and Ψ 0 , and system orientation ΔΨ through Equation (A1) from three precomputed tables in independent incident polarization states.Table A1 (bottom) summarizes the resulting model parameters available for data fitting at once.This paper has been typeset from a T E X/L A T E X file prepared by the author.The computed polarization with xsstokes_torus integrated in 3.5-6 keV (black) and 30-60 keV (red) for various high resolutions given by the number of points in  and  ranges inside the torus_integrator routine.We display the same as in Figure C1, but for much finer binning:  u = 100 and  v = 600 (dotted),  u = 200 and  v = 800 (dashed-dotted),  u = 400 and  v = 1000 (dashed),  u = 1000 and  v = 2000 (solid).

Figure 2 .
Figure 2. Top: the spectra,  E , normalized to value at 50 keV.Bottom: the corresponding polarization degree, , versus energy.For easy comparisons, we show the xsstokes_torus results in the same way as the results of MC simulations are given in figure 2 of Paper I. Various inclinations  and halfopening angles Θ for both type-1 and type-2 observers are shown in the color code.The primary input was set to Γ = 2 and  0 = 2% for all displayed cases.The detailed parametric dependencies are shown in following figures when integrated in energy.

Figure B1 .
Figure B1.Left: the definitions of angles and vectors in the locally reflecting plane, tangent to the torus surface.Right: the definitions of angles and vectors in the polarization plane, perpendicular to the photon momentum direction.These are needed for the calculations of rotation of the polarization angle by changing frame of reference.
Figure C2.The computed polarization with xsstokes_torus integrated in 3.5-6 keV (black) and 30-60 keV (red) for various high resolutions given by the number of points in  and  ranges inside the torus_integrator routine.We display the same as in FigureC1, but for much finer binning:  u = 100 and  v = 600 (dotted),  u = 200 and  v = 800 (dashed-dotted),  u = 400 and  v = 1000 (dashed),  u = 1000 and  v = 2000 (solid).

Table A1 .
The XSPEC parameters available in the two attached xsstokes model versions.