Skip to content

Commit

Permalink
Minor fix; Revert clang-format change in GeantImporter
Browse files Browse the repository at this point in the history
  • Loading branch information
stognini committed Mar 19, 2024
1 parent 4c61165 commit 9de91f0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
3 changes: 1 addition & 2 deletions src/celeritas/ext/GeantImporter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,7 @@ std::vector<ImportElement> import_elements()
// Despite the function name, this is *NOT* a vector, it's an array
double* const g4rel_abundance = g4element->GetRelativeAbundanceVector();

double total_el_abundance_fraction = 0; // Verify that the sum is
// ~1
double total_el_abundance_fraction = 0; // Verify that the sum is ~1
for (auto idx : range(g4element->GetNumberOfIsotopes()))
{
ImportElement::IsotopeFrac key;
Expand Down
13 changes: 7 additions & 6 deletions test/celeritas/optical/Scintillation.test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ class ScintillationTest : public OpticalTestBase
ScintillationParams::Input inp;
inp.scintillation_by_particle = scint_by_particle;
inp.matid_to_optmatid.push_back(OpticalMaterialId(0));
// Match particle params list
inp.pid_to_scintpid.push_back(ScintillationParticleId(0)); // electron
// Match particle params (1st particle is an electron)
inp.pid_to_scintpid.push_back(ScintillationParticleId(0));
inp.data.push_back(std::move(data));

return std::make_shared<ScintillationParams>(std::move(inp),
Expand All @@ -80,6 +80,9 @@ class ScintillationTest : public OpticalTestBase
//! Create material components
std::vector<ImportScintComponent> build_material_components()
{
static constexpr double nm = 1e-9 * units::meter;
static constexpr double ns = 1e-9 * units::second;

std::vector<ImportScintComponent> comps;
comps.push_back({0.65713, 128 * nm, 10 * nm, 10 * ns, 6 * ns});
comps.push_back({0.31987, 128 * nm, 10 * nm, 10 * ns, 1500 * ns});
Expand Down Expand Up @@ -107,8 +110,8 @@ class ScintillationTest : public OpticalTestBase
comp.yield = 4000;
comp.lambda_mean = 1e-5;
comp.lambda_sigma = 1e-6;
comp.rise_time = 15 * ns;
comp.fall_time = 5 * ns;
comp.rise_time = 15e-9;
comp.fall_time = 5e-9;
vec_comps.push_back(std::move(comp));
return vec_comps;
}
Expand All @@ -127,8 +130,6 @@ class ScintillationTest : public OpticalTestBase

protected:
RandomEngine rng_;
static constexpr double nm = 1e-9 * units::meter;
static constexpr double ns = 1e-9 * units::second;
};

//---------------------------------------------------------------------------//
Expand Down

0 comments on commit 9de91f0

Please sign in to comment.