Tracking/off-line sort with trackMain/GEBSort
intro
TBD
How to get the software
To get the tracking software (trackMain) and ROOT sorter (GEBSort_nogeb) you can
git clone https://gitlab.phy.anl.gov/tlauritsen/trackMain.git (cd trackMain; make -B) git clone https://gitlab.phy.anl.gov/tlauritsen/GEBSort.git (cd GEBSort; make -B) git clone https://gitlab.phy.anl.gov/tlauritsen/gtreceiver.git (cd gtreceiver; make -B)
This will make the GEBSort_nogeb program, which is the GEBSort ROOTsorter without the software to connet to the GEB tap (hence, make offline). This version of the code can read mode 1 or mode 2 data and does not need a VxWorks license to be installed. The trackMain code will also be generated, the software to add tracked data to the mode 2 data steam (then also know as mode 1 data).
Please note: It will also try to make the 'GEBSort' program, the program that can take data on-line from the Global Event Builder of GRETINA. This compilation will fail unless you have VxWorks installed. However, for off-line use, you only need GEBSort_nogeb, not the full GEBSort program. So you can just ignore the errors for compiling the full GEBSort program.
example sorting mode 2 data
First you can sort the mode2 data without tracking if you like:
./GEBSort_nogeb \ -input disk GTDATA/mode2.gtd \ -chat GEBSort.chat \ -rootfile GTDATA/test.root RECREATE > GTDATA/GEBSort.log
example of tracking and sorting
But you would probably like to track your data. Here is a simple example of how to track some data from gretina and sort it using the GEBSort_nogeb program and make spectra.
rm GTDATA ln -s /home/tl/d6/GEBSort/GEBSort_testdata GTDATA ./trackMain track.chat GTDATA/mode2.gtd GTDATA/mode1.gtd > GTDATA/trackMain.log
Here we ask the tracker to read the GTDATA/mode2.gtd data, add tracking information to the data stream and write the output to GTDATA/mode1.gtd. The parameters for the tracking are in the track.chat file. You should set the link GTDATA to where your data is
With the mode 1 data now created, you can now use the offline version of GEBSort_nogeb to sort the data for display in ROOT as
./GEBSort_nogeb \ -input disk GTDATA/mode1.gtd \ -chat GEBSort.chat \ -rootfile GTDATA/test.root RECREATE > GTDATA/GEBSort.log
The parameters used to sort the data are specified in the GEBSort.chat file, which came from the svn repository. To display the sorted spectra do this
root -l
A bar should pop up. Now compile GSUtil by clicking on the upper most button, then read in the root file that GEBSort_nogeb made by pushing the second button. The data is now ready to be displayed by pushing the buttons listed under mode2 or mode 1 (or by hand if you like)
The tracking parameters [track.chat]
below is an example of a 'track.chat' file downloaded from the svn repository. Details may change... Notice that both a '#' and a';' disables an instruction. Things are explained by comments in the chat file. Some datails may be explained below
#echo #------------------------------------ # chatscript to process hits in the GRETA # germanium shell. Self documenting. #------------------------------------ # maximum number of events to cluster and track # debug parameter really... maxevents 2000000000 ################################################# # coincidence window ################################################# dtwin 300 ################################################# # modify the decomposition # energies in the tracking ################################################# # use the CC FPGA energies or segment FPGA energies useCCEnergy ;useSegEnergy ################## # clustering angle ################## #clustering angle (degrees) [aka 'alpha'] #not necessarily defined as in NIM paper!! ;clusterangle 21 clusterangle 22 ################################################# # enabled detectors enabled "1-130" ############################################## # FOM we assign to single hits # so they can be on an equal playing # field with multihits that have a finite FOM ############################################## singlesfom 0.0 #---------------------------------------- # ndet and associated energy range limits #---------------------------------------- # for each number of sector hits (==ndet) # we expect a certain energy range. Assign # events outside these limets a FOM that # excludes them from further analysis # +-- ndet value # | +-- elo limits # | | +-- ehi limits # | | | +-- assign this FOM value if outside # | | | | ;ndetElim 1 0.0 0.8 1.81 ;ndetElim 2 0.0 1.6 1.82 ;ndetElim 3 0.0 3.2 1.83 ;ndetElim 4 0.4 6.4 1.84 ;ndetElim 5 0.8 18.8 1.85 ;ndetElim 6 1.6 27.6 1.86 ;ndetElim 7 3.2 53.2 1.87 ;ndetElim 8 6.4 99.0 1.88 ;ndetElim 9 18.1 99.0 1.89 ##################### # tracking strategies ##################### #---------------- # --> specify the tracking strategies to use # trackingstrategy <ndet> <option> # 0: full tracking # 1: [REMOVED] largest energy point (==first in E sort) # 2: [REMOVED] random point # 3: 'kickout', break @ first worse permutation # 4: 'goodenough', break @ first OK FOM encountered # 5: 'jump', specify jump option: g...t... trackingstrategy 1 0 trackingstrategy 2 0 trackingstrategy 3 0 # use for full tracking (usually too costly CPU wise) ;trackingstrategy 4 0 ;trackingstrategy 5 0 ;trackingstrategy 6 0 ;trackingstrategy 7 0 ;trackingstrategy 8 0 # use for realistic realtime tracking trackingstrategy 4 5 ggtt trackingstrategy 5 5 ggttt trackingstrategy 6 5 ggtttt trackingstrategy 7 5 gggtttt trackingstrategy 8 5 gggttttt #------------------------------------------------ # figure of merit cuts. In the trackingstrategy # of 'goodenough', we bail if we get a FOM below # the fomgoodenough value given. In the 'jump' # trackingstrategy we jump to next group if the # FOM is above the fomjump value given. fomjump 1.0 fomgoodenough 1.0 ######################################################## # methods for dealings with UNTRACKED (monster) clusters ######################################################## #---------------- # enable reclustering for UNTRACKED (monster) clusters # [method 1 of 2 to deal with those] # +- 'kickout' FOM value # | +- threshold FOM for recluster # | | +- ndet minimum for reclustering # | | | +- max number of reductions in alpha # | | | | +- reduction factor for alpha # | | | | | recluster1 0.01 0.1 3 10 0.90 #---------------- # enable splitting of clusters for UNTRACKED (monster) clusters # [method 2 of 2 to deal with those] # +- 'kickout' FOM value # | +- threshold FOM for splitting # | | +- ndet minimum for splitting # | | | +- ndet maximum for splitting # | | | | +- max number of tries before giving up # | | | | | # | | | | | ;splitclusters1 0.01 0.6 3 16 100 #---------------- # fom kickout value for big untrackted monster clusters # when they are split (we can't use a fraction # as we do for already tracked clusters) untracked_fom_kickout 0.1 ################################################ # methods for splitting already tracked clusters # that don't look right ################################################ #---------------- # enable reclustering for TRACKED clusters # +- 'kickout' FOM value # | +- threshold FOM for recluster # | | +- ndet minimum before trying to recluster # | | | +- max number of reductions in alpha # | | | | +- reduction factor for alpha # | | | | | ;recluster2 0.10 0.8 3 6 0.90 #---------------- # enable splitting of clusters # +- 'kickout' FOM value # | +- threshold FOM for splitting # | | +- ndet minimum for splitting # | | | +- ndet maximum for splitting # | | | | +- max number of tries before giving up # | | | | | +- good enough improvement fraction # | | | | | | ;splitclusters2 0.10 0.7 3 16 200 0.4 ################################################ # methods for combining already tracked clusters # that don't look right ################################################ #---------------- # enable combination of clusters # +- 'kickout' FOM value # | +- threshold FOM for combining # | | +- ndet maximum for combining # | | | +- max distance for inclusion attempt # | | | | ;combineclusters 0.10 0.1 5 10000 ################################## # combine single hits (matchmaker) ################################## # +- 'kickout' FOM value # | +- max distance for inclusion attempt # | | ;matchmaker 0.10 10000 #---------------- # number of itterative loops (more than one # is very CPU costly! and does not help much # at the moment, could even hurt!) itterations 1 #------------------------------------ # misc nprint 50 ############################################## # single hit range function # single hits outside range will be assigned (large) FOM # so they can be cut when we sort. # this value overwrites above^^^ # given [90% interaction length +0.5cm], see pdf for documentation ############################################## # +-- number of datapoints following # | +-- set FOM to this value outside range # | | +-- target to detector distance [cm] # | | | singlehitmaxdepth 23 1.9 18.5 0.000 0.59 0.050 0.59 0.060 0.65 0.080 0.82 0.100 1.04 0.150 1.7 0.200 2.31 0.300 3.15 0.400 3.72 0.500 4.15 0.600 4.53 0.800 5.17 1.000 5.74 1.250 6.38 1.500 6.94 2.000 7.84 3.000 9.01 4.000 9.66 5.000 10 6.000 10.16 8.000 10.17 10.00 10.01 16.3 20.0 # | | # | +-- range (from surface of crystal) [cm] # +-- energy [MeV] # [data points for 0.0 and 16.3 must be there]
The sorting parameters [GEBSort.chat]
For offline use, these parameters are the only ones that matter for now
nevents 2000000000 printevents 10 beta 0.0