Monte Carlo Simulation of a Photon Counting X-Ray ... · PDF fileMonte Carlo Simulation of a...

26
Monte Carlo Simulation of a Photon Counting X-Ray Tomographic System PER FOGELSTRÖM Master of Science Thesis Stockholm, Sweden 2008

Transcript of Monte Carlo Simulation of a Photon Counting X-Ray ... · PDF fileMonte Carlo Simulation of a...

Page 1: Monte Carlo Simulation of a Photon Counting X-Ray ... · PDF fileMonte Carlo Simulation of a Photon Counting ... Monte Carlo simulation of a photon counting X­ray tomographic system

Monte Carlo Simulation of a Photon Counting X-Ray Tomographic System

P E R F O G E L S T R Ö M

Master of Science Thesis Stockholm, Sweden 2008

Page 2: Monte Carlo Simulation of a Photon Counting X-Ray ... · PDF fileMonte Carlo Simulation of a Photon Counting ... Monte Carlo simulation of a photon counting X­ray tomographic system

Monte Carlo Simulation of a Photon Counting X-Ray Tomographic System

P E R F O G E L S T R Ö M

Master’s Thesis in Computer Science (30 ECTS credits) at the School of Engineering Physics Royal Institute of Technology year 2008 Supervisor at CSC was Henrik Eriksson Examiner was Stefan Arnborg TRITA-CSC-E 2008:077 ISRN-KTH/CSC/E--08/077--SE ISSN-1653-5715 Royal Institute of Technology School of Computer Science and Communication KTH CSC SE-100 44 Stockholm, Sweden URL: www.csc.kth.se

Page 3: Monte Carlo Simulation of a Photon Counting X-Ray ... · PDF fileMonte Carlo Simulation of a Photon Counting ... Monte Carlo simulation of a photon counting X­ray tomographic system

Monte Carlo simulation of a photon counting X­ray tomographic system

AbstractThe project aims to develop Monte Carlo simulations of typical XCT­3T systems. XCT­3T is an X­ray imaging system developed by XCounter based on photon counting gaseous avalanche detectors. Simulations of the complete system from X­ray source to signal formation in the detectors is performed.

Montecarlosimulering av fotonräknande tomografiskt röntgensystem

SammanfattningProjektet har syftat till att utveckla Montecarlosimuleringar av typiska XCT­3T­system. XCT­3T är ett röntgenbildsystem utvecklat av XCounter, baserat på fotonräknande gasfyllda electronlavindetektorer. Simulering av hela systemet från röntgenkälla till signalbildning i detektorn har utförts.

Page 4: Monte Carlo Simulation of a Photon Counting X-Ray ... · PDF fileMonte Carlo Simulation of a Photon Counting ... Monte Carlo simulation of a photon counting X­ray tomographic system

Table of Contents 1 Summary.................................................................................................................................1

1.1 Conclusions......................................................................................................................11.2 Recommendations............................................................................................................1

 2 Physics and background..........................................................................................................22.1 X­rays................................................................................................................................22.2 Tomography......................................................................................................................22.3 XCT­3T............................................................................................................................32.4 Photon counting detectors................................................................................................32.5 Energy levels....................................................................................................................42.6 Particle transportation simulation....................................................................................52.7 X­ray tubes.......................................................................................................................6

 3 Simulation...............................................................................................................................73.1 Geant4..............................................................................................................................73.2 Magboltz..........................................................................................................................93.3 Electron avalanche lookup table.......................................................................................9

 4 Performed simulations..........................................................................................................104.1 X­ray spectra...................................................................................................................104.2 Pinhole simulation..........................................................................................................124.3 Scatter rejection..............................................................................................................15

 5 Discussion.............................................................................................................................175.1 Computational tractability..............................................................................................175.2 Accuracy.........................................................................................................................185.3 Assumptions...................................................................................................................185.4 User experience..............................................................................................................19

 6 Conclusions...........................................................................................................................20 7 References.............................................................................................................................21

Page 5: Monte Carlo Simulation of a Photon Counting X-Ray ... · PDF fileMonte Carlo Simulation of a Photon Counting ... Monte Carlo simulation of a photon counting X­ray tomographic system

 1  SummaryAfter more than a hundred years from its invention in the late 19'th century, X-ray imaging remains the mainstay of medical imaging. Apart from obvious improvements the basic process of X-ray imaging remained the same until digital sensors started to appear. Up until a few years ago digital sensors has been of energy integrating type, but now a new generation of photon counting detectors are being introduced. Photon counting technology enables improvements in both image quality and radiation dose. At the forefront of this development, XCounter develops its X-ray detector.

The XCounter detector represents a completely novel approach and exhibits several unique characteristics. To deepen the understanding and the consequence of these, simulations is an attractive option. This Master's thesis investigates the possibility of performing Monte Carlo simulations on the XCounter system. Simulation has been performed in the simulation framework of Geant4. Simulation from X-ray source to detector electronics has been performed. Electron avalanches, central in the operation of the detector are treated separately as these fall outside the ability of Geant4. Part of the project has therefore been the development of a fast simulation method for the signal induction from electron avalanches.

Tied together, the different parts are capable of simulating a complete XCounter system, from the X-ray tube to the electronic counters. Verification of this simulation is carried out against data from a real system and a good agreement is found. Simulation on the inherent scatter rejection of the detector has also been performed showing the usefulness of the simulation tool.

1.1 Conclusions

From the performed simulations and the verification, it can be concluded that accurate system simulation is possible. This is especially satisfying given that the model is built from standard physics with no empirical parts or models fitted to measurements, indicating a good validity of the used assumptions and models.

Computational times can be managed to fall in the reasonable, although certain care must be executed designing simulations. As can be expected, parallel execution is very useful yielding good speed up, even when distributed over several different machines in an ordinary office network.

1.2 Recommendations

The focus of this project has been on system simulation as opposed to detector simulation. Accurate and fast system simulation has also been archived. Possible uses of this simulation are numerous, problems related to X-ray energy spectra interaction are prime candidates. These problems includes studies of the effect of beam hardening, and the interaction with the detectors with photon energy varying efficiency. Geometric considerations are also candidates, determinations of the by each beam sampled volume could be very accurately determined, including the effects of the varying sensitivity in different parts of the detector.

Results from these kinds of simulations could help tune the reconstruction algorithm and general system setup, leading to improved picture quality in present product generation. Simulations could also be used in conjunction with laboratory experiment to verify and explain measurements, giving longterm results in the development of future product generations by increased understanding.

1

Page 6: Monte Carlo Simulation of a Photon Counting X-Ray ... · PDF fileMonte Carlo Simulation of a Photon Counting ... Monte Carlo simulation of a photon counting X­ray tomographic system

 2  Physics and backgroundA basic understanding of the physics involved is necessary for the understanding of this report, as is some particulars of the XCT-3T setup.

2.1 X­rays

X-rays, a form of high energy electromagnetic radiation, was discovered in the end of the 19th century. The discovery is often credited to Wilhelm Röntgen, producing what is known as the first medical X-ray image in 1895. And in many countries X-ray, over Röntgen's great objections, are called Röntgen rays. Later it has been found that the credit of producing the first medical X-ray image should go to the Ukrainian scientist Ivan Pulyui, possibly as early as in the 1880's producing an image of a boy's broken arm and his daughters hand.

Medical X-ray imaging is a projective image process relying on the different density and mass attenuation coefficients of different biological matter. The total attenuation along each X-ray “beam” is the combined effect of path length and local attenuation coefficients.

Depending on objective, X-ray energies between 20 keV and 200 keV are commonly used, to optimize contrast and other factors for the specific purposes.

2.2 Tomography

Tomography, or 3d-reconstruction, is the process of reconstructing the imaged object in three dimensions thought the use of images taken at different angels, projections. Purely film based techniques exist, capable of enhancement of detail in certain “focus planes”. These techniques help with the problem of superimposition of traditional projectional X-ray images. Today tomography is done by computerized algorithms. Image data is digitized and fed thought a reconstruction algorithm yielding true three dimensional object reconstruction. The quality of reconstruction depends on the resolution of the individual projection images as well as the number of different projections used. Traditional computer tomography, CT, is slice based. An X-ray source and detectors are “spun” around the object and a reconstructed images of the slice of the objected is generated.

2

Illustration 1: Hand mit Ringen: print of  Wilhelm Röntgen's first "medical" X­ray, of his  wife's hand, taken on 22 December 1895 and presented to Professor Ludwig Zehnder of the Physik Institut, University of Freiburg, on 1 January 1896

Page 7: Monte Carlo Simulation of a Photon Counting X-Ray ... · PDF fileMonte Carlo Simulation of a Photon Counting ... Monte Carlo simulation of a photon counting X­ray tomographic system

2.3 XCT­3T

The XCT-3T system, XCounters generic 3-dimensional system, consist of multiple scanning photon-counting detectors[1]. Arranged as in individual lines, aimed at a common X-ray source. Scan direction is perpendicular to the lines, so each line produces a complete projection image, with a to each line distinct projection angle, during a scan. Thus all projections needed for reconstruction are collected in a single scan, after which reconstruction of the complete scanned volume can take place.

2.4 Photon counting detectors

The X-ray detectors developed by XCounter are parallel plate gaseous ionization detectors. Incoming X-ray photons ionizes a heavy noble gas mixture contained between two parallel plates. A potential across the plates accelerates the liberated electrons towards the anode plate. If the electric field is sufficiently strong the electrons gain enough energy over the mean free path to create further ion pairs when they collied with neutral atoms in the gas. This leads to a avalanche behavior, known as a Townsend avalanche[2], multiplying the initial ionization. The electron avalanches leaves a trail of much slower moving positive ions, resulting in a space charge distribution that induces a surface charge distribution on the two plates. By dividing the anode plate into narrow strips and measuring the current to each strip the location of the initial ionization can be measured.

The signal, after gas multiplication, from the ionization events from one incoming photon is large enough to trigger the counters, thus individual photons reaching the detector are counted. This method of measurement leads to nearly infinite and linear dynamic range.

Townsend avalanches

Electron avalanches are usually described by the Townsend equation[2]. This equation describes the gas multiplication process as a fractional increase in the number of electrons per unit path length, l:

dnn= dl

3

Illustration 2: Functional illustration of a XCT detector

Page 8: Monte Carlo Simulation of a Photon Counting X-Ray ... · PDF fileMonte Carlo Simulation of a Photon Counting ... Monte Carlo simulation of a photon counting X­ray tomographic system

where   is   called   the  Townsend coefficient.    vary  with  gas  mixture,  pressure,   temperature  and electric field. In parallel plate detectors the electric field is spatially constant and the solution to the Townsend equation is an exponentially growing electron count:

n l =n0e l

This tells us the number of electrons in the avalanches as a function of path length. But it doesn't tell us the spatial distribution of charge. Starting from a single point the avalanche develops towards the anode, as the number of electrons increases they start diffusing. This behavior can be described by a diffusion equation with a source term.

Given that the diffusion coefficient is much lower in the longitudinal direction than the traverse direction, with relation to the avalanche direction, a two dimensional approximation seems appropriate. The problem can be further reduced observing the cylindrical symmetry. The solutions to this problem are Gaussian distributions with variance:

=DT l

Where DT is the traverse diffusion coefficient.

Signal formation

As the electron avalanche develops, it leaves  a positively charged ion trail behind. Leading to a space charge distribution inducing a surface charge on the anode plate below. If we consider the anode as a perfectly conducting plane kept at constant potential,  the induced surface charge can be calculated analytically by the method of images[3]. 

x , y=−qd

2x2 y2

d 2

32

Induced surface charge as function of (x,y), from charge q at position (0,0) and height d.

Summing over all of space and integrating over the strip area, gives the induced charge for each strip. Taking the time derivative of the induced charge results in the current to the strip.

Electron avalanche parameterization

Due to the number of particles involved and limitations in the used tools a parameterization of the electron avalanches where necessary. In order to simplify the parameterization it has been assumed that the total avalanche can be viewed as a linear combination of sub avalanches started at each initial ionization point. 

Calculating the signal generated from one initial ionization a cylindrical symmetric solution where the charge is distributed on to a disc following a Gaussian distribution is used.  This generated a two dimensional space charge for electrons. Ions are also included by tracking the electron multiplication and simple assumption that every new electron leaves one positive ion. This charge distribution can now be used to calculate the induced signal on each strip.

This gives us the possibility of calculating a table of the signal contribution to any particular anode strip as a function of initial ionization location and charge.

2.5 Energy levels

Of special interest in the simulations are the energy levels of different processes. The incoming X-ray photons have energy in the keV range, the dominating interactions in the detector gas are:

1. Photoelectric absorption, in which the complete photon energy is transferred to a electron. The

4

Page 9: Monte Carlo Simulation of a Photon Counting X-Ray ... · PDF fileMonte Carlo Simulation of a Photon Counting ... Monte Carlo simulation of a photon counting X­ray tomographic system

electron usually comes from the inner shells, giving electron energy as:

E e=E−E b

With Ee the electron energy, E incoming photon energy, Eb the binding energy of the electron.

2. Compton scattering, an interaction between the incoming photon and an electron in the absorbing material. The photon transfers part of its energy to the electron. Both total energy and momentum is conserved, the fraction of energy transfered to the electron varies with the deflection angle.

We call the liberated electrons ­electrons, their energy ranges from zero to almost the top energy of the X­ray photons. ­electrons forms a track ionizing further atoms along its way losing energy along the way. Electrons released by secondary ionization carry a much lower energy of a few eV's. 

2.6 Particle transportation simulation

Particle transportation is best simulated with Monte Carlo algorithms. Monte Carlo algorithms are good at handling problems with many dimensions such as particle transportation.

Monte Carlo simulation is a computation algorithm characterizes by repeated random sampling to compute its result. Random sampling has a long history in physics simulations, dating back to the birth of the modern computer and the nuclear weapons program at Los Alamos National Laboratory in the late 1940s, where it was used on “equation of state” calculations.

Applying the concept to particle transportation, each physical process is assigned a certain cross section, likelihood of occurring. These cross sections depending on different variables are measured and tabulated. Shown in the figure below are the cross section for different electron interactions with Xenon, as used by Magboltz[4], a Monte Carlo simulation code.

For certain processes the likelihood of different outcomes are also tabulated, for example the angular distribution of ejected particles. Simulating the propagation of a particle through a volume thus reduces to sampling the relevant cross sectional data.

5

Illustration 3: Cross sections for electron interactions with Xenon, as used by Magboltz. As expected the ionization cross section, ION, falls towards zero when the energy gets below the ionization energy of Xenon, 12.1 eV.

Page 10: Monte Carlo Simulation of a Photon Counting X-Ray ... · PDF fileMonte Carlo Simulation of a Photon Counting ... Monte Carlo simulation of a photon counting X­ray tomographic system

2.7 X­ray tubes

In medical X-ray imaging the most commonly used X-ray source is an X-ray tube. In an X-ray tube radiation is formed when electrons, accelerated in an electric field, hit a target. Upon hitting the target the electrons are slowed and X-rays emitted. Two primary modes for X-ray emission exists:

1. Bremsstrahlung, originating from electromagnetic emission that occurs when electrons are decelerated, braked, in the anode. Given high enough electron energy this radiation lies in the X-ray spectrum forming a continuous spectrum.

2. Characteristic X-rays are produced by atomic relaxation following ionization of inner shell electrons. Forming several sharp peaks, corresponding to different atomic relaxations.

6

Illustration 4: Sample X­ray spectrum from an EMI X­ray tube at 140 keV[5], showing continuous bremsstrahlung spectra and tungsten emission lines.

Page 11: Monte Carlo Simulation of a Photon Counting X-Ray ... · PDF fileMonte Carlo Simulation of a Photon Counting ... Monte Carlo simulation of a photon counting X­ray tomographic system

 3  SimulationThe simulations has mainly been performed in the simulation framework Geant4. Unfortunately Geant4 is unable to simulate electron avalanches. To overcome this, an parameterization of the signal response from electron avalanches has been developed, using detector gas simulations in Magboltz and numerical calculations in Octave[6].

3.1 Geant4

Geant4[7] is a toolkit for the simulation of particles passing thought matter. Particle tracking, geometry description and navigation, and physics processes lie in the core functionality. User interfacing, graphics and data analysis are handled through interfaces to external packages. Geant is an acronym for “Geometry and tracking” and is usually pronounced like the French geant, meaning giant. Dating its origins back to the 1970s, originally written in FORTRAN and culminating in GEANT3 in 1982. Development of the current version, Geant4, started as a joint development project under the CERN1 Research and Development Program in 1994, after independent studies from booth CERN and KEK2, considering the application of object oriented design. C++ was chosen as language and the first version was released in 1998. Still actively developed, it now consist of almost one million lines of code and represents the “state of the art” in tracking particles thought matter.

Physics list

Aimed as a research tool Geant4 lacks a single coherent physics model. Instead physics processes in Geant4 are handled in an object oriented pluggable way. Individual physics processes are registered with the simulation kernel, building a list of relevant physics for the simulation at hand. This is handled thought a mandatory user coded class, called the physics list. This approach is promoted by the lack of a uniform physics model able to cover the energy range and variety of particles. It also enables researchers to implement and test new physics models in an easy way.

Construction of an appropriate physics list is crucial to successful Geant4 simulations. Used in these simulations is a physics list based on the low energy electromagnetic physics list, with some refinements and adaption. The following processes has been active:

For electrons: Ionization, Bremsstrahlung and Multiple scattering.

For photons: Rayleigh scattering, Compton scattering and Photoelectric effect.

These processes from the “Low energy electromagnetic processes”-collection in Geant4 are supposedly valid down to 250 eV.

The default behavior of Geant4 is to track all particles down to zero energy. This can, in certain cases, lead to long computation times. To avoid this custom cuts both in energy and range can be set in the physics list.

Geometry description

Geometry can be described thought a rich set of elementary solids. Sub assemblies can be constructed that greatly speed up the creation of complex geometry. Boolean solids are also supported. Data readout is handled thought the assignment of volumes as sensitive detectors. A sensitive detector is a user implemented class, called whenever a particle enters or interact in the volume. Readout geometry can be separate from physical geometry.

1 European laboratory for particle physics 2 High Energy Accelerator Research Organization

7

Page 12: Monte Carlo Simulation of a Photon Counting X-Ray ... · PDF fileMonte Carlo Simulation of a Photon Counting ... Monte Carlo simulation of a photon counting X­ray tomographic system

Data analysis

A choice of data analysis tools are available, a tool based on the AIDA standard, JAIDA were chosen. AIDA (Abstract Interfaces for Data Analysis) is a standard abstract interfaces for common physics analysis objects, such as histograms, ntuples, fitters, IO etc... The AIDA format is based on XML. JAIDA is a JAVA implementation of the AIDA standard, it provides for, amongst other things, live histograms during the course of simulation as well as data collection to file. It is called through jni (JAVA native methods) from Geant4. Saved data, in AIDA format, can later be analyzed with JAS (Java Analysis Studio), a java based AIDA compliant application.

Data visualization

Visualization is seen as separate from data analysis, in that it involves the drawing of the geometry and individual particle tracks. For visualization wired3 has been used. Visualization is of great use debugging the geometry and for visual understanding.

Parallel execution

The Geant4 package was conceived before the general adoption of parallel execution and was not designed with that in mind. But given the nature of the calculations, today parallel execution is tempting, and in fact several schemes for parallel execution exist. They all rely on the fact that the results of the calculations are statistics which can easily be added together, but differ in their level of integration with the existing code. After some evaluation, a scheme relying on the TOP-C framework was chosen[8]. TOP-C (Task Oriented Parallel – C) is a high level API to an underlying MPI implementation. Parallel execution is achieved under a master-slave paradigm.

Random numbers in parallel execution

Monte Carlo simulations depends on good randomness in the random numbers. True randomness though is not a requirement why pseudorandom number generators are employed. Normal practice is to seed the generator at the beginning of the simulations. When executing in parallel care must be taken to ensure that parallel processes do not accidentally “choose” the same seed. To avoid this problem the master processes seeds a pseudorandom number generator at the beginning of simulations and generates seeds for all slave processes, ensuring different randomness for each individual event.

X­ray spectra

Although, as will be shown, simulation of X-ray tubes is possible in Geant4, it is extremely time consuming. To overcome this an XCounter internal library for X-ray spectra generation has been used. The library relies on tabulated emission and absorption spectra to quickly calculate the spectra from a number of different X-ray tubes at different voltages and filtrations. This library has been linked to the Geant4 simulation to facilitate easy, accurate and quick access to X-ray spectra.

Electron avalanche parameterization

The electron avalanche parameterization has been implemented as a look up table, read from file at the start of each run. For each energy deposit in the active volume of the detector the signal contribution is looked up and added to the total signal. Thus, the signal generated on each anode strip for each photon interaction is calculated inside the framework of Geant4 and can be analyzed there.

8

Page 13: Monte Carlo Simulation of a Photon Counting X-Ray ... · PDF fileMonte Carlo Simulation of a Photon Counting ... Monte Carlo simulation of a photon counting X­ray tomographic system

3.2 Magboltz

Magboltz[4] is a program that computes detector gas properties by "numerically integrating the Boltzmann transport equation"-- i.e., simulating an electron bouncing around inside a gas. By tracking how far the electron propagates, the program can compute the drift velocity, compute transverse and longitudinal diffusion coefficients and avalanche multiplication.

3.3 Electron avalanche lookup table

A script written in Octave[6], a free software for numerics, is used to do the numerical calculations needed to calculate the table. Gas data is taken from gas simulations performed in Magboltz and the signal contribution to ten adjoining strips, from initial ionizations at twenty discrete heights is calculated. The length of the calculated signal is one hundred time steps, with touchdown of the longest avalanches at 50 time units. This includes a fair bit of the ion tail of the signal. Utilizing the symmetry this gives the signal for a symmetric [-9,9] strip interval from the initial ionization point. Signal contributions to strips outside of this interval is very low, and are therefore ignored.

9

Page 14: Monte Carlo Simulation of a Photon Counting X-Ray ... · PDF fileMonte Carlo Simulation of a Photon Counting ... Monte Carlo simulation of a photon counting X­ray tomographic system

 4  Performed simulationsPerformed simulations can be split in two parts. First a simulation of the spectra generated by an X-ray tube, this does no involve the simulation of the XCounter detector. The results are compared to literature and an internal XCounter computer code for X-ray spectra calculations.

Secondly, simulations involving the simulation of the XCounter detector. In these simulations an electron avalanche parameterization is used. Here a single detectors response in a pinhole measurement is simulated and compared to measured data. This enables a verification of the simulation to real world data. Verified detector simulation is used in a “whole system” simulation on the scatter rejection quality of the detector.

4.1 X­ray spectra

Attenuation of X-rays in matter is dependent on the X-ray energy, as is the response of the detector. Accurate energy spectra of the produced X-rays is thus interesting. It is furthermore common to filter the spectra thought one or several filters to shape the spectra. All physics of a X-ray tube is well supported in Gean4, it is thus possible to simulate an X-ray tube in Geant4 to determine the spectra of its produced X-rays.

X­ray tube geometry

A very basic model of a X-ray tube has been used, real world tubes are considerably more complex. The complexity of real world tubes are partly related to cooling of the target and shaping of the electron beam. Given the goal of simulating the generated X-ray spectra, accurate modelings of those structures are not relevant. A good quality electron beam is assumed, and heat build up is ignored.

An electron beam is directed toward a target, modeled as a solid metal block. A filter is placed between the target and a counter. The whole simulation is three dimensional, but all photons hitting the counter is summed to one spectrum. Exact tube geometry varies with manufacturer and model, most tubes also include some filtration from the casing. Modeled is an EMI X-ray tube with a 20 degree target angel and 4 mm aluminum inherent filtration. The target is made of tungsten and it is designed for 140 kV acceleration potential.

10

Drawing 1: Schematic representation of the X­ray tube setup

e- (140 keV)Target (W)

Filter (4mm Al)

Counter

Page 15: Monte Carlo Simulation of a Photon Counting X-Ray ... · PDF fileMonte Carlo Simulation of a Photon Counting ... Monte Carlo simulation of a photon counting X­ray tomographic system

Simulation details

As the electrons hit the target, X-ray radiations is produced and radiated in all directions. Filtration in the target and the spatial spread of the produced X-rays leads to, from a simulation view, poor efficiency. Due to the asymmetric geometry and target filtration, only X-rays produced in a relatively narrow angel are interesting. To produce 10 000 photons at the counter, 140 000 000 electron tracks has to be simulated. This leads to long simulation times. To speed up simulations, a special physics list with high cut in energy of 10 keV has been used, meaning that no particles is tracked below 10 keV.

Comparison to other spectra

In order to assess the accuracy of the simulated spectra, it has been compared to a measured spectrum[Illustration 5]. The spectra calculated by xcspectra, an XCounter internal spectra calculation code, has also been included. Comparison have been done by plotting the three different spectra in the same plot. Relative amplitudes have been manually adjusted to best visual fit.

The fit is generally good, some broadening of the characteristic peaks can be observed in the spectra generated by xcspectra. In the spectra from Geant4 the characteristic peaks are underestimated. Apart from simulation inaccuracy several other explanations are possible. The Geant4 simulation is based on a solid tungsten target, real world targets are more complex. The specification of the target in the EMI tube is not known and may contribute to some of the difference. Ripple on the supply voltage is another possibility.

11

Illustration 5: Spectral comparison, Dotted ­ measured(140 kV EMI)[5],  Solid ­ Geant4, Dashed ­ xcspectra

Page 16: Monte Carlo Simulation of a Photon Counting X-Ray ... · PDF fileMonte Carlo Simulation of a Photon Counting ... Monte Carlo simulation of a photon counting X­ray tomographic system

Angular X­ray distributions

Collection of angular data is also a possible. This is a map of the X-ray intensity over the two dimensional area of the counter.

4.2 Pinhole simulation

Depending on exact position, particularly the height above the anode of the initial ionization event, the gas amplification varies. This leads to different sensitivity in different parts of the gas volume. Ionizations events close to the cathode has a higher probability of being counted. To measure this effect, a sheet of tungsten with a small hole in it, a pinhole, is placed above the detector only letting a small pencil beam of photons through.

Simulations of this setup is interesting because it tests the electron avalanche parametrization and a direct comparison to measured data is possible.

12

Illustration 6: Intensity map of the detector area, size of circle indicates intensity

Page 17: Monte Carlo Simulation of a Photon Counting X-Ray ... · PDF fileMonte Carlo Simulation of a Photon Counting ... Monte Carlo simulation of a photon counting X­ray tomographic system

Detector geometry

The geometry of a specific detector, for which a measured data set exists, has been modeled in Geant4. A tungsten sheet with a small hole has been placed above.

13

Drawing 2: schematic representation of the pinhole experiment

X-rays

Cathode

Pinhole

AnodeHeight

Detector lid

Page 18: Monte Carlo Simulation of a Photon Counting X-Ray ... · PDF fileMonte Carlo Simulation of a Photon Counting ... Monte Carlo simulation of a photon counting X­ray tomographic system

Comparison to measured data

The measured data set consist of measurements for different pinhole positions at four different heights above the anode. Response is dependent on the threshold level used for digitalization of the individual strip signals. Effects of different thresholding levels has been evaluated and one chosen to match expected detector efficiency and the measured data.

As can be seen in the plot, the fit between measured data and simulation is good. To compensate for noise not present in the simulation, a constant noise level has been subtracted from the measured data before comparison.

Another possible explanation of the background is transmission through the pinhole plate. The pinhole plate is 1 mm thick and to minimize transmission another slightly larger pinhole is placed on top of the first one, the thickness of the second plate is 2 mm. This gives a total of 3 mm tungsten. Simulation of the effect of transmission thought this thickness has been performed, but the level of transmission is negligible. To get some transmission a run with 1 mm tungsten was also tried, showing some effect of transmission. This indicates that the second disk is needed, and without it measurement would be effected by transmission.

14

Illustration 7: Comparison at four different heights, Solid ­  measured(background subtracted), Dotted ­ simulated

Page 19: Monte Carlo Simulation of a Photon Counting X-Ray ... · PDF fileMonte Carlo Simulation of a Photon Counting ... Monte Carlo simulation of a photon counting X­ray tomographic system

Mean or individual cases

This analysis of detector response is based on the mean response. If a mean value is composed of two different cases, the mean may not represent a possible value at all. In that case it may be better to treat the two cases separate from each other. Given the photon counting, quantified, nature of the system this is an meaningful objection. Looking at individual events can be fruitful in understanding the mechanic behind the spread for example. This can be done both in a graphic manner, examining individual particle tracks in a wireframe model of the setup, or by enabling extensive logging and examining log files.

4.3 Scatter rejection

The XCT-3T system promises several advantages over other X-ray detector technologies, amongst which natural scatter rejection is one. A closer look at scatter rejection is a prime candidate for Monte Carlo simulation as it involves plenty of parameters difficult to calculate by other means.

Geometry

Setup for scatter simulation consist of an X-ray source, a thick block of Plexiglas and a complete model of a XCT-3T camera. This setup is not modeled after any particular real setup, more after a tentative general purpose XCT-3T setup. The individual detectors correspond to the one simulated earlier. The X-ray source is simulated as a point source with a relevant spectral distribution of photon energy.

The role of the slab of Plexiglass is to create some scattered radiation. Plexiglass can be viewed as a good substitute for tissue, with for this purpose suitable scatter and attenuation properties. The thickness of the Plexiglass is chosen as an anatomically plausible thickness.

15

Illustration 8: Transmission, Solid – measured (3mm W and Pb), Dotted ­simulated (1mm W)

Page 20: Monte Carlo Simulation of a Photon Counting X-Ray ... · PDF fileMonte Carlo Simulation of a Photon Counting ... Monte Carlo simulation of a photon counting X­ray tomographic system

Simulation

In order to measure the amount of scattered radiation, the response from a pencil beam aimed at the center detector channel of the middle detector row is simulated. Every counted signal on any other channel is either from scattered photons or from the spread as observed in the pinhole experiment. To isolate the scatter from the natural spread, a central bin large enough to include most of the spread has been used. Size of this bin is not critical, scattered photons tend to be scattered “significantly”, and the number of scattered photons included even in a generous central bin is small. As expected the scatter rejection proved to be good.

Visualization

One unique possibility in simulation is the visualization of individual particle tracks. Here is a view from the end of the detector, individual rows can be seen in the bottom part, showing one hundred photon tracks. Between the two white lines is the Plexiglass block.

16

Illustration 9: Visualization of scatter rejection simulation, one hundred photon tracks shown

Page 21: Monte Carlo Simulation of a Photon Counting X-Ray ... · PDF fileMonte Carlo Simulation of a Photon Counting ... Monte Carlo simulation of a photon counting X­ray tomographic system

 5  DiscussionThe development process leading to the simulation results presented in this report has involved other simulations and investigations. Designing efficient simulations which results can be trusted is partly an art form. It requires a certain level of understanding of the involved tools and there limitations. Subtle changes can lead to unexpected results, especially running the code in parallel mode. A general discussion on these topics is presented here.

5.1 Computational tractability

Despite the promises of efficient calculation by the use of Monte Carlo simulation algorithms, the resulting computational time can sometimes become large. An investigation of computation time is therefore motivated. Many parameters affect the computation time, the number of particle tracks needed to archive good statistic in the results being the dominant factor.

Confidence intervals

Looking at the size of the confidence interval is one way of analyzing the needed sample size. The process of particle scattering follows Poisson statistics. Given reasonably large samples, above 15, the confidence interval can be written as [9]:

I m=x−/2 xn ,x/2 xn from which follows,  S=2/2 xn

, S size of the interval.

Given that the mean, x , does not vary much with increased sample size we can conclude that the size of confidence interval varies with the square root of sample size. In other words to half the confidence interval we need to quadruple the sample size. Computation time is therefore strongly dependent on the acceptable confidence interval size.

Number of bins

Results are often binned in order to produce a histogram. Here the number of bins directly effects the number of samples in each bin and the confidence interval. In the simulation on scattered radiation the data is basically binned in two bins, leading to good statistics with a relative small sample. Whereas the X­ray spectra in the X­ray tube simulation where binned in 150 bins, calling for a much larger sample.

Geometric efficiency

Pure geometric considerations also apply. A pencil beam with most particle tracks contributing towards results is a lot faster than when the problem calls for a wide spread of particles with lots of tracks with low probability of contributing to results.

Parallel execution

Given the highly parallel nature of the calculation a close to linear speed up where expect running the simulations on multiple processors. Seeing this speed up materialize in practice was very satisfying, especially given the add on nature, of the implementation. No formal execution time measurements has been made, but the indication is towards close to linear speed up scaling to both multiple cores on the same computer and across several computers on the same network.Processor load by the master process also seems modest, an important property in the master slave paradigm.

17

Page 22: Monte Carlo Simulation of a Photon Counting X-Ray ... · PDF fileMonte Carlo Simulation of a Photon Counting ... Monte Carlo simulation of a photon counting X­ray tomographic system

In practice

Running the simulations in practice lots can be said about execution time. One important feature is the ability to get preliminary results quickly. Running a ten hour simulation to find out that your geometry was misaligned due to an angel set in degrees instead of radians is an unsatisfying experience. Here the quadratic nature of the confidence interval comes into play, which together with live drawing of histograms and the possibility to re bin the results during a run, enables quick visual inspection. For example, this histogram of an X-ray spectra were arrived at in less than twenty minutes, whereas the final simulation took over ten hours.

These kinds of preliminary results, although they can be dangerous if misused, are very useful developing a simulation enabling interactive development.

5.2 Accuracy

Geant4 is no magic box, results need to be verified before they are trusted. As an integrated part of the Geant4 development lies a verification program, to guarantee the accuracy of the basic physics implementation. Given the complexity of the interaction between different physics processes, this can not be taken as a guarantee for accuracy in every instance. Therefor it is always a recommendation to verify results whenever possible. In this case the comparison made in the pinhole experiment is a good test. It shows a basic agreement and can be used as a proof of accuracy for the model for many purposes. As it only involves comparison at one operational point (voltage, gas mixture, pressure, etc.), it is not sufficient if studying detailed effects of different operation points.

Accuracy of scatter simulation can be trusted on the grounds that it involves well established physics validated in the general Geant4 validation program. Good accuracy can therefore be expected for whole system simulations.

5.3 Assumptions

Several assumptions have been made developing these simulations. It is believed that none of these gives any harmful effects on results, but a short discussion is in place. First the general assumption in Monte Carlo simulations and in Geant4 is of non interacting events. The system is simulated one

18

Illustration 10: Intermediate result, obtained live during running simulation

Page 23: Monte Carlo Simulation of a Photon Counting X-Ray ... · PDF fileMonte Carlo Simulation of a Photon Counting ... Monte Carlo simulation of a photon counting X­ray tomographic system

photon at a time. This is carried over in the signal induction calculation. As long as the photon flux is low this is reasonable, but given that electron avalanches are relatively slow it must be kept in mind. Detailed study of maximum detector count rate and effects approaching it are outside the scope of this report.

Furthermore a low space charge in the electron avalanches has been assumed, given the moderate gas amplification used, this is believed to be valid. This is true as long as the space charge generated by the avalanches itself is so low as to not distort the electric field significantly. Where gas amplification to be increased space charge effects would probably have to be included[10].

5.4 User experience

To the beginner Geant4 simulation can seem daunting. The new user is normally introduced by the somewhat challenging installation procedure. In its standard form, Geant4 is distributed as source code with an arsenal of computer shell scripts to help the compilations process. There is extensive use of the GNU Build tools. During the installation several choices of visualization tools and data analysis tools has to be made. Once past the installations stage, the application programmer is treated to an interface, although well organized, that exposes a painful amount of detail. This leads to a certain threshold on knowledge. Past this initial threshold the toolkit grows with you, seldom standing in your way and often helping you along. The design is wonderfully object oriented, and encourages the user to stay that way.

User requirements

Geant4 is written in C++ and is object oriented in its design. Extensive use of virtual classes and inheritance is made, so a solid understanding of object oriented programing is recommended. The data analysis tool used in this project is JAVA based and has provision for easy extensions in JAVA. These extensions is used to do things such as importing data from file.

This project has been run under a Linux environment, and given the heavy dependence on system utilities it would seem like a wise choice. Parallelization to other machines requires a common file system, and that cryptographic keys be set up for passwordless remote login. Basic Linux administration skills would help here.

For the electron avalanche modeling calculations in Magboltz, and a program written for Octave were required. Use of Magboltz requires some basic FORTRAN and punch card knowledge.

In summary: C++, JAVA, FORTRAN, Octave/Matlab, Linux with some shell scripting.

Adequate knowledge of relevant physics is of course required.

19

Page 24: Monte Carlo Simulation of a Photon Counting X-Ray ... · PDF fileMonte Carlo Simulation of a Photon Counting ... Monte Carlo simulation of a photon counting X­ray tomographic system

 6  ConclusionsFrom the performed simulations and the verification, it can be concluded that accurate system simulation is possible. This is especially gratifying given that the model is built from standard physics with no empirical parts or models fitted to measurements, indicating a good validity of the used assumptions and models.

Computational times can be managed to fall in the reasonable, although certain care must be executed designing simulations. As can be expected, parallel execution is very useful yielding good speed up, even when distributed over several different machines in an ordinary office network.

The focus of this project has been on system simulation as opposed to detector simulation. Accurate and fast system simulation has also been achieved. Possible uses of this simulation are many, problems related to X-ray energy spectra interaction are prime candidates. These problems includes studies of the effect of beam hardening, and the interaction with the detectors with photon energy varying efficiency.

Geometric considerations are also candidates, determinations of the by each beam sampled volume could be very accurately determined, including the effects of the varying sensitivity in different parts of the detector.

Investigation in gas mixture, pressure and temperature could be performed. Both with relation to X-ray absorption and gas amplification.

Results from these kinds of simulations could help tune the reconstruction algorithm and general system setup leading to improved picture quality in present product generation. Simulations could also be used in conjunction with laboratory experiment to verify and explain measurements, giving longterm results in the development of future product generations by increased understanding.

20

Page 25: Monte Carlo Simulation of a Photon Counting X-Ray ... · PDF fileMonte Carlo Simulation of a Photon Counting ... Monte Carlo simulation of a photon counting X­ray tomographic system

 7  References[1] Maidment, Andrew D. A. et al. , Clinical evaluation of a photon­counting tomosynthesis mammography system, 2006, Proc. of International Workshop on Digital Mammography (IWDM) 2006[2] Knoll Glenn F., Radiation Detection and Measurement, 1988[3] Griffiths David J., Introduction to Electrodynamics, 1999[4]  Magboltz, consult.cern.ch/writeup/magboltz/[5] Birch, Marshall and Ardran, Catalogue of Spectral Data For Diagnostic X­rays, 1979[6]  Octave, www.gnu.org/software/octave/[7] John Allison , Geant4 ­ a simulation toolkit, 2007, Nuclear Physics News[8] Cooperman Gene, Nguyen Viet Ha and Malioutov Igor , Parallelization of Geant4 Using TOP­C and Marshalgen, 2006, The 5th IEEE International Symposium on Network Computing and Applications (NCA­06)[9] Blom Gunnar, Sannolikhetsteori och statistikteori med tillämpningar, [10] Lippmanna Christian, Rieglera Werner and Schnizer Bernhard , Space charge effects and induced signals in resistiveplate chambers, 2003, Nuclear Instruments and Methods in Physics Research A 508 (2003) 19–22

21

Page 26: Monte Carlo Simulation of a Photon Counting X-Ray ... · PDF fileMonte Carlo Simulation of a Photon Counting ... Monte Carlo simulation of a photon counting X­ray tomographic system

TRITA-CSC-E 2008:077 ISRN-KTH/CSC/E--08/077--SE

ISSN-1653-5715

www.kth.se