Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Covers particle physics data analysis with ROOT, uproot, pyhf, and HEPData, including event reconstruction and histogram statistics.
73% 82%+9 ptsof test cases passed
Passed 18 of 22 test cases with the skill, and 16 of 22 without it.
3 of 3 safety checks passed
Not used yet
A skill for analyzing particle physics data, covering event reconstruction, histogram analysis, statistical methods for discovery, and the standard tools used in high-energy physics (HEP) research. Includes ROOT, uproot, pyhf, and HEPData workflows.
| Format | Description | Typical Size | Access Tool |
|---|---|---|---|
| ROOT (.root) | Columnar binary format, HEP standard | GB-TB | ROOT, uproot |
| NanoAOD | Compact analysis format (CMS) | ~1 KB/event | uproot, coffea |
| DAOD_PHYS | Derived analysis format (ATLAS) | ~10 KB/event | ROOT, uproot |
| HepMC | Monte Carlo event record | Variable | pyhepmc |
| HEPData | Published results (YAML/JSON) | KB | hepdata_lib |
import uproot
import awkward as ak
import numpy as np
def load_nanoaod(filepath: str, tree_name: str = "Events",
branches: list[str] = None) -> ak.Array:
"""
Load a NanoAOD ROOT file into an awkward array.
branches: list of branch names to load (None = all)
"""
with uproot.open(filepath) as f:
tree = f[tree_name]
if branches is None:
branches = tree.keys()
events = tree.arrays(branches, library="ak")
print(f"Loaded {len(events)} events")
print(f"Branches: {events.fields}")
return events
# Example: Load muon data
Next to this one in the catalogue, plus more from the same author.