FAST-HEP workflows are described declaratively using YAML files.
Rather than writing analysis execution logic directly in Python scripts, users describe:
The FAST-HEP ecosystem then compiles and executes the workflow.
The primary entry point is typically: author.yaml
The workflow language aims to make analyses:
The language intentionally separates:
The workflow language intentionally favors:
FAST-HEP separates:
fasthep-flow)fasthep-carpenter)fasthep-curator)fasthep-render)This separation allows analyses to evolve while keeping workflow infrastructure relatively stable.
A workflow is not executed directly from the raw YAML.
Instead, FAST-HEP performs several stages:
flowchart LR
Author["author.yaml"]
Normalised["normalised workflow"]
Plan["execution plan"]
Runtime["runtime execution"]
Artifacts["artifacts and outputs"]
Author --> Normalised
Normalised --> Plan
Plan --> Runtime
Runtime --> Artifacts
These stages help provide:
The compilation pipeline is described further in:
author-normalise-planA FAST-HEP workflow is usually written as an author.yaml file.
The exact contents depend on the analysis, but most workflows follow the same broad shape:
version: 1.0
use:
profiles:
- registry
- fasthep_carpenter:registry
- fasthep_curator:registry
- fasthep_render:registry
- fasthep_workshop:registry
data:
datasets:
- name: data
eventtype: data
files:
- data/CMS/Zmumu/data.root
- name: dy
files:
- data/CMS/Zmumu/dy.root
defaults:
eventtype: mc
tree_primary: events
sources:
events:
kind: root_tree
tree: events
stream_type: event_stream
styles:
dimuon_mass:
op: hep.render.data_mc
axes:
x:
name: dimu_mass
label: 'Di-muon Mass, $M_{\mu\mu}$ [GeV/c$^{2}]$'
limits: [60, 120]
y:
name: events
label: Events
scale: log
data_mc:
data: data
signals: [dy]
backgrounds: [qcd, single_top, ttbar, wjets, ww, wz, zz]
stack: true
ratio: true
observers:
- kind: hep.schema_snapshot
at: [read.events, stage.BasicVars]
out: schema
analysis:
stages:
- id: BasicVars
op: hep.define
params:
variables:
- name: Muon_Pt
expr: "sqrt(Muon_Px ** 2 + Muon_Py ** 2)"
- name: IsoMuon_Idx
expr: "(Muon_Iso / Muon_Pt) < 0.10"
- name: NIsoMuon
reduce:
op: count_nonzero
over: IsoMuon_Idx
- id: DiMuons
op: hep.di_object_mass
params:
collection: Muon
mask: IsoMuon_Idx
- id: DiMuonMass
op: hep.hist
params:
dataset_axis: true
axes:
- name: dimu_mass
source: DiMuon_Mass
type: regular
bins:
low: 60
high: 120
nbins: 60
weight_expr: EventWeight
render:
style: dimuon_mass
when: finalThis example describes:
The YAML describes the analysis intent. FAST-HEP then turns this into an executable plan.
FAST-HEP workflows describe analysis intent rather than execution mechanics.
For example:
- id: BasicVars
op: hep.define
params:
variables:
- name: Muon_Pt
expr: "sqrt(Muon_Px ** 2 + Muon_Py ** 2)"This says:
Muon_PtMuon_Px and Muon_Pyhep.defineIt does not say:
From this declaration, FAST-HEP can infer that the operation needs the input fields:
Muon_Px
Muon_Pyand produces the output field: Muon_Pt
That dependency information is used during compilation and planning. The same workflow description can then be executed by different backends without changing the analysis logic.
The workflow language is extensible through profiles.
Profiles register additional:
Example:
use:
profiles:
- fasthep_carpenter:registry
- fasthep_render:registryProfiles are typically provided by installable Python packages.
This enables analyses and experiments to extend FAST-HEP without modifying core workflow infrastructure.
Data are introduced into workflows through sources.
Examples include:
Sources produce streams of structured event data.
Example:
sources:
events:
kind: root_tree
tree: EventsSources are generally implemented in:
fasthep-carpenterOperations transform data or produce derived artifacts.
Each operation is identified by an operation kind, e.g. op: hep.define
Operations are registered through profiles and can be provided by different packages.
Example:
- id: BasicVars
op: hep.define
params:
variables:
- name: Muon_Pt
expr: "sqrt(Muon_Px ** 2 + Muon_Py ** 2)"This operation derives a new field from existing event data.
Example:
- id: DiMuonMass
op: hep.hist
params:
axes:
- name: dimu_mass
source: DiMuon_Mass
type: regular
bins:
low: 60
high: 120
nbins: 60This operation fills a histogram from event-level quantities.
Rendering is usually attached declaratively to produced artifacts:
render:
style: dimuon_mass
when: finalThe rendering backend is resolved through registered render operations and styles.
Some operations or sinks may persist outputs to disk.
Example use cases include:
FAST-HEP attempts to keep artifact generation explicit and inspectable.
Observers inspect workflow execution and generated data products.
Example:
observers:
- kind: hep.schema_snapshot
at: [read.events, stage.BasicVars]
out: schemaThis observer captures schema information during execution.
Observers are commonly used for:
Observers generally do not modify event data directly.
Hooks allow workflows and extensions to react to lifecycle events during execution.
Unlike normal operations, hooks are typically triggered by execution phases rather than appearing directly as analysis stages.
Examples include:
Hooks are commonly used for:
This separation helps keep analysis logic distinct from runtime orchestration concerns.
Workflows may produce:
Generated artifacts are typically written into a build directory.
FAST-HEP attempts to make execution outputs inspectable and reproducible.
The workflow language is designed to remain largely independent of execution backend details.
Possible backends include:
Backends are responsible for execution orchestration rather than workflow semantics.
Related concept pages: