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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>",
"branch": "<branch>"
},
"name": "get_branch_histogram"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cut | No | Optional selection criterion applied per event, e.g. "ReconstructedParticles.momentum.z > 0" | |
| bins | No | Number of histogram bins (default: 100) | |
| path | Yes | Path to ROOT file | |
| tree | No | TTree name to read from (default: "events") | |
| xmax | No | Upper bound of histogram range (auto-detected if omitted, requires xmin) | |
| xmin | No | Lower bound of histogram range (auto-detected if omitted, requires xmax) | |
| branch | Yes | Branch name (or expression) to histogram, e.g. "ReconstructedParticles.momentum.x" | |
| 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). |