@@ -51,19 +51,20 @@ int main(int argc, char **argv) {
51
51
build_toy_detector<test_algebra>(host_mr, toy_cfg);
52
52
53
53
auto white_board = std::make_shared<test::whiteboard>();
54
+ toy_detector_t ::geometry_context ctx{};
54
55
55
56
// General data consistency of the detector
56
57
test::consistency_check<toy_detector_t >::config cfg_cons{};
57
58
detail::register_checks<test::consistency_check>(
58
- toy_det, toy_names, cfg_cons.name (" toy_detector_consistency" ));
59
+ toy_det, toy_names, cfg_cons.name (" toy_detector_consistency" ), ctx );
59
60
60
61
// Navigation link consistency, discovered by ray intersection
61
62
test::ray_scan<toy_detector_t >::config cfg_ray_scan{};
62
63
cfg_ray_scan.name (" toy_detector_ray_scan" );
63
64
cfg_ray_scan.whiteboard (white_board);
64
65
cfg_ray_scan.track_generator ().n_tracks (10000u );
65
66
66
- detail::register_checks<test::ray_scan>(toy_det, toy_names, cfg_ray_scan);
67
+ detail::register_checks<test::ray_scan>(toy_det, toy_names, cfg_ray_scan, ctx );
67
68
68
69
// Comparison of straight line navigation with ray scan
69
70
test::straight_line_navigation<toy_detector_t >::config cfg_str_nav{};
@@ -77,7 +78,7 @@ int main(int argc, char **argv) {
77
78
static_cast <float >(mask_tolerance[1 ]);
78
79
79
80
detail::register_checks<test::straight_line_navigation>(toy_det, toy_names,
80
- cfg_str_nav);
81
+ cfg_str_nav, ctx );
81
82
82
83
// Navigation link consistency, discovered by helix intersection
83
84
test::helix_scan<toy_detector_t >::config cfg_hel_scan{};
@@ -91,7 +92,7 @@ int main(int argc, char **argv) {
91
92
cfg_hel_scan.track_generator ().eta_range (-4 .f , 4 .f );
92
93
cfg_hel_scan.track_generator ().p_T (1 .f * unit<scalar>::GeV);
93
94
94
- detail::register_checks<test::helix_scan>(toy_det, toy_names, cfg_hel_scan);
95
+ detail::register_checks<test::helix_scan>(toy_det, toy_names, cfg_hel_scan, ctx );
95
96
96
97
// Comparison of navigation in a constant B-field with helix
97
98
test::helix_navigation<toy_detector_t >::config cfg_hel_nav{};
@@ -100,7 +101,7 @@ int main(int argc, char **argv) {
100
101
cfg_hel_nav.propagation ().navigation .search_window = {3u , 3u };
101
102
102
103
detail::register_checks<test::helix_navigation>(toy_det, toy_names,
103
- cfg_hel_nav);
104
+ cfg_hel_nav, ctx );
104
105
105
106
// Run the material validation - Material Maps
106
107
test::material_scan<toy_detector_t >::config mat_scan_cfg{};
@@ -111,7 +112,7 @@ int main(int argc, char **argv) {
111
112
112
113
// Record the material using a ray scan
113
114
detail::register_checks<test::material_scan>(toy_det, toy_names,
114
- mat_scan_cfg);
115
+ mat_scan_cfg, ctx );
115
116
116
117
// Now trace the material during navigation and compare
117
118
test::material_validation<toy_detector_t >::config mat_val_cfg{};
@@ -125,7 +126,7 @@ int main(int argc, char **argv) {
125
126
126
127
// @TODO: Put material maps on all portals
127
128
detail::register_checks<test::material_validation>(toy_det, toy_names,
128
- mat_val_cfg);
129
+ mat_val_cfg, ctx );
129
130
130
131
// Run the material validation - Homogeneous material
131
132
toy_cfg.use_material_maps (false );
@@ -139,17 +140,17 @@ int main(int argc, char **argv) {
139
140
// Check that the detector was built correctly
140
141
detail::register_checks<test::consistency_check>(
141
142
toy_det_hom_mat, toy_names_hom_mat,
142
- cfg_cons.name (" toy_detector_consistency_hom_mat" ));
143
+ cfg_cons.name (" toy_detector_consistency_hom_mat" ), ctx );
143
144
144
145
// Record the material using a ray scan
145
146
mat_scan_cfg.name (" toy_detector_hom_material_scan" );
146
147
detail::register_checks<test::material_scan>(
147
- toy_det_hom_mat, toy_names_hom_mat, mat_scan_cfg);
148
+ toy_det_hom_mat, toy_names_hom_mat, mat_scan_cfg, ctx );
148
149
149
150
// Now trace the material during navigation and compare
150
151
mat_val_cfg.name (" toy_detector_hom_material_validaiton" );
151
152
detail::register_checks<test::material_validation>(
152
- toy_det_hom_mat, toy_names_hom_mat, mat_val_cfg);
153
+ toy_det_hom_mat, toy_names_hom_mat, mat_val_cfg, ctx );
153
154
154
155
// Run the checks
155
156
return RUN_ALL_TESTS ();
0 commit comments