get_branch_histogram
Fill a histogram from a ROOT file branch and retrieve bin edges and counts. Supports expressions and optional selection cuts.
Instructions
Fill a histogram of a TTree branch and return bin edges and counts. Prefers HTTP-based access; if unavailable, set allow_copy: true to fall back to xrdcp.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to ROOT file | |
| branch | Yes | Branch name (or expression) to histogram, e.g. "ReconstructedParticles.momentum.x" | |
| tree | No | TTree name to read from (default: "events") | |
| bins | No | Number of histogram bins (default: 100) | |
| xmin | No | Lower bound of histogram range (auto-detected if omitted, requires xmax) | |
| xmax | No | Upper bound of histogram range (auto-detected if omitted, requires xmin) | |
| cut | No | Optional selection criterion applied per event, e.g. "ReconstructedParticles.momentum.z > 0" | |
| server | No | Name of the XRootD server to use (default: first configured server) | |
| allow_copy | No | Fall back to a full xrdcp file copy if HTTP access fails (default: false). |