@@ -28,6 +28,8 @@ finding_algorithm<stepper_t, navigator_t>::operator()(
28
28
const measurement_collection_types::host& measurements,
29
29
const bound_track_parameters_collection_types::host& seeds) const {
30
30
31
+ assert (m_cfg.min_track_candidates_per_track > 1 );
32
+
31
33
/* ****************************************************************
32
34
* Measurement Operations
33
35
*****************************************************************/
@@ -42,15 +44,16 @@ finding_algorithm<stepper_t, navigator_t>::operator()(
42
44
43
45
auto end = std::unique_copy (measurements.begin (), measurements.end (),
44
46
uniques.begin (), measurement_equal_comp ());
45
- const unsigned int n_modules = end - uniques.begin ();
47
+ const auto n_modules = static_cast < unsigned int >( end - uniques.begin () );
46
48
47
49
// Get upper bounds of unique elements
48
50
std::vector<unsigned int > upper_bounds;
49
51
upper_bounds.reserve (n_modules);
50
52
for (unsigned int i = 0 ; i < n_modules; i++) {
51
53
auto up = std::upper_bound (measurements.begin (), measurements.end (),
52
54
uniques[i], measurement_sort_comp ());
53
- upper_bounds.push_back (std::distance (measurements.begin (), up));
55
+ upper_bounds.push_back (
56
+ static_cast <unsigned int >(std::distance (measurements.begin (), up)));
54
57
}
55
58
const auto n_meas = measurements.size ();
56
59
@@ -88,8 +91,7 @@ finding_algorithm<stepper_t, navigator_t>::operator()(
88
91
89
92
std::vector<bound_track_parameters> out_params;
90
93
91
- for (int step = 0 ;
92
- step < static_cast <int >(m_cfg.max_track_candidates_per_track );
94
+ for (unsigned int step = 0 ; step < m_cfg.max_track_candidates_per_track ;
93
95
step++) {
94
96
95
97
// Iterate over input parameters
@@ -104,8 +106,8 @@ finding_algorithm<stepper_t, navigator_t>::operator()(
104
106
out_params.reserve (n_in_params);
105
107
106
108
// Previous step ID
107
- const int previous_step =
108
- (step == 0 ) ? std::numeric_limits<int >::max () : step - 1 ;
109
+ const unsigned int previous_step =
110
+ (step == 0 ) ? std::numeric_limits<unsigned int >::max () : step - 1 ;
109
111
110
112
std::fill (n_trks_per_seed.begin (), n_trks_per_seed.end (), 0 );
111
113
@@ -158,13 +160,14 @@ finding_algorithm<stepper_t, navigator_t>::operator()(
158
160
159
161
if (lo2 == barcodes.begin ()) {
160
162
range.first = 0u ;
161
- range.second = upper_bounds[bcd_id];
163
+ range.second = upper_bounds[static_cast <std:: size_t >( bcd_id) ];
162
164
} else if (lo2 == barcodes.end ()) {
163
165
range.first = 0u ;
164
166
range.second = 0u ;
165
167
} else {
166
- range.first = upper_bounds[bcd_id - 1 ];
167
- range.second = upper_bounds[bcd_id];
168
+ range.first =
169
+ upper_bounds[static_cast <std::size_t >(bcd_id - 1 )];
170
+ range.second = upper_bounds[static_cast <std::size_t >(bcd_id)];
168
171
}
169
172
170
173
unsigned int n_branches = 0 ;
@@ -223,7 +226,7 @@ finding_algorithm<stepper_t, navigator_t>::operator()(
223
226
* Propagate to the next surface
224
227
*********************************/
225
228
226
- const unsigned int n_links = links[step].size ();
229
+ const std:: size_t n_links = links[step].size ();
227
230
for (unsigned int link_id = 0 ; link_id < n_links; link_id++) {
228
231
229
232
const unsigned int seed_idx = links[step][link_id].seed_idx ;
@@ -276,7 +279,7 @@ finding_algorithm<stepper_t, navigator_t>::operator()(
276
279
// Unless the track found a surface, it is considered a
277
280
// tip
278
281
else if (!s4.success &&
279
- step >= static_cast <int >(
282
+ step >= static_cast <unsigned int >(
280
283
m_cfg.min_track_candidates_per_track ) -
281
284
1 ) {
282
285
tips.push_back ({step, link_id});
@@ -285,7 +288,8 @@ finding_algorithm<stepper_t, navigator_t>::operator()(
285
288
// If no more CKF step is expected, current candidate is
286
289
// kept as a tip
287
290
if (s4.success &&
288
- step == static_cast <int >(m_cfg.max_track_candidates_per_track ) -
291
+ step == static_cast <unsigned int >(
292
+ m_cfg.max_track_candidates_per_track ) -
289
293
1 ) {
290
294
tips.push_back ({step, link_id});
291
295
}
@@ -319,7 +323,7 @@ finding_algorithm<stepper_t, navigator_t>::operator()(
319
323
break ;
320
324
}
321
325
322
- const unsigned int link_pos =
326
+ const unsigned long link_pos =
323
327
param_to_link[L.previous .first ][L.previous .second ];
324
328
L = links[L.previous .first ][link_pos];
325
329
}
0 commit comments