Äîêóìåíò âçÿò èç êýøà ïîèñêîâîé ìàøèíû. Àäðåñ îðèãèíàëüíîãî äîêóìåíòà : http://xmm.vilspa.esa.es/scisim/release/latest/help/postscript/rsim.ps
Äàòà èçìåíåíèÿ: Wed Jan 12 14:11:46 2005
Äàòà èíäåêñèðîâàíèÿ: Sat Dec 22 15:34:52 2007
Êîäèðîâêà:

Ïîèñêîâûå ñëîâà: trapezium
RGA Simulator (RSIM) 4.0
Peter Videler
January 12, 2005
This is a paper version of the RSIM help. If possible, refer to the HTML version, which contains images
and hypertext links.
RSIM is a simulator for the RGSinstrument. It is part of the XMM-NewtonScience Simulator SciSim.
RSIM consists of two parts: RGASIM and RFCSIM.
This document describes only the RGA (Re ection Grating Array) part of the simulator. The camera
part (RFC) is simulated by RFCSIMwhich is simply a symbolic link to ESIM.
This document contains information speci c to RSIM only; for generic information see SciSim User
Guide.
1

XMM-Newton Science Simulator Page: 2
Contents
1 Overview 4
1.1 Features simulated . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2 Usage 5
2.1 SCISIM GUI usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2 Command line usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3 Con guring the simulation 5
3.1 RGA GUI usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.1.1 Instrument tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.1.2 Features tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.1.3 Simulation tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.2 Con guration le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.2.1 Keywords tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.2.2 Keywords description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.2.3 Keywords example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.3 Coordinate system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4 Internals 13
4.1 RGA related raystream elds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.1.1 RGAlastProcess . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.1.2 gratingProcess . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.2 Error budget implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.3 RGA coordinate system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.4 Grating shape . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.5 Hardwired values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5 Limitations of model 16

XMM-Newton Science Simulator Page: 3
6 RSIM Tools 16
6.1 RFCdot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
7 Acknowledgment 18

XMM-Newton Science Simulator Page: 4
1 Overview
RGASIM is a ray tracer which simulates the X-ray response of the RGA of the XMM-Newtonpayload.
RGASIM reads rays, traces them through the RGA and writes the resulting rays on the output. It is
implemented as a single executable that acts as a lter on rays. The program uses the uniform interface
of SciSimto read and write the ray information.
Typically RGASIM will receive input rays from the mirror simulator MSIMand the output will be
analyzed by RFCSIMor ESIM. All the SciSim Toolscan be applied on its output for example to obtain
ray paths, e ective area calculation, ray statistics etc.
For studying the focusing properties of the RGA without any of the CCD speci c features, a tool rfcdot
is provided which can project rays either on the Rowland circle or on the 9 CCD surfaces.
1.1 Features simulated
RSIM models the following geometry:
 3D model of grating array
 trapezium shaped grating plates
 ribs on grating back
 the support braces placed in between some of the gratings (including holes).
 missing gratings, allow for partly lled RGA.
 blocking of rays by the walls separating the grating rows.
The following features are included:
 scattering o the grating surface.
 grating positioning and alignment errors.
 grating non- atness (bow, warp).
 variable line density groove spacing and additional random spacing errors.
 tabulated grating eôciency (from the Columbia EM code).
 re ections on grating back, ribs and SiC support structure (specular only).
 multiple re ections in between two grating plates and/or braces.
 misalignment of the RGA relative to telescope and detectors.
The RGA simulator cannot be used(Sec. 5) as a raytracer for the entire RGA support structure. It only
includes those RGA components which are in the X-ray light path.

XMM-Newton Science Simulator Page: 5
2 Usage
RGASIM acts as a lter on the SciSimraystream, which typically comes from the Mirror Simulator
(MSIM). The output is a modi ed stream of rays containing all rays leaving the RGA. The detector
simulators ESIMand RFCSIMwill select only those rays from the stream which reach their detector.
RGASIM can be used in two ways: either from the SciSimgraphical user interface (GUI) or from the
command line.
RGASIM is con gured by the rgasim config section of the scisim.cfg(see SciSim User Guide).
On the command line one can specify an explicit le to be used with the -c option. From the GUI
all relevant parameters can be adjusted. All parameters that are accessible from the GUI can also be
changed on the command line with the --keyword value option, e.g. rgasim --model FM1.
The model parameter selects one of the prede ned models. A model consists of a set of les which de ne
properties such as the grating con guration, error budget values, scattering etc.
Other keywords modify the behavior of the simulation itself. There are keywords to position the RGA,
specify the spectral order range and select the way the error budget implementation works.
The default con guration is to run a simulation as realistic as currently known for RGA model FM1
(Flight Model 1). To run this model no additional user con guration is required.
2.1 SCISIM GUI usage
To use RSIM from within the SciSimGUI, start scisim (see SciSim User Guide). First set up a source
con guration. Then select GSIM, MSIMand RGASIM, and click on the Run button.
The rays that leave RGASIM are now written to a le. This le can be used as input for RFCSIMand/or
ESIM. Alternatively it can be analysed with any of the SciSim Toolsfrom the command line.
The RGA (likewise the other modules) can be con gured(Sec. 3) by clicking on the icon with the right
mouse button. This pops up a con guration screen.
To run a simulation from the GUI which bypasses the RGA (similar to the command line instruction:
msim | esim) select model \none" from the RGA instrument tab. This copies the RGA input stream
unchanged to the output as if the RGA were not present.
2.2 Command line usage
See for global command line usage the SciSim User Guide. An example of RGASIM on the command
line with con guration keywords(Sec. 3):
rgasim -c myconfigfile --verbose 3 --orders begin -1 -2 end
3 Con guring the simulation
This chapter describes how to con gure the simulation of the RGA instrument.

XMM-Newton Science Simulator Page: 6
First the usage of RGA GUIs is described, followed by a listing of all keywords needed to con gure the
instrument.
One can nd the con guration in under the rgasim con g section of the scisim.cfg.
The last section describes the positioning of the instrument.
3.1 RGA GUI usage
The RGA-GUI is an easy-to-use interface that allows the User to set some top-level simulation param-
eters. For advanced modi cations one should access the rgasim con guration section of the scisim.cfg.
Information on how to start the simulator can be found in the top level documentation of SciSim.
The con guration is grouped under so-called \Tabs".
3.1.1 Instrument tab
Model One can select one of the models in the rgasim con guration.
A user can add additional models to the list by editing the con guration le.
Selecting a model only speci es the lenames for the con guration les of that model. They
do not a ect the value of the other keywords. The positioning of the RGA model and the
setting of the keyword switches is thus not part of the Keywords tree(Sec. ??) de nition
itself.
Simulation A set of prede ned settings can be selected which overrule the keywords set by the user.
Two sets are prede ned: realistic and ideal. When either of these simulation setting is
chosen, the keywords are set to the value hard wired in the code.
The setting realistic corresponds to the defaults of this installation.
The setting ideal corresponds to a perfect RGA with all error budget contributions o , no
scattering and no re ections at grating back. This can be useful for verifying the focus
properties of the RGA geometry.
The default setting is user speci ed which allows the user to change the con guration.
Rotation see the SciSim User Guide for information about the Rotation settings.
Translation see the SciSim User Guide for information about the Translation settings.
3.1.2 Features tab
error budget Enables all error budget contributions.
Note: If not set this disables alignment, line spacing and grating non- atness errors.
grating scatter Use scattering at grating surface
Grating eôciency at front side Re ection coeôcient (R) for re ections on gold grating surface: ab-
sorb: Absorb ray (R = 0)
always 1: Fully re ect ray (R = 1)
table: (default) interpolate in eôciency lookup table ( R = Eff( ; E; order))

XMM-Newton Science Simulator Page: 7
Grating eôciency at back side Re ection coeôcient (R) for grating back and braces: absorb: Ab-
sorb ray (R = 0)
always 1: Fully re ect ray (R = 1)
table: (default) use SiC re ection coeôcients ( R = Eff( ; E))
3.1.3 Simulation tab
Spectral Order Selects spectral orders that will be generated. By default the orders -3,-2,-1,0 are
selected.
Mode Use photons or classical rays (default Ray)
History Creates a history le of the rays that did not leave this system (default none)
Debug Determines the generation and/or level of detail of the warning messages (default sparse).
Note: Debug information is written to stderr bypassing the SciSimmessaging system. It can
only be used from the command line.
3.2 Con guration le
This section describes the keyword used to con gure rgasim.The default keyword values are set in the
rgasim config section of the con guration le scisim.cfg.
Note that the keywords are case sensitive.
3.2.1 Keywords tree
Please refer to SciSim User Guidefor keywords not described here.
rgasim con guration section
backE
debugAlpha
debugGapGuess
e Warnings
extraCheckLeaveRGA
gapGuess
gratE
grscatter
initshake
intensInIsOne
ishakeMoveGrat
linespError
main
maskTransparent
model
models
model1
braceposFile
cornerdisplFile
errorbudgetFile
gratEôciencyFile
gratscatterFileGratings

XMM-Newton Science Simulator Page: 8
gratNon atFile
gratposFile
gratpresentFile
gratscatterFile
henke dataFile
maskFile lincoordFile
:
modelN
orders
Rx RxBow RxWarp
Ry RyBow RyWarp
Rz
shakePerRay
simulation
Tx Ty Tz
useMeasuredCornerDispl
verbose
3.2.2 Keywords description
backE
description: Re ection coeôcient (R) used for grating back and braces.
range: 0 Absorb ray: R = 0
1 Fully re ect ray: R = 1
2 (default) use SiC re ection coeôcients: R = Eff( ; E)
braceposFile
description: Positions and orientation of the 20 braces.
parent: de nition of a model
cornerdisplFile
description: Corner displacements for each grating. Used for grating misalignment.
parent: de nition of a model
debugAlpha
description: Generate debug le with information about angles of rays re ecting on a grating. Debug
use only.
range: 0 o (default)
1 on
debugGapGuess
description: Write debug le with gap guessing results. Debug use only.
range: 0 o (default)
1 on
e Warnings
description: Generate warning messages when the energy, angle or order of a ray falls outside of range
of the eôcieny lookup table. This reduces the size of the log le.
range: 0 o (default)
1 on
errorbudgetFile
description: Magnitude of random distortions in the error budget.
parent: de nition of a model
extraCheckLeaveRGA

XMM-Newton Science Simulator Page: 9
description: Check explicitly, if a ray leaves the gap in between grating plates. The alternative is to
skip this test and assume, because no other surfaces were hit, that the ray must leave
the RGA.
range: 0 o
1 on (default)
gapGuess
description: Use 'guessing routine' to nd between which two gratings a ray enters the RGA. If the
guessing fails, all 'gaps' are checked sequentially so setting this ag does not e ect the
output accuracy of the simulation.
range: 0 o
1 on (default)
gratE
description: Grating Eôciency. Re ection coeôcient (R) for re ections on gold grating surface.
range: 0 Absorb ray: R = 0
1 Fully re ect ray: R = 1
2 (default) interpolate in eôciency lookup table: R = Eff( ; E; order)
gratEôciencyFile
description: Tabulated grating eôciencies.
parent: de nition of a model
gratNon atFile
description: The measured non- atness parameters per grating.
parent: de nition of a model
gratposFile
description: Positions and orientation of 6*54 possible gratings. Not all gratings speci ed in this le
have to be actual present in the RGA
parent: de nition of a model
gratpresentFile
description: File which speci es which gratings and braces are present in the RGA.
parent: de nition of a model
gratscatterFile
description: Components of scatter model for grating scattering.
parent: de nition of a model
gratscatterFileGratings
description: This le includes the parameters of the small angle scatter model (rms of the roughness,
correlation length) as derived of measurements per grating plate.
parent: de nition of a model
grscatter
description: Use scattering at grating surface
range: 0 o
1 on (default)
henke dataFile
description: optical constants table. Used for SiC re ectivity calculation.
parent: de nition of a model
initshake
description: Set (on initialization) the alignment errors for all gratings should be set on initialization,
before the rays run trough.
The alternative is to set shakePerRay
range: 0 o
1 on (default)

XMM-Newton Science Simulator Page: 10
intensInIsOne
description: Set the intensity of all incoming rays (from MSIM) to 1. This switch is for debugging
purposes only. Changing the intensity of incoming rays invalidates the e ective area
reported by SciSim Toolssuch as ssimraystat
range: 0 o (default)
1 on
ishakeMoveGrat
description: Modify the grating positions vectors instead of using the stored grating perturbations
for each ray.
range: 0 o
1 on (default)
lincoordFile
description: Name of the CCF LINCOORD FITS le. It contains all relevant information about the
CCD and Camera alignment.
parent: de nition of a model
linespError
description: Disable the line spacing error contributions to the error budget
range: 0 o
1 on (default)
main
description: Main switch for using all error budget contributions.
Note: when set to 0 this disables alignment, line spacing and grating non- atness errors.
range: 0 o
1 on (default)
maskFile
description: De nes the RGA maximum outer dimensions and sets a mask for blocking a part of the
RGA entrance.
parent: de nition of a model
maskTransparent
description: Switch (0/1) to make the RGA mask transparent rather than blocking.
range: 0 mask blocking (default)
1 transparent
model, de nition of a ...
description: A User-de ned label followed by a group of lenames, which de ne the model. When
this model is selected with model, these les model le will be loaded. For normal use
of the simulation there is no need to edit the data les.
Advanced users can however create their own models by editing the data les. The les
are in plain ASCII. The le format is described in the header of the les. The generic
lookup mechanism (see SciSim User Guide) is used to locate the data les.
parent: models
childs: braceposFile, cornerdisplFile, errorbudgetFile, henke dataFile, gratEôciencyFile, gratposFile,
gratpresentFile, gratscatterFile, maskFile
model, selection of a ...
description: The label of the model to be simulated. Model none has a special meaning: It copies
all rays unchanged to the output as if the RGA were not present.
models
description: Contains a map of models. The user may add models, giving it a unique name. One of
the models is selected by model
childs: de nitions of models
orders
description: List of spectral orders to generate. Allowed range [-5,+2]. Orders may appear in any
sequence. eg. 'begin 0 -2 end'. Not all orders might be present in the grating eôciency

XMM-Newton Science Simulator Page: 11
lookup table.
range: list of unique numbers in the range [-5,+2]
Default: begin 0 -1 -2 -3 end
unit: order
Rx, Ry, Rz
description: Disable the R? component of the resulting rotation for a grating perturbation
range: 0 o
1 on (default)
RxBow, RyBow
description: Disable the R? component of the grating bow related to the grating non- atness
range: 0 o
1 on (default)
2 taken from measurements in gratNon atFile RyBow only
RxWarp, RyWarp
description: Disable the R? component of the grating warp related to the grating non- atness
range: 0 o
1 on (default)
shakePerRay
description: New random alignment errors should be drawn for every ray.
The alternative is to set initshake.
range: 0 o (default)
1 on
simulation
description: Speci es the way the model is simulated(Sec. ??).
range: 0 User speci ed model
1 Ideal model
2 Realistic model
Tx, Ty, Tz
description: Disable the T? component of the resulting translation for a grating perturbation
range: 0 o
1 on (default)
useMeasuredCornerDispl
description: Use the Measured Corner displacement le.
range: 0 o
1 on (default)
verbose
description: Determines the generation and/or level of detail of the warning messages.
Note: Debug information is written to stderr bypassing the SciSimmessaging system. It
can only be used from the command line.
Setting to a higher level increases the size of the log le.
range: 0 o
1 low
2 normal (default)
3 high
4 lots
5 debug
3.2.3 Keywords example
Below one can nd an example of how the con guration section of an RGASIM could look like. Note
that the default con guration of RGASIM can be found in the rgasim con g section of scisim.cfg.

XMM-Newton Science Simulator Page: 12
begin
rgasim_config begin
simulation 2
model fm1
models begin
fm1 begin
henke_dataFile Henke_data.dat
gratposFile gratpos_14jul97.dat
braceposFile bracepos.dat
gratpresentFile gratpresent_braces.dat
errorbudgetFile errorbudget.dat
gratscatterFile gratscatter.dat
gratscatterFileGratings grat_scatter_rga1.dat
gratNonflatFile grat_nonflat_rga1.dat
gratEfficiencyFile new_efficiency_7-8_35.table
maskFile RGAmask.dat
cornerdisplFile grat_corner_pert_FM1_GRadj.dat
end
end
gratEff 2
backEff 2
maskTransparent 0
orders begin 0 -1 -2 -3 end
grscatter 1
main 1
linespError 1
Rx 1
Ry 1
Rz 1
Tx 1
Ty 1
Tz 1
RxBow 1
RxWarp 1
RyBow 1 # 0=off; 1=random bow;
# 2=measurements from gratNonflatFile
RyWarp 1
initshake 1
ishakeMoveGrat 1
shakePerRay 0
useMeasuredCornerDispl 1
effWarnings 1
verbose 2
intensInIsOne 0
debugAlpha 0
extraCheckLeaveRGA 1
gapGuess 1
debugGapGuess 0
#---------------------------------------------------------

XMM-Newton Science Simulator Page: 13
# raytrace section (All simulators contain such a section; for more
# information oabout this section, see the SciSim User Guide)
estimatedRays 0
historyFile none
raytraceMode 1
rotation.angle 0
rotation.x 0
rotation.y 1
rotation.z 0
scale 1
seed 0
transform 1
translation.x 800
translation.y 0
translation.z 0
#---------------------------------------------------------
end
end
3.3 Coordinate system
The position of the RGA is speci ed in the generic coordinate system described in the SciSim User Guide.
The axis form a right handed orthogonal system: the x-axis points along the telescope optical axis towards
the mirror focus, the z-axis points opposite the dispersion direction, y-axis parallel to the direction of the
grooves. The origin is at the parabolic/hyperbolic mid plane of the mirrors. Units are in mm.
The default RGA center location(Sec. 4.3) speci ed in the con guration le is at x = +800mm.
4 Internals
4.1 RGA related raystream elds
The following elds in the raystream are related to the RGA:
gratingRow grating row number (1-6)
grating grating number inside a row (1-54)
gratingRe ections number of re ections on grating front side (gold)
gratingBacksideRe ections number of re ections on grating back
gratingRibRe ections number re ections on grating ribs
spectralOrder spectral Order (99 = unde ned)
RGAlastProcess ag for last process which occurred in RGASIM (see below)
gratingProcess summary ag for ray based on grating re ections and backside re ections (see below)
These elds can for example be used to lter the raystream on using one of the SciSim Tools: ssimfilter.

XMM-Newton Science Simulator Page: 14
4.1.1 RGAlastProcess
The RGAlastProcess ag is set whenever a ray hits a surface. So when subsequent surfaces are hit inside
the RGA, the RGAlastProcess ag gets updated. The value of the previous ray segment can however be
retrieved from the history le.
The possible values for the RGAlastProcess ag are:
(From scisim/rsim/lib/rsim_mod.f90)
flagGratingReflect = 20
flagRGAreflectTop = 10
flagRGAreflectBot = 11
flagGratingTopEdgeHit = 12
flagRGAreflectSidewall = 13
flagGratingRibTopEdgeHit = 30
flagGratingRibHit = (/31,32,33,34,35/)
flagProblem = 90
flagBraceSideHit = 40
flagBraceReflectTop = 41
flagBraceReflectBot = 42
4.1.2 gratingProcess
The gratingProcess provides the possibility to easily lter the RGASIM output rays depending on the
number of re ections which occurred inside the RGA.
The possible values of the gratingProcess ag are:
0 No re ections in RGA (ray to EPIC)
1 Only one re ection on grating surface. No grating back or rib re ections. (ray to RFC)
2 Missed RGA (outside RGA mask)
3 Other
4.2 Error budget implementation
Three di erent classes of random perturbations are implemented which contribute to the resolution and
increase the spot size of the image:
 alignment errors of the gratings.
 random deviations from the nominal line density variation.
 the bow of the grating in two directions.

XMM-Newton Science Simulator Page: 15
Alignment errors and grating bow are converted to translations and rotations of the surface normal of
the grating. The resulting translations are performed in the RGA coordinate frame, the rotations in the
local grating coordinate frame.
Alignment errors are calculated by adding up the shifts to the grating corner points resulting from the
boss positions, rail displacements and embedment displacements, each of which is drawn from a user
chosen distribution. The translations and rotations of the grating are derived from the grating corner
point displacements.
The bow of a grating is modelled by picking a value for the rotation of the surface normal from a
Gaussian distribution, the sigma of which is drawn from another Gaussian distribution, derived from the
grating atness measurements: data/rsim/rgs-col-cal-96002.ps.gz. The applied rotation due to the bow
is independent of the position were the ray hits the grating.
Only the direction of the re ected ray is a ected by the error budget. Re ected rays always originate
from the intersection point with the nominal (unperturbed) grating position.
The line density error contribution is implemented by adding a random error to the nominal line density
at the intersection point.
4.3 RGA coordinate system
The RGA coordinate system is de ned in RS-PX-0016 section 4.2.3.1 [?].
The origin is located at point 'G' inside the RGA (where the optical axis intersects the Rowland circle
geometry). The x-axis is pointing towards the focus, The z-axis points opposite the dispersion direction,
y-axis parallel to the direction of the grooves. These axis form a right handed orthogonal system.
4.4 Grating shape
The gratings in the code are assumed to all have the nominal trapezoid shape. The entire gold coated
surface side behaves as a grating with a varying line density. (no non-ruled area on the shiny side).
Gratings have a uniform thickness of 1 mm. There are 5 ribs on the back of the gratings.
4.5 Hardwired values
Some of the RGA dimensions which are unlikely to change are hardwired in the code as Fortran param-
eters:
gratings
------
grating_mod.f90: gr%shape%basewidth = 97.46 ! (mm)
grating_mod.f90: gr%shape%topwidth = 100.41 ! (mm)
grating_mod.f90: gr%shape%height = 200.0 * cos(0.4230 *pi/180.)
grating_mod.f90: gr%shape%thickness = 1.0 ! (mm)
ribs
----

XMM-Newton Science Simulator Page: 16
rib_mod.f90: ribThick= 1.0 ! thickness (mm)
rib_mod.f90: ribSizeZ=(/5.7, 9., 9., 9., 5.7/) ! length ribs (mm)
braces
------
grating_mod.f90: brace_length = 135.9 ! (mm)
grating_mod.f90: brace_width = 97.8 ! (mm)
grating_mod.f90: gr%shape%thickness = 3.81 ! (mm)
grating_mod.f90: strip_width = 6.85 ! (mm) from FP
grating_mod.f90: phi1 = 38.0/180.*pi ! from FP
linespacing
--------
grating_mod.f90: d0 = 15491.e-07 ! d = d0 + xcoor*d1 (in mm)
grating_mod.f90: d0overd1= 3353.2 ! d0/d1
other
-----
rga_mod.f90: xtop= -150. ! RGA virtual topsurface ( for guessgap)
rowinit_mod.f90: grshift = 50 ! space next to last grating in a row (mm)
rowland_mod.f90: radius = 3352.6427 ! radius rowland circle
5 Limitations of model
Some of the limitations of this release of RGASIM are:
 There is no scattering from braces and backs of gratings.
 Re ection at UV and optical energies on the gratings is not included in the model. As a
geometric raytracer, RGASIM does not include di raction at surface edges.
 Grating non- atness is modeled in a statistical manner: gratings all have their properties
drawn from the same random distribution.
 There is no re ection from the surfaces facing the telescope and detector. (top and bottom
edges of the gratings and the RGA structure). All rays hitting these surfaces are absorbed.
 Rays can not run 'backwards' leaving the RGA at the telescope side.
6 RSIM Tools
6.1 RFCdot
ESIMand RFCSIMare the simulators to use for the CCD detectors of EPICand RGS. If however only the
intersection point of a ray with the Rowland circle (or the RFC CCD surfaces) is required, the RSIM
tool rfcdot can be used.
rfcdot projects rays onto the Rowland circle or on the 9 RFC-CCD surfaces. The tool is only available
from the command line and writes its output in ASCII to stdout.

XMM-Newton Science Simulator Page: 17
The con guration is speci ed in the rfcdot con g section of the scisim.cfg.
The default position is set to the nominal position of the RFC.
The keyword dist sets the distance between two neighboring CCDs. Keyword planes de nes the vertical
steps between the CCD.
No limitation is put on the dimension of the CCDs in the cross dispersion direction (y). Rays hitting the
RFC at z values outside the area where the CCDs are located are projected on fake surfaces (CCD number
0 and 10). So RFC will intersect with any ray in space, but only CCD numbers 1-9 with y-coordinates
within the actual dimensions of the CCDs hit the RFC detector in reality.
The output columns of rfcdot are:
(from scisim/rsim/src/rfc_mod.f90)
1 rowlandarc, ! duplicate from 7
2 rowlandint(2), ! duplicate from 9
3 intersect(3), ! z (dispersion dir) intersection points with CCD
4 intersect(2), ! y (cross dispersion)
5 intersect(1), ! x
6 ccdnr, ! 1-9 as in RS-PX-0019
7 rowlandarc, ! intersection point with Rowland circle:
8 rowlandint(3), ! z
9 rowlandint(2), ! y
10 rowlandint(1), ! x
11 r%id,
12 r%source,
13 r%time,
14 r%energy,
15 r%intensity,
16-18 r%dir, ! direction vector of ray
19 r%mirrorShell,
20 r%mirrorProcess,
21 r%gratingRow,
22 r%grating,
23 r%gratingReflections,
24 r%gratingBacksideReflections,
25 r%gratingRibReflections,
26 r%spectralOrder,
27 r%gratingprocess,
28 r%RGAlastprocess
The rst two columns rowlandarc and rowlandint(2) are the intersection points with the Rowland circle
in respectively the dispersion and cross-dispersion direction. They are duplicated so the rays can easily
be plotted by piping into a plotting package which takes the rst two columns (e.g. xmgr).
The intersection points are speci ed in the local coordinate frame of the RFC.
The RFC coordinate system is de ned in [?]. It has its origin at the midpoint of CCD nr 5. The x-axis
is normal to the CCD and points into the CCD surface. Negative z runs in the dispersion direction.
So higher photon energies correspond to higher rowlandarc values.
The CCDs are numbered 1-9 as in [?]. CCD no 9 has the largest z coordinate (closest to EPIC focus)

XMM-Newton Science Simulator Page: 18
Note that when making a histogram distributions of the impacts, the ray intensity values have to be
taken into account as a weight factor.
7 Acknowledgment
We like to thank the RGS team at UCB/COL for making available the source code of the original RGS ray
tracer program which was the starting point for the development of RGASIM. Many of the algorithms
used in the code (scattering, errorbudget) originate from inputs by Frits Paerels.
References