Skip to content

TPC MC monopoles and extended track references - #15993

Closed
tubagundem wants to merge 17 commits into
AliceO2Group:devfrom
tubagundem:TPC_MC_monopoles
Closed

tubagundem wants to merge 17 commits into
AliceO2Group:devfrom
tubagundem:TPC_MC_monopoles

Conversation

@tubagundem

@tubagundem tubagundem commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

This PR, merges Marco's PR (#15602) and adds an extension of track references to different detectors.

Marco Giacalone and others added 17 commits July 15, 2026 17:17
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.
- 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>
…kinematics

The monopole mass of a simulation (G4.monopoleMass) was only known to the
simulation itself. Consumers of the output (digitizer, reconstruction MC
labels, QC, analysis) took the compiled-in default of 100 GeV through
O2DatabasePDG, so MCTrack::GetMass(), GetEnergy(), GetRapidity() and
Get4Momentum() were wrong for monopoles of any other mass.

- O2HitMerger: apply the G4.* config key-values (they were not applied in
  the merger process) and write the mass to the MCEventHeader under
  o2::sim::MonopoleMassHeaderKey when G4.monopole is set.
- MCKinematicsReader: take the mass from the header when headers or
  tracks are loaded and hand it to O2DatabasePDG; warn if kinematics of
  different masses are read in the same process.
- O2DatabasePDG: setMonopoleMass()/getMonopoleMass(); Mass() returns the
  set mass for the monopole PDG codes. Unset by default, so the simulation
  itself keeps using TDatabasePDG.

Limitations: entries already registered in a TDatabasePDG keep their mass
(ROOT has no setter); G4 parameters given through --configFile are not
applied in the merger; files produced before this change have no key.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@tubagundem

Copy link
Copy Markdown
Contributor Author

Hi @sawenzel,

Since I was testing the extension of the track references with monopoles, I first merged Marco's PR into my branch and then added the extension of track references. Should I make a clean PR with just track references?

@sawenzel

Copy link
Copy Markdown
Collaborator

@tubagundem : Yes please. One PR == one feature.

@tubagundem tubagundem closed this Oct 22, 2026
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.

3 participants