You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
REC::VertDoca bank documentation mismatch for cx*, cy*, cz* fields #1217
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:
The documentation should reflect that these fields store momentum components (px, py, pz), or
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
Activity
c-dilks commentedon Apr 30, 2026
Is this actually solved? I thought this was more of a documentation issue.
skuditha commentedon Apr 30, 2026
No Chris! It is not solved. Thanks for catching it.
The pull request linked (#1212) is for a separate problem. I didn't create an "issue" for it as it was a trivial fix.
This "issue" (1217) has two potential solutions:
Either solution works. If we can come to a decision, I can even work on fixing it.
baltzell commentedon May 1, 2026
Looks like the 2 options are:
Is this is the only bank schema downstream of DSTs containing direction cosines?