Skip to content

EventBuilder

Overview#

The EventBuilder program is used to merge events across different Clovers and ancillary detectors (e.g., TAG or LaBr3), based on their timestamps. It takes as input the output files from LSTClovBuilder.

The resulting data are written into a ROOT TTree format, including:

  • Raw data
  • Calibrated Germanium (Ge) data
  • BGO data
  • AddBack data

Additionally, it can export data in GSort format (raw or AddBack).


Configuration File: EventBuilder.conf#

CAL_FILE:           Path to the detector’s calibration file  
XTALK_FILE:         Path to the xTalk coefficient file  
ShiftTrack_Dir:     Path to the gain-drift alignment folder (one file per run)  
QTotGatesFile:      Path to the QTot gates file (if TAG is used)  
PositionsFile:      Path to the detector positions file  
LSTSortDir:         Path to the input files (from LSTClovBuilder)  
OutputDir:          Path to the output directory  
DataType:           Storage format (ROOTRaw, ROOTAna, RawGSort, CalGSort, M1Hist)  
Mode:               Experiment mode (FIPPS, TAG, or LaBr3)  
TimeWindow:         Coincidence window (in ns)  
MinClovMult:        Minimum Clover multiplicity for event selection  
MinTAGMult:         Minimum TAG multiplicity  
MinLaBr3Mult:       Minimum LaBr3 multiplicity  
MinTACMult:         Minimum TAC multiplicity  
ApplyAC:            Whether to apply anti-Compton suppression at AddBack level  
EminAC:             Minimum BGO energy to apply Compton suppression  
ApplyAddBack:       Addback strategy (0: no addback, 1: addback only for ClovMult==2 and not on diagonal; 2: addback full clover)
EMinGeAddBack:      Minimum Ge energy to be included in AddBack sum
EMinClovAddBack:    Minimum Clover energy to perform addback
RateTrack:          Plot the rate of a given energy window (Bg1_low, Bg1_right Peak_low, Peak_right, Bg2_low, Bg2_right)
ReferenceRun:       Run defining the T0 for global time alignment  

Here is an example of EventBuilder.conf file:

###################
### Calib files ###
###################

CAL_FILE.       InputPars/ECal.txt
XTALK_FILE      InputPars/xTalk.txt
ShiftTrack_Dir  InputPars/ShiftTrack
QTotGatesFile   InputPars
PositionsFile   InputPars/pos.txt

#############
### Paths ###
#############

LSTSortDir      LSTSort
OutputDir       Builder

############
### Mode ###
############

#Data type for output (possibilities: ROOTRaw, ROOTAna, RawGsort, CalGSort, M1Hist)
DataType        ROOTRaw ROOTAna RawGsort CalGSort M1Hist

#Data mode (FIPPS TAG or LaBr3)
Mode            FIPPS

#CalGSort condition (possibilities: Fission/Beta)
#CalGSortCond   Fission

# RateTrack -> Bg1_low, Bg1_right Peak_low, Peak_right, Bg2_low, Bg2_right
RateTrack 500 505 505 515 515 520

######################
### Builder params ###
######################

TimeWindow      1000
MinClovMult     1
MinTAGMult      0
MinLaBr3Mult    0
MinTACMult      0

ApplyAC         1
EminAC          0

# ApplyAddBack => 0: no addback, 1: addback only for ClovMult==2 and not on diagonal; 2: addback full clover
ApplyAddBack    1
EMinGeAddBack   10
EMinClovAddBack 0

# For global timing, default is the first selected run
#ReferenceRun    14666

Usage#

To display help:

EventBuilder

The GSort-formatted data are written to the subdirectories RawGSort/ and CalGSort/ within the OutputDir.


Notes#

1. Calibration File Format
Each line must contain the detector ID followed by the polynomial calibration parameters.
The polynomial order is determined automatically and may vary by channel.

2. Multiple Calibration Files
You can specify CAL_FILE multiple times. In that case:
- The last two values of each calibration line are treated as the channel range to which the calibration applies
- If ranges overlap, the applied function is randomly selected per event