Skip to content
Draft
Show file tree
Hide file tree
Changes from 14 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
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ celeritas_optional_package(PNG "Enable PNG output with libpng")
celeritas_optional_package(Python "Use Python to generate and preprocess")
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 @@ -353,6 +354,14 @@ if(CELERITAS_USE_Geant4 AND BUILD_TESTING AND NOT DEFINED CELER_G4ENV)
celeritas_set_celer_g4env()
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 @@ -28,7 +28,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"},
"CMAKE_INSTALL_PREFIX": "${sourceDir}/install-${presetName}"
}
},
Expand Down
4 changes: 4 additions & 0 deletions cmake/CeleritasConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,10 @@ if(CELERITAS_USE_VecGeom)
endif()
endif()

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

cmake_policy(POP)

#-----------------------------------------------------------------------------#
Expand Down
3 changes: 3 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ add_subdirectory(celeritas)
if(CELERITAS_USE_Geant4)
add_subdirectory(accel)
endif()
if(CELERITAS_USE_DD4hep)
add_subdirectory(ddceler)
endif()

# Add alias as a bridge library: see cmake/CeleritasConfig.cmake.in
# TODO: move to a separate library for just high level interfaces
Expand Down
9 changes: 9 additions & 0 deletions src/ddceler/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
dd4hep_add_plugin(DDcelerTMI
SOURCES DDcelerTMI.cc
USES DD4hep::DDG4 Celeritas::accel Celeritas::celeritas Celeritas::corecel
)
dd4hep_add_plugin(DDcelerRunAction
SOURCES DDcelerRunAction.cc
USES DD4hep::DDG4 DD4hep::DDCore Celeritas::accel Celeritas::celeritas Celeritas::corecel
)
install(TARGETS DDcelerTMI DDcelerRunAction LIBRARY DESTINATION lib)
Copy link
Member

Choose a reason for hiding this comment

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

This should probably be "${CMAKE_INSTALL_LIBDIR}"; and should we also use the EXPORT celeritas-targets target set?

40 changes: 40 additions & 0 deletions src/ddceler/DDcelerRunAction.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
//------------------------------- -*- C++ -*- -------------------------------//
// Copyright Celeritas contributors: see top-level COPYRIGHT file for details
// SPDX-License-Identifier: (Apache-2.0 OR MIT)
//---------------------------------------------------------------------------//
//! \file ddceler/DDcelerTMI.cc
//---------------------------------------------------------------------------//
#include "DDcelerRunAction.hh"

#include <CeleritasG4.hh>
#include <DDG4/Factories.h>
#include <QGSP_BERT.hh>

using TMI = celeritas::TrackingManagerIntegration;

namespace dd4hep
{
namespace sim
{

//---------------------------------------------------------------------------//

void DDcelerRunAction::begin(G4Run const* run)
{
this->info("Begin of run");
Copy link
Member

Choose a reason for hiding this comment

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

These are probably superfluous since the TMI instance also logs similar. If we should be redirecting logging through DD4HEP we can do that as well.

TMI::Instance().BeginOfRunAction(run);
}

//---------------------------------------------------------------------------//

void DDcelerRunAction::end(G4Run const* run)
{
this->info("End of run");
TMI::Instance().EndOfRunAction(run);
}
//---------------------------------------------------------------------------//

} // namespace sim
} // namespace dd4hep

DECLARE_GEANT4ACTION(DDcelerRunAction)
64 changes: 64 additions & 0 deletions src/ddceler/DDcelerRunAction.hh
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
//------------------------------- -*- C++ -*- -------------------------------//
// Copyright Celeritas contributors: see top-level COPYRIGHT file for details
// SPDX-License-Identifier: (Apache-2.0 OR MIT)
//---------------------------------------------------------------------------//
//! \file ddceler/DDcelerTMI.hh
//---------------------------------------------------------------------------//
#pragma once

#include <DD4hep/InstanceCount.h>
#include <DDG4/Geant4Action.h>
#include <DDG4/Geant4RunAction.h>

using Geant4Context = dd4hep::sim::Geant4Context;
using Geant4Action = dd4hep::sim::Geant4Action;
using Geant4RunAction = dd4hep::sim::Geant4RunAction;

namespace dd4hep
{
namespace sim
{
//---------------------------------------------------------------------------//
/*!
* DDG4 action plugin for Celeritas tracking manager integration (TMI).
*/
class DDcelerRunAction : public Geant4RunAction
{
protected:
// Define standard assignments and constructors
DDG4_DEFINE_ACTION_CONSTRUCTORS(DDcelerRunAction);

public:
// Standard constructor
inline DDcelerRunAction(Geant4Context* ctxt, std::string const& nam);

// Default destructor
~DDcelerRunAction();

Choose a reason for hiding this comment

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

Virtual?

Copy link
Member

Choose a reason for hiding this comment

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

I think virtual is automatic if the base class is; @esseivaju has taught me using override (if it's not the first virtual base class), whichI think is the best choice here.


// Make options for Celeritas tracking manager
void begin(G4Run const* run) override;
void end(G4Run const* run) override;
};

//---------------------------------------------------------------------------//
// INLINE DEFINITIONS
//---------------------------------------------------------------------------//
/*!
* Standard constructor
*/
DDcelerRunAction::DDcelerRunAction(Geant4Context* ctxt, std::string const& nam)
: Geant4RunAction(ctxt, nam)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
DDcelerRunAction::DDcelerRunAction(Geant4Context* ctxt, std::string const& nam)
: Geant4RunAction(ctxt, nam)
DDcelerRunAction::DDcelerRunAction(Geant4Context* ctx, std::string const& name)
: Geant4RunAction(ctx, name)

{
InstanceCount::increment(this);
this->info("Constructed Geant4RunAction");
}

DDcelerRunAction::~DDcelerRunAction()
{
this->info("Destructing Geant4RunAction");
InstanceCount::decrement(this);
}

//---------------------------------------------------------------------------//
} // namespace sim
} // namespace dd4hep
71 changes: 71 additions & 0 deletions src/ddceler/DDcelerTMI.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
//------------------------------- -*- C++ -*- -------------------------------//
// Copyright Celeritas contributors: see top-level COPYRIGHT file for details
// SPDX-License-Identifier: (Apache-2.0 OR MIT)
//---------------------------------------------------------------------------//
//! \file ddceler/DDcelerTMI.cc
//---------------------------------------------------------------------------//
#include "DDcelerTMI.hh"

#include <DDG4/Factories.h>
#include <QGSP_BERT.hh>

#include "celeritas/field/FieldDriverOptions.hh"
#include "celeritas/inp/Field.hh"

using TMI = celeritas::TrackingManagerIntegration;

namespace dd4hep
{
namespace sim
{
//---------------------------------------------------------------------------//
celeritas::SetupOptions DDcelerTMI::makeOptions()
{
celeritas::SetupOptions opts;

// NOTE: these numbers are appropriate for CPU execution and can be set
// through the UI using `/celer/`
Comment on lines +39 to +40
Copy link
Member

Choose a reason for hiding this comment

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

I think this comment is obsolete now?

opts.max_num_tracks = 2024;
opts.initializer_capacity = 2024 * 128;
// Celeritas does not support EmStandard MSC physics above 200 MeV
opts.ignore_processes = {"CoulombScat"};

// Use a placeholder non-zero uniform magnetic field
auto make_field_input = []() {
celeritas::inp::UniformField input;

input.strength = {0, 3, 0};
constexpr auto celer_mm = celeritas::units::millimeter;
input.driver_options.minimum_step = 1e-6 * celer_mm;
input.driver_options.delta_chord = 0.025 * celer_mm;
input.driver_options.delta_intersection = 1e-5 * celer_mm;
return input;
};
opts.make_along_step = celeritas::UniformAlongStepFactory(make_field_input);

// Save diagnostic file to a unique name
opts.output_file = "trackingmanager-offload.out.json";
Comment on lines +175 to +176
Copy link
Member

Choose a reason for hiding this comment

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

This should be a user input parameter, or be based on the dd4hep run name

return opts;
}
//---------------------------------------------------------------------------//

void DDcelerTMI::constructPhysics(G4VModularPhysicsList* physics)
{
this->info(
"Using FTFP_BERT physics list with Celeritas tracking for "
"e-/e+/gamma.");

// Register Celeritas tracking manager
auto& tmi = TMI::Instance();
physics->RegisterPhysics(new celeritas::TrackingManagerConstructor(&tmi));
Copy link
Member

Choose a reason for hiding this comment

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

Since this can throw, you may want to write (after including accel/ExceptionConverter.hh):

Suggested change
physics->RegisterPhysics(new celeritas::TrackingManagerConstructor(&tmi));
CELER_TRY_HANDLE(
physics->RegisterPhysics(new celeritas::TrackingManagerConstructor(&tmi)),
ExceptionConverter{"ddceler.construct-physics"});

and same below with your call to SetOptions(makeOptions())


// Configure Celeritas options
tmi.SetOptions(makeOptions());

this->info("Celeritas TrackingManager registered.");
}
//---------------------------------------------------------------------------//
} // namespace sim
} // namespace dd4hep

DECLARE_GEANT4ACTION(DDcelerTMI)
Copy link
Member

Choose a reason for hiding this comment

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

A little annotation about what this does would be good (it doesn't start with DDG4_ or anything to indicate it's coming from that library).

58 changes: 58 additions & 0 deletions src/ddceler/DDcelerTMI.hh
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
//------------------------------- -*- C++ -*- -------------------------------//
// Copyright Celeritas contributors: see top-level COPYRIGHT file for details
// SPDX-License-Identifier: (Apache-2.0 OR MIT)
//---------------------------------------------------------------------------//
//! \file ddceler/DDcelerTMI.hh
//---------------------------------------------------------------------------//
#pragma once

#include <CeleritasG4.hh>
#include <DDG4/Geant4Action.h>
#include <DDG4/Geant4PhysicsList.h>

using Geant4Context = dd4hep::sim::Geant4Context;
using Geant4Action = dd4hep::sim::Geant4Action;
using Geant4PhysicsList = dd4hep::sim::Geant4PhysicsList;

namespace dd4hep
{
namespace sim
{
//---------------------------------------------------------------------------//
/*!
* DDG4 action plugin for Celeritas tracking manager integration (TMI).
*/
class DDcelerTMI : public Geant4PhysicsList
{
protected:
// Define standard assignments and constructors
DDG4_DEFINE_ACTION_CONSTRUCTORS(DDcelerTMI);

public:
// Standard constructor
inline DDcelerTMI(Geant4Context* ctxt, std::string const& nam);

// Default destructor
virtual ~DDcelerTMI() = default;

// Make options for Celeritas tracking manager
celeritas::SetupOptions makeOptions();

// constructPhysics callback
virtual void constructPhysics(G4VModularPhysicsList* physics) override;
};

//---------------------------------------------------------------------------//
// INLINE DEFINITIONS
//---------------------------------------------------------------------------//
/*!
* Standard constructor
*/
DDcelerTMI::DDcelerTMI(Geant4Context* ctxt, std::string const& nam)
: Geant4PhysicsList(ctxt, nam)
{
}

//---------------------------------------------------------------------------//
} // namespace sim
} // namespace dd4hep
41 changes: 41 additions & 0 deletions src/ddceler/steeringFile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
"""
Minimal proof of concept for DDG4 steering file to run Geant4 with celeritas integration.
// Build celeritas-DDG4 plugins and set library path
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}
// Download and install the Open Data Detector For Testing.
git clone https://gitlab.cern.ch/acts/OpenDataDetector
cd OpenDataDetector
cmake -DCMAKE_INSTALL_PREFIX=install -S . -B build
cmake --build build -j 8
cmake --install build
source install/bin/this_odd.sh
// Run simulation with celeritas integration
CELER_LOG=debug CELER_LOG_LOCAL=debug ddsim --action.run DDcelerRunAction \
--compactFile=$PWD/install/share/OpenDataDetector/xml/OpenDataDetector.xml \
--steering steeringFile.py -N 10 -G
"""

import DDG4

# Create DDG4 kernel
kernel = DDG4.Kernel()

# Print detector information
DDG4.importConstants(kernel.detectorDescription(), debug=False)
geant4 = DDG4.Geant4(kernel)
geant4.registerInterruptHandler()
geant4.printDetectors()

# Set up custom physics list for celeritas integration
phys = geant4.setupPhysics('FTFP_BERT')
ph = DDG4.PhysicsList(kernel, str('DDcelerTMI'))
phys.adopt(ph)
phys.dump()
Loading