Skip to content

Integration of monopoles in O2 framework - #15602

Open
jackal1-66 wants to merge 12 commits into
AliceO2Group:devfrom
jackal1-66:monopoles
Open

jackal1-66 wants to merge 12 commits into
AliceO2Group:devfrom
jackal1-66:monopoles

Conversation

@jackal1-66

@jackal1-66 jackal1-66 commented Jul 15, 2026 •

Copy link
Copy Markdown
Collaborator

This PR implements the monopoles integration in AliceO2

jackal1-66 added a commit to jackal1-66/AliceO2 that referenced this pull request Jul 15, 2026
Please consider the following formatting changes to AliceO2Group#15602
jackal1-66 added a commit to jackal1-66/AliceO2 that referenced this pull request Jul 21, 2026
Please consider the following formatting changes to AliceO2Group#15602
@github-actions

Copy link
Copy Markdown
Contributor

This PR did not have any update in the last 30 days. Is it still needed? Unless further action in will be closed in 5 days.

@github-actions github-actions Bot added the stale label Aug 21, 2026
@github-actions github-actions Bot closed this Aug 26, 2026
@jackal1-66 jackal1-66 reopened this Aug 27, 2026
@github-actions github-actions Bot removed the stale label Aug 27, 2026
@jackal1-66
jackal1-66 marked this pull request as ready for review September 11, 2026 09:15
@wiechula

Copy link
Copy Markdown
Collaborator

Dear @jackal1-66 , I just merged another PR that touches the TPC Detector code. I seems that this brought in a conflict. Please have a look.

@jackal1-66

Copy link
Copy Markdown
Collaborator Author

Ciao @wiechula, could you please check that my solution works well for you? I gave priority to your condition over isMonopole.

@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2/fullCI_slc9 for 39381ca at 2026-09-21 13:44:

No log files found

Full log here.

Previous version was configuring O2MonopolePhysics globally which replaced
the chord finder on the run G4FieldManager and also called G4Transportation::EnableMa
gneticMoment(true), which are botbh global switched. Since NystromRK4 is incompatible
 with the monopole physics, the G4ClassicalRK4 was used, which I think is wrong, as I
 wanted to keep the original stepper the VMC macro asks for. Now the monopoles chord
finder is built and not installed.
In addition some minor things that were raised by Sandro's review and found while rechecking the code:
- Now SetMaxstep(1.e10) is not called for monopoles, as that limit belongs to the dri
ft volume rather than the track
- TPC and ITS ProcessHits look up the monopole PDG code for neutral tracks only (reduction in calls)
- Throw fatal in case Monopole Physics is requested but not installed properly
The commit, together with the rest has been validated by running with Schwinger pair
monopoles + various gD options.
@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2/fullCI_slc9 for 1d62ef1 at 2026-09-22 16:59:

No log files found

Full log here.

@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2/fullCI_slc9 for 26f3cee at 2026-09-22 20:19:

No log files found

Full log here.

- Register mplIoni through G4PhysicsListHelper.
- Move the TPC Bethe-Bloch computation back into the branch that uses it.
- Run the ITS monopole PDG lookup only when G4.monopole is set.
- Define the monopole particles only when G4.monopole is set.
- Make non-positive monopole magnetic charge or mass fatal.
- Make a mismatch between G4.monopoleMass and TDatabasePDG fatal.
- Warn when the TPC drift field is zero.
- Align the species comment with the code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Monopoles: changes from further review
@ihrivnac

ihrivnac commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Hi @jackal1-66 ,

I've found a few issues in the proposed update:

  1. O2MonopoleTransportation replaces the chord finder but leaves the field manager’s DoesFieldChangeEnergy() flag false. Consequently, G4Transportation discards the integrated kinetic-energy change. The existing VMC G4MonopoleTransportation explicitly takes the final kinetic energy from the integrated field track. Discarding this change affects acceleration, stopping range and subsequent energy deposition.

  2. Local field managers bypass the monopole equation of motion. Only the global field manager receives the monopole chord finder. A region or volume with its own field manager therefore uses its ordinary equation, losing the monopole’s magnetic-force contribution. This matters only if such local fields are used. We were not previously using local fields, but @sawenzel recently introduced them to support different field configuration parameters in different regions.

  3. Defining monopoles as kPTHadron causes VMC to attach hadron ionisation and multiple scattering. The PR removes the ionisation process but leaves multiple scattering. Is that intended? Consider defining these particles as kPTUndefined and explicitly attaching the intended monopole processes, while checking that the required VMC cuts and step limits remain effective.

  4. The magnetic-moment workaround is not thread-safe. Temporarily changing G4Transportation::EnableMagneticMoment() modifies a shared static flag. This does not affect O2’s process-based parallelism, so it can be considered a low-priority issue.

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.

5 participants