Skip to content

REC::VertDoca bank documentation mismatch for cx*, cy*, cz* fields #1217

@skuditha

Description

@skuditha

There appears to be a mismatch between the documented meaning of several fields in the REC::VertDoca bank and what is actually written in the reconstruction code.

According to the bank definition in:
coatjava/etc/bankdefs/hipo4/even.json

the fields are described as direction vectors:

{"name":"cx1", "info":"x-direction vector of the first track at the DOCA point (cm)"},
{"name":"cy1", "info":"y-direction vector of the first track at the DOCA point (cm)"},
{"name":"cz1", "info":"z-direction vector of the first track at the DOCA point (cm)"},
...
{"name":"cx2", "info":"x-direction vector of the second track at the DOCA point (cm)"},
{"name":"cy2", "info":"y-direction vector of the second track at the DOCA point (cm)"},
{"name":"cz2", "info":"z-direction vector of the second track at the DOCA point (cm)"},

However, in the actual implementation (coatjava/reconstruction/vtx/src/main/java/org/jlab/rec/vtx/banks/Writer.java):

bank.setFloat("cx1", i, (float) vtx.get(i).getP1().getPx());
bank.setFloat("cy1", i, (float) vtx.get(i).getP1().getPy());
bank.setFloat("cz1", i, (float) vtx.get(i).getP1().getPz());

bank.setFloat("cx2", i, (float) vtx.get(i).getP2().getPx());
bank.setFloat("cy2", i, (float) vtx.get(i).getP2().getPy());
bank.setFloat("cz2", i, (float) vtx.get(i).getP2().getPz());

These area clearly momentum components (px, py, pz), not direction vectors.

Expected Behaviour

Either:

  1. The documentation should reflect that these fields store momentum components (px, py, pz), or
  2. The implementation should be updated to store normalized direction vectors if that was the original intent.

Impact

This discrepancy can lead to:

  • Misinterpretation of the variables in analysis code
  • Incorrect physics usage (e.g., assuming unit vectors when magnitudes are present)
  • Potential downstream bugs in reconstruction or ML workflows

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions