Skip to content
Draft
Show file tree
Hide file tree
Changes from 70 commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
9d8d49c
Add dd4hep to list of optional cmake dependencies
rahmans1 Apr 21, 2025
926bf32
Add initial ddceler plugin building mechanism to cmake
rahmans1 Apr 21, 2025
78c4a61
Add initial ddceler plugin layout
rahmans1 Apr 21, 2025
32a4c12
Update CMakeLists.txt to bring in latest changes from develop
rahmans1 Apr 21, 2025
d88d5d0
Remove ddceler plugin test files. Will be uploaded later with proper …
rahmans1 Apr 25, 2025
2eb55b2
Add ddceler directory to list of subdirectories to build if DD4hep op…
May 22, 2025
5e0c2b4
Fix typo. Replace dd4hep with ddceler.
May 22, 2025
2e18c6f
Add plugin to lib post install
May 22, 2025
518ed0b
Modify plugin name to match class name
May 29, 2025
242c8e7
Fix formatting for ddceler plugin code
May 29, 2025
db4682a
Add DDG4 Run Action plugin for celeritas offload with proper formatting
May 29, 2025
2d9531e
Add DDG4 Run Action plugin for celeritas offload to cmake file
May 29, 2025
92ef544
Minimal DDG4 steering file to demonstrate celeritas integration
May 29, 2025
45675e3
Add a placeholder non-zero uniform magnetic field
May 29, 2025
d8cb34b
Merge branch 'celeritas-project:develop' into feature-dd4hep-integrat…
rahmans1 Jun 30, 2025
3426206
Merge branch 'celeritas-project:develop' into feature-dd4hep-integrat…
rahmans1 Jul 7, 2025
ffdebc9
First commit of simple detector for testing celeritas-dd4hep integrat…
rahmans1 Jul 14, 2025
eab608a
Fix style and set sensor type
Jul 17, 2025
e1b7f2e
Parse sensor type properly
Jul 17, 2025
247c802
Remove explicit definition of world volume and make the beampipe a pa…
Jul 17, 2025
544e71f
Add a placeholder sensor type for beampipe to passive
Jul 17, 2025
d382ba3
Fix style and move comment block into info section
Jul 21, 2025
3ff27fc
Fix style and commit first iteration of benchmark plotting script to …
Jul 21, 2025
c393a26
Add steering file to the example with proper formatting
Jul 21, 2025
e3b43be
Use a uniform 3 Tesla field everywhere
Jul 25, 2025
372ffbc
Merge branch 'develop' into feature-dd4hep-integration-plugin
rahmans1 Jul 25, 2025
cd7c7f5
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 25, 2025
be6380d
Track zero energy deposition particles
Jul 28, 2025
06c2650
Align celeritas magnetic field with the DD4hep field direction
Jul 28, 2025
d3870b6
Updates to the plotting script. Looking at only primaries from MCPart…
Aug 8, 2025
791c0f3
Move the steering file to the example directory
Aug 14, 2025
8fa69e1
Merge branch 'develop' into feature-dd4hep-integration-plugin
rahmans1 Aug 15, 2025
3d8fa86
Fix comments and don't include unnecessary header file
rahmans1 Aug 18, 2025
5bcf1c4
Merge branch 'celeritas-project:develop' into feature-dd4hep-integrat…
rahmans1 Aug 25, 2025
945037b
Generalize info message for celeritas tracking and replace physics li…
rahmans1 Aug 25, 2025
a99b483
Update steering file
rahmans1 Aug 25, 2025
e7565fb
Add messenger commands to pass celeritas configuration variables thro…
rahmans1 Aug 25, 2025
10dda0c
Merge branch 'celeritas-project:develop' into feature-dd4hep-integrat…
rahmans1 Sep 3, 2025
71c5bf6
First commit of workflow to test dd4hep integration under eic-shell e…
rahmans1 Sep 3, 2025
29543ed
Temporarily trigger on every push to the branch
rahmans1 Sep 3, 2025
2e6d880
Remove download action
rahmans1 Sep 4, 2025
2893153
Build celeritas with dd4hep
rahmans1 Sep 4, 2025
962233c
Run with a general example from DD4hep upstream repo
rahmans1 Sep 4, 2025
938fd43
Set correct relative path for steering file in action
rahmans1 Sep 4, 2025
7a43205
Merge branch 'celeritas-project:develop' into feature-dd4hep-integrat…
rahmans1 Sep 29, 2025
acadfb8
Merge branch 'celeritas-project:develop' into feature-dd4hep-integrat…
rahmans1 Oct 2, 2025
a17b72c
Merge branch 'celeritas-project:develop' into feature-dd4hep-integrat…
rahmans1 Oct 6, 2025
193b27b
Merge branch 'celeritas-project:develop' into feature-dd4hep-integrat…
rahmans1 Oct 9, 2025
dabb8d3
Specify a single parameter to define the field map for DD4hep and cel…
Oct 9, 2025
f7d60ee
Use lowercase for dd4hep class name
Oct 9, 2025
b6a68df
Revert "Use lowercase for dd4hep class name"
Oct 10, 2025
f853755
Revert "Specify a single parameter to define the field map for DD4hep…
Oct 10, 2025
8e4dc01
Using the upstream DD4hep example but replacing the field with a cons…
Oct 13, 2025
b781260
Remove custom example
Oct 13, 2025
f53a239
Use the constant field example instead of solenoidal field
rahmans1 Oct 13, 2025
908143d
1. DDcelerTMI.hh:34 - Changed m_uniformFieldStrength from float to st…
Oct 13, 2025
2209929
Minor updates to variable names that align with the example output st…
Oct 13, 2025
718d5ee
1. DDcelerTMI.cc:10 - Added #include <DD4hep/Detector.h> to access t…
Oct 13, 2025
0f5e37c
Strategy 1 (Fast path): DDcelerTMI.cc:54-82
Oct 13, 2025
2578b1e
Build the magnetic field with only constant field types in local example
Oct 14, 2025
bff4df5
Only allow constant field components
Oct 14, 2025
b23e4c5
Don't use debug mode in action workflow
Oct 14, 2025
df18cec
Also run with no celeritas offload and produce a benchmark comparison…
Oct 14, 2025
1e996a7
Add more options within steering file to simplify usage
Oct 14, 2025
f17d96c
Add a dd4hep property to pass celeritas ignored processes from steeri…
Oct 14, 2025
d00b13a
Attempt at parametrizing the field driver options through the xml des…
Oct 14, 2025
8d222b0
Instead of resetting Geant4FieldManager, we query the DD4hep descript…
Oct 14, 2025
f9721a7
Use CELER_VALIDATE instead of using throw directly everywhere
Oct 14, 2025
9120784
Use CELER_LOG(info) instead of using this->info directly everywhere
Oct 14, 2025
0167a04
Merge branch 'develop' into feature-dd4hep-integration-plugin
rahmans1 Oct 15, 2025
f8720bd
Merge branch 'develop' into feature-dd4hep-integration-plugin
rahmans1 Oct 29, 2025
aca4052
Apply fixes from pre-commit hooks: see detailed commit message →
pre-commit-ci[bot] Oct 29, 2025
e654cf2
Configure DD4hep plugins to link against build libraries and copy com…
Nov 6, 2025
667aaca
Add VecGeom-specific linker flags for DD4hep plugins
Nov 6, 2025
80a94a7
Additional condition for vecgeom based runs
Nov 6, 2025
953a072
Revert "Use CELER_LOG(info) instead of using this->info directly ever…
Nov 7, 2025
b416eb7
Use the ci nightly of eic-shell container
rahmans1 Nov 13, 2025
1b437a6
Doesn't need to run on every push to the branch
rahmans1 Nov 13, 2025
020c94b
Use the container from github package registry instead of accessing f…
rahmans1 Nov 13, 2025
92b18b7
Revert "Doesn't need to run on every push to the branch"
Nov 13, 2025
93967bb
Source profile for eic-shell container environment
rahmans1 Nov 13, 2025
fdfbbf9
Use bash shell explicitly
rahmans1 Nov 13, 2025
7c487c5
Run Celeritas and Geant4 simulations in parallel
rahmans1 Nov 13, 2025
4f24883
Check removing source command in workflow
rahmans1 Nov 13, 2025
41240e7
Enhance dd4hep integration workflow with error handling
rahmans1 Nov 13, 2025
cf3684d
Merge branch 'celeritas-project:develop' into feature-dd4hep-integrat…
rahmans1 Nov 17, 2025
064e040
Merge branch 'celeritas-project:develop' into feature-dd4hep-integrat…
rahmans1 Dec 1, 2025
e89d113
Reorganize plugin cmakefile to setup proper dependency chain
Dec 1, 2025
ccda8f1
Add copyright header to steeringFile.py
Dec 1, 2025
6ef1501
Add copyright header to SiD_ConstantField.xml
Dec 1, 2025
b0ea549
Make steeringFile.py PEP8 compliant
Dec 1, 2025
654795e
Rename parameter 'nam' to 'name' and remove from codespell ignore list
Dec 1, 2025
a5cb800
Merge branch 'feature-dd4hep-integration-plugin' of https://github.co…
Dec 1, 2025
aeadd13
Initialize DDcelerTMI member variables and add validation
Dec 4, 2025
d865047
Merge branch 'celeritas-project:develop' into feature-dd4hep-integrat…
rahmans1 Dec 10, 2025
2f61586
Refactor dd4hep integration workflow steps
rahmans1 Dec 10, 2025
c621268
Add error handling to dd4hep integration workflow
rahmans1 Dec 10, 2025
9eaff43
Rename upload step and update artifact paths
rahmans1 Dec 10, 2025
d491cb1
Export gdml and upload artifact
rahmans1 Dec 10, 2025
965fc39
Update check-dd4hep-integration workflow for GDML output
rahmans1 Dec 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/check-dd4hep-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Check dd4hep integration

on:
workflow_dispatch:
workflow_call:
push:
branches:
- feature-dd4hep-integration-plugin
Copy link
Member

Choose a reason for hiding this comment

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

Note to self: will update this so that we run at the end of each PR


concurrency:
group: build-${{github.ref}}-${{github.event.pull_request.number || github.run_number}}-${{github.workflow}}
cancel-in-progress: true

jobs:
check-dd4hep-integration:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: cvmfs-contrib/github-action-cvmfs@v5
- uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "eic_xl:nightly"
network_types: "none"
run: |
eic-info
cmake -DCELERITAS_USE_DD4hep=ON -DCMAKE_INSTALL_PREFIX=install -S . -B build
cmake --build build -j 8
cmake --install build
export LD_LIBRARY_PATH=$PWD/install/lib:${LD_LIBRARY_PATH}
# Run with Celeritas enabled
ddsim --compactFile=$PWD/example/ddceler/SiD_ConstantField.xml --steering $PWD/example/ddceler/steeringFile.py --outputFile output_celeritas.root
# Run with Celeritas disabled (Geant4 only)
CELER_DISABLE=1 ddsim --compactFile=$PWD/example/ddceler/SiD_ConstantField.xml --steering $PWD/example/ddceler/steeringFile.py --outputFile output_geant4.root
# Compare benchmarks and generate plots
root -l -b -q '$PWD/example/ddceler/compare_benchmarks.cc("output_geant4.root", "output_celeritas.root")'
- name: Upload comparison plots
uses: actions/upload-artifact@v4
if: always()
with:
name: comparison-plots
path: "*.png"
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ celeritas_optional_package(PNG "Enable PNG output with libpng")
celeritas_optional_package(Python "Use Python for documentation and testing")
celeritas_optional_package(ROOT "Enable ROOT I/O")
celeritas_optional_package(VecGeom "Use VecGeom geometry")
celeritas_optional_package(DD4hep "Enable DD4hep integration")
option(CELERITAS_USE_Perfetto "Perfetto tracing library" OFF)

# Components
Expand Down Expand Up @@ -366,6 +367,14 @@ if(CELERITAS_USE_Geant4 AND NOT Geant4_FOUND)
endif()
endif()

if(CELERITAS_USE_DD4hep)
if(NOT DD4hep_FOUND)
find_package(DD4hep 1.18 REQUIRED COMPONENTS DDCore DDG4)
include(${DD4hep_DIR}/cmake/DD4hep.cmake)
include(${DD4hep_DIR}/cmake/DD4hepBuild.cmake)
Comment on lines +371 to +372

Choose a reason for hiding this comment

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

Is this necessary? We don't use it in epic, but we use it in npsim...

endif()
endif()

if(CELERITAS_USE_HepMC3)
if(NOT HepMC3_FOUND)
find_package(HepMC3 REQUIRED)
Expand Down
4 changes: 3 additions & 1 deletion CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"CELERITAS_USE_MPI": {"type": "BOOL", "value": "ON"},
"CELERITAS_USE_PNG": {"type": "BOOL", "value": "OFF"},
"CELERITAS_USE_ROOT": {"type": "BOOL", "value": "ON"},
"CELERITAS_USE_VecGeom": {"type": "BOOL", "value": "ON"}
"CELERITAS_USE_VecGeom": {"type": "BOOL", "value": "ON"},
"CELERITAS_USE_DD4hep": {"type": "BOOL", "value": "OFF"}
}
},
{
Expand All @@ -47,6 +48,7 @@
"CELERITAS_USE_PNG": {"type": "BOOL", "value": "OFF"},
"CELERITAS_USE_ROOT": {"type": "BOOL", "value": "OFF"},
"CELERITAS_USE_VecGeom": {"type": "BOOL", "value": "OFF"},
"CELERITAS_USE_DD4hep": {"type": "BOOL", "value": "OFF"},
"CELERITAS_USE_covfie": {"type": "BOOL", "value": "OFF"}
}
},
Expand Down
4 changes: 4 additions & 0 deletions cmake/CeleritasConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ if(CELERITAS_USE_VecGeom)
endif()
endif()

if(CELERITAS_USE_DD4hep)
find_dependency(DD4hep REQUIRED)
endif()

cmake_policy(POP)

#-----------------------------------------------------------------------------#
Expand Down
68 changes: 68 additions & 0 deletions example/ddceler/SiD_ConstantField.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<lccdd>
<comment>
Using a constant field in the DD4hep example SiD detector description
</comment>

<includes>
<gdmlFile ref="${DD4hepINSTALL}/DDDetectors/compact/elements.xml"/>
<gdmlFile ref="${DD4hepINSTALL}/DDDetectors/compact/materials.xml"/>
</includes>

<define>
<include ref="${DD4hepINSTALL}/DDDetectors/compact/SiDConstants.xml"/>
</define>


<limits>
<include ref="${DD4hepINSTALL}/DDDetectors/compact/SiD_Limits.xml"/>
</limits>

<regions>
<region name="SiTrackerBarrelRegion" eunit="MeV" lunit="mm" cut="0.001" threshold="0.001">
<limitsetref name="SiTrackerBarrelRegionLimitSet"/>
</region>
</regions>


<comment>Common Generic visualization attributes</comment>
<display>
<vis name="InvisibleNoDaughters" showDaughters="false" visible="false"/>
<vis name="InvisibleWithDaughters" showDaughters="true" visible="false"/>
<vis name="GreenVis" alpha="1" r="0.0" g="1.0" b="0.0" showDaughters="true" visible="true"/>
<vis name="RedVis" alpha="1" r="1.0" g="0.0" b="0.0" showDaughters="true" visible="true"/>
<vis name="BlueVis" alpha="1" r="0.0" g="0.0" b="1.0" showDaughters="true" visible="true"/>
</display>

<comment>Additional design specific material definitions</comment>
<include ref="${DD4hepINSTALL}/DDDetectors/compact/SiD/SiD_Materials.xml"/>

<comment>Tracking detectors</comment>
<include ref="${DD4hepINSTALL}/DDDetectors/compact/SiD/SiD_Vertex.xml"/>
<include ref="${DD4hepINSTALL}/DDDetectors/compact/SiD/SiD_Tracker.xml"/>

<comment>Calorimeters</comment>
<include ref="${DD4hepINSTALL}/DDDetectors/compact/SiD/SiD_Ecal.xml"/>
<include ref="${DD4hepINSTALL}/DDDetectors/compact/SiD/SiD_Hcal.xml"/>
<include ref="${DD4hepINSTALL}/DDDetectors/compact/SiD/SiD_HcalPlug.xml"/>
<include ref="${DD4hepINSTALL}/DDDetectors/compact/SiD/SiD_Muon.xml"/>
<include ref="${DD4hepINSTALL}/DDDetectors/compact/SiD/SiD_Lumical.xml"/>
<include ref="${DD4hepINSTALL}/DDDetectors/compact/SiD/SiD_Beamcal.xml"/>

<comment>Beampipe</comment>
<include ref="${DD4hepINSTALL}/DDDetectors/compact/SiD/SiD_Beampipe.xml"/>

<comment>Dead material, supports and magnet</comment>
<include ref="${DD4hepINSTALL}/DDDetectors/compact/SiD/SiD_Shields.xml"/>
<include ref="${DD4hepINSTALL}/DDDetectors/compact/SiD/SiD_Solenoid.xml"/>

<comment>Magnetic field</comment>
<fields>
<field name="MagnetFields1_Constant" type="ConstantField" field="magnetic">
<strength x="0" y="0" z="4.0*tesla"/>
</field>
<field name="MagnetFields2_Constant" type="ConstantField" field="magnetic">
<strength x="0" y="0" z="3.0*tesla"/>
</field>
</fields>

</lccdd>
Loading
Loading