Sie sind auf Seite 1von 29

NSCL S800 ROOT data analysis March 14, 2011 K.

Wimmer Abstract: Documentation for the NSCL S800 ROOT data analysis programs. This code can be used to analyze data taken with the S800 and Caesar, SeGA or Hira.

Contents
1 Introduction 2 The 2.1 2.2 2.3 2.4 2.5 2.6 2.7 unpacking code S800 . . . . . . . . . . . . . . . . . . Caesar . . . . . . . . . . . . . . . . . Hira . . . . . . . . . . . . . . . . . . SeGA . . . . . . . . . . . . . . . . . Scaler data . . . . . . . . . . . . . . Additional run information . . . . . . Histogramming of the unpacked data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 4 4 5 6 7 7 8 8 9 9 11 12 14 15 15 16 16 16 16 16 16

3 Calibration and reconstruction 3.1 Calibrated S800 data . . . . . 3.2 Calibrated Caesar data . . . . 3.3 Calibrated Hira data . . . . . 3.4 Calibrated SeGA data . . . . 3.5 Further run information . . . 3.6 Histogramming and gating . . 4 The GUI 4.1 The main window . . . . . 4.2 Dening histograms . . . . 4.2.1 The Histo class . . 4.3 Gates, Cuts and Condition 4.4 Changing the settings . . . . . . . . . . . . .

5 The histogram viewer 16 5.1 Creating gates and cuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 5.2 Fitting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 6 Additional Programs 6.1 Graphical cuts . . . . . . . . . . . . . . . . . . . . 6.2 CRDC sample viewer . . . . . . . . . . . . . . . . 6.3 Calibration . . . . . . . . . . . . . . . . . . . . . 6.3.1 The ion chamber . . . . . . . . . . . . . . 6.3.2 The CRDC pad amplitudes . . . . . . . . 6.3.3 The CRDC positions (mask calibration) . 6.3.4 Caesar energy calibration . . . . . . . . . 6.3.5 Timing calibration for the detectors . . . 6.3.6 Hira calibration, the Silicon strip detectors 6.3.7 Hira calibration, the CsI crystals . . . . . 6.3.8 Energy calibration for SeGA cores . . . . . 6.3.9 SeGA Segment calibration . . . . . . . . . 6.4 Corrections . . . . . . . . . . . . . . . . . . . . . 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 16 17 18 18 19 20 20 21 21 22 22 22 23

6.5

6.4.1 6.4.2 6.4.3 6.4.4 Useful 6.5.1 6.5.2 6.5.3

Time-of-ight corrections . . . . . . . . . . . Ion chamber corrections . . . . . . . . . . . Corrections for the angle at the intermediate Acceptance corrections . . . . . . . . . . . . scripts . . . . . . . . . . . . . . . . . . . . . makeCuts.C . . . . . . . . . . . . . . . . . . converter.C . . . . . . . . . . . . . . . . . . FitPeaks.C . . . . . . . . . . . . . . . . . .

. . . . . . . . image . . . . . . . . . . . . . . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

23 24 24 25 25 25 25 25 25

7 Installation

Introduction

The NSCL S800 ROOT program package is used for the analysis of experiments with the S800 spectrograph at NSCL/MSU. It allows for online and oine analysis and histogramming. It can be congured for SeGA, Caesar or Hira experiments. It consists of two main programs for unpacking, calibration and reconstruction of physical events, a graphical interface, a histogram viewing program, and several helper programs for calibration. The analysis of the data proceeds in two steps. In the rst step the data are are extracted from the evt-les written by the NSCL data acquisition program and converted to root les. This step is done by the Unpacker part of program. In this step the data are sorted into Objects of type S800, Caesar, SeGA or Hira which are derived from the main root class TObject. The structure of these objects are described in section 2. In the second step the calibration is applied to all detector subsystems, and physical events are created with the help of the inverse map for ejectile reconstruction with the S800, the SeGA segment position information or E E identication of light particles with Hira (section 3). This allows to obtain ejectile momentum distributions, Doppler-corrected energies and angular distributions of light charged particles detected by the Hira array. After each step Histogram les can be created. When histograms of calibrated data are created it is possible to impose gates and windows on the data, to obtain for example -gated momentum distributions. The ow chart in Fig. 1 shows the process of the data analysis with the NSCL S800 ROOT analysis package.
binary .evt file

Unpack

raw data .root file settings .dat file

Unpack_Histos

raw hists .root file

Calculate

cal data .root file cuts .root file

Cal_histos

cal hists .root file

Figure 1: Flow chart representing the data analysis process. Blue boxes mark in- and output les, red programs and green additional information needed by the programs. Each program is called by typing its name on the commandline followed by ags dening 4

the programs parameters. If the program is started without any ags, a description of all ags and the expected format is printed. In the following the individual steps are described. In addition to the commandline based programs described in the next sections a graphical user interface has been developed. This is described in section 4. Both the unpacking as well as the calculation code are implemented into the GUI and histograms and cuts can be dened by a few mouse clicks. However, this program is still under development, and even the nal functionality will be limited to more or less what is possible with SpecTcl. For a more sophisticated analysis including automatic acceptance or eciency corrections, weighting events, and especially the Hira particle identication the use of the commandline based programs is highly recommended. A basic knowledge of ROOT and object oriented programming is required if you want to successfully use the package, however examples are provided, which can be easily modied to customize the code. For the S800 part as well as for SeGA the results obtained with this code have been compared with the corresponding SpecTcl analysis. Except for rounding errors exact agreement for all parameters has been found.

The unpacking code

The unpacking part of the code takes a binary .evt le and transform it into a .root le. No calibrations, calculations or corrections are done in this step. The resulting .root le contains a tree called tr with two branches, one for the S800 data and one for the secondary detector chosen. The unpacking routines are collected in the UnpackedEvent class. This code is very similar to the SpecTcl/ScintiSpec codes. The unpacking code is called by typing Unpack -i INPUTFILE -o OUTPUTFILE (-lb NUM) in the commandline, where INPUTFILE is the .evt le to be unpacked and OUTPUTFILE the resulting root le. The optional ag -lb NUM can be used to unpack only the rst NUM buers. This can be useful for testing. The information needed by the unpacking code are given in the defs.h les. Here the packet identiers and channel numbers are dened. With very few exceptions described later these les should not change unless there is a signicant change in the electronics or the readout code. For example the S800defs.h le contains the packet identiers for all sub detectors in hexadecimal numbers as well as the number of channels in the CRDC and ion chamber detectors. In the following the structure of the objects written to the unpacked tree is described. Additional information can be found in the source code, i.e. S800.hh, Caesar.hh etc. and the reference at http://www.nscl.msu.edu/~ wimmer/referenceguide.

2.1

S800

The S800 class contains several subclasses which are associated with the corresponding detector systems in the S800 spectrograph. The structure is shown in Fig. 2. It is impor5

S800
fTrigger fTof fScintillator[3] fCrdc[2] fIonChamber fTPpac

Trigger
fregistr fs800 fexternal1 fexternal2 fsecondary

TimeOfFlight
frf fobj fxfp ftar ftac_obj ftac_xfp

Scintillator
fID fde_up fde_down ftime_up ftime_down

Crdc
fID fanode ftac fwidth fdata fsample fchannels

IonChamber
fchannels fdata

Tppac
fID fdata fsample fchannels

Figure 2: Structure of the unpacked S800 data. tant to remember that these are raw data, i.e. for example fobj of the TimeOfFlight is the raw time, the master trigger time fs800 in not subtracted yet, the CRDC data are the samples in time, pedestals are not removed. Data from the unpacked tree can be plotted from the root command line by for example: tr->Draw("fTof.fobj-fs800") for the OBJ time, or tr->Draw("fTof.ftac_obj-fs800:fTof.ftac_xfp-fs800","","colz") for a two-dimensional particle identication plot for the incoming beam using the times recorded with the TACs. Some variables are stored as vectors. This saves memory and computation time, but makes it a bit dicult to plot them directly from the command line. The Unpack histos program can be used to histogram the CRDC and ion chamber data for calibration. The PPAC and CRDC data can also be viewed with the Trace program described in 6.2.

2.2

Caesar

The Caesar data essentially consists of the energy and time information for each Fera VSN and channel stored in two-dimensional arrays ftime[vsn][ch] and fenergy[vsn][ch] (see Fig. 3). Most of the time the multiplicity of the time events is very dierent from the energy events. In order to avoid looping over all 12 16 elements of the array when correlating the times with the energies the data of either the time or the energy are also stored as vectors (fenti, fvvsn and fvch). The method is chosen in Caesardefs.h. 6

Caesar
ftrigbit ftime[vsn][ch] fenergy[vsn][ch] ftmult femult fenti fvvsn fvchn

Figure 3: Structure of the unpacked Caesar data. #define FERA_TIME 1 If FERA TIME 1 is chosen, the times are stored in the vector, and the corresponding energies are taken from the two-dimensional array. This is faster if there are less time data than energies. The faster method can be determined by looking at the average number of ftmult and femult. The code will print out a warning message if the less ecient method is chosen. The data of a specic detector (i.e. VSN and CH combination) can be accessed on the root commandline by tr->Draw("fenergy[VSN][CH]")

2.3

Hira

Each Hira telescope consists of a Silicon detector stack and four CsI crystals, their data are identied by the number of the electronics tower, the slot number and the channel number. The Hira object itself contains vectors of Si and CsI objects as shown in Fig. 4. Since the Hira data structure only contains vectors the histogramming on the root
Hira
fSi fCsI

Si
ftower fen fchip fstrip ftime

CsI
fslot fch fen

Figure 4: Structure of the unpacked Hira data. commandline is not recommended. Examples how to plot Hira data are given in the Unpack histos.cc source code. 7

2.4

SeGA

The SeGA data structure is shown in Fig. 5. It consists of the hitpattern and a vector of Core objects. These in turn contain the energy, time and channel information of the central core signal as well as a hitpattern for the segments and vectors of the segment data.
SeGA
fhitpattern fcore

Core
fhitpattern fen fch ftime fsegch fsegen

Figure 5: Structure of the unpacked SeGA data.

2.5

Scaler data

In addition to the event data, every two second the scaler values are written to the .evt le. This data is also unpacked and written to a separate tree in the .root le called sc. The structure of the Scaler object is shown in Fig. 6. NSCALER is the number
Scaler
fvalues[NSCALER] fstartTime fendTime

Figure 6: Structure of the Scaler data. of scaler channels dened in Scalerdefs.h, this number should be larger or equal to the number of channels. If thats not the case an error message with every scaler event will printed. fstartTime and fendTime are the times in seconds when the scaler number was reseted or read out, respectively, so their dierence should be 2, if the scaler readout is set to two seconds. The Scaler object has method to calculate the rate automatically. For the analysis of the scaler data the program ScalerAnalysis is used. It produces rate histograms for each channel. It is called by: ScalerAnalysis -i INPUTFILES -o OUTPUTFILE -s SETTINGSFILE

where INPUTFILE is the .root le containing the unpacked data and OUTPUTFILE the resulting histogram root le. The settings le SETTINGSFILE contains the names of the scaler channels and has to be provided by the user. The rst line is the number of channels, followed by one line for each channel with the scaler channel number and its name. An example is provided with the default settings at http://www.nscl.msu.edu/~ wimmer. The program can also be used to analyze the data from several runs by using more than one input le, for example ScalerAnalysis -i run0[45]*.root -o scaler_040_059.root -s scalerset.dat would analyze runs 40 to 59 and write the result to scaler 040 059.root. Before doing so you should check the size and the binning of the histograms in the ScalerAnalysis.cc source code.

2.6

Additional run information

For each run additional information on the run is written to the .root output le. The class Runinfo contains information like the run number, the runtime, the life time of the acquisition and the eciencies of the detector subsystems. This information is updated in each analysis step. The unpacking code writes the number of buers, scaler buers, the run number, the start and end-time of the run, as well as the scaler integrals to the class. For a list of the members check the Info.hh source code. Note that some scaler channels are hard-coded (sorry), so if the scaler channel of the raw and live clock or the XFP and OBJ scintillators changes, the code has to be updated.

2.7

Histogramming of the unpacked data

For display of the unpacked data the Unpack histos.cc code is called by Unpack_histos -i INPUTFILES -o OUTPUTFILE where INPUTFILE is the .root le containing the unpacked data and OUTPUTFILE the resulting histogram root le. The program can also be used to analyze the data from several runs by using more than one input le, for example Unpack_histos -i run10*.root run110.root -o hrun100_110.root would make histograms for runs 100 to 110 and write to the le hrun100 110.root. The data is accessed by the getter methods of the unpacked objects, for example if my s800 is an instance of S800, my S800->GetIonChamber()->GetChannels()[i] and my S800->GetIonChamber()->GetData()[i] give the channel number and raw energy of channel i of the ion chamber. An example for each detector system is provided with the source code.

Calibration and reconstruction

In the second step all calibrations of the detectors are performed. With the inverse map for the S800 the momenta, angles and positions of the ejectiles at the target position are reconstructed. From the position of the detectors the Doppler corrected energies can be obtained. The calibration code is called by typing Calculate -i INPUTFILE -o OUTPUTFILE -s SETTINGSFILE (-t NUM) in the commandline, where INPUTFILE is the .root le containing the unpacked data and OUTPUTFILE the resulting calibrated root le with the tree caltr. The settings le SETTINGSFILE contains all relevant information, such as the path to calibration les, the inverse map and various other variables which are described in the following sections. The optional ag -t NUM is used to indicate whether it is a source run, i.e. no valid S800 event required, or it can be used to choose a software coincidence condition. The meaning of NUM depends on the secondary detector system and is described in the corresponding section. In general if NUM is set to zero, events are only written if the S800Calc is valid, i.e. the event has been recorded in the ion chamber and both CRDCs. For source runs, or if an oine coincidence condition is imposed this value will be dierent from 0. The default value of NUM is 0. The settings le is read as a TEnv object. General settings, which are independent of the secondary detector are the verbose level for testing and debugging and the number of events to be read. If LastEvent is zero all events are analyzed. Example settings les can be found at http://www.nscl.msu.edu/~ wimmer, they are not intended to be used, but to give an example of the input format of the settings and the various calibration les.

3.1

Calibrated S800 data

The S800Calc class contains contains the calibrated S800 data, it consists of several subclasses for the individual detector subsystems. The general structure shown in Fig. 7 is very similar to the unpacked data. During the calibration several intermediate variables are calculated which are not needed for the further analysis, however can be helpful for calibration or to check the calibration. For example the CRDC pad with the maximum amplitude fmaxpad is not needed anymore once the position fx has been calculated in units of cm. With a switch in the Makele the storage of such parameters in the .root le can be suppressed. If the Makele contains a line: SWITCH += -DS800_DETAILEDTREE the parameters indicated in blue in Fig. 7 are written to the tree. For SWITCH += -US800_DETAILEDTREE the output is suppressed, this saves disc space and computation time. Similar switches can be found for the secondary detectors. The TOF class contains the time of ight information, in contrast to the unpacked data, here the master trigger time ftimes800 is subtracted. Furthermore it contains the 10

S800Calc
ftimes800 fTOF fSCINT[3] fIC fPAD[2] fTRACK fPPAC[2] fIITRACK

TOF
frf fobj fxfp frfc fobjc fxfpc ftac_obj ftac_xfp ftac_objc ftac_xfpc

SCINT
fde ftime fdeup fdedown ftimeup ftimedown

IC
fsum fde fcal fchan

PAD
fid fx fy fcal fchan fmaxpad fpadmax fx_gravity fx_fit

TRACK
fxfp fafp fyfp fbfp fata fyta fbta fdta fazita fscatter fptot fppar fptra fetot

PPAC
fid fx fy fxstrip fystrip fxmult fymult fxmax fymax

IITRACK
fxii faii fyii fbii fazita fscatter

Figure 7: Structure of the calibrated S800 data. corrected time-of-ights fobjc etc. which are needed for the particle identication after the secondary target. Since the time-of-ight depends on the trajectory trough the S800, these times are corrected depending on the angles in the focal plane (fafp member of TRACK) and the position on CRDC 0 (fx member of PAD[0]). The correction parameters are given in the settings le by OBJe1.Corr for the dependence on angle and OBJ.Corr for the position dependence. Similar for the XFP scintillator time and the TAC measurement. Typical values are around 1 for the angle and around 0.1 for the position correction. Correction parameters can be obtained with the calibration procedure of the HistView program (section 5) or a tting script described in section 6. The fsum member of the IC class is the sum of all 16 channels of the ion chamber, while fde is additionally corrected depending on the position of the particle in the CRDCs, since the energy loss in the ion chamber depends slightly on it (IC.Y.Corr, IC.X.Corr and IC.X0.Corr). For the CRDCs the calibrated charge signals of each pad are stored in the vectors fcal and fchan for the pad number. For calibration rst default pedestals are subtracted 11

from each sample point. The pedestals are given in the Crdc.Ped.File le specied in the settings le. Then for each event the pad with the maximum charge deposition is found (fmaxpad) and its signal hight, as well as the two adjacent pads are saved in fpadmax (vector of size 3). In an iterative calibration the osets and gains of all pads are determined by gating on several particle species identied with the ion chamber and the time-of-ight. Calibration parameters are stored in the le Crdc.File dened in the settings le. The procedure to obtain the calibration le is described in section 6. Once all channels are calibrated the position of the particle is determined by either the center of gravity of by a t of the charge distribution. The method is chosen in the settings le by setting Crdc.Method.N (N = 0, 1 for CRDC 0 or 1) to 0 for center of gravity or 2 for t. After that the position in x and y in mm is obtained from runs with a mask in front of the CRDCs. The calibration parameters Crdc.X.Oset.N, Crdc.X.Gain.N are dened in the settings le. Like all calibration parameters they can be calculated using the calibration procedures of the HistView program (section 5). From the positions in both CRDCs the angles and position of each particle are calculated (fxfp,fafp,fyfp and fbfp members of TRACK) and with the help of the inverse map the corresponding angles at the target position are reconstructed. The le for the inverse map is dened in the settings le where Map.File gives the path to the inverse map le. If the distribution of angles fata and fbta are not centered around 0 this can be corrected with Angle.a and Angle.b in the settings le. The TRACK class further contains the scattering angles fscatter and fazita as well as the momenta (fptot, fppar and fptra) and energies fetot of the particle. In case the tracking PPACs are used, the calibrated S800 also contains the classes PPAC and IITRACK for the intermediate image tracking. These are very similar to the focal plane CRDCs.

3.2

Calibrated Caesar data

The CaesarCalc class contains contains the calibrated Caesar data. In addition to the calibrated energies and times for each ring and detector of Caesar, the energies after the addback routine are stored as well. After correlating the energies with the times in the Fera, the raw energies and times as well as the multiplicity are stored for later calibration. The dierence between frawmult and fmult is a software window on the energies and times (Caesar.Min.Energy and Caesar.Max.Energy and similar for time in the settings le). In order to correlate the Fera VSN and channel number with the actual ring and detector number of each Caesar crystal a mapping le is needed (Caesar.VSN.Map). For energy and time calibration two additional les are needed (Caesar.ECal and Caesar.TCal), these contain parameters for up to a third order polynom for the energy and a time oset. The time can be additionally shifted by a xed amount Caesar.Time.Shift. After time calibration the dierence to a reference time is taken. This is in the settings le SeGA.Time.Method since it is the same for the SeGA calibration. Here 0 means raw time without reference, 1 with the calibrated OBJ scintillator time as reference, 4 with the calibrated RF time as reference and 5 with the master trigger time (E1 scintillator) as reference. Methods 2 and 3 are not implemented yet. Once the energies are calibrated they can be Doppler corrected with the positions 12

CaesarCalc
frawmult ftimesraw fenergyraw fmult fring fdet ftime fenergy fdcenergy fabmult fringab fdetab fenergyab fdcenergyab

Figure 8: Structure of the calibrated Caesar data. dened in Caesar.Pos. For the Doppler correction also the target position with respect to the S800 pivot point needs to be known. The values of Target.X, Target.Y and Target.Z in the settings le dene the center of the target. The Doppler corrected energy fdcenergy is then calculated using the velocity at the target position Target.Beta of the settings le. In the addback routine the energies of neighboring crystals are added and the position of the crystal with the highest energy deposition is taken as the rst interaction point for the Doppler correction. In the Caesar.Neigh for each detector the number of neighbors and their ring and detector number are dened. In a few cases the addback routine might fail, due to too high detector multiplicity or wrongly defended neighbors. The calibration code counts the number of addback fails and prints out their percentage at the end of the run. If the amount of failures during the addback becomes to large, the code and the settings le should be checked for errors. For source runs the -t NUM ag has to be set to any value larger than 0, as otherwise only events with a valid S800 subevent are written to the output tree.

3.3

Calibrated Hira data

The data written to the calibrated Hira branch contains the telescope multiplicity fmult and a vector of Telescopes (see Fig. 9). The structure of the Telescoped class is very similar to the unpacked Hira data. The objects Si and CsI themselves contain vectors of energies and channel numbers, in case of the Silicon detector also the time information, as well as the maximum energy deposited and is strip or channel number. Similar to the other classes, uncalibrated data is also written to the branch if the switch in the Makele is set to detailed tree. Each telescope contains three silicons, fSi[0] is the thin E detector, fSi[1] the front and fSi[2] the backside of the double sided strip detector. 13

HiraCalc
fmult fTele

Telescope
ftelenum fSi[3] fCsI

SiCalc
fmult fstripNr fenergy ftime fmaxen fmaxstrip fenraw

CsICalc
fmult fch fen fmaxen fmaxch fenraw

Figure 9: Structure of the calibrated Hira data. For the calibration of the Silicon detectors a mapping table to identify the tower and chip numbers with the telescope number and the type of the Silicon detector is needed. The mapping table is dened in the settings Si.Map. A similar map is needed for the CsI mapping (CsI.Map). For the backsides of the Silicon detectors the polarity is inverted, thus the raw energy is subtracted from the value of Si.B.MaxEn to obtain the correct value. The paths for the calibration les are the values of Si.Cal and CsI.Cal in the settings le. Depending on the ag -t NUM on calling the Calculate program events are only written to the tree if the following conditions are met. If NUM is set to 0 only the validity of the S800 part is requested, for 1 the S800 must be valid and both a E and the CsI E detector of the same telescope must have a signal above threshold. For calibration run, i.e. with the source or a proton beam, there is no S800 trigger. If NUM is set to 10 both E and the E detector must be valid, for 11 it is sucient if the E detector is valid, while for 12 events with a single E hit are also written to the output tree. The further analysis of Hira data like identication of the light particles, their emission angle, the calculation of solid angle and the cross section is done in a separate step. The code for this which also includes some fancy methods for S800 events can be provided upon request.

14

3.4

Calibrated SeGA data

The structure of the calibrated SeGA data is shown in Fig. 10. Similar to the unpacked data the SeGACalc contains a vector of CoreCalc which in turn contains the relevant information for each SeGA hit. In addition to detector number fdet, energy fen and
SeGACalc
fmult fcore

CoreCalc
fdet fen fDCen ftime fPosition fmaxseg fsegch fsegen

Figure 10: Structure of the calibrated SeGA data. time ftime the Doppler corrected energy fDCen and the position of the segment with the maximum energy deposition, a TVector3 fPosition are written to the data. The segment energies are only written to le if the switch in the Makele is set to detailed tree. The path to the calibration le for SeGA is given by the value of SeGA.Cal.File in the settings le. This le contains the energy calibration parameters up to third order, individual time osets for each core and the angles and of each crystal center with respect to the beam axis. For the time reference point the method is chosen by SeGA.Time.Method in the settings le. Here 0 means raw time without reference, 1 with the calibrated OBJ scintillator time as reference, 4 with the calibrated RF time as reference and 5 with the master trigger time (E1 scintillator) as reference. Methods 2 and 3 are not implemented yet. The positions of the segments are calculated from the angle of the center of the crystal with respect to the beam axis and the angle between two neighboring segments Doppler.DeltaTheta. A routine to read the actual position of each segment from a le is currently under development. For the Doppler correction also the target position with respect to the S800 pivot point needs to be known. The values of Target.X, Target.Y and Target.Z in the settings le dene the center of the target, while Doppler.Distance gives the average distance of the crystal centers from the target position. The Doppler corrected energy fDCen is then calculated using the velocity at the target position Target.Beta of the settings le. When histogramming the SeGA data the Doppler corrected energy can be accessed with several get methods. 15

GetDCEnergy() gives the energy based on the velocity and the positions as dened in the settings le with GetDCEnergy(double beta) the Doppler correction is recalculated with a dierent beta if the angle = alpha between the and the ejectile is known the Doppler correction can be done on an event-by-event basis with GetDCEnergy(double beta, double alpha). As for the Caesar data, for source runs the -t NUM ag has to be set to any value larger than 0, as otherwise only events with a valid S800 subevent are written to the output tree.

3.5

Further run information

In the calibration step the run information Runinfo is updated. Furthermore the settings itself are written to the output le. The settings of the inverse map, mass and charge of the ejectile and its B value, the number of entries in the unpacked tree as well as the number of valid entries written to the output tree. The number of events in all S800 sub detector systems is counted and their respective eciency relative to the ion chamber is calculated. At the end of the Calculate program run time a summary of the run information will be printed out.

3.6

Histogramming and gating

After the calibration steps histograms are created with the Cal histos program. It is called with Cal_histos -i INPUTFILE -o OUTPUTFILE (-c CUTSFILE -t TAC -cal CAL)

where INPUTFILE is the .root le containing the calibrated data and OUTPUTFILE the resulting histogram root le. The program can also be used to analyze the data from several runs by using more than one input le, for example Cal_histos -i run10*.root run110.root -o hrun100_110.root would make histograms for runs 100 to 110 and write to the le hrun100 110.root. The optional ags are CUTSFILE, a root le containing particle identication cuts for the incoming and outgoing beam, TAC to indicate whether these cuts have been created with the TAC (0) or TDC (1) measurement of the time (default is 0) and CAL to produce histograms which are used for the calibration of the detectors. In that case the calibrated data has to include the raw parameters (i.e. the corresponding DETAILEDTREE switch has to be set). The value of CAL is a binary number, 1 stands for CRDC calibration, 2 for ion chamber calibration, 4 for Hira calibration and 8 for Hira strip calibration. Combinations of the above are possible, i.e. 3 would produce histograms for the CRDC and the ion chamber calibration. For the detectors histograms of the raw 16

data are obtained by using an empty calibration le, as default the gain of all detectors is set to 1 and the oset to 0. Graphical cuts for the particle identication are created with the makeCuts.C script (see section 6.1 for the use of the script and the naming convention of cuts). For each cut gated histograms are created and lled. The cuts as well as the run information runinfo and the settings set from the input le are then also written to the output root le. The example Cal histos.cc source code provided is not meant to be a full analysis. Rather an example for each detector system of how to get data from the tree and ll histograms is provided.

4
4.1 4.2
4.2.1

The GUI
The main window Dening histograms
The Histo class

4.3 4.4

Gates, Cuts and Condition Changing the settings

5
5.1 5.2

The histogram viewer


Creating gates and cuts Fitting

Additional Programs

This section describes several additional programs and scripts needed for the calibration and to determine correction parameters.

6.1

Graphical cuts

The script makeCuts.C allows to create graphical cuts (TCutG objects) and save them to a root le. A typical root session to create a cut on the particle identication with the ion chamber and the corrected OBJ time-of-ight would look as follows. root -l root [0] TFile f("run025_calc.root") root [1] caltr->Draw("fIC.fde:fTOF.ftac_objc","","colz") root [2] .x makeCuts.C -------------------------------------Draw and save 2D cuts in ROOT -------------------------------------17

- set output filename by calling "setFile("YOURFILE.root")" default name is "cutfile.root" - start cut by calling "cut("YOURNAME")" -------------------------------------root [3] setFile("cuts.root") setting filename to cuts.root root [4] cut("in28Mgout27Na") You can draw a cut by clicking View->Toolbar->Graphical Cut Double-click to close cut Cut in28Mgout27Na with 8 points 1807.47 539.725 1794.9 484.11 1804.78 441.737 1820.04 428.496 1831.72 476.165 1834.41 545.021 1819.15 587.394 1807.47 539.725 Cut in28Mgout27Na will be saved to file cuts.root TFile** cuts.root TFile* cuts.root KEY: TCutG in28Mg;1 Graph KEY: TCutG in28Mgout27Na;1 Graph root [5] The same can be done with histograms: root root root root ... -l [0] TFile h("hrun025_calc.root") [1] xfp_vs_obj->Draw("colz") [2] .x makeCuts.C

The cut is initialized by clicking on ViewToolbar and then on the scissor symbol on the top right of the canvas. A cuts is closed with a double-click. For the Cal histos program cuts have to called inXYZ for the incoming beam XYZ and inXYZoutABC for an outgoing beam ABC produced from the incoming XYZ beam. So inXYZ has to be created rst, then the ion chamber - corrected OBJ 2D histograms are produced with a gate on XYZ and the inXYZoutABC cuts are created with this histogram. The created cuts are automatically saved to the le specied, and this le is updated, i.e. the inXYZoutABC cuts should be written to a le which already contains the corresponding inXYZ cut.

6.2

CRDC sample viewer

The Trace program displays the samples for the S800 CRDCs and the tracking PPACs. It is started by the command Trace. Fig. 11 shows the main window. The le should 18

Figure 11: Trace GUI be an unpacked run, containing the raw S800 data. There are four plotting options. the projection for one event, this is used to see what pads have red in the event, and to get a value for the gravity width used in the calculation step. projection for several events sample data for one event and one pad (use the projection for this event to nd out what pads have red) sample data for one event and up to ten pads In case the PPAC is chosen, pad refers to strip number.

6.3

Calibration

In this section a few calibration programs are presented. The output format of these programs is such that the .dat les containing the calibration parameters can be directly used in the settings le. For tting most of the programs use the shared library libPeaks.so so make sure that this is installed. 6.3.1 The ion chamber

The Cal histos program as provided with the package creates a histogram for each channel of the ion chamber and each particle id gate in the ion chamber. The histograms called ICde vs ch[ou][ch] for outgoing beam gate number ou and ion chamber channel ch are created for rst incoming beam only, so make sure that the incoming beam cut is on the most intense beam, and then create cuts (section 6.1) for the outgoing beam after the target. These cuts do not have to be perfect, use approximate values for the OBJ time correction, or gate on the Z of the nucleus only. At least two particle id cuts (blobs) are needed for the calibration of the ion chamber with ICCal -i INPUTFILE -o OUTPUTFILE -b NBLOBS -m MATCHINGCH where INPUTFILE is the .root le containing the calibrated data and OUTPUTFILE is the name of the output le without any extension. The program will create a calibration le OUTPUTFILE.dat and plot the t result to OUTPUTFILE.ps to 19

check the quality of the ts. int NBLOBS is the number of particle id cuts, blobs, the default value is 2. Each channel and blob histogram is then tted with a Gaussian function. There is no absolute calibration of the ion chamber, so all channels are calibrated relative to channel int MATCHINGCH. If MATCHINGCH is negative, then no calibration is performed, just the result of the individual ts in printed to the OUTPUTFILE.dat le. 6.3.2 The CRDC pad amplitudes

The PadCal program is used to calibrate the CRDC pads. This is an iterative procedure, so the steps described in the following have to be repeated a few times as a new calibration can change for which the maximum amplitude is found. Run the Calculate program with an empty calibration le for the CRDCs, but with the default pedestal settings. Then the Cal histos program is used to create histograms called crdcpad X Y inABCoutZ and crdcpad0 X Y inABCoutZ for CRDC X, pad Y and particle id cuts inABCoutZ. As for the ion chamber calibration rough cuts are sucient, choose three outgoing beam which are spread over the whole range of the CRDC. The crdcpad histograms are lled with the value of the pad with the maximum amplitude, while for the crdcpad0 histograms the two neighboring pad are also lled. The calibration is called by PadCal -i INPUTFILE -o OUTPUTFILE -n NITER -m MATCHINGCH -h HIST where INPUTFILE is the .root le containing the calibrated histograms and OUTPUTFILE is the name of the output le without any extension. The program will create a calibration le OUTPUTFILE.dat. If int HIST is not 0 (default is 0) then the t result is written to OUTPUTFILE.root in order to check the quality of the ts. There is no absolute calibration of the CRDCs, so all pads are calibrated relative to pad int MATCHINGCH. int NITER is the number of the current iteration of the calibration. If NITER = 0 then a new calibration le for the CRDCs is created, if it is larger than 0 then the gains and osets are read from OUTPUTFILE.dat and after the calibration the le is updated and the new calibration parameters are written to it. There are a few things which have to be adjusted in the source code itself. The name of the histograms is hard-coded, you have to choose three blobs which are distributed over the whole range of interest in the CRDC. The calibration can also be done with only one or two blobs, but then the source code has to be changed. The histogram names are dened in line 44 and following of the code: string hname[3]; hname[0] = "in28Mgout22F"; hname[1] = "in28Mgout25Ne"; hname[2] = "in28Mgout27Na"; For rst two iterations the crdcpad0 histograms are used for the calibration, after that only the maximum pad contributes to the calibration. This can be changed in the source code lines 90 and 110 (if(niter2)). After the calibration run the Calculate program with the new calibration le OUTPUTFILE.dat, create new histograms and rerun PadCal with NITER increased by 1. Eventually this procedure converges, i.e. the 20

new gains and osets do not dier signicantly from the old ones (for each CRDC and pad the old and new values are printed to the screen). 6.3.3 The CRDC positions (mask calibration)

The mask calibration is very simple, just plot the y position versus the x position for each CRDC mask calibration run caltr->Draw("fPAD[0].fy:fPAD[0].fx","","colz") and determine the position of the center hole and several other holes. Fig. 12 shows a sketch of the mask with the y positions of the holes in mm. The center hole marked in red is located at x = 0 mm and y = 0 mm. The gains for x is just the pad size, 2.54 mm,

50 25 30 20 10 0

6 5 4 3 2 1 0

25

Figure 12: Sketch of the CRDC mask used for the position calibration the osets in x are around 300 mm, for y the gains and osets of the two CRDCs have opposite sign as the drift eld is reversed. Absolute values are around 110 - 150 mm for the oset and 0.1 mm/ns for the gain. In the future a graphical method to calibrate the positions will be implemented into the HistView program (section 5). 6.3.4 Caesar energy calibration

The Caesar array is calibrated with several ray sources. The program for the energy calibration is called by CaesarCal -s SETTINGSFILE -o OUTPUTFILE -a APPROX -h HIST SETTINGSFILE is a le listing the runs and sources to be used for the calibration. The rst line is a comment followed by one line with the path to the histogram le and a number indicating the source used in this run, for example: #sources 0 152Eu, 1 60Co, 2 88Y, 3 137Cs, 4 226Ra, 5 22Na, 6 133Ba, 7 57Co hrun013_calc.root 2 hrun012_calc.root 0

21

The program loops over all rings (R) and detectors (D) and looks for histograms called egamraw R D created by the Cal histos program with the raw energies. The rst run in the list should be taken with the 88 Y source, this provides a rst rough calibration used to constrain the ts on the other sources. If you dont want this, you have to change the source code. The -a APPROX ag gives the approximate gain of the detectors, this allows for a quick peak nding. OUTPUTFILE is the name of the output le without any extension. The program will create a calibration le OUTPUTFILE.dat and a ps le OUTPUTFILE.ps with the calibration curves. The last page of the .ps le shows the calibrated energy versus the detector number (D+24R) for the 88 Y source run to quickly check the result. If int HIST is not 0 (default is 0) then the t result for each peak as well as the calibration curve is written to OUTPUTFILE.root. Currently the calibration curve is tted with a linear function, the Calculate code supports however up to third order polynomials for the energy calibration. The t function can be changed in the code. 6.3.5 Timing calibration for the detectors

The times measured with the individual channels of both the Caesar and the SeGA detectors are not aligned with respect to each other and the time measured with the object scintillator. This has to be corrected. The program TimeCal can t the time oset corrections for both detector systems. TimeCal -i INPUTFILE -o OUTPUTFILE -d DETECTOR -s SETPOINT -h HIST where INPUTFILE is the .root le containing the calibrated histograms. For the time reference the object scintillator time is subtracted from each time. Thus before the calibration can be performed the data have to calibrated with an empty time calibration le for Caesar, and with all time values in the SeGA calibration le set to 0. Also make sure that the time method in the settings le is set to 1 OBJ. If necessary a energy gate might be applied in the Cal histos program. The ag -d DETECTOR is used to choose between SeGA (-d 0) and Caesar (-d 1). The program then ts histograms called tgamraw C with the SeGA core number C or tgamraw R D for ring (R) and detector (D) of Caesar. The SETPOINT is the time zero point, all detectors will be calibrated to that time (the default is 0). OUTPUTFILE is the name of the output le without any extension. All t functions are written to OUTPUTFILE.root if the -h HIST ag is not 0 (default is 0). Furthermore a postscript le OUTPUTFILE.ps with the histograms and ts is created. The last page of the .ps le shows on the left the raw and on the right the shifted times versus the detector number (core number C for SeGA and D+24R for Caesar). After a successful calibration all detectors should be aligned. For SeGA there is one calibration le both energies and times, so either use the already created energy calibration le as the OUTPUTFILE le (a TEnv does only update the le, so the energy calibration is not deleted) or copy two les together. 6.3.6 Hira calibration, the Silicon strip detectors

to be written ... 22

6.3.7

Hira calibration, the CsI crystals

to be written ... 6.3.8 Energy calibration for SeGA cores

For the energy calibration of the SeGA core signals the GammaCal program is used. GammaCal -i INPUTFILE -o OUTPUTFILE -s SOURCE -a APPROX -h HIST where INPUTFILE is the .root le containing the calibrated histograms and OUTPUTFILE is the name of the output le without any extension. The program will create a calibration le OUTPUTFILE.dat. If -h HIST is not 0 (default is 0) then the t result is written to OUTPUTFILE.root in order to check the quality of the ts. The program searches for histograms if the type hgeraw C with core number C. These are created with the Unpack histos program. For the segments the cores have to be already calibrated. The calibration source is chosen with -s SOURCE, so far 152 Eu (0) and 60 Co (1) are available, but it is very easy to implement other ray sources. -a APPROX gives the approximate gain of the detectors, this allows for a quick peak nding, especially if the background lines are of similar intensity as the source. The calibration curve is a rst order polynomial, however the Calculate code supports up to third order for cores. If higher orders are really needed, the tting function can easily be changed for a higher order polynomial. At the end of the tting procedure a plot for each tted raw energy spectrum and the calibration curve is saved to OUTPUTFILE.ps. The last page of the .ps le shows a summary of the calibrated energy versus the detector number to quickly check the result. 6.3.9 SeGA Segment calibration

After the cores are calibrated, each segment is calibrated with respect to the core energy by gating on segment multiplicity one events. In that case the full energy is deposited in one segment only, and the segment energy should be the same as the core energy. For the calibration of the segments all runs, not only the source runs, can be used. In the Cal histos code for each segment a TProle of the calibrated core energy versus the segment energy is created. The proles are tted with SegCal -i INPUTFILE -o OUTPUTFILE -r LOW HIGH -h HIST where INPUTFILE and OUTPUTFILE as usual the in and output les. The -r LOW HIGH ag is used to dene a tting range for the segment energy in channels. If nothing is given there the t will range from channel 10 to 3000. The proles and t results are printed to a postscript le OUTPUTFILE.ps and the last page the calibrated segment energy versus the segment number (segnr+32corenr) is plotted. If -h HIST is not 0 (default is 0) then the t result is written to OUTPUTFILE.root. The result of the calibration is written to OUTPUTFILE.dat. For SeGA there is only one calibration le containing the time oset, and the calibration for both cores and segments. So either 23

use the le containing already the time and core calibration parameters as OUTPUTFILE.dat (a TEnv does only update the le, so the energy calibration is not deleted) or copy the les together. After that the angles of the detectors have to added to the le.

6.4

Corrections

In addition to the calibration parameter a number of corrections to the calibrated data have to be made. These include position and angle dependence of time and energy loss in the focal plane and intermediate image, as well as acceptance corrections to the momentum distributions. 6.4.1 Time-of-ight corrections

Since the time-of-ight through the S800 spectrograph depends on the trajectory of the particle, or its position and angle in the focal plane, the OBJ or XFP time has to be corrected to be used for the particle identication. First the time-of-ight is corrected for its dependence on the dispersive angle in focal plane. This is done using the script corrections.C. when this script is executed in root (.x corrections.C) a help message is displayed. The corrections are determined by tilting the two dimensional histogram of the angle or the position versus the time by correction parameter, projecting the histogram onto the time axis, and determining the parameter for which the width of the resulting peak is minimized. This is shown in Fig. 13, where the top row shows the peak width as a function of the correction parameter, and the bottom row the result for the corrected two dimensional two dimensional histogram of the angle in the focal plane versus the time for obj, xfp, objtac and xfptac.
Graph Graph Graph Graph 20.4 20.35 21 19.6 17.95 20.95 19.5 20.2 17.9 20.9 19.4 20.15 20.1 17.85 20.85 19.3 20.05 20 19.95 0.8 0.85 0.9 0.95 1 1.05 1.1 1.15 0.8 0.85 0.9 0.95 1 1.05 1.1 1.15 0.8 0.85 0.9 0.95 1 1.05 1.1 1.15 0.8 0.85 0.9 0.95 1 1.05 1.1 1.15 20.3 20.25 19.7 18

19.2 17.8 20.8

result0 50 40 30 20 10

result0
Entries Mean x Mean y RMS x RMS y 41910 1931 1.376 89.34 15.28

result1 50 40 30 20 10 600

result1
Entries Mean x Mean y RMS x RMS y 47224 143.5 1.327 97.7 15.21

result2 50 40 30 20 10 600 0

result2
Entries Mean x Mean y RMS x RMS y 36017 1813 1.404 45.02 15.26

result3 50 40 30 20 10

result3
Entries Mean x Mean y RMS x RMS y 46864 1981 1.343 99.74 15.19

1000

1000

1000

1200

Integral 1.573e+06 0 0 0

Integral 1.895e+06 0 0

Integral 1.884e+06 0 0

Integral 1.894e+06 0 0

800 0
5 0

627 1572535 0 0

800 0
0

1000
0 0 0

800 0
69 0

51 1895369 0 0

6073 1883879 0 0

322 1894383 0 0

800

600 0

0 10 400 20 30 40 50 0 14001500160017001800190020002100220023002400 200

0 10 20 30 40 50 500400300200100 0 0 100 200 300 400 500 200 400

600 10 20 30 200 40 50 0 14001500160017001800190020002100220023002400 40 50 0 14001500160017001800190020002100220023002400 400 10 20 30 200 400

Figure 13: Correcting the time-of-ight for its dependence on the position and angle in the focal plane The correction parameter for the focal plane angle is determined by afpcor("FILENAME", float "FROM", float "TO", int "STEPS", int "ITER") 24

where FILENAME is the name of the .root le containing the histograms afp vs X for X = obj, xfp, objtac and xfptac. FROM and TO dene the range of parameters to be scanned, and STEPS is the number of steps. In addition it might be necessary to adjust the tting ranges tlow and thigh in lines 171 and following. It is recommended to rst do a rough scan to nd the approximate position of the minimum, and then increase the number of steps around the minimum as the script is quite slow. The resulting parameters are printed to the screen, and can be saved to a settings le by typing saveset(FILENAME). If the value of ITER is larger than 0, the script will use the already corrected histograms, and update the correction parameters when the settings are saved. After correcting for the angle in the focal plane rerun Calculate with the new settings, create new histograms, and determine the position correction by: xcor("FILENAME", float "FROM", float "TO", int "STEPS", int "ITER") with ITER = 1. This way the already corrected histograms are used. The procedure can be repeated since afp and x are not independent the x correction may inuence the afp correction. 6.4.2 Ion chamber corrections

The energy loss detected with the ion chamber depends on the position of the particle, this has to be corrected in order to improve the particle identication. Ecor = E exp(p (x x0 )) for x < x0

The script corrections.C already used for the time-of-ight correction can also be used to determine the correction parameter p by typing on the root commandline: .x corrections.C iccor("FILENAME") The script ts a TProle derived from the histogram ICde vs x0 inABCoutXYZ with the inverse of the above equation and plots the resulting corrected histogram as well as the corresponding histogram gated only on the incoming beam ICde vs x0 inABC. The histogram names have to be adjusted in the script in line 480 and 533. The start values for the t parameters are dened in lines 492 and following. The resulting parameters are printed to the screen, and can be saved to a settings le by typing saveset(FILENAME). 6.4.3 Corrections for the angle at the intermediate image

If the tracking PPAC detectors at the intermediate image are used the momentum distribution or dta has to be corrected for the incoming angle aii. This correction works the same way as the time-of-ight corrections, i.e. the two dimensional momentum versus angle histogram is tilted by the correction parameter, then projected the onto the time axis, and the parameter for which the width of the resulting peak is minimized is determined. The correction is determined using runs recorded with the unreacted beam settings. The lenames of such runs have to be dened in the script in line 363 and following. Then the correction script is started by: 25

.x corrections.C momcor(int "TYPE", float "FROM", float "TO", int "STEPS") where FROM and TO dene the range of parameters to be scanned, and STEPS is the number of steps. TYPE indicates the histogram to be used, most useful is 0 using the dta vs aii histograms. 6.4.4 Acceptance corrections

to be written ...

6.5

Useful scripts

This section describes a few scripts which are not directly related to the analysis of NSCL data, but can be useful for other purposes as well. 6.5.1 makeCuts.C

The makeCuts.C script has already been described in section 6.1, it can be used for any kind of two dimensional graphical cuts. 6.5.2 converter.C

This script converts B to energy, momentum, and . By executing this script (.x converter) a help message is displayed. Once the script is loaded type converter(A, Z, BRho) on the root commandline. 6.5.3 FitPeaks.C

This script is used to t histograms with one or two Gaussian peaks and a linear background. The script has been written by Oleg Ivanov, the version included here is slightly modied. Load the program in root by typing .L FitPeaks.C. GetFitPeaks() gives a list of the available tting functions.

Installation

In this section the installation procedure for the program package is described. The code has been successfully installed on the NSCL element machines as well as on the computer in the DataU (both running Ubuntu 10.04 with g++ 4.4.3). Furthermore it has been installed on an Apple MacBook, however for this installation several adjustments in the Makele are necessary. A Makele for Mac can be provided, however installation support may be limited. The package has so far not been installed on any Windows machine. The code has been developed and tested with the ROOT version 5.20, but it should install and run with newer ROOT versions as well. Three tarball archives have to be downloaded from http://www.nscl.msu.edu/~ wimmer 26

CommanLineInterface.tar.gz: the commandline interface is used to parse the input ags (written by V. Bildstein). Fit.tar.gz: contains the source for a shared library of various tting methods used to obtain calibration parameters and to determine the CRDC positions. NSCL ROOT GUI.tar.gz: source code for the analysis package and the graphical user interface. Create a directory for each of these and copy the tarball into the directory and unpack it. Before installing the code several path variables both in the .rootrc and the .bashrc have to be dened. Examples for these les are provided on the webpage. In the following it is assumed that the code is installed in a directory in the home directory called analysis and the sub-folders are common, t, gui and root. Furthermore the executables are copied to the /bin and libraries to /lib folders, these have to be created if they do not yet exist. If you use dierent directories the LIB DIR variable in all makeles has to be adjusted. Add the following lines to the .bashrc le in your home directory: export ROOTSYS=/soft/intel/etch/root/root5.20/ export PATH=$PATH:$ROOTSYS/bin/:~/bin/ export LD_LIBRARY_PATH=$LD_LIBARYPATH:$ROOTSYS/lib/root/:~/lib/ Note that the value of ROOTSYS depends on your ROOT installation, this needs to be changed accordingly if you are not working on NSCL computers. If you do not have a .rootrc le in your home directory, just copy the one provided with the code. If you have one add or modify the following lines: Unix.*.Root.DynamicPath: .:/soft/intel/etch/root/root5.20/lib/root:~/lib Rint.Logon: ~/analysis/root/rootlogon.C Gui.IconPath: :~/analysis/gui/icons where again the ROOT directory might have to be changed. The Rint.Logon script is automatically executed when a ROOT session is started. If you have a dierent logon script, just add the libraries from the provided rootlogon.C script to it. Go to the commandline directory (/analysis/common/) and type make, then go to the t directory (/analysis/t/) and type make. now you should have the libraries libCommandLineInterface.so, libFit.so and libPeaks.so in your /lib/ directory. Then go to the main program directory (/analysis/gui/) and edit the Makele. This le is very long and a bit messy, but only a few things have to changed, and eventually I will clean it up and make the installation easier. change the FIT DIR and COMMON DIR if you use dierent directories in lines 16 and 17 select you secondary detector, and if you want a detailed tree by modifying the SWTICH variable in lines 21 to 28.

27

In order to create the dictionary les for ROOT, the path to the Fit.hh le has to be adjusted in the SeGACalcLinkDef.h and CalcLinkDef.h les. Modify the line #pragma extra_include "/user/wimmer/analysis/Fit/Fit.hh" in both les to the corresponding path. Now type make. This compiles the shared libraries, the unpacking and calibration codes, the histogramming codes as well as the graphical user interface version CoolNameHere and the HistView program. There may be a few warnings, especially in the compilation of the GUI, but hopefully no errors. If you have successfully installed the code, type Unpack on the commandline, the output should look like: use Unpack with following flags: [-lb <int >: last buffer to be read] [-i <char*>: input file] [-o <char*>: output file] No input file given Congratulations, you have mastered the installation! In order to load the libraries directly when you start a root session they are loaded with the rootlogon.C script. Copy the provided le to the /analysis/root/ directory. In case you plan to use only one secondary detector, you can comment the lines corresponding to the other. Start a new ROOT session, all libraries should load, and you can draw data from the trees. The programs introduced in section 6 are not automatically compiled, they are compiled by typing make PROGRAMNAME. All tting programs that need the libPeaks.so library also need the ROOT libSpectrum.so library for peak nding algorithms. My version of ROOT can not locate this library in the $ROOTSYS/lib/root directory even though it is there. Thus I made a link into my /lib/ directory. cd ~/lib/ ln -s $ROOTSYS/lib/root/libSpectrum.so . The GUI is compiled with make gui. To start the main program type Program (no name yet, suggestions welcome), for the histogram viewer HistView on the commandline.

Frequently asked questions


Is it possible to run cluster les? No, and it never will be. Data from dierent runs are only combined in the histogramming steps. If you want to run a series of runs just use a shell script (example provided). If you have access to a good computing infrastructure submitting runs to dierent processors can decrease the run time of the programs by orders of magnitude. How fast in the code? 28

File size [Mb] step speed binary .evt 304 Unpack 510 buers/s unpacked .root 194 Calculate 4300 events/s calibrated .root 255 Cal histos 18000 events/s Table 1: Speed of the analysis programs Slower and faster than SpecTcl. It is slower than SpecTcl, since in each individual step a loop over all events and all subevents is executed. It is faster because the unpacking step is performed once, the calibration step a few times. The main analysis, gating, histogramming and the extraction of physics information is done in the histogramming step which is very fast. For example the nal analysis step of the whole e06006 experiment (S800 and Hira) takes about two minutes on the element computers (with some tricks). In addition to that the individual runs can be analyzed on dierent computers in parallel. Table 1 shows the le sizes and the speed of the program execution for a Caesar run with the 152 Eu source analyzed on the u5pc4 PC at NSCL. The size of the calibrated ROOT le is larger than the unpacked, since a detailed tree was chosen, and for each event the energy and position information before and after addback are written to the tree.

Thanks to
D. Bazin for the original S800 and Hira unpacker D. Weisshaar for the Caesar and SeGA SpecTcl codes V. Bildstein for the CommandLineInterface code A. Lemasson for many suggestions and beta testing of the SeGA part

References
[1] ROOT, An Object-Oriented Data Analysis Framework, http://root.cern.ch

29

Das könnte Ihnen auch gefallen