Skip to content

ZDC: replace legacy fast simulation with an ONNX channel-response model - #16147

Open
Fuligno wants to merge 1 commit into
AliceO2Group:devfrom
Fuligno:zdc-fastsim-pr
Open

Fuligno wants to merge 1 commit into
AliceO2Group:devfrom
Fuligno:zdc-fastsim-pr

Conversation

@Fuligno

@Fuligno Fuligno commented Nov 17, 2026

Copy link
Copy Markdown

Generate ZN and ZP photon counts from primary nucleons using an ONNX model packaged with its configuration in a ROOT/CCDB object. Add an end-of-event detector hook and integrate the generated hits with the existing ZDC simulation interface.

The code was written with assistance from Claude Fable 5.2.

Generate ZN and ZP photon counts from primary nucleons using an ONNX model packaged with its configuration in a ROOT/CCDB object. Add an end-of-event detector hook and integrate the generated hits with the existing ZDC simulation interface.

The code was written with assistance from Claude Fable 5.2.
@Fuligno
Fuligno marked this pull request as ready for review November 18, 2026 08:39
@Fuligno
Fuligno requested review from a team, coppedis, sawenzel and shahor02 as code owners November 18, 2026 08:39

@fcatalan92 fcatalan92 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi @Fuligno, the PR looks fine to me! I have only a small comment on the code.
I have also a couple of other suggestions:

  • maybe it is worth adding a README in ZDC/simulation explaining how the fast simulation works and how to turn it on
  • did you test this code in a simulation with also the other detectors (and not only the ZDC)? This would be nice to check

Comment on lines +2599 to +2600
mFastSimInput.insert(mFastSimInput.end(), {float(p.GetPdgCode()), float(p.Energy()), float(p.Vx()), float(p.Vy()), zsign * float(p.Vz()),
float(p.Px()), float(p.Py()), zsign * float(p.Pz())}); // order expected by the model

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
mFastSimInput.insert(mFastSimInput.end(), {float(p.GetPdgCode()), float(p.Energy()), float(p.Vx()), float(p.Vy()), zsign * float(p.Vz()),
float(p.Px()), float(p.Py()), zsign * float(p.Pz())}); // order expected by the model
mFastSimInput.insert(mFastSimInput.end(), {float(p.GetPdgCode()), float(p.Energy()), float(p.Vx()), float(p.Vy()), float(p.Vz()),
float(p.Px()), float(p.Py()), zsign * float(p.Pz())}); // order expected by the model

There is no need to flip the vertex z-position, the side is determined only by the momentum.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants