Operations and specs

Operations are the primary executable units in FAST-HEP workflows.

An operation describes:

Operations are identified declaratively in workflows using an operation kind:

op: hep.define

The actual implementation is resolved through registries during workflow compilation.


Why operations exist#

FAST-HEP separates:

Operations are the bridge between declarative workflow descriptions and executable analysis logic.

This allows workflows to remain:


Common operation categories#

Operations may perform many different tasks.

CategoryPurposeExampleTypical package
sourcesintroduce external data streamsroot_treefasthep-carpenter
transformsderive or modify event datahep.definefasthep-carpenter
apply filtering and cutflowshep.selection.cutflowfasthep-carpenter
aggregate or summarise event datacounters, reductionsfasthep-carpenter
sinkspersist or aggregate outputshistogram filling, ROOT/parquet writingfasthep-carpenter
generate plots and reportshep.render.data_mcfasthep-render
observersinspect workflow stateschema snapshotsfasthep-curator
hooksreact to runtime lifecycle eventsdiagnostics, summariesfasthep-curator

The exact boundary between categories may evolve as the ecosystem matures, but the core separation of responsibilities between packages is intentional.

Note

Rendering is currently registered as a sink because it consumes produced artifacts and writes visual outputs. It may become a more explicit operation category as the rendering API stabilises.


Example: derived variables#

Example operation:

- id: BasicVars
  op: hep.define
  params:
    variables:
      - name: Muon_Pt
        expr: "sqrt(Muon_Px ** 2 + Muon_Py ** 2)"

This operation:

FAST-HEP uses this information during dependency inference and planning.


Example: histogramming#

- id: DiMuonMass
  op: hep.hist
  params:
    axes:
      - name: dimu_mass
        source: DiMuon_Mass
        type: regular
        bins:
          low: 60
          high: 120
          nbins: 60

This operation consumes event-level quantities and produces histogram artifacts.

Histogram operations are commonly followed by rendering operations.


Example: rendering#

Rendering is usually attached declaratively to produced artifacts:

render:
  style: dimuon_mass
  when: final

Rendering operations may produce:

The rendering implementation is resolved through registries and styles.


Specifications#

Operations are accompanied by specifications (“specs”).

Specs describe operation behavior in a planner-friendly and machine-readable form.

Depending on the operation type, specs may describe:

Specs help FAST-HEP reason about workflows before runtime execution begins.


Why specs matter#

Specs allow planners to understand workflows without executing analysis code.

This enables:

without requiring immediate data processing.

This separation is one of the key architectural ideas in FAST-HEP.


Planner-visible behavior#

Operations often expose planner-visible behavior separately from runtime implementations.

For example:

This allows planners to construct execution graphs before runtime execution begins.


Registry integration#

Operations are registered through registries.

For example:

op: hep.hist

may resolve to:

provided by fasthep_carpenter.

This resolution occurs during workflow compilation.

For more detail, see:


Runtime independence#

Operations intentionally avoid coupling workflows to specific runtimes.

The same operation definitions may eventually support:

without changing the workflow description itself.


Historical note#

Earlier FAST-HEP prototypes exposed some operation specifications as generated JSON artifacts.

This made planner-visible behavior easier to inspect and debug.

Future FAST-HEP versions may again expose richer spec artifacts and planner diagnostics as part of workflow introspection tooling.


Design philosophy#

Operations and specs intentionally separate:

This separation helps workflows remain:


On this page