Skip to content

Commit a3088af

Browse files
authored
Release v0.5.0 (#1442)
* Update goldfinger ndebug environment * Use ordered map for enhanced reproducibility * Add release notes * Improve slot diagnostic examples * Update documentation * Add some documentation to msc * Remove deprecated code
1 parent 8248052 commit a3088af

19 files changed

+413
-41
lines changed

doc/appendix/release-history.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Release History
1616
:maxdepth: 2
1717
:caption: Appendices
1818

19+
release-history/v0.5.rst
1920
release-history/v0.4.rst
2021
release-history/v0.3.rst
2122
release-history/v0.2.rst

doc/appendix/release-history/v0.5.rst

Lines changed: 339 additions & 0 deletions
Large diffs are not rendered by default.

scripts/cmake-presets/goldfinger.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,14 +129,14 @@
129129
"CELERITAS_USE_ROOT": {"type": "BOOL", "value": "OFF"},
130130
"CELERITAS_USE_VecGeom": {"type": "BOOL", "value": "ON"},
131131
"CMAKE_CXX_COMPILER_LAUNCHER": "/opt/homebrew/bin/ccache",
132-
"Geant4_DIR": "/Users/seth/Code/geant4-dev/build",
132+
"Geant4_DIR": "/Users/seth/Code/geant4-dev/install/lib/cmake/Geant4",
133133
"CELERITAS_BUILD_DEMOS": {"type": "BOOL", "value": "OFF"},
134134
"CELERITAS_BUILD_TESTS": {"type": "BOOL", "value": "OFF"},
135135
"CELERITAS_UNITS": "CLHEP"
136136
},
137137
"environment": {
138138
"PATH": "/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/Library/Apple/usr/bin",
139-
"CMAKE_PREFIX_PATH": "/opt/spack/opt/spack/sonoma/googletest/1.14.0/wjvv2w2:/opt/spack/opt/spack/sonoma/vecgeom/1.2.8/t4hnxz2:/opt/spack/opt/spack/sonoma/xerces-c/3.2.4/umj37ov:/opt/spack/opt/spack/sonoma/curl/8.4.0/x4tl4tu:/opt/spack/opt/spack/sonoma/zlib-ng/2.1.3/udbedjf:/opt/spack/opt/spack/sonoma/nghttp2/1.52.0/dzvtf5b:/opt/spack/opt/spack/sonoma/veccore/0.8.1/ye5hcpf:/opt/spack/opt/spack/sonoma/libpng/1.6.39/wl4oyhp:/opt/spack/opt/spack/sonoma/zlib-ng/2.1.3/udbedjf"
139+
"CMAKE_PREFIX_PATH": "/opt/spack/opt/spack/sequoia/libpng/1.6.39/3g6j5kh:/opt/spack/opt/spack/sequoia/zlib-ng/2.2.1/6s4rdcx:/opt/spack/opt/spack/sequoia/vecgeom/1.2.8/own7ofl:/opt/spack/opt/spack/sequoia/xerces-c/3.2.5/3zdtn2m:/opt/spack/opt/spack/sequoia/veccore/0.8.1/x34t746:/opt/spack/opt/spack/sequoia/nlohmann-json/3.11.3/fpe7aef:/opt/spack/opt/spack/sequoia/hepmc3/3.3.0/rrfyfcx:/opt/spack/opt/spack/sequoia/googletest/1.14.0/cwduo4b"
140140
}
141141
}
142142
],

src/celeritas/Units.hh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,8 @@ CELER_ICRT gauss = real_type(1e-4) * tesla;
163163

164164
//!@{
165165
//! \name Other common units
166+
CELER_ICRT micrometer = real_type(1e-4) * centimeter;
167+
CELER_ICRT nanometer = real_type(1e-7) * centimeter;
166168
CELER_ICRT femtometer = real_type(1e-13) * centimeter;
167169
CELER_ICRT barn = real_type(1e-24) * centimeter * centimeter;
168170
//!@}

src/celeritas/em/data/UrbanMscData.hh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ struct UrbanMscParameters
3939
Energy low_energy_limit{0};
4040
Energy high_energy_limit{0};
4141

42-
//! A scale factor for the range
43-
static CELER_CONSTEXPR_FUNCTION real_type dtrl() { return 5e-2; }
42+
//! Fraction of the range below which a step is assumed constant xs
43+
static CELER_CONSTEXPR_FUNCTION real_type dtrl() { return 0.05; }
4444

4545
//! The minimum value of the true path length limit: 0.01 nm
4646
static CELER_CONSTEXPR_FUNCTION real_type limit_min_fix()
4747
{
48-
return 1e-9 * units::centimeter;
48+
return real_type(0.01) * units::nanometer;
4949
}
5050

5151
//! Minimum true path when not calculated in the step limiting
@@ -57,7 +57,7 @@ struct UrbanMscParameters
5757
//! For steps below this value, true = geometrical (no MSC to be applied)
5858
static CELER_CONSTEXPR_FUNCTION real_type min_step()
5959
{
60-
return 100 * limit_min_fix();
60+
return 1 * units::nanometer;
6161
}
6262

6363
//! Below this endpoint energy, don't sample scattering: 1 eV

src/celeritas/em/msc/detail/UrbanMscSafetyStepLimit.hh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,8 @@ CELER_FUNCTION real_type UrbanMscSafetyStepLimit::operator()(Engine& rng)
209209
//---------------------------------------------------------------------------//
210210
/*!
211211
* Calculate the minimum of the true path length limit.
212+
*
213+
* See \c G4UrbanMscModel::ComputeTlimitmin .
212214
*/
213215
CELER_FUNCTION real_type UrbanMscSafetyStepLimit::calc_limit_min(
214216
UrbanMscMaterialData const& msc, Energy const inc_energy) const

src/celeritas/em/msc/detail/UrbanMscScatter.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ UrbanMscScatter::UrbanMscScatter(UrbanMscRef const& shared,
264264
// many of the class member data
265265
theta0_ = this->compute_theta0();
266266

267-
if (theta0_ < 1e-8)
267+
if (theta0_ < real_type(1e-8))
268268
{
269269
// Arbitrarily (?) small angle change (theta_0^2 < 1e-16):
270270
// skip sampling angular distribution if width of direction

src/celeritas/ext/GeantImporter.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -803,8 +803,7 @@ auto import_processes(GeantImporter::DataSelection::Flags process_flags,
803803

804804
static celeritas::TypeDemangler<G4VProcess> const demangle_process;
805805
std::unordered_map<G4VProcess const*, G4ParticleDefinition const*> visited;
806-
detail::GeantProcessImporter import_process(
807-
detail::TableSelection::minimal, materials, elements);
806+
detail::GeantProcessImporter import_process(materials, elements);
808807
detail::GeantOpticalModelImporter import_optical_model(materials);
809808

810809
auto append_process = [&](G4ParticleDefinition const& particle,

src/celeritas/ext/detail/GeantProcessImporter.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,6 @@ bool all_are_assigned(std::vector<T> const& arr)
246246
* Construct with a selected list of tables.
247247
*/
248248
GeantProcessImporter::GeantProcessImporter(
249-
TableSelection,
250249
std::vector<ImportPhysMaterial> const& materials,
251250
std::vector<ImportElement> const& elements)
252251
: materials_(materials), elements_(elements)

src/celeritas/ext/detail/GeantProcessImporter.hh

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,6 @@ namespace celeritas
3232
{
3333
namespace detail
3434
{
35-
//---------------------------------------------------------------------------//
36-
// DEPRECATED: remove in v0.5
37-
enum class TableSelection
38-
{
39-
minimal, //!< Store only lambda, dedx, and range
40-
all
41-
};
42-
4335
//---------------------------------------------------------------------------//
4436
/*!
4537
* Simplify the convoluted mechanism to store Geant4 process, model, and XS
@@ -54,7 +46,7 @@ enum class TableSelection
5446
*
5547
* \code
5648
* std::vector<ImportProcess> processes;
57-
* GeantProcessImporter import(TableSelection::all, materials, elements);
49+
* GeantProcessImporter import(materials, elements);
5850
*
5951
* G4ParticleTable::G4PTblDicIterator& particle_iterator
6052
* = *(G4ParticleTable::GetParticleTable()->GetIterator());
@@ -82,8 +74,7 @@ class GeantProcessImporter
8274
{
8375
public:
8476
// Construct with selected list of tables
85-
GeantProcessImporter(TableSelection which_tables,
86-
std::vector<ImportPhysMaterial> const& materials,
77+
GeantProcessImporter(std::vector<ImportPhysMaterial> const& materials,
8778
std::vector<ImportElement> const& elements);
8879

8980
// Import processes

0 commit comments

Comments
 (0)