Skip to content

v0.20.11 - ROOT Macro Refactoring and check_histogram.C (2026-06-07)

What Changed?

This release refactors the ROOT macro check_event_rate.C with a cleaner function hierarchy using setup_canvas, make_canvas, and draw_canvas helpers. It also adds a new macro check_histogram.C for quick distribution checks of event data, with hit_type-stacked histograms for all key branches.


What's New

Main Feature: check_histogram.C

What it does: New ROOT macro for quick visual inspection of basic event distributions from run.root. All branches are displayed as hit_type-stacked histograms (1-7) with fill + marker + error bar rendering.

Branches covered:

  • hit_type: overall type distribution (no selection)
  • hit1, hit2, hit3: per-channel hit counts
  • adc, adc_raw, adc_mv: ADC distributions
  • timedelta_us: inter-event interval
  • tmp_c, hmd_pct, atm_pa: environment distributions

How to use it:

root -l -q 'check_histogram.C("YYYYMMDD_runN")'

Output: YYYYMMDD_runN/histogram.root


Refactor: check_event_rate.C canvas helper functions

setup_pad / plot_pad were replaced with a cleaner three-layer hierarchy:

Function Role
setup_canvas(TVirtualPad*) Style configuration only
make_canvas(TH1D*) / make_canvas(TProfile*) Canvas creation only (overloaded)
draw_canvas(TVirtualPad*, TH1D*) / draw_canvas(TVirtualPad*, TProfile*) Drawing only (overloaded)

draw_histogram and draw_profile now delegate to these helpers, keeping the main loop readable as make_* / draw_* / save_* calls only.


Installation

Quick Start

# Get the release
git checkout v0.20.11

# Setup
task env:setup

# Run CLI
uv run kazunoko --help

What's Different from the Last Version?

✅ Added

  • examples/check_histogram.C: new macro for basic distribution checks with hit_type stacking

🔧 Changed

  • check_event_rate.C: setup_pad / plot_pad replaced with setup_canvas / make_canvas / draw_canvas
  • check_event_rate.C: draw_channel / save_channel renamed to draw_histogram / save_histogram
  • check_event_rate.C: draw option changed to ex0p with marker colors synced to line colors in stacks

Is It Safe to Upgrade?

Backward Compatible: Yes

  • Library API (kazunoko Python package) is unchanged
  • Only ROOT example macros were modified

Tests Passed

  • ✅ Builds without errors
  • check_event_rate.C runs on real data (20260605_run198)
  • check_histogram.C runs on real data (20260605_run198)

Release Details

  • Date: 2026-06-07
  • Version: v0.20.11
  • Files Changed: 2
  • Commits: c51e703, 5dc59aa, bf52dc1, 2c16e14, d5fa736

Next Steps

  • Further ROOT macro development for coincidence and threshold analysis