Skip to content

Commit 138ab4b

Browse files
cvarnicvarni
authored andcommitted
avoid double -> float conversion
1 parent 21a16e6 commit 138ab4b

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

tests/cpu/compare_with_acts_seeding.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class SpacePointCollector {
5353
friend Acts::SpacePointContainer<SpacePointCollector, Acts::detail::RefHolder>;
5454
using ValueType = SpacePoint;
5555

56-
SpacePointCollector(std::vector<const ValueType*>& externalCollection)
56+
explicit SpacePointCollector(std::vector<const ValueType*>& externalCollection)
5757
: m_storage(&externalCollection)
5858
{}
5959

@@ -75,7 +75,7 @@ class SpacePointCollector {
7575
case "TopStripCenterPosition"_hash:
7676
return Acts::Vector3( {0, 0, 0} );
7777
default:
78-
throw std::runtime_error("no such component " + std::to_string(key));
78+
throw std::invalid_argument("no such component " + std::to_string(key));
7979
}
8080
}
8181

@@ -232,8 +232,8 @@ TEST_P(CompareWithActsSeedingTests, Run) {
232232
acts_config.rMaxMiddle = std::numeric_limits<float>::max();
233233
acts_config.useVariableMiddleSPRange = false;
234234
acts_config.rRangeMiddleSP = {};
235-
acts_config.deltaRMiddleMinSPRange = 10 * Acts::UnitConstants::mm;
236-
acts_config.deltaRMiddleMaxSPRange = 10 * Acts::UnitConstants::mm;
235+
acts_config.deltaRMiddleMinSPRange = 10.f; // mm
236+
acts_config.deltaRMiddleMaxSPRange = 10.f; // mm
237237
acts_config.deltaRMin = traccc_config.deltaRMin;
238238
acts_config.deltaRMax = traccc_config.deltaRMax;
239239
acts_config.deltaRMinTopSP = traccc_config.deltaRMin;
@@ -338,7 +338,6 @@ TEST_P(CompareWithActsSeedingTests, Run) {
338338
// the constructor can accept a mixture of all of these types
339339
int numPhiNeighbors = 1;
340340
int numRadiusNeighbors = 0;
341-
// TODO: set some reasonable values here!!!
342341
std::vector<std::pair<int, int>> zBinNeighborsTop{};
343342
std::vector<std::pair<int, int>> zBinNeighborsBottom{};
344343

0 commit comments

Comments
 (0)