Skip to content

Commit

Permalink
Second option
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzaponte committed Nov 6, 2023
1 parent e7483a3 commit 8e005fa
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions templates/basic/test/test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -170,23 +170,24 @@ TEST_CASE("liquid xenon properties", "[xenon][properties]") {
auto rm = n4::run_manager::create()
.fake_ui ()
.physics (our_optical_physics)
.geometry(nullptr)
.geometry(xe_sphere(1))
.actions(create_actions)
.run()
;

auto g4_rm = rm.here_be_dragons();
// auto g4_rm = rm.here_be_dragons();
auto events = 10000;
auto radii = n4::scale_by(cm, {1, 2, 3, 4, 5, 6, 7, 8});

// --- Infer attenuation length by gathering statistics for given radius -------------
auto check_att_length = [&unscathed, g4_rm, &xe_sphere, events] (auto radius) {
auto check_att_length = [&unscathed, rm, &xe_sphere, events] (auto radius) {
unscathed = 0;

// rm -> replace_geometry(xe_sphere(radius)).run(events):
n4::clear_geometry();
g4_rm -> SetUserInitialization(new n4::geometry{xe_sphere(radius)});
g4_rm -> Initialize();
g4_rm -> BeamOn(events);
rm -> replace_geometry(xe_sphere(radius)).run(events);
// n4::clear_geometry();
// g4_rm -> SetUserInitialization(new n4::geometry{xe_sphere(radius)});
// g4_rm -> Initialize();
// g4_rm -> BeamOn(events);

auto ratio = unscathed / 1. / events;
auto expected_attenuation_length = 3.74 * cm;
Expand Down

0 comments on commit 8e005fa

Please sign in to comment.