@@ -51,19 +51,21 @@ 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,
68
+ ctx);
67
69
68
70
// Comparison of straight line navigation with ray scan
69
71
test::straight_line_navigation<toy_detector_t >::config cfg_str_nav{};
@@ -77,7 +79,7 @@ int main(int argc, char **argv) {
77
79
static_cast <float >(mask_tolerance[1 ]);
78
80
79
81
detail::register_checks<test::straight_line_navigation>(toy_det, toy_names,
80
- cfg_str_nav);
82
+ cfg_str_nav, ctx );
81
83
82
84
// Navigation link consistency, discovered by helix intersection
83
85
test::helix_scan<toy_detector_t >::config cfg_hel_scan{};
@@ -91,7 +93,8 @@ int main(int argc, char **argv) {
91
93
cfg_hel_scan.track_generator ().eta_range (-4 .f , 4 .f );
92
94
cfg_hel_scan.track_generator ().p_T (1 .f * unit<scalar>::GeV);
93
95
94
- detail::register_checks<test::helix_scan>(toy_det, toy_names, cfg_hel_scan);
96
+ detail::register_checks<test::helix_scan>(toy_det, toy_names, cfg_hel_scan,
97
+ ctx);
95
98
96
99
// Comparison of navigation in a constant B-field with helix
97
100
test::helix_navigation<toy_detector_t >::config cfg_hel_nav{};
@@ -100,7 +103,7 @@ int main(int argc, char **argv) {
100
103
cfg_hel_nav.propagation ().navigation .search_window = {3u , 3u };
101
104
102
105
detail::register_checks<test::helix_navigation>(toy_det, toy_names,
103
- cfg_hel_nav);
106
+ cfg_hel_nav, ctx );
104
107
105
108
// Run the material validation - Material Maps
106
109
test::material_scan<toy_detector_t >::config mat_scan_cfg{};
@@ -111,7 +114,7 @@ int main(int argc, char **argv) {
111
114
112
115
// Record the material using a ray scan
113
116
detail::register_checks<test::material_scan>(toy_det, toy_names,
114
- mat_scan_cfg);
117
+ mat_scan_cfg, ctx );
115
118
116
119
// Now trace the material during navigation and compare
117
120
test::material_validation<toy_detector_t >::config mat_val_cfg{};
@@ -125,7 +128,7 @@ int main(int argc, char **argv) {
125
128
126
129
// @TODO: Put material maps on all portals
127
130
detail::register_checks<test::material_validation>(toy_det, toy_names,
128
- mat_val_cfg);
131
+ mat_val_cfg, ctx );
129
132
130
133
// Run the material validation - Homogeneous material
131
134
toy_cfg.use_material_maps (false );
@@ -139,17 +142,17 @@ int main(int argc, char **argv) {
139
142
// Check that the detector was built correctly
140
143
detail::register_checks<test::consistency_check>(
141
144
toy_det_hom_mat, toy_names_hom_mat,
142
- cfg_cons.name (" toy_detector_consistency_hom_mat" ));
145
+ cfg_cons.name (" toy_detector_consistency_hom_mat" ), ctx );
143
146
144
147
// Record the material using a ray scan
145
148
mat_scan_cfg.name (" toy_detector_hom_material_scan" );
146
149
detail::register_checks<test::material_scan>(
147
- toy_det_hom_mat, toy_names_hom_mat, mat_scan_cfg);
150
+ toy_det_hom_mat, toy_names_hom_mat, mat_scan_cfg, ctx );
148
151
149
152
// Now trace the material during navigation and compare
150
153
mat_val_cfg.name (" toy_detector_hom_material_validaiton" );
151
154
detail::register_checks<test::material_validation>(
152
- toy_det_hom_mat, toy_names_hom_mat, mat_val_cfg);
155
+ toy_det_hom_mat, toy_names_hom_mat, mat_val_cfg, ctx );
153
156
154
157
// Run the checks
155
158
return RUN_ALL_TESTS ();
0 commit comments