scikit-hep / scikit-hep/vector

Add fixed mass 4-momentum behaviors

Open
#731 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
Python
Stars
99
Forks
42
Avg merge
1d 13h
Merged PRs (30d)
6

Description

Describe the potential feature

Add a 4-momentum behavior that doesn't require a temporal component like mass to be present a field on the awkward array and instead is fine with 3 components and a fixed mass.

Motivation

The motivation is that often experiments in root files will not have a mass branch along with pt/eta/phi for example because the mass of a particle is either known or zero. One can say "well just do a full_like operation to add a mass branch" but that A) wastes memory and B) is hacky since the behavior is often attached to vectors created from the root file branches directly like in coffea for example. In coffea we now tell the schemas to create such full-like branches to fill out the mass field.

Possible Implementation

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the existing 4-momentum behavior and how behaviors are attached to awkward arrays. Compare its requirement for a temporal or mass component with the requested three-component, fixed-mass case. Done means arrays built from pt/eta/phi can use the behavior without a mass branch, while supporting known or zero mass without creating a full-like field.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.