How provakar1994/bbcal_calibration works
This repository is a collection of ROOT macros for older BigBite Calorimeter cosmic calibration and related gain/HV tuning. The main workflow analyzes replayed detector data to estimate channel peaks, then uses those measurements with HV settings to derive and export adjustments. Separate macros cover shower/preshower cosmic analysis, beam-energy gain calibration, and trigger-to-FADC amplitude targeting. Excerpts show key file reads and calculations, but not every macro’s complete input/output wiring.
Main entry points: PreShower_HV_Peak.C Preshower peak analysis · HV_Peak.C Shower HV peak analysis · HV_Peak_v2.C Shower HV analysis v2 · Sh_hv_tweak.C Shower HV adjustment
Components 23
Cosmic analysis
- Shower cosmic analysis
bbcal_cos_cal.C - Shower cosmic variant
bbsh_cos_cal.C - Preshower cosmic analysis
bbps_cos_cal.C - FADC data arrays
fadc_data.h
HV calibration
- Preshower peak analysis
PreShower_HV_Peak.C - Shower HV peak analysis
HV_Peak.C - Shower HV analysis v2
HV_Peak_v2.C - Shower HV adjustment
Sh_hv_tweak.C
Energy calibration
- Beam energy calibration
eng_cal_BBCal.C
FADC targeting
- Preshower amplitude targets
targetFADCamp.C
Other components
- Calibration operator
- Replayed ROOT data
- Peak measurements
Output - HV settings
hv_set - Gain coefficients
- Shower alpha values
- Shower histogram ROOT
- Trigger/FADC coefficients
trigtoFADCcoef_SH.txt - Preshower trigger coefficients
trigtoFADCcoef_PS.txt - Updated HV settings
hv_set - Gain coefficient output
- Target amplitude output
Output - Calibration plots
plots
Connections 41
- Calibration operator → Shower cosmic analysis: runs
- Calibration operator → Shower cosmic variant: runs
- Calibration operator → Preshower cosmic analysis: runs
- Calibration operator → Shower HV peak analysis: runs
- Calibration operator → Shower HV analysis v2: runs
- Calibration operator → Preshower peak analysis: runs
- Calibration operator → Shower HV adjustment: runs
- Calibration operator → Beam energy calibration: runs
- Calibration operator → Preshower amplitude targets: runs
- Shower cosmic analysis → Replayed ROOT data: reads
- Shower cosmic variant → Replayed ROOT data: reads
- Preshower cosmic analysis → Replayed ROOT data: reads
- Beam energy calibration → Replayed ROOT data: reads
- Shower cosmic analysis → FADC data arrays: uses data arrays
- Preshower cosmic analysis → FADC data arrays: uses data arrays
- Shower cosmic analysis → Peak measurements: writes peaks
- Preshower cosmic analysis → Peak measurements: writes peaks
- Shower HV peak analysis → Peak measurements: reads peaks
- Shower HV analysis v2 → Peak measurements: reads peaks
- Preshower peak analysis → Peak measurements: reads peaks
- Shower HV peak analysis → HV settings: reads settings
- Shower HV analysis v2 → HV settings: reads settings
- Preshower peak analysis → HV settings: reads settings
- Shower HV peak analysis → Updated HV settings: writes adjustments
- Shower HV analysis v2 → Updated HV settings: writes adjustments
- Preshower peak analysis → Updated HV settings: writes adjustments
- Shower HV adjustment → HV settings: reads settings
- Shower HV adjustment → Shower alpha values: reads coefficients
- Shower HV adjustment → Gain coefficients: reads gains
- Shower HV adjustment → Updated HV settings: writes adjustments
- Beam energy calibration → Gain coefficients: reads prior gains
- Beam energy calibration → Gain coefficient output: writes gains
- Shower HV peak analysis → Shower histogram ROOT: reads histograms
- Shower HV analysis v2 → Shower histogram ROOT: reads histograms
- Preshower peak analysis → Shower histogram ROOT: reads histograms
- Preshower amplitude targets → Preshower trigger coefficients: reads coefficients
- Preshower amplitude targets → Target amplitude output: writes targets
- Preshower amplitude targets → Calibration plots: saves plot
- Shower HV peak analysis → Calibration plots: saves plots
- Shower HV analysis v2 → Calibration plots: saves plots
- Preshower peak analysis → Calibration plots: saves plots