Skip to content

3D spectra utilities

3D spectra utilities#

ɣ-ɣ-ɣ player (radware style)#

Cubix allows to create and read cubes using the Rarware's cube format.

Reading an already existing Radware's cube#

Let's suppose the cube main file is named "mycube.cub". Opening this file in cubix will try to load the following files:

  • mycube.tab: file giving the binning definition (in Radware, a binning adapted to the detector resolution is ofter used). If no such file is found, a default one is taken.
  • mycube.spe: total projection spectrum. If no such file, the total projection will be generated for the first read.
  • mycube.2dp: 2D projection projection matrix. If no such file, it will be generated for the first read.
  • mycube.bg.spe: background spectrum. If no such file, it will be automatically calculated.
  • mycube.aca: energy calibration file. If no such file, cube will be supposed already calibrated
  • mycube.aef: efficiency file. If no such file, efficiencies ignored (not used in the current version)

Another option is to define the file: "mycube.conf" containing all these links, as:

2DProj mycube.2dp
LUT mycube.tab
CalFile mycube.aca
TotalProj mycube.spe
EffFile mycube.eff
CompressFact 2

This second option allows to change more easilly the file names if needed, and allows to define the compression factor. This is to be used for binning of 0.5 keV/channel for example (Compression factor of 2)

To open a cube, double click on the file with the .cubextension. It will open the cube properties as follows:

To load the cube player utility, double click on the Cube file (showed by the red arrow on the above picture)

As for the radware \(\gamma-\gamma\) player, we can put the gates by clicking on the buttons "Gate 1" and "Gate 2". The projection will make the gate(s) of Gate 1 AND Gate 2. In case of multiple gates, the combinations will be summed between "Gates 1" AND "Gates 2".

Keyboard shortcuts: * g + g to define a new "Gate 1" by defining manually the centroid and width * Shift + g + g to define a new "Gate 2" by defining manually the centroid and width

In the following example, we can see two gates set on \(10^{+} \rightarrow 8^{+}\) and \(8^{+} \rightarrow 6^{+}\) off \(^{100}\)Zr in a Radware's cube coming from fission data. We can clearly see in the projection the transitions in coincidence, namely the \(2^{+} \rightarrow 2^{+}\), \(4^{+} \rightarrow 2^{+}\) and \(6^{+} \rightarrow 4^{+}\).

Creating a cube from a TTree#

Cubix propose a program to build a cube in the Radware's format from a ROOT TTree. A cube configuration file needs to be defined as in the following example (an example of configuration file is located in $CUBIX_SYS/conf/CubeBuilder.conf:

#######################
### Cube Properties ###
#######################

# Name of the 3D cube file
CubeFileName MyCube
# Compression factor (to obtain binning <1 keV, one needs to scale the energy)
# For example, to obtain a minimal 0.5 KeV/Channel, we fill the Cube on 8k channel for 4keV range ==> Compression factor = 2
CompressionFactor 1

# Must be a power of 2. Max range of the cube
CubeSize 4096

# scratch file used as buffer in cube building in MB
ScratchSize 512

################################
## Input Root Tree Properties ##
################################

#Name of the input TTree (regular expressions can be used as for building TChain)
TreeFile E680_TTree_100Zr.root

#Name of the TTree
TreeName 100Zr_Z_40_A100

#Events to process (0 => All)
NEvents 0

#Name of the branch corresponding to the gamma-ray energy
EGamma EGammaDC

#Name of the branch corresponding to the gamma-ray muliplicity
GammaMult MGamma

#Cut to be apllied (see TTreeFormulaExpression)
Cut None

To create the cube, use the command:

CubeBuilder CubeBuilder.conf

This should produce an output like:

...
...Done creating new cube.
Axis length of 3d cube is 4096.
3d cube has 45001728 minicubes and 11009 records.
Making sure we have enough scratch space...
...Done.
Scan started:  Tue Nov  7 08:36:54 2023


-- INFO    : Input Tree reading to build the database...
Total 11405842 events |===================>| 99.72% [ 2.34e+06 evts/s, time left:   0h00min00s ]
-- INFO    : Building the cube...
...Updating cube from scratch file:  Tue Nov  7 08:37:02 2023

There are 5494 chunks to increment...
...

The process will end by creating the 1D and 2D projections of the cube. at the end you should have in your current folder the following files:

-rw-r--r--@ 1 dudouet  staff       1140  6 nov 11:32 CubeBuilder.conf   # configuration file for the CubeBuilder program
-rw-r--r--  1 dudouet  staff  536870912  7 nov 08:37 MyCube.scr     # temporary scratch file used to build the cube (size parametrized in CubeBuilder.conf)
-rw-r--r--  1 dudouet  staff        864  7 nov 08:37 MyCube.log     # log file of the cube building
-rw-r--r--  1 dudouet  staff   49090488  7 nov 08:37 MyCube.cub     # cube file to be open in cubix
-rw-r--r--  1 dudouet  staff   67108864  7 nov 08:37 MyCube.2dp     # 2D projection of the cube
-rw-r--r--  1 dudouet  staff      16424  7 nov 08:37 MyCube.spe     # 1D projection of the cube
-rw-r--r--  1 dudouet  staff         39  7 nov 08:37 MyCube.conf    # configuration file of the cube (to get the compression factor for example)

This new cube has been build from AGATA/VAMOS fission data filtered by VAMOS on 100Zr events. We can open it and apply the same gates than on the previous example: