Repository navigation
Conversation
This is a step in the long-term refactoring towards a native Geant4 simulation. It decouples O2 from FairRoot by moving the simulation infrastructure that o2-sim depends on into the O2 repository. The imported classes retain their existing interfaces, so no changes are required in the current simulation code. The runtime parameter database, analysis framework, and other components that are unused by O2 are not imported, as their functionality is already provided by CCDB and ConfigurableParam. Owning these classes locally will allow future refactoring and cleanup without changing the current simulation behaviour. The imported sources keep their upstream formatting and licence headers, so they live under a 3rdparty directory and are excluded from clang-format. Requires the corresponding alidist update (fairroot.sh removal from o2.sh) to avoid duplicate ROOT dictionaries. Tested with o2-sim and o2-sim-serial; hits, MC tracks, and event headers are unchanged.
This adds the licence and origin notes for the imported FairRoot sources and removes the leftover FairRoot lookup. - LICENSE and COPYRIGHT are copied verbatim from FairRoot v18.4.9-alice3, as the file headers refer to them. - A README records the upstream version and what was changed. - dependencies/FindFairRoot.cmake and the FairRoot package properties are removed, as nothing looks up FairRoot any more. https://its.cern.ch/jira/browse/O2-7305 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sawenzel
requested review from
a team,
afurs,
andreasmolander,
coppedis,
davidrohr,
f3sch,
fcolamar,
fprino,
jackal1-66,
jokonig,
jotwinow,
kharlov,
mconcas,
mcoquet642,
njacazio,
noferini,
nstrangm,
peressounko,
sahilupadhyaya92,
shahor02 and
wiechula
as code owners
November 5, 2026 19:49
This addresses review comments on the imported FairRoot sources. - AUTHORS and CONTRIBUTORS are copied from FairRoot, as COPYRIGHT refers to them. - Each modified file carries a short note below its licence header, and the README dates the changes. - FairModule stops with a message instead of crashing if the FairRoot geometry import is used, and an orphaned declaration is removed. - A duplicate link in Generators, a blank line in the CPV tests and a stale documentation link are removed. https://its.cern.ch/jira/browse/O2-7305 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Collaborator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Collaborator
|
Error while checking build/O2/fullCI_slc9 for 490b623 at 2026-11-06 08:43: Full log here. |
sawenzel
added a commit
to AliceO2Group/O2Physics
that referenced
this pull request
Nov 6, 2026
The task no longer uses anything from FairRoot: the link was needed for the MCUtils.h include, which was removed in #15379. O2 is about to stop providing the FairRoot targets (AliceO2Group/AliceO2#16054), so this link would break the build.
This restores the creation of the TGeoManager that FairGeoLoader used to do in O2RunSim::Init. - Without it, Geant3 has no geometry manager when the geometry is constructed, and the simulation crashes. - Geant4 created a default one later, so the stored geometry carried a different title. https://its.cern.ch/jira/browse/O2-7305 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sawenzel
force-pushed
the
swenzel/g4mt-pr1-fairroot-base
branch
from
November 6, 2026 09:19
490b623 to
df1d30c
Compare
Collaborator
|
Error while checking build/O2/fullCI_slc9 for df1d30c at 2026-11-06 14:05: Full log here. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR moves the part of FairRoot that our simulation uses into O2, under
Detectors/3rdparty/FairRootBase. Over the years we have come to rely on only a small subset ofFairRoot: the VMC application, the module and detector base classes, the run and sink handling and
the stack. Much of that we have already customised on our side. Keeping this code in house allows us
to simplify our build dependencies and eases the route towards future refactoring of the
simulation, such as multithreaded Geant4 and GPU transport.
The imported classes keep their interfaces, so no change is needed in the simulation code. Parts
we do not use, such as the runtime parameter database and the geometry parameter containers, were
left out, as CCDB and
ConfigurableParamalready cover them. The sources keep their originallicence headers and upstream formatting. FairRoot's
LICENSEandCOPYRIGHTare includedverbatim, together with a short README stating the upstream version (
v18.4.9-alice3).Note that this is not intended to change the simulation output. A seeded
o2-simrun (10 Pythia8pp events, all detectors, Geant4,
-j 8) gives identical content for the kinematics and all 15 hitfiles compared with
dev, with no FairRoot in the environment.This needs the alidist change that drops FairRoot from
o2.sh(alisw/alidist#6409), to avoidduplicate dictionaries for the Fair classes. The two should be merged together.
We would like to thank the FairRoot developers for this code and for the long collaboration it
came out of.
Relates to https://its.cern.ch/jira/browse/O2-7305
Assisted by Claude Code.