Kungliga Tekniska Högskolan
Mathematical Model of a NaI(Tl)-scintillator response
function
Fabian Seitz
Master Thesis
Abstract
Short-term gamma radiation measurements of a NaI(Tl)-scintillator detection
system used in an early warning system for airborne radioactivity have a small
efficiency and are biased by natural radiation sources. Thus it would be desirable to remove the effects of these sources to increase sensitivity. Optimally a
complete unfolding of an energy spectrum could be done.
To achieve that, measurements of various sources with different geometries
were made and the response functions analysed. Then a mathematical model
was developed to approximate all features of the response function, including
the photo peak, the Compton continuum, the backscatter peak, the multiple
Compton area and both escape peaks. A computer program was written to test
the model and determine the quality of the reduction.
The results of the test runs show that the model is a suitable simulation
of a response function of a point source under laboratory conditions. However,
real-life data cannot be properly reduced due to a small statistical basis and
large uncertainties in the modelling of the backscatter peak in this geometry.
Contents
1 Introduction
7
2 Theoretical Background
2.1 Interaction processes: Photoelectric effect,
production . . . . . . . . . . . . . . . . . .
2.1.1 Photoelectric effect . . . . . . . . .
2.1.2 Compton effect . . . . . . . . . . .
2.1.3 Pair Production . . . . . . . . . .
2.2 Detector . . . . . . . . . . . . . . . . . . .
2.2.1 Scintillator . . . . . . . . . . . . .
2.2.2 Photomultiplier tube . . . . . . . .
2.2.3 Multichannel Analyzer . . . . . . .
2.3 Spectra . . . . . . . . . . . . . . . . . . .
10
Compton effect, pair
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
10
11
12
13
13
14
15
15
16
3 Measurement and Analysis
20
3.1 Energy Calibration . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.2 Long-term measurement of 137 Cs point source . . . . . . . . . . . 22
3.3 Long-term measurement of 137 Cs extended source . . . . . . . . . 24
3.4 Additional Measurements with other Point Sources . . . . . . . . 27
3.5 Measurement with 137 Cs extended source in Gävle measuring station . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
3.6 Efficiency calibration . . . . . . . . . . . . . . . . . . . . . . . . . 36
3.6.1 Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . 36
3.6.2 Efficiency results . . . . . . . . . . . . . . . . . . . . . . . 38
3.6.3 Solid Angle Relation . . . . . . . . . . . . . . . . . . . . . 38
3.6.4 Solid Angle Relation for the Gävle sampling station . . . 39
4 Model for the description of a point source spectrum
4.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . .
4.2 Photo peak . . . . . . . . . . . . . . . . . . . . . . . . .
4.3 Compton continuum . . . . . . . . . . . . . . . . . . . .
4.3.1 Determination of parameters G and B . . . . . .
4.3.2 Determination of parameters a and k . . . . . . .
4.4 Backscatter peak . . . . . . . . . . . . . . . . . . . . . .
1
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
41
41
42
43
45
45
46
CONTENTS
4.5
Further minor corrections . . . . . . . . . . . .
4.5.1 Connection between Multiple Compton
peak . . . . . . . . . . . . . . . . . . . .
4.5.2 Bending of the Compton continuum . .
4.5.3 Effects of Pair production . . . . . . . .
5 Programming solution
5.1 Programming environment . . . .
5.2 Structure . . . . . . . . . . . . .
5.2.1 Help functions . . . . . .
5.2.2 The function removePeak
5.2.3 The main routine . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. . .
area
. . .
. . .
. . .
. . . . . . .
and photo
. . . . . . .
. . . . . . .
. . . . . . .
47
48
49
.
.
.
.
.
.
.
.
.
.
50
50
51
53
54
60
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
6 Test Run Results
6.1 Laboratory spectra without Automatic Peak Search . . .
6.1.1 137 Cs Point Source Histogram . . . . . . . . . . . .
6.1.2 137 Cs Extended Source Histogram . . . . . . . . .
6.1.3 88 Y Source Histogram . . . . . . . . . . . . . . . .
6.1.4 60 Co Source Histogram . . . . . . . . . . . . . . .
6.1.5 Other Spectra . . . . . . . . . . . . . . . . . . . . .
6.2 Test Runs with Automatic Reduction . . . . . . . . . . .
6.2.1 226 Ra Source Histogram . . . . . . . . . . . . . . .
6.2.2 133 Ba Source Histogram . . . . . . . . . . . . . . .
6.2.3 Spectrum from Kista Station (with 137 Cs extended
6.2.4 1-hour Measurement in Kista Station (with 60 Co
source) . . . . . . . . . . . . . . . . . . . . . . . .
6.3 Summary of Results . . . . . . . . . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
source)
point
. . . .
. . . .
47
63
63
63
65
65
68
68
68
71
71
73
75
76
7 Conclusion and outlook
78
A List of measurements
84
B Program code listing
88
2
List of Figures
2.1
2.2
2.3
2.4
2.5
2.6
3.1
3.2
3.3
3.4
3.5
3.6
3.7
3.8
3.9
3.10
3.11
3.12
3.13
3.14
3.15
3.16
Predominant mode of interaction in relation to energy and atomic
number of the absorber (Source: [1, p.202]) . . . . . . . . . . . .
Shape of the Compton continuum for various gamma-ray energies
(Source: [3, p.310]) . . . . . . . . . . . . . . . . . . . . . . . . . .
Schematic overview of a photomultiplier tube (Source: [13]) . . .
Schematic overview of a linear ramp converter ADC (Source: [3,
p.694]) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Schematic overview of a successive approximation ADC (Source:
[3, p.695]) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Schematic overview of a spectrum on the basis of the described
basic effects. The left diagram shows the case below the threshold
energy of 1022 keV, the right diagram the case above this energz
(Source: [3, p.316]) . . . . . . . . . . . . . . . . . . . . . . . . . .
Spectrum of laboratory background . . . . . . . . . . . . . . . . .
Energy calibration plot . . . . . . . . . . . . . . . . . . . . . . . .
Spectrum of a 137 Cs point source . . . . . . . . . . . . . . . . . .
Spectrum of an extended 137 Cs source . . . . . . . . . . . . . . .
Spectra of extended and point source compared (normalized on
extended source photo peak) . . . . . . . . . . . . . . . . . . . .
Positions of the detector and the sources inside the lead shield
(schematic) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Spectrum of 241 Am point source . . . . . . . . . . . . . . . . . .
Spectrum of 226 Ra point source . . . . . . . . . . . . . . . . . . .
Spectrum of 133 Ba point source . . . . . . . . . . . . . . . . . . .
Spectrum of 210 Pb point source . . . . . . . . . . . . . . . . . . .
Spectrum of 22 Na point source . . . . . . . . . . . . . . . . . . .
Spectrum of 60 Co point source . . . . . . . . . . . . . . . . . . .
Spectrum of 88 Y point source . . . . . . . . . . . . . . . . . . . .
Schematic overview of the geometry in the measuring stations in
Gävle and Stockholm . . . . . . . . . . . . . . . . . . . . . . . . .
Measurement of 137 Cs in the laboratory and Gävle station (normalized on Gävle measurement for shape comparison) . . . . . .
Efficiency calibration . . . . . . . . . . . . . . . . . . . . . . . . .
3
11
14
15
17
18
19
20
22
23
25
26
27
28
29
30
31
31
32
32
33
34
36
LIST OF FIGURES
4.1
4.2
5.1
Example of a Gaussian function with σ = 1 and µ = 0 . . . . . .
Example of a logistic function, here f (x) = 1+e1−x . . . . . . . . .
Example
Cs) .
Example
88
Y) . .
137
5.2
of a simulated response function
. . . . . . . . . . . . . . . . . . .
of a simulated response function
. . . . . . . . . . . . . . . . . . .
(661.657
. . . . .
(1836.06
. . . . .
keV peak of
. . . . . . . .
keV peak of
. . . . . . . .
Contributing functions and total sum of test run on 137 Cs . . . .
Spectrum of 137 Cs point source and remainder after reduction . .
Spectrum of 137 Cs extended source and remainder after reduction
Results of first reduction of 88 Y point source spectrum . . . . . .
Results of second reduction of 88 Y point source spectrum . . . .
Results of first reduction of 60 Co point source spectrum . . . . .
Results of second reduction of 60 Co point source spectrum . . . .
Overview of reduction steps of 226 Ra point source spectrum . . .
Overview of 133 Ba reduction process . . . . . . . . . . . . . . . .
Overview of reduction process of a real-life spectrum with a 137 Cs
source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.11 Detailed view of the area around the 137 Cs in figure 6.10 on page 75
6.12 One hour data samples of Kista station and test run results . . .
6.1
6.2
6.3
6.4
6.5
6.6
6.7
6.8
6.9
6.10
4
43
44
62
62
66
66
67
69
69
70
70
72
73
75
76
77
List of Tables
3.1
3.2
Photo peak positions of some known gamma ray photon energies
Overview Efficiency measurements . . . . . . . . . . . . . . . . .
21
37
6.1
6.2
Overview Test Run Results . . . . . . . . . . . . . . . . . . . . .
Reduction steps of 226 Ra test run . . . . . . . . . . . . . . . . . .
64
73
5
LIST OF TABLES
6
Chapter 1
Introduction
Radioactivity is virtually ubiquous. Besides the cosmic background radiation
there are numerous radioactive isotopes present in nature. The most notable
example is certainly 238 U which can be found in many common minerals of the
earth’s crust. Its decay product 222 Rn emerges from the ground, making it a
prevalent component of the air.
Since the discovery of radioactivity in the late 19th century scientific progress
has made it possible to produce significant amounts of radioactive materials for
various purposes. Methods for diagnosis and treatment in medicine make use
of these achievements, e.g. the use of 99m Tc for diagnosis in nuclear medicine.
The development quickened considerably when nuclear fission was first
identified in 1938. The first self sustaining chain reaction was achieved in
1942. The first atomic bomb tests were conducted in the last months of the
Second World War. Since that time nuclear fission has been used both for civil
and military means.
All these uses of radioactive material may lead to contamination of the air.
While the medical uses may only emit small amounts, the emissions of a
nuclear explosion are more extensive. The resulting fallout can be detected
over large distances and long time periods. Although overground tests of
atomic bombs as a large source of contamination have been partially banned
since 19631 and finally ceased in 19802, other tests and major accidents in
nuclear power plants may still create large emissions.
Thus the measurement of the air’s contamination with radioactive materials
has been of scientific interest for two reasons. First, the extent of the
contamination as well as long-term trends can be observed. This can show the
impact on the atmosphere and nature. Second, contamination after a major
accident like the nuclear meltdown in the Chernobyl power plant in 1986 can
be detected quickly. If necessary, measures to meet possibly dangerous
1 according to the ”Partial Test Ban Treaty” (PTBT) which went into force in October
1963 but was not universal as some countries ratified it much later or have not signed at all
(e.g. PR China). See [9]
2 see [8]
7
CHAPTER 1. INTRODUCTION
situations can be taken. Furthermore observation of the air’s composition is
included in the Comprehensive Nuclear Test Ban Treaty (CTBT) from 1996.
It is one of several methods for the mutual monitoring of compliance with the
treaty3 .
Since the Second World War such measurements have been conducted. The
Swedish Defence Research Agency runs six stations for environmental
monitoring purposes in different parts of Sweden. There large ventilators
create a stream of air which is piped through a glass fibre filter to collect
particles. It is regularly removed and sent to the laboratory in Kista4 . There
the samples are analysed by a high purity germanium (HPGe) detector which
can detect gamma radiation with high efficiency.
This method is very precise and able to detect even small quantities of unusual
gamma ray emitting nuclides in the air. The drawback to this is that the
analysis takes several days to complete. In a case of a severe contamination it
would be desirable to receive results as early as possible.
Therefore the Swedish Defence Research Agency has developed “Tidig
Varning”, an automated system which uses a NaI(Tl) scintillation detector. It
is placed directly behind the filter in all of the six stations and collects data in
15 minute intervals which is displayed in the form of histograms which show
the distribution of incident gamma ray photons over the energy spectrum. If
unusual radiation levels are detected, a warning is sent via a mobile phone
connection. This setup is affordable, reliable, does not need maintenance and
can be installed at remote locations. While the germanium detector needs to
be cooled down with liquid nitrogen, the NaI-scintillator can operate at room
temperatures.
However it lacks the very high sensitivity of the laboratory measurements due
to its lower energy resolution and the background radiation. Hence,
improvements without a change of the detector system itself would make it
more sensitive. One obstacle to a better sensitivity is that every gamma ray
source affects the measured spectrum not only at its distinct energy. It has a
distinct effect on the spectrum which spreads over the whole energy range
from zero to the energy of the incident photons, just like fingerprint. This may
obscure the measurement of other sources of lower energy. In practical terms
this means that strong natural sources of radioactivity might affect the
histogram so much that weaker sources may not be detectable at all anymore.
It would be desirable to mitigate the effects of such strong natural sources.
This may help in some cases to discover unusual radiation earlier.
The goal of this thesis is to develop a model which emulates the spectrum
fingerprint such that the corresponding source is matched. If this emulation is
subtracted then, the remainder of the histogram will only contain the effects of
other sources. By repeating this procedure several times, a complete unfolding
of the histogram can be achieved. In an optimal case, all radioactive sources
on the filter can be determined.
3 see
[10] and [11]
of filters is done twice a week in most stations, in Kista station roughly daily.
4 Change
8
CHAPTER 1. INTRODUCTION
To achieve that I took several steps.
First I conducted measurements with various sources inside a lead shield in
the laboratory. Then I analysed this data to study the shapes of the acquired
histograms and to do calibrations. Additionally I conducted measurements in
the Kista and Gävle sampling stations.
In the second step I found functions that recreate the fingerprints of the source
with a close resemblance.
Finally I wrote a computer program which implements these functions and
runs a partial or complete unfolding of a given histogram. This test runs
where compared with the actual histograms.
9
Chapter 2
Theoretical Background
It is essential for the further steps to understand how the spectra of the
NaI(Tl)-scintillator come about. For that both the physical principles and the
processing in the detector device have to be considered.
First the interactions of gamma rays with matter are explained. There are
three important modes of interaction whose probability depends on the
gamma ray energy and the material it interacts with. They contribute all in
different ways to the spectrum and the deeper understanding of them will help
to interpret them.
Another relevant aspect to this is the design of the detector, especially the
function principle of the scintillator. This along with some details about the
processing of the signal will be explained at the end of the section.
2.1
Interaction processes: Photoelectric effect,
Compton effect, pair production
While the presence of gamma rays can be detected easily with devices such as
a Geiger counter, the determination of their exact energy requires a more
sophisticated device. The NaI(Tl)-detector makes use of the interaction of
gamma ray photons with matter. Thus a more thorough understanding of
interaction processes is necessary.
Gamma rays interact with matter mainly in three different ways: the
photoelectric effect, the Compton effect and pair production. The probability
of a certain process to occur depends largely on the energy of the gamma
photon and the nuclide it is interacting with. The atomic properties of the
irradiated material have some influence on the extent of the attenuation, but
the dominating parameter is the energy of the gamma ray photons. At lower
energies the photoelectric effect is dominant, while pair production does not
occur at all below 1.022 MeV1 . At medium energies the Compton effect is
1 [1,
p.202]
10
CHAPTER 2. THEORETICAL BACKGROUND
dominant. Figure 2.1 illustrates this.
Figure 2.1: Predominant mode of interaction in relation to energy and atomic
number of the absorber (Source: [1, p.202])
2.1.1
Photoelectric effect
A negatively charged plate is slowly discharged at the exposure to light. A
positively charged plate however is not. This and other observations in the last
years of the 19th century led to the discovery of the photoelectric effect whose
theory was developed by Albert Einstein.
Light has to be considered as a stream of light quanta or photons of the energy
E = hν
where ν is the frequency of the light and h the Planck constant. If E is larger
than the binding energy E = eVa of an electron in the outer shells of an atom,
it is possible that the photon removes an electron from the shell. The free
electron then has the kinetic energy
E = hν − eVa
Thus the entire energy of the photon has been transmitted to the emission of
the electron and the emitted electron itself. Considering the shell structure of
atoms, it is evident that the probability for this effect rises around the binding
energies of the different shells. Since these binding energies are typically below
100 keV2 , the photo effect is the most dominant way of interaction there.
2 [1,
p.199]
11
CHAPTER 2. THEORETICAL BACKGROUND
2.1.2
Compton effect
The Compton effect describes another process of interaction, in which not all
energy of the incident photon is transferred. The photon collides with a
weakly bound electron and is scattered. This causes an excitation of the
electron and induces an oscillation which results in the emission of radiation.
This radiation has the same frequency as the oscillation.
The process can be described as an elastic collision3 .
The process in terms of energy can be written as:
hν + m0 c2 = hν ′ + mc2
with m0 as the rest mass of the electron, ν ′ as the frequency of the scattered
photon and m as the relativistic mass of the electron after the collision.
For momentum conservation we use the model of a two-dimensional plane with
the electron entering it in positive x-direction.
For the momentum in y-direction:
hν ′
sin θ + mv sin θ
c
with θ as the scattering angle, and v as the speed of the electron.
For the momentum in x-direction:
0=
hν
hν ′
=
cos θ + mv cos θ
c
c
Using the abbreviation ν − ν ′ = ∆ν, the relativistic mass formula m =
and the relation c = λν we obtain after a few steps :
|∆λ| =
q m0
2
1− vc2
h
(1 − cos θ) = λc (1 − cosθ)
m0 c
λc is the so-called Compton wavelength and is defined as λc = mh0 c
For our purposes it is better though to write the result in terms of energy:
!
hν
m0 c2 (1 − cos θ)
′
Ee− = hν − hν = hν
1 + mhν
2 (1 − cos θ)
0c
A few remarks have to be made about the result and the Compton effect in
general:
• In materials with a high atomic number the electrons are strongly bound
which makes a momentum transfer less probable. Therefore the effect is
less likely to occur4 . The higher the energy of the photons is, the more
probable the effect becomes. For every material there is an energy range
where the Compton effect is the most likely type of interaction to occur.
3 [2,
4 [2,
p.62]
p. 63]
12
CHAPTER 2. THEORETICAL BACKGROUND
• Unlike the photo effect the energy of the electron is not only determined
by the incident photon energy. The second variable is the scattering
angle. Since all scattering angles 0 ≤ θ ≤ π can occur, the excited
electrons can have energies within a certain range. The lowest energy is
zero, occuring at a scattering angle of θ = 0. The highest energy is at an
angle of θ = π, which results in the following energy:
Ee− ,θ=π = hν − hν ′ = hν
2 mhν
2
0c
1 + 2 mhν
2
0c
!
(2.1)
The energy Ee− ,θ=π is somewhat lower than the initial energy of the
incident photon. In a diagram showing the electron energy distribution a
sharp drop will occur above this energy. Figure 2.2 on the following page
illustrates this. The section about spectra will discuss this further.
2.1.3
Pair Production
According to the theory of relativity mass and energy are exchangeable,
related to each other by the formula E = mc2 . An electron colliding with its
anti-particle, the positron, annihilates and the energy equal to the masses of
both particles is emitted. Pair production is the reversal of this process, i.e. an
incident photon creates an electron-positron pair. For momentum conservation
reasons the presence of a massive atom nearby is necessary.
It is obvious that the energy equivalent of the electron-positron pair’s mass is
necessary. This is 1022 keV, since the electron mass is 511 keV and the
positron is identical with the exception of the charge. Therefore this process
cannot occur below the threshold of 1022 keV.
It is not until energies of 5 MeV that pair production can become the
dominant mode of interaction. As the focus on this thesis lies on the energy
range from zero to 2 MeV, pair production will only play a minor role. It is
however necessary to consider it since its effects will be clearly visible in the
measurements.
2.2
Detector
There are several different types of detectors with their respective range of
applications.
The requirements for a detector for our purposes are that it should be small in
size, operable at room temperatures and does not require maintenance.
Amongst others this rules out gas detectors which would have a very large
size5 .
5 For
a more detailed discussion see [1, p. 207]
13
CHAPTER 2. THEORETICAL BACKGROUND
Figure 2.2: Shape of the Compton continuum for various gamma-ray energies
(Source: [3, p.310])
2.2.1
Scintillator
A scintillator can fulfil these requirements and was used for the measurements
in this work. This class of substances absorbs radiation, which excites its
atoms. When the atoms return to their initial state, they emit again radiation.
The scintillator therefore fluoresces.
The molecules do not pass on all of the energy to the outgoing radiation but
lose some of it during the processes, e.g. to thermal energy. Therefore the
secondary radiation is not of the same wavelength (i.e. energy) as the absorbed
radiation. This loss of energy appears as a shift between the wavelengths of
the incoming and the outgoing radiation, the so-called Stokes shift6 .
Thus a scintillator can be used to convert high energy radiation to lower
energies. In an optimal case the incoming radiation is linearly shifted over
6 see
[12]
14
CHAPTER 2. THEORETICAL BACKGROUND
large energy ranges so that the output is a perfect representation of the
incoming radiation.
A suitable scintillator material must have certain properties for our purposes.
It should convert gamma rays with energies between 0 and 3 MeV linearly to
lower energies. Furthermore it has to be transparent for the wavelengths
created in this process so that the secondary radiation is not absorbed. Several
types of materials, ranging from inorganic crystals to organic liquids, fulfil
these requirements7 .
In our case we use a Thallium doped Sodium-iodide scintillator, abbreviated
as NaI(Tl). This material was among the first known scintillators and is still
very common. It converts the gamma rays to radiation with wavelengths of
visible light.
2.2.2
Photomultiplier tube
The emitted light strikes a photosensitive surface and releases photoelectrons
into the vacuum of a photomultiplier tube which contains a row of positively
charged metal plates (dynodes). Between them there are electric fields of
increasing strength. When the electrons hit the surface of a dynode, more
electrons are emitted. As this procedure is repeated several times, the number
of electron grows. The geometry of the plates and the voltages between them
are chosen such that this increase is linear, i.e. the factor between the number
of incoming and outgoing electrons is always the same. The purpose of this
procedure is to create a sufficient number of electrons so that a voltage can be
measured.
Figure 2.3: Schematic overview of a photomultiplier tube (Source: [13])
2.2.3
Multichannel Analyzer
This voltage then is to be converted to a digital signal which can be used by
the computer.
7 [1,
p. 209-211]
15
CHAPTER 2. THEORETICAL BACKGROUND
The device for this is a Multichannel Analyzer (MCA), whose central
component is an analogue-to-digital converter (ADC)8 . One common type of
an ADC is the linear ramp converter which compares the input pulse to a
linearly increasing ramp voltage. While the input pulse is lower or equal the
ramp voltage, a linear gate is opened which is connected to an constant
frequency oscillator. Thus the opening times of the gate correspond to a
certain number of oscillations. These oscillations are counted by an address
register. Hence the input pulse is converted to a number in the address
register. A schematic illustration of this can be seen in figure 2.4 on the next
page.
Another common type is the successive approximation ADC which works
similar to an interval approximation. As there are two possible values in a
digital system (0 and 1) the full-scale amplitude R is divided up in two halves.
If the signal is in the upper half, i.e. > R2 , this is translated to 1 and the signal
is reduced by R2 so that only the part in the upper half remains. Otherwise it
is translated as zero. This step is performed for R4 , R8 and so on until the
number of available bits is determined. A 4-bit ADC of this type would work
as seen in figure 2.5 on page 18. As indicated there, the maximum number of
different combinations is 24 = 16.
Every time a signal arrives it will be assigned to one of these combinations,
the so-called channels. The computer counts then which values occur how
often. This can be translated into a histogram which displays the number of
occurences over the corresponding channel. Since every channel corresponds to
a certain energy of a photon emitted by the scintillator, the histogram
represents the energy spectrum.
The ADC as an electronic device needs some time to process an incoming
signal, the so-called dead time. During this time span no other signals can be
analysed. If another signal arrives, it will be lost. Therefore there is a
difference between the real time, i.e. the time span of the measurement, and
the live time, i.e. the time span in which the detector was ready to process
new signals. The more signals come in, the smaller the live time is. Therefore
the analysed radiation sources should never be too strong, so that the dead
time is negligible in comparison to the real time.
The MCA used for the measurements in this thesis has 1024 channels. It
furthermore includes an amplifier which will apply a certain gain to the output
of the photomultiplier tube. This allows to adjust the energy interval which
will fit into the 1024 channels.
2.3
Spectra
The spectrum is the final result of the whole detection process, and some of its
features are easy to predict. However there are some details to it which may
not be obvious at first.
8 see
[3, p.691]
16
CHAPTER 2. THEORETICAL BACKGROUND
Figure 2.4: Schematic overview of a linear ramp converter ADC (Source: [3,
p.694])
The detector is working in an indirect way: it counts the number of electrons
which were released into the photomultiplier tube. This number does not tell
anything about the number of photons which were emitted by the scintillator.
If two or more photons are emitted by the scintillator within a very short time
span, these events will be registered as one event which has the energy of all
photons combined.
Therefore it is more adequate to say that a count registered by the detector
corresponds to the energy which has been deposited by one or more virtually
simultaneous events.
The scintillator is a solid crystal of some extension. Therefore it can happen
that the products of an interaction may interact again, hence depositing more
energy than just with a single interaction. It is important to point that out
because some features of the spectrum could not be explained otherwise.
Thus all the interactions should be considered with possible further
interactions:
• The Photoelectric effect transmits all the photon’s energy to the
scintillator - since electrons have a very short free mean path, none of
them can leave it. Therefore every photon interacting through this effect
will be detected at its energy. Due to statistical distribution, it will be
visible as a Gaussian distribution function in the spectrum. This is
called the photo peak.
• The Compton effect will transmit some of the photon’s energy to the
scintillator. The counts are distributed among all energies which can be
the result of a scattering angle between 0 ≤ θ ≤ π. This distribution is
called the Compton continuum. Since there is a fixed boundary for the
maximum energy deposited by the Compton effect there should be no
17
CHAPTER 2. THEORETICAL BACKGROUND
Figure 2.5: Schematic overview of a successive approximation ADC (Source: [3,
p.695])
photons above that, resulting in a sharp drop in the histogram. This is
called the Compton edge.
• The scattered photon will in many cases leave the detector without any
interaction. If it interacts though, it will deposit some more energy. In
many cases this may not be distinguishable from the Compton
continuum or the photo peak. In some cases however the total of the
deposited energy may lie between the Compton edge and the photo
peak. Therefore it is not to be expected that the number of counts will
drop to zero above the energy of the Compton edge.
• In case pair production occurrs, the resulting electron-position pair has
an energy of E = Eγ − 2me c2 , i.e. 1022 keV goes into the creation of the
two particles and the remaining energy will be the kinetic energy. The
positron is an anti-particle and can annihilate with an electron which
would create another two photons of an energy of 511 keV. The positron
travels at most a few millimetres9 so that it is very likely that the
creation of these photons occurs inside the scintillator. If one of the
photons escapes, the deposited energy is the incident gamma ray photon
energy minus the energy of the annihilation, i.e. 511 keV. In analogy to
that the escape of both will result in an energy loss of 1022 keV. This
will result in two peaks in the spectrum: one at Eγ − 511 keV and one at
Eγ − 1022 keV. The latter is called “double escape peak”, the other
correspondingly “single escape peak”. Due to the small probably of pair
9 [3,
p. 312]
18
CHAPTER 2. THEORETICAL BACKGROUND
production in low energy regions the effects will be quite small in our
measurements.
Figure 2.6: Schematic overview of a spectrum on the basis of the described basic
effects. The left diagram shows the case below the threshold energy of 1022 keV,
the right diagram the case above this energz (Source: [3, p.316])
19
Chapter 3
Measurement and Analysis
Most of the spectra used in the further analysis were taken in the lab inside a
large lead shield to limit the effects of background radiation to the minimum.
However this is not a perfect dampening of outside effects like the radioactive
222
Rn in the air. Therefore a long-time measurement was done to analyse the
effects of background radiation inside the shield. This data was used to
subtract the effects of background radiation from all measurements.
5000
Background spectrum
4500
4000
3500
Counts
3000
2500
2000
1500
1000
500
0
0
200
400
600
800
Channel
Figure 3.1: Spectrum of laboratory background
20
1000
CHAPTER 3. MEASUREMENT AND ANALYSIS
3.1
Energy Calibration
The gain was adjusted such that the highest energy visible (i.e. the energy
corresponding to the highest channel) will be around 2700 keV which is
enough to cover the relevant range in the sampling stations. This value as well
as the used voltage in the photomultiplier tube were not changed during the
course of measurements.
As with every kind of device for measurement it is crucial that calibration is
done to relate any obtained values to standard units. So far it is clear that
every channel in the spectrum corresponds to a certain energy. However it has
to be determined which energy that is.
Although the programming solution will use channels as the primary unit, it is
necessary to have a reliable way to convert channels to energies and vice versa.
Therefore all the sources available in the laboratory have been used to do
measurements. The results of these measurements then were used to find a
calibration.1
Isotope
137
Cs
88
Y
60
Co
60
Co
88
Y
Peak energy [keV]
661.657
898.042
1173.96
1331.35
1836.063
Channel
261.87
349.75
450.57
508.43
689.08
Calibrated energy [keV]
661.60
898.33
1173.01
1332.14
1836.00
Table 3.1: Photo peak positions of some known gamma ray photon energies
Table 3.1 shows some of the calibration sources used. X-ray energies were
intentionally not excluded here. Most sources emit photons at several different
energies in the X-ray range. As this energy range is represented only in 30
channels, the resolution is too low to identify and position them properly.
After all our main concern is gamma radiation, so this is of smaller importance.
While figure 3.2 on the following page seems to show an almost perfect linear
relation, this does not hold true when the numbers are investigated more
closely. A linear relation would lead to results several keV away from the real
values. A second-order polynomial was used for better approximation.
A least-square fit resulted in the following relation:
E = 0.000162834 · C 2 + 2.59414 · C − 28.8893
with E being the energy and C being the channel. It is obvious that this
equation would yield negative energies for C < 12 - indeed this formula is very
unprecise for low energies. The column “Calibrated energy” in table 3.1 shows
however that the precision for higher energies is sufficient. Very low energies <
255 keV (channel 109 and below) are not of high importance in this work as
1 All
reference energy values of the different isotopes used in this thesis were taken from
[7].
21
CHAPTER 3. MEASUREMENT AND ANALYSIS
2000
Energy calibration
Approximation fit
1800
1600
1331 keV (Co-60)
1400
1836 keV (Y-88)
Energy [keV]
1174 keV (Co-60)
1200
1000
898 keV (Y-88)
800
662 keV (Cs-137)
600
26 keV (Am-241)
60 keV (Am-241)
400
200
0
0
100
200
300
400
500
600
700
Channel
Figure 3.2: Energy calibration plot
the detector is less suitable for the X-ray range2 . Furthermore higher energies
> 2000 keV (channel 748 and above) have a lower priority as the point sources
in the laboratory do not emit large amounts of radiation there.
3.2
Long-term measurement of
source
137
Cs point
The role model for all subsequent considerations and calculations is the
spectrum of a 137 Cs point source. This is not chosen randomly but for the
properties of the spectrum. 137 Cs has a half-life of 30.07 years3 and decays to
137
Ba which is stable. A major advantage of 137 Cs is that it emits only gamma
ray photons of a single energy4 , namely 661.657 keV. This allows to study an
2 Additionally
the backscatter peak plays a role, which will be discussed later.
measurement times are very short in comparison so that it is in general not necessary
to consider that the source’s activity decreases during the measurement.
4 For the sake of completeness it has to be mentioned that this is not entirely true. In
0.00058 % of all decays a photon of the energy 283.53 keV is emitted. This number however is
so small that it is negligible for all practical purposes. In the spectra of the following sections
such negligible photon emissions will not be mentioned.
3 The
22
CHAPTER 3. MEASUREMENT AND ANALYSIS
unbiased spectrum of a single energy gamma ray source below the threshold
for pair production.
137
Cs is furthermore the only isotope with these properties which was available
in the laboratory. Figure 3.35 shows a spectrum taken inside the lead shield.
The seven lowest channels were set to zero since there are no useful results to
expect in such low energy areas6 .
0
100
Energy [keV]
300
400
200
500
600
700
60000
Cs-137 point source
Photo Peak
X-Ray Peak
50000
Counts
40000
30000
20000
Backscatter Peak
10000
Compton Edge
Compton Continuum
0
0
50
100
150
Channel
Figure 3.3: Spectrum of a
137
200
250
300
Cs point source
The expected features are visible. At the expected energy 662 keV there is a
large peak, resulting from the interactions through the photoelectric effect.
The Compton continuum is uniformly distributed. The Compton edge is
theoretically at 477.33 keV (channel 193). In the shown spectrum the height of
the Compton continuum at this energy has already decreased to one third of
its initial height. The Compton edge is distributed over an area of about 30
channels. Both the shape of the peak and the smoothed out Compton edge
can be explained by the fact that the energy resolution is limited and there is
always a statistical distribution in measurements of countable events.
The count level between Compton edge and photo peak does not fall to zero
because of multiple Compton events.
5 For
6 The
details of the measurements see the appendix.
used analysis program MAESTRO provides a lower level discriminator.
23
CHAPTER 3. MEASUREMENT AND ANALYSIS
Two additional features however cannot be explained with the knowledge from
section 2.3. First of all, there is a large narrow peak at channel 17. 137 Cs emits
in 5.8 % of all decays a photon7 of 32 keV, which contributes to that peak8 .
Another significant difference to the expected shape is the peak on top of the
Compton continuum at an energy of approximately 190 keV (channel 82).
This is called the backscatter peak. It can be explained as another side effect
of the matter surrounding the detector. The gamma ray photons are scattered
in the lead shield and some of them reach the detector. This requires a rather
large scattering angle which implies that most of the photons reaching the
detector in this way have similar energies. This can be illustrated by a
numerical example: a 662 keV photon scattered by an angle of 120 degress will
deposit 437 keV in the Compton electron and retain 224 keV itself. At a
scattering angle of 160 degrees the photon will have an energy of 186 keV. The
same for 180 degrees would be 184 keV. This shows that the energies of these
photons are unequally distributed and will be concentrated around the value
for a scattering angle of 180 degrees, in this case 184 keV. This is exactly as it
is represented in the spectrum. Thus the position has to be expected at the
energy
E′ =
hν
1 + 2 mhν
2
0c
(3.1)
This expression gives only the rough position of the peak’s top. There is no
general expression for the height or shape of the backscatter peak since it
depends largely on the surrounding material. The only obvious observation is
that the peak has an unsymmetrical shape since E ′ is the smallest energy and
gives a lower limit to the distribution.
3.3
Long-term measurement of
source
137
Cs extended
One of the goals of the project was to reach a large resemblance to the spectra
which would be taken in real life in one of the measurement stations.
Radioactive particles are distributed all over the filter so that gamma
radiation will not come from a single point but several directions.
It cannot be assumed that the spectra of point and extended sources are
identical. Since a larger variety of backscattering radiation will reach the
detector, it can be expected that the backscatter peak will be seen on a wider
energy interval. Furthermore the solid angle of the source is different which
will result in a different efficiency.
7 Actually there are two separate energies at 31.817 keV (2.04 %) and 32.194 keV (3.76 %).
Due to the low energy resolution they are detected as a single energy.
8 Channel 17 would correspond to 15.26 keV using the calibration function. Since the
function is less reliable at such low energies, it has to be assumed that this value is not
accurate.
24
CHAPTER 3. MEASUREMENT AND ANALYSIS
0
100
Energy [keV]
300
400
200
500
600
700
90000
Cs-137 extended source
X-Ray Peak
80000
Photo Peak
70000
Counts
60000
50000
40000
Backscatter Peak
30000
20000
Compton Edge
10000
Compton Continuum
0
0
50
100
150
Channel
Figure 3.4: Spectrum of an extended
200
137
250
300
Cs source
To study the spectrum of such an extended source the Swedish Defence
Research Agency produced such a device. It is a quadratic9 flat filter with 20
kBq activity equally distributed on the area. It was manufactured by dropping
a 137 Cs solution on the filter. To avoid contamination of the surroundings it
has been kept inside a carton box during all the measurements. Since this
material hardly absorbs gamma radiation, its effect can be considered
negligible.
The extended source was placed inside the lead shield in 10 cm distance to the
detector. All other measurements could be taken with the detector placed in
the center of the lead shield and perpendicular to the shield’s door. Because
space is limited in the lead shield, this measurement had to be taken parallel
to the shield’s door (see figure 3.6 on page 27 for illustration). The effects of
this should be rather small since the scintillator side of the detector is still in a
reasonably large distance to the lead shield and only the distances changed,
not the general positioning.
Under these conditions a measurement of the extended source was taken to see
the difference in the spectra.
As figure 3.4 shows there is indeed the expected effect visible. The backscatter
9 side
length of the carton outside is 58 cm.
25
CHAPTER 3. MEASUREMENT AND ANALYSIS
0
100
Energy [keV]
300
400
200
500
600
700
90000
extended source
point source
80000
Counts (normalized)
70000
60000
50000
40000
30000
20000
10000
0
0
50
100
150
Channel
200
250
300
Figure 3.5: Spectra of extended and point source compared (normalized on
extended source photo peak)
peak elevates the count levels well above the backscatter energy. Figure 3.5
illustrates that even better. Here both measurements are normalized to the
top of the peak in the extended source measurement. This facilitates
comparison of the shapes of the spectra.
It can clearly be seen that the spectra are virtually identical in the area above
the Compton edge. Both the photo peak and the multiple Compton area (i.e.
between photo peak and Compton edge) bear a large resemblance. However,
the Compton continuum looks significantly different. The backscatter peak is
not only higher. As expected, it is also spread out much wider, almost until
the Compton edge. Additionally to that, the Compton continuum left of the
peak is slightly higher.
For the modelling of the response function this leads to some important
conclusions.
First of all it has to be assumed that not only 137 Cs, but also other isotopes’
spectra will look different when they come from an extended source instead
from a point source. Since the created model should be applicable to different
nuclides, the used functions should be adjustable to both.
More fundamentally it is an important aspect that the backscatter peak is
26
CHAPTER 3. MEASUREMENT AND ANALYSIS
Extended source
Point source
b
10 cm
Detector 10 cm
Detector
Door
Figure 3.6: Positions of the detector and the sources inside the lead shield
(schematic)
obviously highly dependent on the shape of the source as well as the properties
of the surroundings. The shape of the measurements in the stations may differ
significantly from the measurements in the laboratory. There is no easy way to
predict this shape.
3.4
Additional Measurements with other Point
Sources
Apart from the 137 Cs sources there were several other point sources available
in the laboratory. None of them has the properties of 137 Cs, but all of them
were used in long-term measurements to acquire data which could be later
used for tests of the response function model.
These samples were
•
241
Am (Figure 3.7 on the following page): 241 Am has a half-life of 432.2
years and decays to 237 Np, which has a half-life of 2.4 million years. Its
decay process radiates alpha, gamma and X-ray radiation with dozens of
different energies. However there are only a few energies which have a
non-negligible intensity. These are 26.3448 keV and 59.5412 keV for
27
CHAPTER 3. MEASUREMENT AND ANALYSIS
3e+006
Am-241 point source
2.5e+006
59.5 keV Peak
Counts
2e+006
1.5e+006
1e+006
26.3 keV Peak
500000
0
0
5
10
15
20
Channel
Figure 3.7: Spectrum of
241
25
30
35
40
Am point source
gamma decays as well as a few X-ray energies between 11 keV and 21
keV. The 59.5 keV peak is clearly distinguishable, while the lower
energies blend partly together, making the 26.3 keV peak only an
elevated part of a plateau. There are no significant features above
channel 40. Thus the spectrum yields little which will be of further use.
However it shows again that the calibration is not accurate in these low
energy areas.
•
226
Ra (Figure 3.8 on the next page): 226 Ra is part of the uranium decay
chain which includes 15 isotopes, starting with 238 U and ending with the
stable 206 Pb. 226 Ra is in the middle of this chain. It decays to 222 Rn
with a half-life of 1600 years. The only notable photon emission created
by this process is at 186.211 keV which occurs in 3.59 percent of all
decays. Zhis decay chain is long and some of the intermediary steps are
short-lived isotopes (from 164.3 µs to 5.012 days) with the exception of
210
Pb (22.3 years) and 210 Po (138.387 days)10 . Therefore many of the
other isotopes can be seen in the spectrum with their respective energies.
As expected the spectrum in figure 3.8 on the following page shows a lot
of peaks, ranging up to more than 1800 keV. As the left-most of the four
prominent peaks in the spectrum between 100 keV and 400 keV the
10 The
complete decay chain is: 226 Ra (1600 y) → 222 Rn (3.8235 d) → 218 Po (3.05 m) →
(26.8 m) → 214 Bi (19.9 m) → 214 Po (164.3 µs) → 210 Pb (22.3 y) → 210 Bi (5.012 d)
→ 210 Po (138.378 d) → 206 Pb (stable)
214 Pb
28
CHAPTER 3. MEASUREMENT AND ANALYSIS
0
150
300
450
600
750
Energy [keV]
900 1050 1200 1350 1500 1650 1800 1950
1.2e+007
Ra-226 point source
Ra-226 (186 keV)
Pb-214 (242 keV)
Pb-214 (295 keV)
Pb-214 (352 keV)
1e+007
Counts
8e+006
6e+006
4e+006
Pb-214 (609 keV)
2e+006
0
0
100
200
300
400
Channel
Figure 3.8: Spectrum of
226
500
600
700
Ra point source
emitted photons of 226 Ra itself at 186.211 keV is clearly visible. The
next peaks from left to right at 241.91 keV, 295.17 keV and 351.90 keV
originate all from 214 Pb. The high peak at 609.32 keV originates from
214
Bi.
•
133
Ba (Figure 3.9 on the next page): 133 Ba has a half-life of 10.51 years
and decays to 133 Cs which is stable. It emits gamma rays at several
energies, the most intensive ones being at 80.9971 keV and 356.017 keV.
Both of them can be seen in the spectrum. Despite the favourable
condition that it has a stable decay product, 133 Ba is of little use for
tests of the response function model. The Compton continuum is hardly
visible, which can be explained by the fact that only photons which
deposit their energy only partly in the scintillator are counted there. In
such low energy regions the photo effect makes up a large percentage of
the interactions. Furthermore, Compton scattered photons will have a
low energy, thus making it less probable that scattered photons escape
the detector. Therefore only few counts are in the Compton continuum.
•
210
Pb (Figure 3.10 on page 31): As 226 Ra, 210 Pb is part of the 238 U
decay chain. After two more decay products, 210 Bi and 210 Po, the chain
comes to its end with the stable 206 Pb. The two decay products emit
gamma radiation with very low densities, so that they are not detected
at all. 210 Pb itself emits only 46.539 keV gamma rays and a few different
29
CHAPTER 3. MEASUREMENT AND ANALYSIS
0
50
100
150
Energy [keV]
200
250
300
350
400
450
1.2e+006
Ba-133 point source
1e+006
Counts
800000
600000
400000
81 keV peak
200000
356 keV peak
0
0
50
100
Channel
Figure 3.9: Spectrum of
133
150
200
Ba point source
X-ray energies, the strongest at 11.721 keV. The spectrum features
therefore only two visible peaks at very low energies, making it hardly
useful for the modelling11 .
•
22
Na (Figure 3.11 on the next page): 22 Na is an isotope with a half-life
of 2.6019 years. It decays to the stable 22 Ne, emitting gamma ray
photons at 1274.53 keV. Additionally there are also photons at 511 keV,
the rest energy of the electron. This is caused by the β + -decay processes
which emit positrons and subsequently annihilation photons. Therefore
this isotope shows a spectrum with two energies. The 511 keV peak is
larger than the gamma ray peak, which is due to the fact that every
electron-positron annihilation creates two 511 keV photons. Furthermore
the efficiency is higher at lower energies. The Compton continuum and
the backscatter peak are visible for both energies.
•
60
Co (Figure 3.12 on page 32): 60 Co has a half-life of 5.2714 years. It
decays to 60 Ni, which is stable, and emits gamma rays at 1173.327 keV
and 1332.501 keV. Since there are no other significant photon emissions,
its spectrum is very useful for the modelling. It even shows a double
escape peak just above the backscatter peak.
11 The spectrum shows also again the large differences the calibration creates in low energy
areas.
30
CHAPTER 3. MEASUREMENT AND ANALYSIS
180000
Pb-210 point source
160000
140000
46.5 keV Peak
Counts
120000
100000
X-Ray Peak (several energies between 10 and 15 keV)
80000
60000
40000
20000
0
0
20
40
60
80
100
Channel
Figure 3.10: Spectrum of
0
100
200
300
400
500
210
Pb point source
Energy [keV]
600 700 800
900 1000 1100 1200 1300 1400
100000
Na-22 point source
90000
Double Escape
Peak (225 keV)
80000
70000
Backscatter Peak
511 keV Peak (Electron-Positron Annihilation)
Counts
60000
50000
40000
30000
20000
1274.5 keV Peak
10000
0
0
100
200
300
Channel
Figure 3.11: Spectrum of
31
22
400
Na point source
500
CHAPTER 3. MEASUREMENT AND ANALYSIS
0
100
200
300
400
500
Energy [keV]
600 700 800
900 1000 1100 1200 1300 1400
12000
Co-60 point source
1173 keV Peak
10000
Backscatter Peak
1333 keV Peak
8000
Counts
Double Escape Peak (1333 keV)
6000
4000
2000
0
0
100
200
300
Channel
Figure 3.12: Spectrum of
0
150
300
450
600
60
400
500
Co point source
Energy [keV]
900 1050 1200 1350 1500 1650 1800 1950
750
160000
Y-88 point source
140000
Double Escape Peak
120000
898 keV Peak
Counts
100000
Backscatter Peak
80000
511 keV
Annihilation Peak
60000
1836 keV Peak
Single Escape Peak
40000
20000
0
0
100
200
300
400
Channel
Figure 3.13: Spectrum of
32
88
500
Y point source
600
700
CHAPTER 3. MEASUREMENT AND ANALYSIS
•
3.5
88
Y (Figure 3.13 on the previous page): 88 Y has a half-life of 106.65
days. It emits gamma ray photons at 898.042 keV and 1836.063 keV.
The latter shows therefore all features of a spectrum including double
and single escape peaks. Additionally there is a peak at 511 keV, caused
by positron-electron annihilation. Since the two gamma ray peaks are in
some distance to each other, this spectrum will be very useful for testing
the model at higher energies.
Measurement with 137Cs extended source in
Gävle measuring station
Air inlet
Air inlet
Detector
Detector
Kista
Gävle and other stations
Figure 3.14: Schematic overview of the geometry in the measuring stations in
Gävle and Stockholm
The last preparatory measurement was conducted in November 2006 at a
measuring station situated at the sewage plant in Gävle, 170 kilometres north
of Stockholm. The primary reason to conduct this measurement was to have
another spectrum taken in a different environment.
As displayed in figure 3.14, the geometries in the stations differ significantly
from the laboratory. Therefore this measurement is of interest as it can
indicate if the shape of the extended source spectrum will look similar to the
lab results in real measurements in the station.
33
CHAPTER 3. MEASUREMENT AND ANALYSIS
2000
Gavle measurement (extended source)
Point source in lab (normalized)
Extended source in lab (normalized)
1800
1600
1400
Counts
1200
1000
800
600
400
200
0
0
100
200
300
400
Energy [keV]
500
600
700
Figure 3.15: Measurement of 137 Cs in the laboratory and Gävle station (normalized on Gävle measurement for shape comparison)
Since the effective measurement time was only a few hours12 , the acquired
spectrum is more influenced by statistical fluctuations than the laboratory
measurements13 . Additionally the influence of the background is stronger as
the lead shield in the laboratory provided better shielding.
To reduce the effects of the latter, first a measurement of the background was
taken. The extended source was attached outside the air intake of the filter
system14 and a measurement of 4330 s (about 72 minutes) was taken.
In figure 3.15 the results with reduced background can be seen15 . For shape
comparison the spectra from figure 3.5 on page 26 have been added16 .
However it shows all features of the laboratory results. A large resemblance
12 This
measurement was conducted during a one-day trip to Gävle.
√
has to be considered here that the counts have a statistical deviation of N with N
being the number of counts. Therefore the statistical deviation is comparatively high at low
count numbers like in this measurement.
14 The fan was deactivated during that time to reduce the risk of contaminating the system
with material of the extended source
15 For calibration a simple linear relation was used. The cut-off just below 100 keV in the
Gävle measurement is due to the settings of the MAESTRO program. In Gävle measurement
the first 41 channels are cut off, while in the laboratory only the first 7 channels are ignored.
16 Normalized on the peak of the Gävle measurement.
13 It
34
CHAPTER 3. MEASUREMENT AND ANALYSIS
can be seen at the photo peak which is almost a perfect match and the
Compton edge can be seen roughly at the same position. In lower energy
regions however the Gävle measurement shows much higher count levels. This
is probably due to the unshielded surroundings of the detector with a large
variety of different materials. Compton scattering in these then leads to such
high count levels in lower energy regions.
The conclusion out of this is that the Compton continuum looks quite similar,
while the backscatter peak depends heavily on the surroundings. Additionally
it has to be expected that in environments outside the laboratory there will be
always a large amount of scattering effects, both X-ray and Compton.
35
CHAPTER 3. MEASUREMENT AND ANALYSIS
3.6
Efficiency calibration
0.009
Efficiency
Efficiency (based on Ra-226 simulation)
Approximative fit
0.008
0.007
Efficiency
0.006
0.005
0.004
0.003
0.002
0.001
0
0
500
1000
1500
2000
2500
Energy [keV]
Figure 3.16: Efficiency calibration
Another aspect of the general measurement is the efficiency of the detector,
i.e. the percentage of incident gamma ray photons which are displayed as part
of the photo peak in the spectrum. This is essential to estimate the detection
limit of the detector.
This efficiency varies over the whole energy spectrum since the probability of
the full photon energy to be absorbed is highly dependent on the energy of the
incident gamma ray. Additionally the properties of the scintillation crystal,
the photo multiplier tube and the digital measurement system have effect on
the results.
The direct relation between the emitted and counted photons will only give
efficiency results for the given geometry, in this case the detector at 10 cm
distance from the point source.
3.6.1
Parameters
The calculation is based on the following parameters:
• First of all it has to be determined how many counts there are in the
photo peak. As the photo peaks are always biased by the multiple
Compton area, an approximation of the background has to be made.
36
Isotope
241
37
59.54
295.22
352
356.02
609
661.66
898.04
1120.29
1173.24
1274.53
1332.5
1764.49
1836.06
2204.21
137
Cs
661.66
137
Cs
661.66
137
Cs
661.66
Peak
intensity
[%]
Energy
Measuring
Photons
Measured
(measured)
time
Counts
[keV]
[s]
Point Sources
45.9
45
88101
9.683 · 106 1.033 · 107 ± 6765
19.3
288
574880
1.846 · 107 2.103 · 107 ± 14230
37.6
346.41
574880
7.122 · 107 4.125 · 107 ± 18431
62.05
354
15953
3.039 · 106 1.172 · 106 ± 3067
46.1
610
574880
1.075 · 108 3.081 · 107 ± 15948
85.1
662
9408
5.250 · 106
842514 ± 2056
93.7
898
87722
3.153 · 108 3.025 · 106 ± 4938
15.1
1125
574880
1.130 · 107 5.754 · 106 ± 11414
99.97
1173
12512
3.234 · 106
209570 ± 1334
99.94
1285
62426
4.695 · 106
315681 ± 1282
99.99
1332
12512
3.235 · 106
201977 ± 1096
15.4
1769
574880
1.175 · 107 4.238 · 106 ± 8704
99.2
1836
87722
3.534 · 108 1.549 · 106 ± 3029
5.08
2216
574880
1.279 · 106 1.074 · 106 ± 4440
Extended Source
85.1
661
81956
1.306 · 106 1.337 · 106 ± 2505
Point Source in Gävle Measurement Station
180
5.472 · 106
2003 ± 141
Extended Source in Gävle Measurement Station
4333
6.873 · 107
28487 ± 381
Table 3.2: Overview Efficiency measurements
Efficiency
[10−3 ]
8.46 ± 0.52
4.72 ± 0.30
4.68 ± 0.28
5.14 ± 0.33
2.84 ± 0.17
2.93 ± 0.19
2.07 ± 0.13
1.65 ± 0.11
1.39 ± 0.10
1.44 ± 0.10
1.34 ± 0.09
1.19 ± 0.08
1.00 ± 0.06
0.92 ± 0.06
1.02 ± 0.07
0.37 ± 0.05
0.41 ± 0.03
CHAPTER 3. MEASUREMENT AND ANALYSIS
Am
Ra
214
Pb (226 Ra)
133
Ba
214
Bi (226 Ra)
137
Cs
88
Y
226
Ra
60
Co
22
Na
60
Co
226
Ra
88
Y
226
Ra
226
Energy
(expected)
[keV]
CHAPTER 3. MEASUREMENT AND ANALYSIS
The program MAESTRO has such an approximation routine. The values
were therefore taken from this program.
• The second important part of the calculation is to determine how many
photons were emitted. Here it is important to take into account that not
every decay leads to the emission of a photon of the expected energy.
E.g. 137 Cs emits only in 85.1 % of all decays a photon of the energy
661.66 keV. Furthermore it is important to consider that the activity of
the samples decreases. Therefore the half-life and the current activity17
have to be taken into account18 .
Then the efficiency is calculated as
Efficiency =
3.6.2
Counts in the photo peak
Total photons emitted by the source
(3.2)
Efficiency results
The table 3.2 on the previous page19 and the figure 3.16 on page 36 show the
results. It is clearly visible that the efficiency decreases at higher energies.
The given error estimate includes besides the statistical errors some
systematical errors. The latter take into account that the source may be
displaced by two millimetres and that the activity values given in the data
sheet were only exact to 0.1 kBq.
An interesting aspect is that the efficiency of the extended source
measurement results in a significantly lower efficiency than the point source of
the same energy. This can be explained by different geometric conditions.
3.6.3
Solid Angle Relation
To relate the results to other geometries, the solid angle Ω is a characteristic
value. It represents the percentage of photons which actually reach the
detector.
This is of particular interest as there is an obvious efficiency difference
between the extended 137 Cs source and the corresponding point source.
The calculation of the absolute values for different geometries is not trivial. I
tried to make some approximations to get values which are near to the real
ones:
17 Data
sheets of all sources with exact activities and dates were available.
is also important to mention that the activity is not constant during the measurement
for the same reasons. This can be considered negligible in all measurements here as the halflives of all used isotopes are much longer than the measurement. However I included it into
my calculation.
19 The rows with 226 Ra in brackets refer to later steps in the decay chain of this nuclide.
The activity values of these nuclides were calculated with a program I wrote. This simulates
the decay in small time steps, which yielded approximative results for the isotopes with longer
half-lives.
18 It
38
CHAPTER 3. MEASUREMENT AND ANALYSIS
• For the point source a simple approximation can be done. Though the
surface of the detector is flat, I assumed it is a part of a sphere with 10
cm radius around the point source. This resulted in the value of
Ω
4π = 0.0215, i.e. 2.15 % of all emitted photons will reach the detector.
• With the extended source it is not possible to find such a simple
approximation for the solid angle. I decided to develop a Monte Carlo
simulation which uses a simplified model of the geometrical properties.
The geometry was simplified such that the surface of the detector is a
circle20 in front of a quadratic plane in 10 cm distance21 . Using the
assumption that the radioactive particles are distributed randomly on
the plane, the program chooses randomly a point on the plane as well as
a direction of the emitted gamma ray photon22 . I waited for roughly
121.7 million iterations to reduce statistical fluctuations. The result was:
Ω
= 0.03273 ± 2.91185 · 10−5
4π
That means that about 3.3 % of all emitted gamma ray photons reach
the detector.
The measurements cannot provide values for direct comparison. However the
relation between the solid angles of the extended source and the point source
can be calculated as follows:
Efficiency point source
Ωpoint
=
Efficiency extended source
Ωextended
This returns a value of 2.87 ± 0.38 for the two 137 Cs sources in the geometry
inside the lead shield. Based on the value of 0.0215 the effective solid angle of
the extended source would be 2.87 · 0.0215 = 0.0617, i.e. 6.17 % of all emitted
photons will be detected.
This contradicts the results from the calculated values of the solid angles.
0.0215
= 0.66. Considering that the
That calculation would return 0.03273
approximation methods are very crude and the measurements are quite
precise, it is clear that at least one of the calculated values is not accurate.
3.6.4
Solid Angle Relation for the Gävle sampling station
The same calculation was performed on the measurements from Gävle station.
The data of the point source originates from a short calibration measurement.
20 The
depth of the scintillating crystal was not taken in account.
the horizontal and vertical position of the detector were used as additional
parameters.
22 For efficiency purposes this direction is never pointing away from the detector, thus omitting 50 % of the possible directions. To take that in account the result is divided by 2.
21 Additionally
39
CHAPTER 3. MEASUREMENT AND ANALYSIS
It results in a value of 0.88 ± 0.19 which is very different from the laboratory
measurement. Considering the different geometry of the measurement23 , this
is not surprising.
23 Naturally the sources had to be placed outside the air intake. Therefore there is more
metal between source and detector which will lead to more attenuation.
40
Chapter 4
Model for the description of
a point source spectrum
4.1
Overview
After the acquisition of these results the task was to create a function which
approximates the real spectrum of a radioactive source as well as possible.
A suitable function should feature the following properties:
• It should be continuous for the whole energy range.
• Ideally it should also be continuously differentiable. Although this is not
absolutely mandatory, it can avoid false peaks in the remaining spectrum
after the function’s values have been subtracted.
• Generally limx→∞ f (x) = 0 should be valid. More specifically it is
important that the function’s values are negligible for energies which are
higher than the photo peak of the incident photon energy.
• Coefficients should be neither very small nor very large so that the
computer will not exceed the range of usable values and return faulty
results.
To combine all these requirements I decided to design different functions to
represent each feature of the spectrum separately. These functions are added
up then.
The different parts are:
• The photo peak is naturally approximated by Gaussian distribution
functions.
• The basis of the Compton continuum is formed by a reversed logistic
function which is constant over the whole continuum interval and
decreases then to a defined minimum value.
41
CHAPTER 4. MODEL FOR THE DESCRIPTION OF A POINT SOURCE
SPECTRUM
• The backscatter peak is defined using modified Gaussian distribution
functions
Several small corrections and additions have to be made to approximate the
spectra better. These are modifications to the functions above as well as
smaller details like the double escape peak.
The photo peak plays in many ways a special role in the model. In most cases
there are several distinct energies represented in the spectrum. Therefore they
add up, especially in the area of the Compton continuum. The consequence is
that the photo peak is the only feature of the spectrum which can be
approximated by a fit procedure. It is clearly visible and it is possible to give
estimates on the background at its position. Therefore all other parts of the
spectrum have to be calculated in relation to the parameters of the photo
peak. These are in general its position and the total number of counts in the
peak. From that all other positions such as that of the backscatter peak and
the Compton edge can be calculated. The count numbers however cannot be
obtained from that. For this experimental values from the recorded spectra
have to be used to make reasonable estimates.
4.2
Photo peak
As mentioned before the photoelectric effect creates counts at one distinct
energy. This is represented as a statistical distribution around this energy in
the spectrum which can be described by a normal distribution function, which
is generally
−
1
f (x) = √ · e
σ 2π
(x−µ)2
2σ2
2
σ 2 is the variance and determines by that the width of the peak. It is not
constant, but depends on the energy resolution at the peak’s energy. The top
of the peak is at µ so that f (µ) = σ√12π is the maximum. In the example of
figure 4.1 on the next page this is f (0) = 0.3989
Since this part of the function has to be used for a fit procedure, a more
flexible version makes more sense:
f (x) = A · e
−
(x−µ)2
2B 2
2
−
(x−µ)2
2B 2
2
≤ 1, A
A, B and µ then can be fit coefficients1 . Since 0 < e
represents the height of the peak, while B = σ. The latter can be derived
directly from the full width at half maximum (FWHM), which is related to σ
√
by σ = 2FWHM
≈ FWHM
2.35 . This makes it easy to choose initial values for σ, µ
2 ln 2
and A from the shape, position and height of the peak.
1 µ will be usually given so that it can be fixed to the peak’s position as it is returned from
a peak search.
42
CHAPTER 4. MODEL FOR THE DESCRIPTION OF A POINT SOURCE
SPECTRUM
0.4
f(x)
0.35
0.3
0.25
0.2
0.15
0.1
0.05
0
-4
-2
0
2
4
Figure 4.1: Example of a Gaussian function with σ = 1 and µ = 0
All of this however differs in one aspect significantly from the real spectra.
The left end of the peak is elevated due to the multiple Compton events. To
approximate that as well as possible, an approach from [5] was taken.
In this a “double Gaussian” is used for better approximation. This means that
the peak is represented by two Gaussian distribution functions: one for the
area left of the maximum and one for the area right of the maximum. They
will then be used for their corresponding areas and fitted accordingly. The
computer program has to make the transition at the top of the peak then.
This procedure promises to fit the peak more accurately than a single
Gaussian function due to its better flexibility.
4.3
Compton continuum
Without considering the backscatter peak the Compton continuum is generally
a block with a smooth transition to the multiple Compton area height.
Therefore a linear function or a polynomial which is cut off at the Compton
edge could have been suitable. This however would collide with the general
requirements of the function to be continuous.
A suitable approach seemed to be a logistic function as displayed in figure 4.2
43
CHAPTER 4. MODEL FOR THE DESCRIPTION OF A POINT SOURCE
SPECTRUM
1
Logistic function
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
-8
-6
-4
-2
0
2
4
Figure 4.2: Example of a logistic function, here f (x) =
6
1
1+e−x
on the following page. These kinds of functions characterize the integral of a
one-dimensional distribution such as the normal distribution. Furthermore
they represent growth processes in biology - e.g. the growth of a bacteria
population. These models have an initial population and an upper limit which
cannot be exceeded. Therefore the function starts at a low value and increases
exponentially. As it approaches its upper limit, the growth slows down and the
function becomes constant2 .
In the case of the Compton continuum the opposite is the case. It starts at the
maximum and ends at the minimum. Therefore the logistic function had to be
reversed which is simply done by changing the sign of the whole function and
add the maximum value to it.
The final function is then
1
f (x) = G · 1 −
+B
1 + a · e−k·x
G is the upper limit of the function, i.e. the height of the Compton continuum.
2 Actually it never reaches the upper limit, but the difference becomes so small that it is
virtually constant.
44
8
CHAPTER 4. MODEL FOR THE DESCRIPTION OF A POINT SOURCE
SPECTRUM
a and k are coefficients which are calculated by two predefined points. This
predefined points were the position of the Compton edge and a point in the
multiple Compton area.
B is the height of the multiple Compton area.
4.3.1
Determination of parameters G and B
G was calculated using the extracted heights of the height of the spectrum in
the Compton continuum (NContinuum ) and the multiple Compton area B.
G was then defined:
G = NContinuum − B
The values come directly from the spectra of isotopes where the Compton
continuum and the Compton edge are clearly visible3 .
These levels have to be calculated out of a value which has a fixed relation to
the number of incident photons. The height of the photo peak would be
unsuitable as it depends on the energy resolution. Among the available data in
the reduction process the only suitable parameter is the number of counts in
the photo peak.
Thus two functions were defined in the program which return a factor to
convert the number of counts in the photo peak into the levels NContinuum and
B. As there are only two data points available to create such a function, they
are connected by a linear relation.
4.3.2
Determination of parameters a and k
A third function of this kind was defined for the height of the spectrum at the
Compton edge in relation to the count number (NEdge ).
Two levels were defined:
b1 =
NEdge − B
NContinuum
and
1
(4.1)
G
Both define fractions of the function in relation to its maximum value (i.e. the
continuum). b1 defines the fraction at the Compton edge, b2 the fraction at
1
xEdge . The one in G
is chosen arbitrarily and represents the number of counts
at xEdge . Ideally zero would have been chosen, but that would cause a division
by zero when calculating k. Since G 6= 0 in equation 4.1, it is necessary to give
a reasonably low value which shall be reached at xEdge . Since we are operating
with natural numbers, I decided to use the lowest natural number, i.e. one.
Out of this k and a can be determined by:
b2 =
3 These
are
88 Y
and
137 Cs.
45
CHAPTER 4. MODEL FOR THE DESCRIPTION OF A POINT SOURCE
SPECTRUM
k=
b1 (1−b2 )
ln (1−b
2 )b2
−xEdge + xMultiple Compton
a=
4.4
b1
1
· −kxEdge
1 − b1 e
Backscatter peak
As mentioned before the prediction of the backscatter peak’s shape is very
difficult due to its dependence on source geometry and the properties of the
surroundings. Furthermore it is also dependent on the source energy.
Because of this the approximation to the real shape can only be done with very
rough estimates. The only natural parameter is the position of the peak’s top.
Since the shape resembles the movement of an overdamped oscillator, I took
this approach first. Unfortunately it did not lead to usable results.
Finally I decided for a double Gaussian as with the photo peak. Because no fit
can be done in this case, the following parametrization was used:
• The position of the peak can be calculated out of the photo peak
position.
• The second parameter is the peak height. The value depends on the
photo peak energy and is determined by an approximation function like
the ones used for the Compton continuum height. Since the only usable
results are from the isotopes 137 Cs and 88 Y, this is a linear function.
• The third parameter is the one defining the shape of the peak. Since we
are using two different Gaussian functions, these are calculated
differently:
– As the left part of the function is of less importance, I decided for a
very simple approximation: the function shall be shaped in a way
that it returns a value of 1 count for the position where it vanishes
in the spectrum of of 137 Cs. There the peak itself is at ≈ 210 keV
and the peak vanishes to the left at ≈ 150 keV. From these I
designed the function so that this position is always 75 % of the
backscatter peak energy. This returned the parameter:
− 1 · xBackscatter
a= q 4
1
−2 · ln Nbackscatter
– The right part is more difficult to determine because it affects a
large interval in the spectrum. Furthermore it should resemble the
backscatter peak of the extended source as much as possible. For
test purposes however the difference to the point source spectra
46
CHAPTER 4. MODEL FOR THE DESCRIPTION OF A POINT SOURCE
SPECTRUM
should not be so large that it performs on an acceptable level when
reducing such a spectrum.
When looking at the spectra of 88 Y and 60 Co one can see that the
backscatter peaks drop equally quickly independent of the energy of
the gamma radiation. This indicates that the geometry has more
influence on the peak’s shape than the energy of the incident
photons. Therefore it seemed reasonable to define an energy xZero
at which the backscatter peak has droppped to an insignificant
level. This parameter has to be defined empirically then.
This yields
xZero − xBackscatter
a= q
1
−2 · ln Nbackscatter
The two function parts are connected at the top of the peak.
4.5
Further minor corrections
The function can be used for the approximation of a 137 Cs spectrum. However
in other spectra there are some differences to this model which should be taken
into consideration to reduce the differences between emulation and reality.
4.5.1
Connection between Multiple Compton area and
photo peak
Since we considered the multiple Compton area to be non-negligible in the
construction of the logistic function, we have added a constant to it. The
drawback of this is that this function does not vanish. It will affect the height
of the photo peak and higher energy areas.
To solve this problem some construction like another logistic function could
have been used to make this small constant vanish with higher energies.
However it was important to me to avoid functions which are too complicated especially as this is a minor difference which could cause further complications
in the development of the programming solution. Therefore I decided to use
an approach which is rather unelegant and mathematically not entirely
correct, but can be included easily in programming: I simply compared the
values of the photo peak and the logistic function. Whichever returned the
higher value was chosen as the simulated response function for this energy.
To correct the mathematics it would be possible to define the logistic function
and the photo peak function only in certain boundaries. Since the calculations
of these would be rather tedious and of no further use in programming I did
without them - after all one of the preconditions for the different function
parts was that they are defined over the whole interval. In either case it is
inevitable that the function cannot be differentiated at the point of the
transition between the two functions. The only disadvantage could be that this
47
CHAPTER 4. MODEL FOR THE DESCRIPTION OF A POINT SOURCE
SPECTRUM
sudden change in steepnees may lead to the creation of a small peak. Since the
values at this point are very small it is safe to say that this effect is negligible.
The values of the logistic function are ignored for any energy above the photo
peak energy which solves any further problems in higher energy regions.
4.5.2
Bending of the Compton continuum
The logistic function provides a good approximation of the Compton Edge and
the multiple Compton area. However the continuum itself is virtually flat.
That describes the spectrum of 137 Cs quite good, but a closer look at the
spectra of 88 Y and 60 Co indicates that this is not true for all energies. Both
appear slightly raised at both ends, although it is difficult to observe it at the
lower end.
This can be explained by the cross-section of Compton scattering. It is
determined by the Klein-Nishina formula:
dσ
= 0.5re2 P (Eγ ,θ) − P (Eγ ,θ)2 sin θ2 + P (Eγ ,θ)3
dΩ
where Ω is the solid angle, P (Eγ ,θ) is the ratio of photon energy before and
after the collision, θ is the scattering angle and re is the classical electron
radius. Integration of this expression over the relevant solid angles returns a
bended shape of the Compton continuum4
The 88 Y spectrum shows that the shape is similar to a second degree
polynomial. I chose to use this as a model for the shape and simply multiply
the logistic function with a factor of the kind f (x) = a · x2 + b · x + c. This
however has to be modified to fit our purposes.
The modified version of this function is:
f (x) = 1 + a · (x − x0 )2 + b · (x − x0 )
This is based on the following:
• The function shall never lower the Compton continuum. Therefore the
minimum of the function has to be 1. Hence the constant 1 is added.
• The position of the minimum should be in the centre of the Compton
continuum, i.e. at the position exactly halfway from zero to the
Compton edge. To keep the function simple I moved the minimum on
the x-axis by replacing x with x − x0 . x0 is then the centre of the
Compton continuum.
• The increase at the right end differs with the gamma ray energy. While
the right end is raised by only 10 % in the 137 Cs spectrum (661.657
keV), the right end of the Compton continuum belonging to the 1836
keV peak of the 88 Y spectrum is elevated by about 70 %. Naturally a
linear interpolation of these values would not be sufficient for use on
4 This
can also be seen in the schematical spectrum in figure 2.6 on page 19.
48
CHAPTER 4. MODEL FOR THE DESCRIPTION OF A POINT SOURCE
SPECTRUM
other energies as a linear function could result in a negative raise for
some values. Instead I used a second degree polynomial for that which
returns a raise of zero for zero energy. I defined the elevation then as
qr (661.657keV) = 0.1 and qr (1836keV) = 0.7 for the right side of the
Compton continuum as well as ql = q2r .
• The left end of the Compton continuum appears to be lower than the
right end. I decided to assume that the left end is elevated only half as
much as the right end.
The coefficients are determined as follows:
a=
b=
qr · ( 12 − x0 )
ql − (qr · x0 )
=
3
−2x0
−2x30
−2 · x20 · ql + qr ( 12 − x0 )
ql − a · x20
=
−x0
2x30
As this function is just a factor for the logistic function and hence a part of it,
all the modifications described in the section before apply here as well and
solve any issues which could arise of the function’s behaviour at higher energy
values. The multiple Compton area is also affected but the difference is
negligible.
4.5.3
Effects of Pair production
The effects of pair production are small, but visible. Thus it seemed
reasonable to include them in the simulation.
While the positions are known, neither the peaks’ shape nor the peaks’ height
can be determined easily.
Therefore simple approximations were made for these two properties.
The peaks’ shapes depend on the energy resolution. The 1836 keV peak of 88 Y
had a FWHM of 80.5 channels, while the 137 Cs peak at 661.657 keV had a
FWHM of only 48.15 channels. From the measurements FWHM values for
numerous peaks were available. Therefore these values were used for an
approximation which would give the relation between the channel and the
FWHM. I fitted a linear function to the available values. This was used to give
an estimate of the FWHM at a given channel.
The peak height was also done using a linear expolation of values acquired
from the different spectra.
49
Chapter 5
Programming solution
The next step was to put the described model into action. This included
several issues to be solved.
First of all a programming language and a development environment had to be
chosen. Subsequently the program had to be written in a way that it could be
used for different spectra without too many adjustments. Since this included
at least theoretically the use of spectra which were not taken under laboratory
conditions it was also necessary to make the procedure fail-safe so that
unexpected values would not result in a premature termination of the program.
Last but not least a way to transfer data had to be found. This included both
the import of the spectra as well as the output of the results. The latter should
also include additional information about how the spectrum was reduced.
5.1
Programming environment
Apart from the choice of a programming language it was important to find
additional tools which would make the task of developing a programming
solution of the model easier.
A suitable environment for the development should be able to handle the 1024
channels of the detector results in a way that is both efficient and easy to use.
Furthermore fit procedures and functions should be available and easy to use
as well.
ROOT, a software package developed CERN1 , seemed to be suitable. It is
object-oriented which makes it easy to include certain functions in otherwise
unrelated code. The following classes were used:
• TH1: a histogram class which can be used as a data container for the
1024 values (i.e. the channels) of a spectrum
• TF1: a class for mathematical functions which includes fit procedures
1 see
http://root.cern.ch for further information
50
CHAPTER 5. PROGRAMMING SOLUTION
• TSpectrum: a class which includes a peak search routine
I tried some other classes but abandoned them eventually. Since I had in mind
that such a program should run later on an unattended computer I assumed a
graphical output would not be of high importance. Therefore I kept the
output simple by using a text file. Later I used the plotting program GNUPLOT
for visualization.
ROOT comes with the integrated C++ command-line interpreter CINT. As there
was no immediate need to compile binaries, I used C++ like a scripting
language. The Windows-version of ROOT was used.
ROOT displays histograms by standard graphically. Although this was not of
importance for the output I created, it was of some help to have a first look at
the final reduction.
5.2
Structure
Since a working solution had a higher priority to me than elegant
programming code, I refrained from planning a sophisticated structure in the
early development stage to get a working version first. Like in many
programming projects this resulted in a working but less flexible code. Despite
being in C++, my program is generally not object-oriented. However it makes
use of many object-oriented language features.
The program itself has three major parts:
• Some help functions which are used in the remove process
• The function removePeak which removes the entire spectrum for a
certain incident photon energy. It takes as parameters the position of the
photo peak (i.e. the channel corresponding to the energy), a pointer to
the histogram it shall work with, the lowest channel which is to be
considered, the name of the file in which it shall dump its output and
optionally a boolean value which turns on the background approximation
procedure2 .
• The main routine which displays a row of analysis options. All these
options are predefined, hence the program is no fully-fledged application
for immediate use on arbitrary spectra. There are generally three
different categories of options:
1. For several isotopes there are preadjusted routines which call
removePeak for the known energies and stops then. Thus it simply
removes all important energy peaks of the spectra taken in the
laboratory. These are good tests to see how well the simulation fits
to the real spectra.
2 If
this argument is not given, the background approximation procedure is turned off
51
CHAPTER 5. PROGRAMMING SOLUTION
2. For several other isotopes it is possible to run an automatic
reduction of the spectrum. The peak search of TSpectrum is used
to find peaks and runs then removePeak. It stops when there are no
further suitable peaks found.
3. Measurements in the Kista station of one hour length can be
reduced by the same procedure. There are two different ones - one
with a 60 Co attached outside the filter and one with just the filter.
In general the program is working preferably with channels instead of energies.
This is more convenient because the values of a certain channel are assigned to
one of 1024 so-called bins in the histogram class. Both the content of the bin
and the bin’s address are integer values. This makes it more easier to run
through all values in the histogram with a simple loop. Using the float values
of the energy calibration would make that significantly more difficult. Apart
from that it is also a very accurate depiction of the real process we are dealing
with: the digital counter behind the photo multiplier tube sorts the signals
into 1024 different channels. Both counts and channels are integers.
There are also physical aspects to that. The statistical distribution represented
in the photo peak and other parts of the spectrum is not the representation of
a statistical distribution of gamma ray photons over the energy. It is instead
the statistical error of the measuring device. Thus the photo peak is
symmetric when it is shown as a function of the channel, but not after the
conversion to energies. Therefore it makes sense to apply the mathematical
model to a channel-count-histogram instead of a energy-count-histogram.
However for most cases this difference is rather small as the energy calibration
is almost a linear relation.
On many occasions, e.g. the calculation of the Compton edge positions, the
energy value is needed. For this I have written conversion functions which use
the energy calibration.
At some points of the programming code it is stated that the histogram
contains 1025 channels, not 1024 channels. The reason for that lies in the
convention of C++ that integers are starting at the value zero. The channel
numbers however range from 1 to 1024. To avoid conversion steps as a
potential source for errors, I reserved 1025 channels in the histogram, thus
counting from 0 to 1024. Bin zero was left empty. In all operations the
channel number was then identical to the index number of the bin.
It has to be mentioned that the program does not calculate the activities of
the source. One reason for this is that the activity can only be calculated if
the source is identified. This would require a library of all relevant energies as
well as a very exact energy calibration. The latter may be possible in the
laboratory, but in the station temperature differences between summer and
winter will make the calibration unusable3 . Furthermore the efficiency
measurement results have shown that efficiency depends on the geometry.
3 see [4, Fig.4]; the results there indicate a difference of at least 10% between freezing
temperature and room temperature.
52
CHAPTER 5. PROGRAMMING SOLUTION
Therefore an estimate of the activity by the program may lead to wrong
results.
5.2.1
Help functions
This part includes a lot of functions which are used several times later. Most
of these functions are the linear interpolations mentioned at several points in
the previous chapter.
In detail these functions are:
• floatToStr: this converts a variable of the type float to a variable of
type string. This is used to produce different names for the output files
when the automatic peak search is used. The names are then based on
the float value of the channel where the peak was found.
• kevtochannel: converts a given energy to the corresponding channel.
• channeltokev: converts a given channel to the corresponding energy.
• fwhmfromchannel: as mentioned in the section about the minor
corrections of the escape peaks this is a linear approximation of the
FWHM in relation to the channel. The internal linear functions however
returns the FWHM in the unit keV. It is converted back to channels for
the output.
• photoefficiency and photoefficiencyint: functions which relate the
channel to the percentage of the counts which end up in the photo peak.
I hoped that I could conclude the number of counts which would end up
in the Compton continuum. Unfortunately this was not very useful so
that I scrapped it later. This approach however would be a more physical
approach to determine the shares of photoelectric effect and Compton
effect for a given energy. For that I decided to keep it for later use.
• comptonrelativeheight: this was the function I came up with instead.
It is a fit using a third degree polynomial based on the values of the
three spectra usable for such purposes4 . It gives out the height of the
Compton continuum in relation to the integrated photo peak. The
argument of the function is the position of the photo peak.
• multiplecomptonrelativeheight: the corresponding function for the
height of the multiple Compton area5.
• comptonedgerelativeheight: The same for the height of the spectrum
at the position of the Compton edge
4 as
mentioned before, these are 60 Co, 88 Y and 137 Cs
area is only clearly visible in the spectra of 137 Cs and
linear relation is used.
5 This
53
88 Y
(higher peak) so that a
CHAPTER 5. PROGRAMMING SOLUTION
• sigmafromchannel: a help function calculating the σ-value for a
Gaussian function using the FWHM values calculated in
fwhmfromchannel.
• comptonedgepos: calculates the position of the Compton edge for a
given photo peak position
Almost all of these functions work with channels as output and input. This
has proven to be very convenient when using the laboratory results because I
used the same calibration throughout my work. Unfortunately this is much
less convenient when using results from other detectors. As this applies only
for a few cases in this work I decided to keep it as it is. For a further
generalization and more flexibility however it would be advisable to readjust
these functions to work with energies instead of channels.
5.2.2
The function removePeak
The function is divided in different parts which will be presented in the
following subsections. The function is very “verbose”, i.e. it displays many of
the calculated values. Additionally the functions of ROOT write text in the
output, making it easier to follow the calculation process.
Arguments
The function removePeak takes the following arguments:
• p is the position of the peak in channels - the value of that is determined
in the main routine. It is a double value to give an exact position of the
peak.
• c is a pointer to the histogram of type TH1I on which the function will
act. This data type is a histogram for integer values, i.e. every channel
(or bin) contains an integer value. I decided to use that because we are
dealing generally with countable events. Though the mathematical
model will often return float values, it makes little sense to keep these.
To name one example, the logistic function will never reach its upper
boundary in the Compton continuum though it does in reality. By
rounding it up the values will reach the upper boundary as it is
represented in the real spectra. Apart from that the differences by
rounding are very small compared to the absolute value. Another idea
would have been to replace a rounding algorithm by an algorithm which
uses a random value generator for the interpretation of the mathematical
model values. A value of 10.1 from the mathematical model would then
by interpreted as 10 with a likeliness of 90 % and as 11 with a likeliness
of 10 %. I refrained from using such an approach as it would slow down
the calculation without any real gain in the application of the model.
54
CHAPTER 5. PROGRAMMING SOLUTION
• minchannel sets the lowest channel which shall be used in the reduction.
All lower channels will be neglected. This addition was integrated for the
case it would make sense to exclude some channels from the reduction.
However this is fixed in the main routine and used as a constant.
• outfile is the name for the text file into which the data sets of the
reduced spectrum shall be written.
• backgroundappr tells the function if a background approximation shall
be attempted under every peak. While this was mostly not necessary
with the laboratory measurements6 , it was necessary with spectra from
the station and the automatic peak search7 . For them the background
approximation was activated. It is an optional argument. By default it is
turned off.
Calculation of characteristic positions
Since they are needed throughout the function, some important positions are
calculated:
• the exact position of the peak and its rounded version (comes from the
function argument)
• the position of the Compton edge (using equation 2.1)
• the position of the backscatter peak (using equation 3.1)
Furthermore the height of the peak at its top is obtained. This is an important
parameter for the fit procedure. After the fit a numerical integration of the
peak will be done to obtain the number of counts in the peak.
Fit procedure
The fit procedure of ROOT is using the conventional least square fit method. It
is quite reliable for approximations of linear functions, but with all more
sophisticated functions it often returns useless values as it converges at wrong
points or does not converge at all.
Therefore it is necessary to start with values which are presumably quite close
to the optimal value. This makes it less likely that the fit procedure will return
useless values. For a good estimate of σ in the Gaussian functions the program
tries to find a value for the FWHM which is directly related to σ. This is done
by starting from the top both to the left and right simultaneously. As soon as
one of the to the points has reached half of the top value, it is stopped. Out of
that an estimate of the FWHM is calculated. The FWHM is converted to the
corresponding σ and set as a starting value for the fit procedure.
6 The
background under the peak was negligible here as long as the highest peaks were
reduced first.
7 Some peaks might be missed in a first search so that it cannot be guaranteed that the
high energies were reduced first
55
CHAPTER 5. PROGRAMMING SOLUTION
Now all three parameters8 are available for the fit of the Gaussian function.
To increase the reliability of the whole procedure a feature of ROOT is used.
The TF1-class allows to give boundaries for all variables which may not be
exceeded. This is a powerful feature since we can assume that the starting
values are quite close to the optimal values. By limiting these variables to an
interval it is very unlikely that the result is useless even if the fit procedure
does not converge. So the main purpose to run the fit procedure is to find a
suitable σ-value which gives the Gaussian function a shape which is quite close
to the real spectrum. I chose the parameters as follows:
• The peak height may be changed in a rather large interval of ± 50 % of
the assumed value
• The position of the peak’s top is fixed to the assumed position ± 1
channel
• σ may also be changed in an interval of ± 50 %
None of these boundaries were chosen on a basis of physical or mathematical
arguments. They simply proved to be quite reliable.
Before the fit starts another important calculation is performed. It is the
determination of the left and the right end of the peak, i.e. is the point when
the curve of the histogram is already so flat that it cannot be counted as part
of the peak anymore.
This is done by an improvised derivative calculated using the following model:
f (i + 2) − f (i − 2)
∆f (i)
=
∆x
4
which calculates the slope at channel i. The interval of 4 is chosen arbitrarily
as a compromise between resolution and reliability. A calculation using only
the neighbouring channel would be less reliable as the histogram will not be
entirely smooth in reality. An interval which is too wide would lead to
unreasonably wide peak widths.
The idea of the procedure is that the end of the peak is reached as soon as the
absolute value of the derivative falls under a certain threshold. This threshold
is set as a percentage of the absolute derivative of the steepest point.
Unlike the FWHM calculation this procedure goes to the left and right
separately. When it goes to the left, it saves the highest slope values it
calculates (i.e. the steepest point of the peak on the left side). To have a
reasonable start value this highest slope value is obtained from the left FWHM
position first. It runs as long as the current slope is higher than 5 % of this
maximum slope. The value of 5 % is also chosen arbitrarily9. At the point
8 These
are peak height A, peak position µ and σ
is a “safe” value since a smaller value might be too risky when peaks are close
together so that the slope does not return to zero at all. In spectra taken in the laboratory
this returns often too small peak widths. One may argue that this jeopardizes the whole
approach of relating the Compton continuum’s height to the sum of counts under the peak.
This is not the case as there are very few counts in the corners of the peak. Thus the effects
are rather small.
9 This
56
CHAPTER 5. PROGRAMMING SOLUTION
where the slope falls under this percentage the loop stops and marks that
point as left end of the peak. An analogue procedure is done for the right side
of the peak, then with reversed signs.
This calculation is also important for the background approximation. With
the knowledge that MAESTRO, the program which was used for the acquistion of
data, is using a similar method, I used this approximation: a straight line from
the left to the right end of the peak is drawn. All counts above this line are
assumed to be part of the peak, all counts below it are assumed to be
background10.
In the program this is included as an addition of type f (x) = a · x + b to the
Gaussian function.
Now the fit is performed. For that two TF1-classes are initiated - one for the
left part of the peak and one for the right part. They are completely separate
within their respective boundaries.
After the fit procedure the two parameters a and b of the background function
are set to zero so that they do not interfere with any further calculations.
From the fitting results it is also possible to readjust the values for the
boundaries of the peak. This is also done.
Calculation of Parameters
Before the reduction itself can be performed several parameters have to be
calculated:
• A numerical integration of the peak is done by running through the
whole spectrum with a loop using the Gaussian functionw. The result is
the number of counts in the photo peak.
• The calculation of the Compton continuum’s height using the help
function.
• Unlike most of the other calculations the estimate of the backscatter
peak’s height is done without a help function and performed directly in
the removePeak-function.
• The Compton continuum’s parameter is calculated then according to the
description in chapter 4.3. Unfortunately the procedure has several traps
which may cause an abort of program execution. The calculation of the
parameters k and a includes logarithms and divisions. Since we are
dealing with unknown values, it may happen that a division by zero or a
logarithm with argument zero occurrs. This can occur when the peaks
are very small which results in even smaller values for the Compton
continuum and the multiple Compton area. Therefore it is required that
G and the level in the multiple Compton area is larger than zero.
Furthermore the relative levels used in the logistic function must be
larger than zero and smaller than one. A last backup is that the position
10 This
is only applied when background approximation is turned on.
57
CHAPTER 5. PROGRAMMING SOLUTION
of the Compton edge and the point in the middle of the Compton edge
and the photo peak may be equal. This however can hardly occur for
reasons explained in the description of the main routine. If the
calculated values for the Compton continuum level or the multiple
Compton area level do not fulfil these conditions, a flag11 is set that no
reduction of the Compton continuum shall be conducted. This solution
has grown out of necessity as the peak search algorithm often returns
peaks which are very small. Although it does not make sense to reduce
such small peaks, the function removePeak should be fail-safe even for
these cases. The reduction of the peak itself makes sense in this scenario
as otherwise no change would happen at all and the peak search
algorithm may end up in an infite loop.
• The modification function for the bending of the Compton continuum is
prepared.
• The two Gaussian functions for the backscatter peak are prepared.
There is also a flag which indicates if the peak shall be considered at all.
The condition here is that the peak height has to be larger than 1. This
is also to make sure that the logarithms used there never receive a
negative argument. The point for the zero-level of this peak was set to
290 keV, based on observations of the 137 Cs, 88 Y and 60 Co spectra.
• The escape peaks are prepared - both are assumed to be of the same
height and shape. Here also the creation of a help function has been
spared and the height of the peak is estimated using a linear function.
This relates the height of this peak to the height of the photo peak. If
the energy of the photo peak position is too low, the height will be
automatically set to zero.
Finally the protocol file is opened so that it can be filled with information
during the reduction.
Loop for reduction
Now that all needed values are defined, the reduction can be performed. This
is done by a loop which runs from 1 to 1024.
All parts of the function are considered separately first, i.e. the result of the
function at the position is saved in a variable. At the end of the loop the sum
of all function parts is subtracted from the value of the bin.
For every round of the loop the following steps are conducted:
• The value of the photo peak is calculated. The value for the peak’s top is
calculated as the mean value of the left Gaussian function and the right
Gaussian function. This makes a smooth transition likely, but does not
11 This word is used here in the meaning of a value which is a boolean indicator, like e.g.
the user rights of a file in a Unix system.
58
CHAPTER 5. PROGRAMMING SOLUTION
guarantee it. I first considered to guarantee a smooth transition by
combining the two functions in a way so that the right part slowly takes
over and the left part decreases when going from left to right. This
however would have made the fitting of two separate Gaussian functions
for best approximation meaningless.
• The Compton continuum’s value is calculated next. There are three
conditions that the logistic function is used here.
1. The value of the logistic function modified by the polynomial for
the bending has to be larger than the Gaussian function for the left
side of the peak.
2. The bin number has to be smaller than the peak’s position. This is
to avoid that the logistic function will be applied again when the
Gaussian function falls under the multiple Compton area level.
3. The logistic function is not deactivated with the flag.
If all three conditions apply the logistic function with the polynomial
factor is applied. To avoid that the Gaussian function and the logistic
function add up, the logistic function is set to zero. If one of the
conditions is not given, the logistic function cannot be applied and its
value is set to be zero.
• The backscatter peak is reduced in the same way as the photo peak. The
peak’s top is set to be the mean value of the Gaussian functions.
• The escape peaks are only reduced if the energy value of the photo
peak’s position is larger than 1022 keV. No further conditions or
modifications are applied.
Finally the current bin’s value is reduced by the previously calculated values.
After the whole process a data file is written which contains the values of all
the function’s parts as well as the initial value of the spectrum and its
remainder after the reduction. Every line of the file contains the values for one
bin, separated by tabulators. The order of the values is
1. Channel number
2. Corresponding Energy
3. Initial value
4. Gaussian functions for the photo peak
5. Background approximation function
6. Logistic function
7. Backscatter peak functions
59
CHAPTER 5. PROGRAMMING SOLUTION
8. Single escape peak
9. Double escape peak
10. The modelled response function combined
11. Remainder
This can be visualized later with the program GNUPLOT.
It has to be mentioned that the reduction process may return negative values
for the bins. Although this might seem unlogical first, it is an absolute
necessity. Since the mathematical model is only an approximation, it may
return values larger than the ones of the real spectrum, thus leading to an
overdampening of the measurement results. In total however it counts only
how close the model is to the reality. To require the model to be permanently
less or equal the real values would not lead to a good model as it will in most
cases reduce less than there is actually in the spectrum.
Another aspect in this context is that negative values may seem undesirable
first. In early approaches I set all negative values to zero - this however makes
it impossible to judge if the mathematical model is accurate. Channels which
are reduced by too large values would seem perfectly flat.
During the run of the loop three sums are created:
1. the sum of all the initial values of the channels, i.e. the counts in the
whole spectrum before the reduction
2. the sum of all the remaining values of the channels, i.e. the counts in the
whole spectrum after the reduction
3. the sum of the absolute differences between the value before the
reduction and after the reduction
The sum of the differences divided by the sum of initial values returns then an
estimate how good the dampening is.
5.2.3
The main routine
The main routine starts with the initialization of ROOT and the histogram. As
general constants the minimum channel and the total number of channels are
set.
A primitive text menu lets the user choose which data file shall be used for the
further analysis.
Then this data file is opened and read by a loop. It has to be mentioned that
the standard file type of MAESTRO is a binary file. Therefore I used the ASCII
file type of the program which contains also all necessary additional
information. To keep the input procedure simple, I prepocessed the files such
that the resulting text file contains in each line the channel number and the
number of counts separated by tabulators. The additional information is
removed.
60
CHAPTER 5. PROGRAMMING SOLUTION
The read procedure sets the corresponding bins in the histogram. Channels
lower than the minimum channel will be set to zero automatically.
Then the further acitivity is forked into one of two options:
• If already defined peaks shall be used12 , the remove function is called
with the channel of the peak’s top as parameter. All the values are
predefined.
• A peak search using the TSpectrum class is applied. This offers only one
option to steer the search: a value for σ can be given. The larger this
value is, the wider a peak has to be to qualify as such. As it is not
desirable that small fluctuations are detected as peaks it is important
that this parameter is not chosen too small. On the other hand it should
be avoided that significant peaks are missed. It is also possible to not
use this option at all. The latter performed well with all the laboratory
spectra since all peaks there are wide enough. With the results of the
station this was unfortunately not possible. A value of 1.7 worked quite
well in these cases.
The list of peaks is sorted by energy. Then all peaks are reduced starting
from the highest energy. To let the procedure run without further checks
of the found peaks would be very risky as no reduction will be perfect. A
reduction process will leave some remaining counts which may be
misinterpreted as a peak as soon as the general level of counts is small
enough. In extreme cases the remove function will be called when the
level is below zero. This will lead to useless results. Therefore it is
necessary to set some rules for suitable peaks. All peaks which are below
zero level are dropped. One might argue that a higher level could be set
as there will be no useable peaks at low levels. However it is difficult to
set such a threshold as generally low levels may cause important peaks
to be missed by the procedure. Another condition for a suitable peak is
to set a threshold for the peak’s energy. I decided to exclude at least the
X-ray energies so that a minimum energy of 100 keV is required.
Another, more safer option would be to set it to half the electron energy,
i.e. 256.5 keV. After all peaks are reduced, the procedure starts anew
and the peak search is run again. This is repeated until no further
suitable peaks are found. For every reduction process a new output file is
created. The filename includes the channel position.
At the end of all reductions a short report is displayed. It includes the
positions of all reduced peaks and the counts in the corresponding photo peak.
Furthermore it compares the initial spectrum to the final spectrum. By that
an estimate is made how much of the spectrum was reduced.
12 see
listing in section 3
61
CHAPTER 5. PROGRAMMING SOLUTION
45000
Simulated response function
40000
35000
Counts
30000
25000
20000
15000
10000
5000
0
0
50
100
150
Channel
200
250
300
Figure 5.1: Example of a simulated response function (661.657 keV peak of
137
Cs)
50000
Simulated response function
45000
40000
35000
Counts
30000
25000
20000
15000
10000
5000
0
0
100
200
300
400
Channel
500
600
700
Figure 5.2: Example of a simulated response function (1836.06 keV peak of 88 Y)
62
Chapter 6
Test Run Results
Finally the program is tested on the data acquired in the laboratory.
The point source spectra serve as primary tests as they are well known and
virtually without any background. Additionally, the extended source spectrum
is tested to determine to what extent the reduction procedure is suitable for
that.
Finally some data from Kista station was tested.
6.1
6.1.1
Laboratory spectra without Automatic
Peak Search
137
Cs Point Source Histogram
The standard test which I used for the whole model was a point source of
137
Cs. One may argue that the extended source would have given a more
realistic modelling since it has a similar geometry as the filter in the station.
However my primary goal was to make a proof of concept - for this it was
necessary that different isotopes could be tested. A single sample could hardly
have served for this purpose.
Therefore the reduction of this spectrum was used for the first testing rounds.
After that other samples were tested.
The results of the test run can be seen in the figures 6.1 on page 66 and 6.2 on
page 66. The only value set is 262.75 as the channel of the peak’s top. This is
the value which returned the best fits.
When running the program on this sample, the Gaussian function for the left
side of the peak converges but the one for the right side does not. The resulting
values however reach an overall reduction of 95.50 %.1 This value results from
a comparison of the sums of the absolute values of all channels. This sum
1 As with all dampening values this depends heavily on the exact details of the procedure used. With other starting parameters for the fitting procedure the results can differ
significantly. In some cases I was able to reach about 95.8 %.
63
CHAPTER 6. TEST RUN RESULTS
Peak
Position
262.75
262.75
689
351
510
450
243.5
144.5
121.5
100.5
78.5
146.5
124.5
291.5
Photo
peak
counts
Photo peak
Initial
Remaining
counts
Sum
Sum
(MAESTRO)
137
Cs point source
868417
842514
2053602
92329
137
Cs extended source
1365110
1336512
3577017
471020
88
Y point source
1398450
1547493
18414619
10560751
3212110
3035432
10560751
1379834
Total Dampening
60
Co point source
224483
201850
1844171
863894
242895
211993
863894
145870
Total Dampening
226
Ra point source (Automatic peak search)
33492800
33854074
439068260 364954930
42394500
48376240
364954930 299157735
24829200
22061879
299157735 263912101
14842900
263912101 244575786
6537360
244575786 236747193
Total Dampening
133
Ba point source (Automatic peak search)
1346600
1244830
5134771
3007703
548893
3007703
2308179
Total Dampening
137
Cs extended source in Kista station
453364
18472424
17178385
Dampening
[%]
95.504
86.832
42.6502
86.9343
92.5069
53.1701
83.1148
92.0927
16.8797
18.0289
11.7816
7.3268
3.20089
46.0796
41.4248
23.2577
55.0481
7.00525
Table 6.1: Overview Test Run Results
represents the difference between the spectrum and a perfect zero-level. Thus
a comparison of these values before and after one reduction process determines
how much could be reduced. Therefore 95.50 % means that the sum after the
reduction is only 4.50 % of the sum before the reduction. The use of absolute
values is necessary as a reduction process may return negative count values.
Otherwise the calculation could return a reduction of more than 100 %.
As the value 95.50 % and the figure 6.2 on page 66 suggest, there is little left
of the initial spectrum. When looking in detail at the figure 6.2 on page 66,
one can see that the left part of the peak is reduced too much and the right
part too little. One possible reason for that is the multiple Compton area left
of the peak which biases the peak a bit. This may tilt the peak somewhat to
the right. Another reason is that fitting procedures do not necessarily return
64
CHAPTER 6. TEST RUN RESULTS
the best values. In this they return a reasonable but imperfect approximation.
The differences are almost symmetric. When summing up over the whole peak
area, the result is just about 2,000 counts, compared to 868,000 counts before
the reduction. A better indicator for the quality is the sum of the absolute
values, i.e. the total difference to a perfect reduction. This sum is 45,000
which corresponds to 5.2 % of the initial 868,000 counts, thus giving a 94.8 %
reduction. This is considerably more than the statistical uncertainty, and some
channels are only reduced by about 83 %. Therefore it can be concluded that
the overall performance of the photo peak reduction is in line with the other
parts of the reduction, but its precision varies considerably over the photo
peak energy interval.
The only other area which differs from zero level after the reduction is the
backscatter peak. Obviously the model does not completely match the real
shape here.
All things considered the results are still satisfactory. Large parts of the
histogram are reduced from a solid count number to an insignificant
background noise.
6.1.2
137
Cs Extended Source Histogram
For the second test run a 137 Cs extended source was used. As described in
section 3.3, the overall shape of this source’s spectrum is somewhat different to
the point source. The backscatter peak and the Compton continuum are
slightly higher, which is displayed in figure 6.3 on page 67.
While the model approximates the right end of the compton continuum as well
as the photo peak very well, it fails with the backscatter peak and its
surroundings. This does not necessarily mean that the model is not able to
approximate the histogram of this extended source at all. A modification of
the parameters giving the height of the backscatter peak could deal with this.
It would have been possible to add another argument to separate extended
from point sources, but the height of the backscatter peak is not constant,
hence an estimate only based on one data pair would have been hardly
sufficient for other cases. Therefore I focused on the point sources.
Considering the general conditions, the reduction result of 87.4 % seems still
acceptable.
6.1.3
88
Y Source Histogram
To test the usefulness of the approximation the next question is if the
approximation is good enough to properly reduce a spectrum with two
energies present. In the optimal case the spectrum will look like the shape of a
single energy spectrum after one reduction.
Therefore, I made a test run on the histogram of 88 Y. It resulted in a
reduction of 92.5 %.
To illustrate the process, figure 6.4 on page 69 shows the first reduction
process which dampened the 1836 keV peak. Figure 6.5 on page 69 then shows
65
CHAPTER 6. TEST RUN RESULTS
50000
Photo Peak
Logistic
Backscatter Peak
Simulated Response Function
45000
40000
35000
Counts
30000
25000
20000
15000
10000
5000
0
0
50
100
150
200
Channel
250
300
350
Figure 6.1: Contributing functions and total sum of test run on
400
137
Cs
50000
Initial
Remainder
45000
40000
35000
Counts
30000
25000
20000
15000
10000
5000
0
-5000
0
50
100
150
200
250
300
350
Channel
Figure 6.2: Spectrum of
137
Cs point source and remainder after reduction
66
CHAPTER 6. TEST RUN RESULTS
80000
Initial
Remainder
70000
60000
Counts
50000
40000
30000
20000
10000
0
-10000
0
50
100
150
200
250
300
350
Channel
Figure 6.3: Spectrum of
137
Cs extended source and remainder after reduction
the second reduction process and, for comparison, the initial spectrum and the
spectrum after the first reduction.
The first reduction process failed partly. The fit procedure for the right side of
the photo peak aborted while the left side converged regularly. I suspected
that the generous boundaries for the values of σ and the peak height may have
lead to this, but even with smaller boundaries the fit procedure failed. The
result illustrates the disadvantage of the double Gaussian function: if the two
functions differ significantly, it may lead to a sharp drop in the overall result
and might subsequently create a peak in the remaining spectrum after the
reduction.
The simulated single escape peak is somewhat to the left of the real position,
i.e. the energy of the simulated peak is lower than the energy of the real one.
The energy calibration is obviously a few channels off here. The double escape
peak however seems to fit perfectly. The bending of the compton continuum
works well although there are small differences in the transition to the
multiple compton area.
Since two backscatter peaks are combined in the initial spectrum, it is difficult
to determine if the first reduction was successful on it. The figure 6.4 on
page 69 indicates that the largest portion of the peak was reduced, but it
dropped a bit too early to zero so that a small peak is left. The effects
however are quite small.
Thus the remainder of the first reduction appears to be quite accurate in the
67
CHAPTER 6. TEST RUN RESULTS
simulation of the Compton continuum and the double escape peak.
The second reduction again does not converge at the right side of the photo
peak. In this case however the values resulting from the aborted fit procedure
seem to be a good choice so that the peak is approximated quite well. The
compton edge is also well approximated. The backscatter peak is a bit
overcompensated.
In overview the whole procedure performs quite well. Even though two of the
fit procedures fail the overall reduction is almost as good as the single
reduction of 137 Cs.
6.1.4
60
Co Source Histogram
The problem of the modelling of the backscatter peak is illustrated best with
the spectrum of a 60 Co. I let the program run through both energies. The
results of that are visualised in figures 6.6 on page 70 and 6.7 on page 70. The
first peak reduction reduced by 53.2 %. The remainder was reduced by 83.1 %.
This accumulated to a total reduction of 92.1 %.
The most significant detail here is the remainder of the backscatter peak.
Obviously it drops somewhat differently than 88 Y which leaves some counts
behind.
This shows that the backscatter peak is far more difficult to deal with than
any other feature of the spectrum. Since it is not possible to extract the peaks’
height directly from this spectrum, it is hard to optimize the parameter
functions so that it gives a better approximation for all tested samples.
6.1.5
Other Spectra
After these promising test results a few other spectra were also used in test
runs.
The reduction of the 241 Am-spectrum failed in general as most of the non-zero
parts are in the lowest part of the spectrum. The lowest peak was below the
minimum channel, the higher peak just above it. A fit on it failed however.
The overall reduction was about 71 %.
22
Na was reduced very well. Both photo peaks were reduced. The remainder
spectrum shows that the two photo peaks and the backscatter peak could not
be entirely reduced. The overall result of 91.6 % reduction is still satisfactory.
6.2
Test Runs with Automatic Reduction
For a successful test run on a real-life spectrum it was also necessary to do
tests using the automatic peak search. The spectra with several peaks seemed
suitable for that.
Although the algorithm is designed to reduce higher peaks first, it cannot be
assumed that all peaks have been detected by the peak search. This implies
also that there may be higher energy peaks whose compton continuum is part
68
CHAPTER 6. TEST RUN RESULTS
160000
Initial
1st Reduction
2nd reduction
2nd simulated response #function
140000
120000
Counts
100000
80000
60000
40000
20000
0
-20000
0
100
200
300
400
Channel
500
88
Figure 6.4: Results of first reduction of
600
700
800
Y point source spectrum
160000
Initial
1st Reduction
2nd reduction
2nd simulated response #function
140000
120000
Counts
100000
80000
60000
40000
20000
0
-20000
0
100
200
300
400
Channel
Figure 6.5: Results of second reduction of
69
500
88
600
700
800
Y point source spectrum
CHAPTER 6. TEST RUN RESULTS
12000
Initial
1st Reduction
1st simulated response function
10000
8000
Counts
6000
4000
2000
0
-2000
0
100
200
300
400
Channel
Figure 6.6: Results of first reduction of
500
60
600
700
800
Co point source spectrum
12000
Initial
1st Reduction
2nd reduction
2nd simulated response function
10000
8000
Counts
6000
4000
2000
0
-2000
0
100
200
300
400
Channel
Figure 6.7: Results of second reduction of
70
500
60
600
700
800
Co point source spectrum
CHAPTER 6. TEST RUN RESULTS
of the background. Therefore the background approximation algorithm is
turned on in these tests.
In early versions of the program I tried to let it loop as long as any peaks
could be found in the spectrum. This showed that simple abort criteria (as
described in section 5.2.3) are often not sufficient. As soon as low count levels
are reached, even small local elevations are detected as peaks and will be
reduced. As soon as any major peaks are reduced, many of the remaining
peaks are actually remaining parts of the reduced peaks. Thus a further
reduction of these will lead to faulty results and every round of reductions
makes less sense than the one before.
Therefore the unfolding process should stop after a few rounds. It is not easy
to set an exact limit for this since the results of the peak searches are highly
dependent on the count levels. Under the assumption that all clearly visible
peaks are found after two rounds, I let the loop stop after three rounds at the
latest.
6.2.1
226
Ra Source Histogram
Due to its long decay chain the spectrum of 226 Ra has many peaks. As the
figure 6.8 on the following page shows, there are some smaller peaks in higher
energy regions whose Compton continuums while add a significant background
to all lower energy peaks. The table 6.2 on page 73 gives an overview of the
reduction steps. In this case the procedure stopped after one round as it could
not find significant peaks after five reduction steps. This is not surprising as
most peaks are so small that a more sensitive peak search would produce
faulty results.
The overall reduction was only 46.1 %. A substantial number of counts
remains since only the bigger peaks reduced. One large peak at channel 34.5
(≈ 60 keV) was not considered for a reduction as it is in the X-ray energy
area. This contributes also to the poor result.
The background approximation is of interest when the reduction of the peaks
is analysed qualitatively. The highest peak at channel 243.5 seems to be
almost entirely removed after the first reduction process. The other peaks’
remainders however seem to be at a quite high level and more jagged. This
can be explained by the background approximation procedure. Since the peaks
are very close to each other their left and right ends blend into each other so
that the overall level is higher. This leads the approximation procedure to
assume that the background is higher. Nonetheless all the peaks are properly
reduced so that no significant peak in the allowed range is left.
6.2.2
133
Ba Source Histogram
A similar example is the test run on 133 Ba. Some peaks do not qualify as their
energy is too low. The two other peaks however are reduced. The count level
of the remainder seems somewhat too high, which can be explained by their
71
Initial spectrum
1st reduction
2nd reduction
3rd reduction
4th reduction
5th reduction
1e+007
Counts
8e+006
6e+006
226
Ra point source spectrum
4e+006
2e+006
0
0
100
200
300
Channel
400
500
CHAPTER 6. TEST RUN RESULTS
72
Figure 6.8: Overview of reduction steps of
1.2e+007
CHAPTER 6. TEST RUN RESULTS
Channel
243.5
144.5
121.5
100.5
78.5
Energy [keV]
611.1
348.0
287.4
232.2
174.4
Counts reduced
3.35 · 107
4.24 · 107
2.48 · 107
1.48 · 107
6.43 · 106
Table 6.2: Reduction steps of
226
Ra test run
proximity to each other and the resulting high background approximation
function.
200000
Initial spectrum
1st reduction
2nd reduction
150000
Counts
100000
50000
0
-50000
0
20
40
60
80
Channel
Figure 6.9: Overview of
6.2.3
133
100
120
140
160
Ba reduction process
Spectrum from Kista Station (with
source)
137
Cs extended
The previous results demonstrate that the procedure is capable of reducing
peaks in a more complex environment with background though there are some
weaknesses in the background approximation.
The next step is to use a real-life spectrum from one of the stations and try to
remove some distinct peaks. In a simple example we attached the extended
73
CHAPTER 6. TEST RUN RESULTS
137
Cs source to the air intake of the station in Kista. Then a spectrum was
taken over a time period of 2.6 days. After that a short background
measurement of 37 minutes length was taken. The ventilator was turned off as
the extended source would have blocked the air stream and could have caused
contamination. Therefore the filter did not contain raised numbers of particles
as it would have been the case in a regular measurement.
In preparation to the test run one addition had to be made. Since the
conditions in the measurement station are different, a slightly different energy
calibration was used. The functions which calculate the levels of multiple
Compton area, backscatter peak and Compton continuum are tied to the
channel number. Thus the change of the energy calibration could make the use
of these functions unreliable. Therefore I added an intermediary step in all
these functions which converted the channel to the energy and then back to
the channel using the laboratory calibration2 .
The test run on the sample is displayed in 6.10 on the following page. The
graph “initial spectrum” shows the peak which clearly differs from the
background. It also illustrates the general shape of a natural background
spectrum with very high count levels at low energies. The graph
“Comparative background measurement” is based on the data from the second
measurement. Since the time span was much shorter here, the count levels
were also much smaller. Therefore I normalized this spectrum on the peak of
the other two spectra so that the shapes could be compared. This leads
naturally to a high statistical fluctuation.
The purpose of the test run was that the program should find the 137 Cs peak
and reduce it. The result of the process then should look like a spectrum of a
natural background - just as if the additional radiation source would have
never been there.
As the figure suggest this seems to be achieved. It finds a peak at channel
291.5 (657 keV3 ) and runs the reduction procedure on it. The shapes of the
three graphs look roughly the same. However it cannot be said for certain as
the background is much larger than the photo peak. In these dimensions the
compton continuum and the backscatter peak can hardly be distinguished
from statistical fluctuation. Nonetheless it can be said that the reduction of
the photo peak worked quite well as there is only a small difference between
the slope of the background measurement - again it seems that the background
approximation leaves too much of the photo peak. Figure 6.11 on page 76
shows this in more detail.
2 The disadvantage about this is that this conversion step may cause small errors when
numbers are rounded.
3 The difference to the nominal 661.657 keV is due to the conversions between channels
and energies. Furthermore the energy calibration in the station is not as precise as the energy
calibration for the laboratory measurements.
74
CHAPTER 6. TEST RUN RESULTS
200000
Initial spectrum
Reduced Spectrum
Comparative background measurement
180000
160000
140000
Counts
120000
100000
80000
60000
40000
20000
0
0
100
200
300
400
500
600
700
Channel
Figure 6.10: Overview of reduction process of a real-life spectrum with a
source
6.2.4
1-hour Measurement in Kista Station (with
point source)
60
137
Cs
Co
The most demanding and realistic scenario for a test run is a spectrum which
was taken over a short time span. This resembles very much the real
conditions for the early-warning system as the standard measurement interval
is only 15 minutes. Naturally count numbers are much lower, leading too
higher fluctuations and less pronounced peaks.
This measurement was not taken separately. Instead normal data samples
from the station were used. For better results four consecutive measurements
were added to give a combined data sample corresponding to a single
measurement of one hour’s length. Two different settings were used: the first
one was with just the filter and normal background radiation. In the second
one a 60 Co point source was attached outside the air inlet to simulate the
presence of an additional radiation source in the filter. The peaks resulting
from that can be seen in figure 6.12 on page 77 - the peaks are in the graph
“initial spectrum” between channels 500 and 600, but not in the graph with
the natural spectrum.
An important difference to the previous measurements is that in this scenario
the station is in full operation so that the filter contains significant amounts of
particles which causes some smaller peaks from natural radiation sources.
This test run is less successful. In the first round of the peak search there are
75
CHAPTER 6. TEST RUN RESULTS
35000
Initial spectrum
Reduced Spectrum
Comparative background measurement
30000
25000
Counts
20000
15000
10000
5000
0
200
250
300
Channel
Figure 6.11: Detailed view of the area around the
previous page
350
137
400
Cs in figure 6.10 on the
7 peaks found which seem to be suitable for reduction. Among them is one at
channel 500.5 (1157 keV), which is probably the 1174 keV peak of 60 Co. In
the second run 16 more peaks are found, including three peaks between
channel 566.5 (1315 keV) and 578.5 (1344 keV). All three could be the 1332
keV peak of 60 Cs. This long chain of reduction steps leads to the vanishing of
the large background peak.
The peak search is obviously pushed beyond its limits here - it finds far more
peaks than there are. A higher σ-setting for the peak search however gave
none of the peaks which were supposed to be found. The reduction result may
include all the relevant peaks, but it is impossible to determine by looking at
the peak search and reduction output which were real peaks and which were
only false hits.
6.3
Summary of Results
In laboratory conditions the model and the procedure used in the program
work very well. They achieve a high resemblance to the real spectra. Only
small differences in the backscatter peak and photo peak approximation
remain. From this it can be assumed that the used approximations were
sufficient for the removal of single energy spectra under laboratory conditions.
In the more complex spectra this seems to hold although the background
76
CHAPTER 6. TEST RUN RESULTS
3000
Initial spectrum
Reduced Spectrum
Comparative background measurement
2500
2000
Counts
1500
1000
500
0
-500
0
200
400
600
800
1000
Channel
Figure 6.12: One hour data samples of Kista station and test run results
approximation function seemed to return results which are slightly too high.
In the measurements from the station the whole procedure seems to work well
as long as there is a substantial statistical basis of counts. The reduction of
the photo peak is sufficient. However qualified statements about the accuracy
of the backscatter peak or compton continuum in the station measurements
cannot be made as there is no significant data to support them.
In a scenario close to the real spectra obtained by the station in daily use the
program fails to distinguish relevant from irrelevant peaks due to the low
count numbers. This produces faulty results.
One issue concerns both laboratory and station measurements: the program is
not able to deal with peaks in the X-ray range. Considering that the resolution
there is very low and the left side of the backscatter peak biases this energy
region further, it may be advisable to discard any results below 256.5 keV.
77
Chapter 7
Conclusion and outlook
The mathematical model as a composition of basically three functions
produces satisfactory results when applied to laboratory spectra of one or two
energies. Each of them is reduce by well over 90 %. Beyond that only
qualitative statements can be made. It appears that the reduction of single
peaks in a more complex environment of spectra with many energies is
working quite well.
However, there is room for further improvements. Several issues remain which
make the model unsuitable for practical use in the sampling stations.
X-rays are not covered at all by the model. As the energies of these are
dependent on the isotopes, it would be necessary to identify the isotopes in the
spectrum, which is very difficult considering the required precision.
Furthermore there is background radiation present in the X-ray area. All that
makes it hardly realistic that this can be simulated accurately by any model.
Thus there is no conceivable way to disentangle the area below 255 keV to
such a degree that lower energy peaks can be detected properly. Therefore, it
is advisable to discard generally all counts below this threshold. This would
also make a better simulation of the backscatter peak’s left side unnecessary.
The right side however can affect large energy intervals. The backscatter peak
is certainly the most difficult feature of the spectrum for the fact that it
depends on many outside factors. For point sources in the laboratory with
largely identical conditions it may be easier to predict, but the extended
source shows that such an approximation may very well be worthless in any
other environment.
Therefore I consider it crucial for a generalized mathematical model to gain
more knowledge about the backscatter peak in different conditions. There are
two experimental ways to go - both of them could not be realised in the scope
of this thesis. The first one would be to conduct measurements in the stations
over very long time spans of at least several days for stable spectra an
background reduction. It would be necessary to use different detectors to get
rid of any detector specific problems and to use different radioactive sources.
For the latter it would be desirable to use extended sources of several isotopes
78
CHAPTER 7. CONCLUSION AND OUTLOOK
which have stable decay products. This would approximate the real conditions
in the stations as far as possible. Obstacles to this solution are the availability
of corresponding sources and the long outages of the sampling stations. An
alternative approach would be a purely numerical method. A Monte Carlo
simulation of the whole system could be developed. This would give the
approximate shape of the whole spectrum. It has to be cross-checked with
laboratory results though as such a simulation is quite complex and there are
several possibly suitable approaches to that1 . Furthermore it would require
significant computing resources. Since Monte Carlo simulations are generally
quite time-demanding, it may even be that the station measurements will be
the quicker way.
The good performance of the mathematical model does not imply necessarily
that there is no better way to describe the shape of the response function. The
use of the double Gaussian function to describe the photo peak is suitable, but
it does not describe the natural distribution of the photo peak. It would be
better to describe the photo peak as a Gaussian function which is biased by
the multiple compton area on the left side. A Monte Carlo simulation could
also give further insight into this.
This could also solve another minor issue. So far the mathematical model
depends largely on functions which return values for the Compton continuum
height and other parameters. In the optimal case these help functions could be
abolished or at least improved significantly - so far they are crude
interpolations.
Additionally a consideration of the cross-section and the use of the
Klein-Nishina formula could make the simulation of the Compton continuum
more exact than it is at the moment.
In any case there is room for improvement in the programming solution of the
system. While the current program structure seemed suitable for this thesis, it
turned out later that an entirely object-oriented approach would have been
more flexible. One example is the rather poor performance of the background
approximation function. ROOT offers more sophisticated solutions for that but
it would have been difficult to include that in the program structure.
Beyond the improvement of approximation and reduction methods there are
also ways to improve the data samples which could be of relevance in the
further development of the system.
As the spectra from Kista station show there is a very large background at
lower energies. Though a massive shielding like the laboratory’s lead shield is
not realistic, it may be of interest to cover the detector in some directions with
attenuating materials. This could improve the overall results.
The last test run on the Kista station data samples shows that even with all
the mentioned issues solved it is likely that an automatic peak search will fail
with the small statistical basis of a 15-minute measurement. The histograms
will always be very jagged. Therefore it would make sense to use a database
system to collect data of all measurements. By adding up the results over
1 See
[6]
79
CHAPTER 7. CONCLUSION AND OUTLOOK
longer time intervals smoother spectra could be acquired. This would increase
the reaction time but would make it much more a likely that a proper
reduction of known peaks can be done and would show significant unusal
peaks with more reliability.
80
Acknowledgements
I would like to thank
• Katarina Wilhelmsen for helpful supervision and comments on my text.
• Karin Lindh for long discussions, support during the measurements, the
field trip to Gävle and heroic weekend action to save the extended source
from ending up as a part of the polonium scandal.
• Catharina Söderström and Peter Jansson for the help with the
measurements.
• Andras Kerek for supervision on this thesis.
81
Bibliography
[1] Kenneth S. Krane, Introductory Nuclear Physics, John Wiley & Sons,
1988
[2] H. Haken and H. C. Wolf, The Physics of Atoms and Quanta, 6th edition,
Springer 2000
[3] Glenn F. Knoll, Radiation Detection and Measurement, John Wiley &
Sons, 2000
[4] K.D. Ianakiev, B.S. Alexandrov, P.B. Littlewood and M.C. Browne,
Temperature behavior of NaI (Tl) scintillation detectors, Nuclear
Nonproliferation Division, Los Alamos National Laboratory, Los Alamos,
NM, USA and Cavendish Laboratory, Cambridge University, Cambridge,
UK
[5] Olof Tengblad, Determination of Anitneutrino Spectra of Fission
Products, Chalmers University of Technology and University of Göteborg,
Departement of Physics, Götebörg 1988
[6] HU-Xia Shi, Bo-Xian Chen, Ti-Zhu Li, Di Yun, Precise Monte Carlo
simulation of gamma-ray response functions for an NaI(Tl) detector,
Applied Radiation and Isotopes 57 (2002), 517-524
[7] Berkeley Laboratory Isotopes Project,
http://ie.lbl.gov/education/isotopes.htm
[8] ”List of nuclear tests” in the English Wikipedia,
http://en.wikipedia.org/wiki/List_of_nuclear_tests
[9] Article on Partial Test Ban Treaty in the English Wikipedia,
http://en.wikipedia.org/wiki/Partial_Test_Ban_Treaty
[10] Article on Comprehensive Test Ban Treaty in the English Wikipedia,
http://en.wikipedia.org/wiki/Comprehensive_Test_Ban_Treaty
[11] Full text of the treaty on the web site of the Preparatory Commission for
the Comprehensive Nuclear-Test-Ban Treaty Organization (CTBTO),
http://www.ctbto.org/treaty/treatytext.tt.html
82
BIBLIOGRAPHY
[12] Article on the Stokes shift in the English Wikipedia,
http://en.wikipedia.org/wiki/Stokes_shift
[13] Article on the photomultiplier tube in the English Wikipedia,
http://en.wikipedia.org/wiki/Photomultiplier
83
Appendix A
List of measurements
If not stated otherwise, all measurements were taken inside the lead shield
with 10 cm distance between source and detector. The results were cleared of
background effects using the long-term measurements.
The results of the detector which I broke accidently in July 2006 were not used
at all. With the exception of the measurements in the Gävle station, all
measurements were made with the replacement of the broken detector.
• Spectrum in Figure 3.1 on page 20
– Background measurement inside the lead shield to subtract
background effects from the laboratory measurements
– Duration: 239,975 s (real), 239,972 s (live)
– Measurement conducted on 1 September 2006
• Spectrum in Figure 3.3 on page 23
– Measurement of
137
Cs point source
– Duration: 9418 s (real), 9408 s (live)
– Sample reference date 1 June 1997 (initial activity 44.4 kBq)
– Measurement conducted on 29 August 2006
– Estimated activity at the time of measurement: 35.9 kBq
• Spectrum in Figure 3.4 on page 25
– Measurement of
137
Cs extended source
– Duration: 81956 s (real), 81938 s (live)
– Sample reference date 1 January 2003 (initial activity 20.37 kBq)
– Measurement conducted on 31 August 2006
– Estimated activity at the time of measurement: 18.7 kBq
84
APPENDIX A. LIST OF MEASUREMENTS
• Spectrum in Figure 3.7 on page 28
– Measurement of
241
Am point source
– Duration: 88157 s (real), 88101 s (live)
– Sample reference date 1 June 1997 (initial activity 40.3 kBq)
– Measurement conducted on 29 August 2006
– Estimated activity at the time of measurement: 39.7 kBq
• Spectrum in Figure 3.8 on page 29
– Measurement of
226
Ra point source
– Duration: 577010 s (real), 574880 s (live)
– Sample reference date 1 June 1997 (initial activity 40.3 kBq)
– Measurement conducted on 6 September 2006
– Estimated activity at the time of measurement: 40.1 kBq
• Spectrum in Figure 3.9 on page 30
– Measurement of
133
Ba point source
– Duration: 15988 s (real), 15953 s (live)
– Sample reference date 1 June 1997 (initial activity 42.5 kBq)
– Measurement conducted on 13 September 2006
– Estimated activity at the time of measurement: 23.0 kBq
• Spectrum in Figure 3.10 on page 31
– Measurement of
210
Pb point source
– Duration: 11635 s (real), 11632 s (live)
– Sample reference date 1 June 1997 (initial activity 213 kBq)
– Measurement conducted on 13 September 2006
– Estimated activity at the time of measurement: 159.6 kBq
• Spectrum in Figure 3.11 on page 31
– Measurement of
22
Na point source
– Duration: 62446 s (real), 62426 s (live)
– Sample reference date 1 June 1997 (initial activity 41.6 kBq)
– Measurement conducted on 13 September 2006
– Estimated activity at the time of measurement: 3.5 kBq
• Spectrum in Figure 3.12 on page 32
– Measurement of
60
Co point source
85
APPENDIX A. LIST OF MEASUREMENTS
– Duration: 12520 s (real), 12512 s (live)
– Sample reference date 1 June 1997 (initial activity 40.6 kBq)
– Measurement conducted on 29 August 2006
– Estimated activity at the time of measurement: 12.0 kBq
• Spectrum in Figure 3.13 on page 32
– Measurement of
88
Y point source
– Duration: 87839 s (real), 87755 s (live)
– Sample reference date 1 May 2005 (initial activity 423 kBq)
– Measurement conducted on 31 August 2006
– Estimated activity at the time of measurement: 17.8 kBq
• Gävle point source measurement (table 3.2 on page 37)
– Measurement of
137
Cs point source
– Duration: 180 s (real), 180 s (live)
– Sample reference date 1 June 1997 (initial activity 44.4 kBq)
– Measurement conducted on 8 November 2006
– Estimated activity at the time of measurement: 35.9 kBq
• Gävle extended source measurement (table 3.2 on page 37 and
figure 3.15 on page 34)
– Measurement of
137
Cs extended source
– Duration: 4333 s (real), 4330 s (live)
– Sample reference date 1 January 2003 (initial activity 20.37 kBq)
– Measurement conducted on 8 November 2006
– Estimated activity at the time of measurement: 18.7 kBq
• Spectra in Figure 6.10 on page 75 and 6.11 on page 76
– Two measurements: one with
background spectrum only
137
Cs extended source and one
– Location: Kista measurement station
– Duration (source): 228585 s (real), 228506 s (live)
– Measurement (source) conducted on 8 December 2006, starting at
16:13
– Duration (background): 2215 s (real), 2216 s (live)
– Measurement (background) conducted on 11 December 2006,
starting at 8:13
• Spectra in Figure 6.12 on page 77
86
APPENDIX A. LIST OF MEASUREMENTS
– Two measurements: one of 60 Co point source attached to the
outside of the air inlet, one without source
– Duration: approximately 3600 s each (compiled of 4 single
measurements of 1500 s each)
– Measurement conducted on 2 February 2007
87
Appendix B
Program code listing
#include
#include
#include
#include
#include
#include
#include
#include
<iostream>
<string>
<sstream>
<fstream>
<vector>
"TH1.h"
"TF1.h"
"TSpectrum.h"
using namespace std;
string floatToStr(float f){
std::ostringstream os;
os << f ;
return (os.str());
}
// laboratory calibration
double
double
double
double
return
}
labkevtochannel (double kev) {
a = 0.000162834;
b = 2.59414;
c = -28.8893;
-(b/(2*a))+sqrt(((pow(b,2))/(4*pow(a,2)))-(c-kev)/a);
double
double
double
double
labchanneltokev (int channel) {
a = 0.000162834;
b = 2.59414;
c = -28.8893;
88
APPENDIX B. PROGRAM CODE LISTING
return a*pow(channel,2)+b*channel+c;
}
double kevtochannel (double kev) {
return labkevtochannel(kev);
}
double channeltokev (int channel) {
return labchanneltokev(channel);
}
// Kista station calibration
double
double
double
double
return
}
kistakevtochannel (double kev) {
a = 0;
b = 2.393936;
c = -39.480137;
(kev-c)/b;
double
double
double
double
return
}
kistachanneltokev (int channel) {
a = 0;
b = 2.393936;
c = -39.480137;
b*channel+c;
double
double
double
double
double
return
}
fwhmfromchannel (int channel) {
a = 0.0921692;
b = 20.6043;
x = a*channel+b;
y = channeltokev(channel);
kevtochannel(y+(x/2.0)) - kevtochannel(y-(x/2.0));
double photoefficiency (int channel) {
// calculates how many of the
// emitted photons end up in the photo peak
double a = -0.000111023;
double b = 0.190384;
return a*channeltokev(channel)+b;
}
double photoefficiencyint (int channel) {
// calculates how many of the
// emitted photons end up in the photo peak
89
APPENDIX B. PROGRAM CODE LISTING
double a = -0.000111023;
double b = 0.190384;
return 0.5*a*channeltokev(channel)*channeltokev(channel)
+b*channeltokev(channel);
}
double comptonrelativeheight (double photopeakpos) {
// calculates the ratio between the integrated photopeak and
// the compton continuum height
// in case the Kista station
// data is used - conversion of the channels
photopeakpos = labchanneltokev(kevtochannel(photopeakpos));
double a = 1.16769e-005;
double b = 0.00302349;
double d = -1.12727e-008;
return d*pow(photopeakpos,3)
+a*pow(photopeakpos,2)
+b*photopeakpos;
}
double multiplecomptonrelativeheight (double photopeakpos) {
// calculates the ratio between
// the integrated photopeak and the height
// at the position between photo peak and compton edge
// in case the Kista station
// data is used - conversion of the channels
photopeakpos = labchanneltokev(kevtochannel(photopeakpos));
double a = 2.82596e-007;
double b = 0.000970274;
return a*photopeakpos+b;
}
double comptonedgerelativeheight (double photopeakpos) {
// calculates the ratio between the integrated photopeak
// and the height at the position of the compton edge
// in case the Kista station
// data is used - conversion of the channels
photopeakpos = labchanneltokev(kevtochannel(photopeakpos));
double a = 4.07404e-006;
double b = 0.00251556;
return a*photopeakpos+b;
}
90
APPENDIX B. PROGRAM CODE LISTING
double sigmafromchannel (int channel) {
return fwhmfromchannel(channel)/2.35;
}
int comptonedgepos(double peakpos) {
double Epeak = channeltokev(peakpos);
double tmp = 2*(Epeak/511);
double Eedge = Epeak*(tmp/(1.0+tmp));
return kevtochannel(Eedge);
}
int round(double x) {
if (floor(x) > 0.5) {
return ceil(x);
}
return floor(x);
}
string removePeak(double p,TH1I *c,
int minchannel,string outfile,bool backgroundappr = 0) {
cout << "Unfolding the peak at channel " << p << "\n";
// positions
double peakposexact = p;
int peakpos = round(peakposexact);
double backtmp = (2*channeltokev(peakposexact))/511.0;
double comptonedgepos =
kevtochannel(channeltokev(peakposexact)*(backtmp/(1+backtmp)));
cout << "Compton edge should be at channel "
<< comptonedgepos << "\n";
double backscatterpeakpos =
kevtochannel(channeltokev(peakpos)/(1+backtmp));
cout << "Backscatter peak should be at channel "
<< backscatterpeakpos << "\n";
// heights
int peakheight = c->GetBinContent(round(peakpos));
// search FWHM
int leftFWHM = peakpos;
int rightFWHM = peakpos;
int leftend,rightend;
double derthreshold = 0.05;
while (
c->GetBinContent(leftFWHM) >= (c->GetBinContent(peakpos)/2)
91
APPENDIX B. PROGRAM CODE LISTING
&& c->GetBinContent(rightFWHM) >= (c->GetBinContent(peakpos)/2)
&& leftFWHM > 0
&& rightFWHM < 1024) {
leftFWHM--;
rightFWHM++;
}
double sigma = (rightFWHM - leftFWHM - 1)/2.35;
cout << "Estimated FWHM of photopeak: "
<< (rightFWHM - leftFWHM - 1) << "\n";
cout << "Estimated sigma of photopeak: " << sigma << "\n";
// go to left
double maxder =
(((double) (c->GetBinContent(leftFWHM+2)
-c->GetBinContent(leftFWHM-2)))
/((double) 4));
for (int i = peakpos;
(i > leftFWHM
|| (((double) (c->GetBinContent(i+2)-c->GetBinContent(i-2)))
/((double) 4)) > (derthreshold*maxder))
&& i >= 0
&& i <= 1024;i--) {
double tmpder =
(((double) (c->GetBinContent(i+2)-c->GetBinContent(i-2)))
/((double) 4));
if (tmpder > maxder) {
maxder = tmpder;
}
}
leftend = i;
// go to right
double minder = (
((double) (c->GetBinContent(rightFWHM+2)
-c->GetBinContent(rightFWHM-2)))
/((double) 4));
for (int i = peakpos; (i < rightFWHM ||
(
((double) (c->GetBinContent(i+2)-c->GetBinContent(i-2)))
/((double) 4)) < (derthreshold*minder))
&& i >= 0
&& i <= 1024 ;i++) {
double tmpder = (
(
(double) (c->GetBinContent(i+2)-c->GetBinContent(i-2))
)
92
APPENDIX B. PROGRAM CODE LISTING
/((double) 4));
if (tmpder < minder) {
minder = tmpder;
}
}
rightend = i;
cout << "Estimated fitting area for peak: channel "
<< leftend << " to " << rightend << "\n";
// now the background estimate:
// a line through the left and right end of the peak
// f(x) = a*x + b
// calculate a and b
// (only if background approximation is applied)
double baka = 0;
double bakb = 0;
if (backgroundappr) {
baka = ((double) c->GetBinContent(rightend)
- c->GetBinContent(leftend))
/(rightend-leftend);
bakb = (double) c->GetBinContent(leftend) - baka*leftend;
cout << "Background function: f(x) = "
<< baka << "*x + "
<< bakb << "\n";
// create a double Gaussian for the left and right side
TF1 *faL = new TF1("faL","gaus(0)+[3]*x+[4]",0,1024);
TF1 *faR = new TF1("faR","gaus(0)+[3]*x+[4]",0,1024);
// set parameters for the background
faL->SetParameter(3,baka);
faL->SetParameter(4,bakb);
faR->SetParameter(3,baka);
faR->SetParameter(4,bakb);
faL->SetParLimits(3,baka,baka);
faL->SetParLimits(4,bakb,bakb);
faR->SetParLimits(3,baka,baka);
faR->SetParLimits(4,bakb,bakb);
} else {
cout << "No background approximation function applied!\n";
// create a double Gaussian for the left and right side
TF1 *faL = new TF1("faL","gaus(0)",0,1024);
TF1 *faR = new TF1("faR","gaus(0)",0,1024);
}
// Gaussian fit for left of the peak
faL->SetParLimits(0,peakheight/2.0,(3.0/2.0)*peakheight);
93
APPENDIX B. PROGRAM CODE LISTING
faL->SetParLimits(1,peakpos-1,peakpos+1);
faL->SetParLimits(2,sigma/2.0,(3.0/2.0)*sigma);
cout << "Fitting left half of the peak\n:";
c->Fit("faL","","",leftend,peakpos);
// Gaussian fit for right of the peak
faR->SetParLimits(0,peakheight/2.0,(3.0/2.0)*peakheight);
faR->SetParLimits(1,peakpos-1,peakpos+1);
faR->SetParLimits(2,sigma/2.0,(3.0/2.0)*sigma);
cout << "Fitting right half of the peak\n:";
c->Fit("faR","","",peakpos,rightend);
//
//
//
//
after the fit both functions have to be
reset so that they won’t use the background
this is simply done by setting both
parameters of the background line to zero
if (backgroundappr) {
faL->SetParameter(3,0);
faL->SetParameter(4,0);
faR->SetParameter(3,0);
faR->SetParameter(4,0);
}
// Furthermore we can
for (int i = peakpos;
rightend = i;
}
for (int i = peakpos;
leftend = i;
}
cout << "New estimate
<< leftend << " to "
readjust the boundaries of the peak
faR->Eval(i,0,0,0) > 1;i++) {
faL->Eval(i,0,0,0) > 1;i--) {
for peak width: channel "
<< rightend << "\n";
// giving an estimate for the height of the compton continuum
// first we integrate to see how many counts
// are in the photo peak
double photosum = 0;
for (int k = comptonedgepos;k <= 1024;k++) {
if (k <= peakpos) {
photosum += faL->Eval(k,0,0,0);
} else {
photosum += faR->Eval(k,0,0,0);
}
}
94
APPENDIX B. PROGRAM CODE LISTING
cout << "Integrated photo peak: " << photosum << "\n";
int comptonheight = round(
(photosum*comptonrelativeheight(peakposexact))
/comptonedgepos);
// the backscatter peak becomes
// much smaller with higher energies
double bskev1 = 661.62; // at the Cs-137 peak
double bsheight1 = 1.75;
// 175% of the compton continuum at Cs-137
double bskev2 = 1836; // at the Y-88 peak
double bsheight2 = 1.1;
// 110% of the compton continuum (estimate)
double bstmpa = (bsheight2-bsheight1)/(bskev1-bskev2);
double bstmpb = bsheight1 - bstmpa*bskev1;
int bspeakheight =
round(
(bstmpa*channeltokev(peakposexact)+bstmpb)
*comptonheight);
cout << "Estimated height of the compton continuum: "
<< comptonheight << "\n";
cout << "Estimated height of the backscatterpeak: "
<< bspeakheight << "\n";
int comptonedgelevel =
round(comptonedgerelativeheight(peakposexact)*photosum);
int multiplecomptonlevel =
round(multiplecomptonrelativeheight(peakposexact)*photosum);
// logistical function for the compton continuum
// 0: G
// 1: a
// 2: k
// 3: basic level multiple comptons
// between compton edge and photo peak
bool comptonactive = 1;
// indicates of the compton shift can be properly reduced
TF1 *continuum =
new TF1("continuum",
"[0]*(1-(1/(1+[1]*exp(-1.0*[2]*x))))+[3]",0,1024);
double G = comptonheight - multiplecomptonlevel;
if (comptonheight > 0) {
double b1 = ((double) comptonedgelevel - multiplecomptonlevel)
/comptonheight; // Coefficient 1: level at compton edge
double x1 = comptonedgepos;
double b2 = 1.0/G; // Coefficient 2:
95
APPENDIX B. PROGRAM CODE LISTING
// virtual zero-level between compton edge and peak position
double x2 = (x1+peakposexact)/2.0;
// equation for determination of (bx/(1-bx)) = a*exp(-k*bin)
cout << "G: " << G << "\n";
cout << "b1: " << b1 << "\n";
cout << "x1 (comptonedgepos): " << x1 << "\n";
cout << "b2: " << b2 << "\n";
cout << "x2 (between compton and peak): " << x2 << "\n";
if(G > 0 && b1 < 1 && b2 < 1 && b1 > 0 && b2 > 0 && x1 != x2) {
double contk = log((b1*(1-b2))/((1-b1)*b2))/(-x1+x2);
cout << "contk: " << contk << "\n";
double conta = (b1/(1-b1))*(1/exp(-contk*x1));
cout << "conta: " << conta << "\n";
continuum->SetParameter(0,G);
continuum->SetParameter(1,conta);
continuum->SetParameter(2,contk);
continuum->SetParameter(3,multiplecomptonlevel);
}
else {
comptonactive = 0; // compton shift can be properly reduced
}
} else {
comptonactive = 0; // compton shift can be properly reduced
}
//modification for elevated area
//of compton continuum near the compton edge
// we use a polynomial
// f(x) = a*x**2 + b*x + c with three characteristics
// channel zero (called k):
// elevated with half the elevation of the right half
// compton edge (called m):
// elevated with 10% at 661.62 keV and 70 % at 1836 keV
// middle of those two (called zero):
// no elevation, which leads to c = 0
double tmpq = 1.9595e-007*pow(channeltokev(peakposexact),2)
+ 2.14999e-005*channeltokev(peakposexact);
double tmpp = tmpq/2.0;
double tmpzero = comptonedgepos/2.0;
double tmpk = -tmpzero;
double tmpm = tmpzero;
double tmpa = (tmpq-(tmpp*tmpm)/tmpk)/(tmpm*tmpm-tmpk*tmpm);
double tmpb = (tmpp-tmpa*tmpk*tmpk)/tmpk;
96
APPENDIX B. PROGRAM CODE LISTING
TF1 *comptoncontmod1 =
new TF1("comptoncontmod1",
"1+[0]*(x-[2])**2+[1]*(x-[2])",0,1024);
comptoncontmod1->SetParameter(0,tmpa);
comptoncontmod1->SetParameter(1,tmpb);
comptoncontmod1->SetParameter(2,tmpzero);
// double Gaussian for the backscatter peak
bool backscatteractive = 1;
// indicates if backscatterpeak can properly be reduced
int backscatterpeakheight =
bspeakheight - (G+multiplecomptonlevel);
TF1 *backscatterL = new TF1("backscatterL","gaus(0)",0,1024);
TF1 *backscatterR = new TF1("backscatterR","gaus(0)",0,1024);
if (backscatterpeakheight > 1) {
double cL =
(-(1.0/4.0)*backscatterpeakpos)
/sqrt(-2*log(1.0/backscatterpeakheight));
double cR =
(kevtochannel(290)-backscatterpeakpos)
/sqrt(-2*log(1.0/backscatterpeakheight));
// parameters
// 0: backscatterpeakheight
backscatterL->SetParameter(0,backscatterpeakheight);
backscatterR->SetParameter(0,backscatterpeakheight);
// 1: backscatterpeakpos
backscatterL->SetParameter(1,backscatterpeakpos);
backscatterR->SetParameter(1,backscatterpeakpos);
// 2: cL/cR
backscatterL->SetParameter(2,cL);
backscatterR->SetParameter(2,cR);
} else {
backscatteractive = 0;
}
// escape functions
TF1 *singleescape = new TF1("backscatterR","gaus(0)",0,1024);
TF1 *doubleescape = new TF1("backscatterR","gaus(0)",0,1024);
singleescape->SetParameter(1,
kevtochannel(channeltokev(peakposexact)-511));
doubleescape->SetParameter(1,
kevtochannel(channeltokev(peakposexact)-2*511));
singleescape->SetParameter(2,
sigmafromchannel(kevtochannel(
channeltokev(peakposexact)-511)));
doubleescape->SetParameter(2,
97
APPENDIX B. PROGRAM CODE LISTING
sigmafromchannel(kevtochannel(
channeltokev(peakposexact)-2*511)));
if (channeltokev(peakposexact) > 2*511) {
cout << "Single Escape Peak:"
<< kevtochannel(channeltokev(peakposexact)-511) << "\n";
cout << "Double Escape Peak:"
<< kevtochannel(channeltokev(peakposexact)-2*511) << "\n";
double escapepeakheight =
(2450.0/20584839.0)
*(channeltokev(peakposexact)-2*511)*peakheight;
}
else {
double escapepeakheight = 0;
}
doubleescape->SetParameter(0,escapepeakheight);
singleescape->SetParameter(0,escapepeakheight);
// parts of the function
int gauss,logist,backscatterbin,singleescapebin,doubleescapebin;
// dampening estimate
int sumin,sumrem; // sums of initial and remaining values
// open output file
ofstream offile;
offile.open (outfile.c_str(), ios::out);
// run through and deduct
for (int i = minchannel; i <= 1024;i++) {
// save initial value
int initial = c->GetBinContent(i);
// set all parts to zero
gauss = logist = backscatterbin
= singleescapebin = doubleescapebin = 0;
// Gaussian peak
if (i < p) {
int gauss = round(faL->Eval(i,0,0,0));
} elseif (i == p) {
int gauss = round((faL->Eval(i,0,0,0)
+ faR->Eval(i,0,0,0))/2.0);
} else {
int gauss = round(faR->Eval(i,0,0,0));
}
98
APPENDIX B. PROGRAM CODE LISTING
// continuum
if (
(continuum->Eval(i,0,0,0)
* comptoncontmod1->Eval(i,0,0,0)
) >
faL->Eval(i,0,0,0)
&& i < p && comptonactive) {
int logist = round(continuum->Eval(i,0,0,0)
* comptoncontmod1->Eval(i,0,0,0));
int gauss = 0;
} else {
int logist = 0;
}
// backscatter peak
if (backscatteractive) {
if (i < backscatterpeakpos) {
int backscatterbin = round(backscatterL->Eval(i,0,0,0));
} elseif (i == backscatterpeakpos) {
int backscatterbin = round((backscatterL->Eval(i,0,0,0)
+ backscatterR->Eval(i,0,0,0))/2.0);
} else {
int backscatterbin = round(backscatterR->Eval(i,0,0,0));
}
} else {
int backscatterbin = 0;
}
// escape peaks
if(channeltokev(peakposexact)-2*511 > 0) {
int singleescapebin = round(singleescape->Eval(i,0,0,0));
int doubleescapebin = round(doubleescape->Eval(i,0,0,0));
}
// subtract the parts
c->SetBinContent(i,
initial-gauss-logistbackscatterbin-singleescapebin-doubleescapebin);
// the
offile
offile
offile
offile
offile
protocol file
<<
<<
<<
<<
<<
i << "\t"; // 1: channel number
channeltokev(i) << "\t"; // 2: corresponding energy
initial << "\t"; // 3: initial value
gauss << "\t"; // 4: Photo peak
baka*i+bakb << "\t";
99
APPENDIX B. PROGRAM CODE LISTING
// 5: value of the background approximation
// function at this position
offile << logist << "\t"; // 6: Logistic function
offile << backscatterbin << "\t"; // 7: Backscatter peak
offile << singleescapebin << "\t"; // 8:Single Escape Peak
offile << doubleescapebin << "\t"; // 9: Double Escape Peak
offile
<< (gauss+logist+backscatterbin+
singleescapebin+doubleescapebin)
<< "\t";
// 10: the whole modelled response function combined
offile << c->GetBinContent(i) << "\t"; // 11: remainder
offile << endl;
// estimate for the dampening
sumin += abs(initial);
sumrem += abs(c->GetBinContent(i));
}
cout << "Initial sum:\t" << sumin << "\n";
cout << "Remaining sum:\t" << sumrem << "\n";
cout << "Dampening:\t"
<< 100-(sumrem/(double) sumin)*100 << "% \n";
string logstring;
logstring.append("Counts in photo peak: ");
logstring.append(floatToStr(photosum));
logstring.append("\n");
return logstring;
offile.close();
}
int test5c ()
{
gROOT->Reset();
int channels = 1024;
int minchannel = 27;
TH1I *counts =
new TH1I("Histogram of Counts","Counts",channels,0,channels);
counts->Reset();
100
APPENDIX B. PROGRAM CODE LISTING
// readfile
ifstream in;
cout << "Choose one of the samples." << endl;
cout << "Predefined peak positions:" << endl;
cout << "(1) Cs-137 (point)" << endl;
cout << "(2) Cs-137 (extended)" << endl;
cout << "(3) Co-60" << endl;
cout << "(4) Y-88" << endl;
cout << "(5) Ba-133" << endl;
cout << "(6) Na-22" << endl;
cout << "Automatic peak search:" << endl;
cout << "(11) Cs-137 (point)" << endl;
cout << "(12) Cs-137 (extended)" << endl;
cout << "(13) Co-60" << endl;
cout << "(14) Y-88" << endl;
cout << "(15) Ra-226" << endl;
cout << "(16) Ba-133" << endl;
cout <<
"(21) Kista station spectrum with extended Cs-137 source"
<< endl;
cout << "(22) Real spectrum (1 hour)" << endl;
cout << "(23) Real spectrum (1 hour, with Co-60 source)"
<< endl;
int a;
cin >> a;
double x,y;
string datfile;
switch (a) {
case 1: in.open("C:/root/macros/histocs137.dat"); break;
case 2: in.open("C:/root/macros/histocs137ex.dat"); break;
case 3: in.open("C:/root/macros/histoco60.dat"); break;
case 4: in.open("C:/root/macros/histoy88.dat"); break;
case 5: in.open("C:/root/macros/histoba133.dat"); break;
case 6: in.open("C:/root/macros/histona22.dat"); break;
case 11: in.open("C:/root/macros/histocs137.dat"); break;
case 12: in.open("C:/root/macros/histocs137ex.dat"); break;
case 13: in.open("C:/root/macros/histoco60.dat"); break;
case 14: in.open("C:/root/macros/histoy88.dat"); break;
case 15: in.open("C:/root/macros/histora226.dat"); break;
case 16: in.open("C:/root/macros/histoba133.dat"); break;
case 21: in.open("C:/root/macros/historoof1.dat"); break;
case 22: in.open("C:/root/macros/historealnormal.dat"); break;
case 23:
in.open("C:/root/macros/historealcontaminated.dat"); break;
101
APPENDIX B. PROGRAM CODE LISTING
}
if (!in.is_open()) { printf("error!"); }
int i = 1;
while(in.good()) {
in >> x >> y;
i++;
if (x < minchannel) {
y = 0;
}
counts->SetBinContent(x,y);
}
in.close();
int sum1;
for (int i = minchannel;i <= 1024;i++) {
sum1 += abs(counts->GetBinContent(i));
}
TSpectrum *spec = new TSpectrum(1024);
switch (a) {
case 1:
removePeak(262.75,counts,minchannel,
"C:/root/macros/outputcs137.dat");
break;
case 2:
removePeak(262.75,counts,minchannel,
"C:/root/macros/outputcs137ex.dat");
break;
case 3:
removePeak(510.0,counts,minchannel,
"C:/root/macros/outputco60-510.dat");
removePeak(450.0,counts,minchannel,
"C:/root/macros/outputco60-450.dat");
break;
case 4:
removePeak(689.0,counts,minchannel,
"C:/root/macros/outputy88-689.dat");
removePeak(351.0,counts,minchannel,
"C:/root/macros/outputy88-351.dat");
break;
case 5:
removePeak(kevtochannel(383.851),counts,minchannel,
"C:/root/macros/outputba133-384.dat");
removePeak(kevtochannel(356.017),counts,minchannel,
"C:/root/macros/outputba133-356.dat");
102
APPENDIX B. PROGRAM CODE LISTING
removePeak(kevtochannel(302.853),counts,minchannel,
"C:/root/macros/outputba133-302.dat");
removePeak(kevtochannel(276.398),counts,minchannel,
"C:/root/macros/outputba133-276.dat");
break;
case 6:
removePeak(kevtochannel(1274.53),counts,minchannel,
"C:/root/macros/outputna22-1275.dat");
removePeak(kevtochannel(511),counts,minchannel,
"C:/root/macros/outputna22-511.dat");
break;
case 7:
removePeak(kevtochannel(383.851),counts,minchannel,
"C:/root/macros/outputba133-384.dat");
removePeak(kevtochannel(356.017),counts,minchannel,
"C:/root/macros/outputba133-356.dat");
removePeak(kevtochannel(302.853),counts,minchannel,
"C:/root/macros/outputba133-302.dat");
removePeak(kevtochannel(276.398),counts,minchannel,
"C:/root/macros/outputba133-276.dat");
break;
case 8:
removePeak(kevtochannel(383.851),counts,minchannel,
"C:/root/macros/outputba133-384.dat");
removePeak(kevtochannel(356.017),counts,minchannel,
"C:/root/macros/outputba133-356.dat");
removePeak(kevtochannel(302.853),counts,minchannel,
"C:/root/macros/outputba133-302.dat");
removePeak(kevtochannel(276.398),counts,minchannel,
"C:/root/macros/outputba133-276.dat");
break;
default:
std::ostringstream logstream;
vector<double> v;
logstream << "Report about dampening" << endl;
int xpeaktopheight;
float xpeaktoppos;
bool flag = 1;
// overload of calibration functions for Kista station samples
if (a > 20) {
int kevtochannel (double kev) {
return kistakevtochannel(kev);
}
double channeltokev (int channel) {
return kistachanneltokev(channel);
103
APPENDIX B. PROGRAM CODE LISTING
}
}
for (int l = 1;l <= 2 && flag;l++) {
//search peaks
Int_t nfound = spec->Search(counts,2);
cout << "Found " << nfound << " candidate peaks to fit\n";
Float_t *xpeaks = spec->GetPositionX();
bool xpeakfound = 0;
xpeaktopheight = 0;
float xpeaktmp;
// sort the peaks by position
while (flag) {
flag = 0;
for (int i = 1; i < nfound; i++) {
if (xpeaks[i-1] < xpeaks[i]) {
xpeaktmp = xpeaks[i];
xpeaks[i] = xpeaks[i-1];
xpeaks[i-1] = xpeaktmp;
flag = 1;
}
}
}
// list the found peaks
for (int i = 0; i < nfound; i++) {
cout << "Channel " << xpeaks[i]
<< " (" << channeltokev(xpeaks[i])
<< " keV)" << endl;
}
flag = 0;
for (int i = 0; i < nfound; i++) {
// check if this peak has already been reduced
vector<double>::iterator iter1 = v.begin();
bool doubleredflag = 0;
while( iter1 != v.end()) {
if (*iter1 == xpeaks[i]) {
doubleredflag = 1;
}
iter1++;
}
if (counts->GetBinContent(round(xpeaks[i])) > 0
&& channeltokev(xpeaks[i]) > 100
&& !doubleredflag) {
// run peak dampening
104
APPENDIX B. PROGRAM CODE LISTING
logstream << "Reduction round: " << l << endl;
logstream << "Dampening at channel "
<< xpeaks[i] << " ("
<< channeltokev(xpeaks[i])
<< " keV)" << endl;
string basestr = "C:/root/macros/outputautomatic-";
basestr.append(floatToStr(xpeaks[i]));
basestr.append(".dat");
logstream << removePeak(xpeaks[i],counts,minchannel,basestr,1);
v.push_back(xpeaks[i]);
logstream << "----\n";
flag = 1;
}
}
}
cout << logstream.str();
break;
}
int sum2;
for (int i = minchannel;i <= 1024;i++) {
sum2 += abs(counts->GetBinContent(i));
}
if (sum1 == 0) {
cout << "no dampening possible" << endl;
} else {
cout << "Final dampening: "
<< (100-(sum2/(float) sum1)*100)
<< "% \n";
}
counts->Draw();
}
105
© Copyright 2026 Paperzz