Skip to content

feat: ALERT pre- and post-KF AI PID inference - #1368

Merged
baltzell merged 12 commits into
JeffersonLab:developmentfrom
skuditha:alert-ai-pid
Aug 4, 2026
Merged

feat: ALERT pre- and post-KF AI PID inference#1368
baltzell merged 12 commits into
JeffersonLab:developmentfrom
skuditha:alert-ai-pid

Conversation

@skuditha

Copy link
Copy Markdown
Contributor
  • Replaces the existing ALERT pre-PID implementation with the new AHDC- and ATOF-based TorchScript models.
  • Adds post-KF PID inference for every valid ALERT::ai:projections pair.
  • Writes predicted particle IDs and class probabilities to the existing ALERT AI PID banks.

@skuditha
skuditha marked this pull request as ready for review July 30, 2026 13:15

@mathieuouillon mathieuouillon left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The old translator did logits.softmax(1) before toFloatArray(). Both new translators (ModelPrePID.java:290, ModelPostPID.java:84) read the raw output tensor. argmax is unaffected, so pid/prepid are fine either way, but if the exported TorchScript modules end in a Linear rather than a Softmax, then p2212/prob_2212/... are logits, and downstream users of a bank field literally named prob_* will be misled. Can you confirm the export includes the softmax?

Comment thread reconstruction/alert/src/main/java/org/jlab/service/alert/ALERTEngine.java Outdated
Comment thread reconstruction/alert/src/main/java/org/jlab/service/alert/ALERTEngine.java Outdated
@skuditha

skuditha commented Jul 31, 2026

Copy link
Copy Markdown
Contributor Author

Resolved Mathieu's comments. CI will fail until the pull request to merge the models to the networks repository is approved. (https://code.jlab.org/hallb/clas12/coatjava/networks/-/merge_requests/13)

@c-dilks

c-dilks commented Jul 31, 2026

Copy link
Copy Markdown
Member

I merged https://code.jlab.org/hallb/clas12/coatjava/networks/-/merge_requests/13 and manually triggered @dependabot to create #1369.
Once that's merged, you can rebase this branch or merge development into it.

@baltzell

baltzell commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

@skuditha Are you sure you addressed all? Looks like the bank names may still not exist. (Also, you can mark them "resolved" if they are so.)

@baltzell
baltzell enabled auto-merge (squash) August 4, 2026 13:03
@baltzell
baltzell merged commit d24aa6f into JeffersonLab:development Aug 4, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants