Skip to content

ROC Calibration

Andreas Pettersson edited this page Oct 20, 2025 · 3 revisions

Make sure the firmware is loaded, if not: sudo fw-loader load hcal-zcu102

Setup the ROC: cd to pflib/build ./pftool –z

DAQ.SETUP.STANDARD

EXPERT.ELINKS.AUTO

Take a pedestal run and plot it:

DAQ.PEDESTAL

cd ../ana/pedestal/
python violinplot.py ../../build/pedestal_{RUNNUMBER}.csv -o NAME_pedestal.png --ylim 100 300
init_pedestal

Pedestal trimming: trim_inv

./pftool –z
TASKS.LEVEL_PEDESTALS

Allow this to apply the changes to the ROC.

Take another pedestal: leveled_pedestal

See more info on the TASKS tab of this wiki.

Pedestal trimming: Inv_vref

TASKS.INV_VREF_SCAN
Number of events per point:  [1] 1
Filename:  [inv_vref_scan_20251010_123843.csv] 
Channel to scan on link 0 [17] 
Channel to scan on link 1 [51] 

(See more info on the TASKS tab of this wiki. )

cd pflib/ana/inv_vref
inv_vref_align.py with inv_vref_scan.csv

that should have been outputted in build folder

Example of usage:

python3 inv_vref_align.py -f ../../build/inv_vref_scan_20251010_080328.csv -o inv_vref_10oct.yaml -t 100

This will take the linear range of the scan and find (performing a linear fit) the inv_vref that gives the desired pedestal ADC target (-t argument).

The output will be stored in a yaml:

REFERENCEVOLTAGE_0:
  INV_VREF: 524
REFERENCEVOLTAGE_1:
  INV_VREF: 502

Apply the inv_vref values:

Go back to build

> ROC.LOAD
--- This command expects a YAML file with page names, parameter names and their values.
Filename: inv_vref_10oct.yaml
Update all parameter values on the chip using the defaults in the manual for any values not provided?  (Y/N)  [N] N

Take a new pedestal:

trimmed_pedestal

TOA alignment

Run

TASKS.TOA_VREF_SCAN

When asked whether or not to save the settings to the ROC, chose YES.

TOT alignment

...

Clone this wiki locally