Skip to content

AnaRaw

Overview#

The AnaRaw program is used to:

  • Read the raw histograms written by the LSTClovBuilder program
  • Extract ShiftTrack values
  • Perform energy calibration

To compute ShiftTrack values, the program must be provided with the expected peak positions for each channel of interest.


Configuration File: AnaRaw.conf#

Parameters:

LSTSortDir:               Path to the input ROOT files
ShiftTrack_Dir:           Path to the output ShiftTrack files
PrepareShiftTrackFile:    Configuration file for ShiftTrack initialization
ShiftTrackFile:           ShiftTrack parameter file (produced during initialization)
OutputDir:                Directory to store output ROOT files

ShiftTrack Procedure#

Step 1: Initialization#

Prepare the PrepareShiftTrackFile configuration file. This file should define peak search parameters for each channel using a reference run.
An example file can be found at:

$FIPPS_Softs_SYS/Conf/InitShiftTrack.conf

You can define a general setup for all channels and refine it later per channel.

To start initialization, run:

AnaRaw -init -run N

This will generate the ShiftTrackFile, containing the raw channel values of each peak. It will be used for run-by-run gain matching.


Step 2: ShiftTrack Calculation#

Process the full run range to compute and apply gain matching for all runs relative to the reference. Run:

AnaRaw -track -run ...

Use the -help option to learn how to specify a range of runs.

Output:

  • One file per run: r_RunNbr.txt stored in ShiftTrack_Dir, used by the event builder for alignment
  • One ROOT file in OutputDir, containing:
  • Offset and gain evolution vs. run number
  • Gain-matched gamma spectra (multiplicity 1) for each crystal

Calibration#

After ShiftTrack processing, the output ROOT file (in OutputDir) contains:

  • The evolution of offset/gain for each channel
  • Gain-corrected energy spectra for each detector

You can perform energy calibration using:

AnaRaw -calib -file ROOTFile.root -calibconf -source 152Eu -poly 1

Options explained:

  • -calib: Indicates calibration mode
  • -file ROOTFile.root: Input file (produced by ShiftTrack step)
  • -calibconf: Calibration settings (defined in the same format as PrepareShiftTrackFile)
  • -source 152Eu: Calibration source
  • -poly 1: Polynomial order (e.g., linear)
  • -id N: Calibrate only specific detector IDs (can be used multiple times)