Read Me
XECON - a tool for analysis of radioxenon data
=====================================================================
Author: Anders Ringbom
Swedish Defence Research Agency (FOI)
E-mail: anders.ringbom@foi.se
XECON is a set of C++ routines that can be used to perform analysis of
2D beta-gamma spectra from radioxenon systems producing data on IMS
format 2.0.
The script is indended to be used with the physics analysis package
ROOT, developed at CERN. ROOT is under "GNU lesser general public
license" and can be downloaded from http://root.cern.ch/ for most
platforms.
The scripts have been developed when working with data from the SAUNA
radioxenon system, but are applicable to any system producing data on
the format IMS 2.0.
1. Introduction
This library consists of a collection of C++ functions that uses
the ROOT environment to analyze data from the SAUNA system (or any
other system that uses the beta-gamma coincidence technique and stores
data on IMS 2.0 format).
A complete measurement consists of data stored on three files (go to
link to view examples of these files):
SAMPLEPHD
GASBKPHD
DETBKPHD
The analysis consists of parsing the data from the files,
calculate the activity concentration of ^133Xe, ^131mXe, ^133mXe, and
^135Xe, and plot histograms. Results are also written to output text
files for further usage by other programs.
The analysis is based on the so called net-count method. The
original equations have been updated with a correction for the decay of
^133mXe to ^133Xe not included in the first version.
2. Installation
The scripts are executed in the ROOT environment, which can be
used at most platforms.
The distribution of XECON contains the following files (XECON releases
can be downloaded at the Sourceforge project page):
* xecon.c The main root script.
* nlib.c Library routines used by xecon.c
* example_input.txt Example of input file holding the
names of the files to be analysed.
* param.txt Parameter file with optional analysis
parameters to be set by the user.
* sample_example.phd Example of a sample data file
* gasbk_example.phd Example of a gas background data file
* detbk_example.phd Example of a detector background file
Installation instructions for Windows:
1) Create a working directory, for example c:\xecon\, and extract
all xecon files into that directory.
2) If required, install ROOT, either by using the source supplied
in this distribution, or by installing ROOT from http://root.cern.ch/.
3) Start the Command prompt in Windows.
4) Go to the working directory by entering e.g. "cd c:\xecon" in
the command window.
5) Start ROOT by entering "root".
6) At the ROOT prompt, you can now execute the script by entering:
".x xecon("example_input.txt",0,0)"
7) In this case, the example data is analyzed and the result
should be written to the standard output (the command window).
8) Still at the ROOT prompt, enter: ".x
xecon("example_input.txt",0,1)"
9) In this case, the same analysis is performed as in 6), but now
histograms and energy calibration are plotted as well.
10) Check that the files xecon_result.txt and xecon_data.txt are
created in directory c:\xecon\.
11) Note that the file xecon_result.txt is overwritten each time a new
analysis is performed.
12) You have to save it under a different filename if you want to keep
it.
3. The script XECON
xecon.c analyses and plots a sample (consisting of one SAMPLEPHD,
GASBKPHD, and DETBKPHD files respectively). The results of the
calculations are stored in output text files like this.
The script xecon requires the following files to be installed in the
same directory (you can of course put them wherever you like, but then
you have to change xecon accordingly):
nlib.c - Routines used by xecon.c
param.txt - A parameter file usd by the analysis. Contains optional
ROI definitions, gain calibration tweak parameters, and the memory
effect correction factor.
<input file> A text file holding the data directory name and names of
the data files to be analyzed.
Two files are produced by xecon.c:
xecon_result.txt - The result of the analysis. Produced each time
the script is executed. The previous xecon_result.txt is replaced.
xecon_data.txt - The main results written on a single line.
Results are concatenated to xecon_data.txt when the script is executed.
This file can be used to read data into other programs for plotting etc.
Execution of XECON:
At the ROOT - prompt, write:
.x xecon.c("<input file>",<roi flag =0,1>, <plot flag = 0,1>)
<input file> : The name of the input file holding the data directory
and the data file names.
<roi flag> : =0 use ROIs from original data, =1 Use ROI definitions
from param.txt
<plot flag> : =0 do not create and plot histograms, =1 create and plot
histogram
Example:
.x xecon.c("my_data.txt",0,0)
This will perform and plot an anlysis using the data files in
my_data.txt.
Histograms will in this case not be plotted, and ROI definitions from
the original data are used.
The file <input file> should have the following format:
-----------------------------------------------------------------------
<directory path to the directory holding the data files>
<sample file name 1> \t <gas background file name 1> \t <detector
background file name 1> \t <optional analysis flag = x>
<sample file name 2> \t <gas background file name 2> \t <detector
background file name 2> \t <optional analysis flag = x>
...
...
-----------------------------------------------------------------------
If the analysis flag "x" is included, the file names will be read;
otherwise the sample will be skipped.
Only one input line should be flagged for analysis.