Contents
Preface and acknowledgements
Preface and acknowledgements
1
Introduction to McXtrace
1.1
Development of Monte Carlo x-ray simulation
1.2
Scientific background
1.3
The design of McXtrace
1.4
Overview
2
New features in McXtrace 3.8.6
2.1
Kernel
2.2
Run-time
2.3
Components and Library
2.4
Tools, installation
3
Installing McXtrace
4
Monte Carlo Techniques and simulation strategy
4.1
X-ray simulations
4.2
The x-ray weight
4.3
Weight factor transformations during a Monte Carlo choice
4.4
Stratified sampling
4.5
Accuracy of Monte Carlo simulations
5
Running McXtrace
5.1
Brief introduction to the graphical user interface
5.2
Running the instrument compiler
5.3
Running the simulations
5.4
Using simulation front-ends
5.5
Data formats - Analyzing and visualizing the simulation results
5.6
Using MPI for parallel computing
6
The McXtrace kernel and meta-language
6.1
Notational conventions
6.2
Syntactical conventions
6.3
Writing instrument definitions
6.4
Writing instrument definitions - complex arrangements and syntax
6.5
Writing component definitions
6.6
Extending component definitions
6.7
MxDoc, the McXtrace library documentation tool
7
The component library: Abstract
7.1
Component categories
7.2
Data files
7.3
Component and instrument examples
A
Random numbers in McXtrace
A.1
Transformation of random numbers
A.2
Random generators
B
Libraries and conversion constants
B.1
Run-time calls and functions (
mcxtrace-r
)
B.2
Reading a data file into a vector/matrix (Table input,
read
_table-lib
)
B.3
Constants for unit conversion etc.
C
The McXtrace terminology
Bibliography
Bibliography
Index and keywords
User and Programmers’ Guide to the X Ray-Tracing Package McXtrace, version 3.8.6
[
next
] [
tail
] [
up
]
Contents
Preface and acknowledgements
1
Introduction to McXtrace
1.1
Development of Monte Carlo x-ray simulation
1.2
Scientific background
1.2.1
The goals of McXtrace
1.3
The design of McXtrace
1.4
Overview
2
New features in McXtrace 3.8.6
2.1
Kernel
2.2
Run-time
2.3
Components and Library
2.3.1
New components
2.3.2
Example instruments
2.4
Tools, installation
2.4.1
Selected Tool features
2.4.2
Warnings
3
Installing McXtrace
3.0.1
Platform support
4
Monte Carlo Techniques and simulation strategy
4.1
X-ray simulations
4.1.1
Monte Carlo ray tracing simulations
4.2
The x-ray weight
4.2.1
Statistical errors of non-integer counts
4.3
Weight factor transformations during a Monte Carlo choice
4.3.1
Direction focusing
4.4
Stratified sampling
4.5
Accuracy of Monte Carlo simulations
5
Running McXtrace
5.0.1
Important note for Windows users
5.1
Brief introduction to the graphical user interface
5.2
Running the instrument compiler
5.2.1
Code generation options
5.2.2
Specifying the location of files
5.2.3
Embedding the generated simulations in other programs
5.2.4
Running the C compiler
5.3
Running the simulations
5.3.1
Choosing an output data file format
5.3.2
Basic import and plot of results
5.3.3
Interacting with a running simulation
5.3.4
Optimizing simulation speed
5.3.5
Optimizing instrument parameters
5.4
Using simulation front-ends
5.4.1
The graphical user interface (mxgui)
5.4.2
Running simulations on the commandline (mxrun)
5.4.3
GPU acceleration via OpenACC
5.4.4
Graphical display of simulations (mxdisplay)
5.4.5
Plotting the results of a simulation (mxplot)
5.4.6
Creating and viewing the library, component/instrument help and Manuals (mxdoc)
5.4.7
Self-testing the installation (mxtest, mxviewtest)
5.5
Data formats - Analyzing and visualizing the simulation results
5.5.1
The McXtrace/McCode text format
5.5.2
NeXus format
5.6
Using MPI for parallel computing
5.6.1
Parallel computing (MPI)
5.6.2
McRun options for MPI
5.6.3
McXtrace/MPI Performance
5.6.4
MPI Bugs and limitations
6
The McXtrace kernel and meta-language
6.1
Notational conventions
6.2
Syntactical conventions
6.3
Writing instrument definitions
6.3.1
The instrument definition head
6.3.2
The
DECLARE
section
6.3.3
The
INITIALIZE
section
6.3.4
The
NEXUS
extension
6.3.5
The
TRACE
section
6.3.6
The
SAVE
section
6.3.7
The
FINALLY
section
6.3.8
The end of the instrument definition
6.4
Writing instrument definitions - complex arrangements and syntax
6.4.1
Embedding instruments in instruments TRACE
6.4.2
Component extensions - EXTEND
6.4.3
Mutually exclusive components in parallell - GROUP
6.4.4
Duplication of component instances - COPY
6.4.5
Conditional components - WHEN
6.4.6
Component loops and non sequential propagation - JUMP
6.4.7
Enhancing statistics reaching components - SPLIT
6.5
Writing component definitions
6.5.1
The component definition header
6.5.2
The
DECLARE
section
6.5.3
The
SHARE
section
6.5.4
The
INITIALIZE
section
6.5.5
The
TRACE
section
6.5.6
The
SAVE
section
6.5.7
The
FINALLY
section
6.5.8
The
MCDISPLAY
section
6.5.9
The end of the component definition
6.5.10
A component example: Semi-transparent mirror
6.6
Extending component definitions
6.6.1
Extending from the instrument definition file
6.6.2
Explicitly modify an existing library component
6.6.3
Component heritage and duplication
6.7
MxDoc, the McXtrace library documentation tool
7
The component library: Abstract
7.1
Component categories
7.2
Data files
7.3
Component and instrument examples
A
Random numbers in McXtrace
A.1
Transformation of random numbers
A.2
Random generators
B
Libraries and conversion constants
B.1
Run-time calls and functions (
mcxtrace-r
)
B.1.1
Photon propagation
B.1.2
Coordinate and component variable retrieval
B.1.3
Coordinate transformations
B.1.4
Mathematical routines
B.1.5
Output from detectors
B.1.6
Ray-geometry intersections
B.1.7
Random numbers
B.2
Reading a data file into a vector/matrix (Table input,
read
_table-lib
)
B.3
Constants for unit conversion etc.
C
The McXtrace terminology
Bibliography
Index and keywords
[
next
] [
front
] [
up
]