AnaRaw
Overview#
The AnaRaw program is used to:
- Read the raw histograms written by the
LSTClovBuilderprogram - Extract
ShiftTrackvalues - 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:
You can define a general setup for all channels and refine it later per channel.
To start initialization, run:
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:
Use the -help option to learn how to specify a range of runs.
Output:
- One file per run:
r_RunNbr.txtstored inShiftTrack_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:
Options explained:
-calib: Indicates calibration mode-file ROOTFile.root: Input file (produced by ShiftTrack step)-calibconf: Calibration settings (defined in the same format asPrepareShiftTrackFile)-source 152Eu: Calibration source-poly 1: Polynomial order (e.g., linear)-id N: Calibrate only specific detector IDs (can be used multiple times)