Skip to content

Commit

Permalink
fix: Fixing typo in name of variable and associated methods (#1277)
Browse files Browse the repository at this point in the history
* fixing variable name

* fixing format

* fixing additional format errors

* re-trigger CI

Co-authored-by: robertlangenberg <[email protected]>
  • Loading branch information
noemina and robertlangenberg authored Jun 7, 2022
1 parent 239ece3 commit 29f3649
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 27 deletions.
14 changes: 7 additions & 7 deletions Core/include/Acts/Seeding/SeedFinderUtils.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -205,17 +205,17 @@ bool xyzCoordinateCheck(Acts::SeedfinderConfig<external_spacepoint_t> m_config,
// if arive here spacepointPosition is compatible with strip directions and
// detector elements

const Acts::Vector3 bottomStripCenterPosition =
m_config.getBottomStripCenterPosition(sp->sp());
const Acts::Vector3 topStripCenterPosition =
m_config.getTopStripCenterPosition(sp->sp());

// spacepointPosition corected with respect to the bottom strip direction and
// the distance between the strips
// spacepointPosition corected with respect to the top strip position and
// direction and the distance between the strips
s0 = s0 / bd1;
outputCoordinates[0] = bottomStripCenterPosition[0] +
outputCoordinates[0] = topStripCenterPosition[0] +
(topHalfStripLength * topStripDirection[0]) * s0;
outputCoordinates[1] = bottomStripCenterPosition[1] +
outputCoordinates[1] = topStripCenterPosition[1] +
(topHalfStripLength * topStripDirection[1]) * s0;
outputCoordinates[2] = bottomStripCenterPosition[2] +
outputCoordinates[2] = topStripCenterPosition[2] +
(topHalfStripLength * topStripDirection[2]) * s0;
return true;
}
Expand Down
4 changes: 2 additions & 2 deletions Core/include/Acts/Seeding/SeedfinderConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ struct SeedfinderConfig {
Delegate<Acts::Vector3(const SpacePoint&)> getBottomStripDirection;
// Returns distance between the centers of the two strips.
Delegate<Acts::Vector3(const SpacePoint&)> getStripCenterDistance;
// Returns position of the center of the bottom strip.
Delegate<Acts::Vector3(const SpacePoint&)> getBottomStripCenterPosition;
// Returns position of the center of the top strip.
Delegate<Acts::Vector3(const SpacePoint&)> getTopStripCenterPosition;

SeedfinderConfig toInternalUnits() const {
using namespace Acts::UnitLiterals;
Expand Down
4 changes: 2 additions & 2 deletions Examples/Algorithms/TrackFinding/src/SeedingAlgorithm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ ActsExamples::SeedingAlgorithm::SeedingAlgorithm(
return sp.stripCenterDistance();
});

m_cfg.seedFinderConfig.getBottomStripCenterPosition.connect(
m_cfg.seedFinderConfig.getTopStripCenterPosition.connect(
[](const void*, const SimSpacePoint& sp) -> Acts::Vector3 {
return sp.bottomStripCenterPosition();
return sp.topStripCenterPosition();
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class SimSpacePoint {
/// @param topStripDirection direction of the top strip
/// @param bottomStripDirection direction of the bottom strip
/// @param stripCenterDistance distance between the center of the two strips
/// @param bottomStripCenterPosition position of the center of the bottom strip
/// @param topStripCenterPosition position of the center of the top strip
/// @param validDoubleMeasurementDetails boolean to check if double measurements are valid
template <typename position_t>
SimSpacePoint(const Eigen::MatrixBase<position_t>& pos, float varRho,
Expand All @@ -42,7 +42,7 @@ class SimSpacePoint {
const Acts::Vector3 topStripDirection,
const Acts::Vector3 bottomStripDirection,
const Acts::Vector3 stripCenterDistance,
const Acts::Vector3 bottomStripCenterPosition)
const Acts::Vector3 topStripCenterPosition)
: m_x(pos[Acts::ePos0]),
m_y(pos[Acts::ePos1]),
m_z(pos[Acts::ePos2]),
Expand All @@ -55,7 +55,7 @@ class SimSpacePoint {
m_topStripDirection(topStripDirection),
m_bottomStripDirection(bottomStripDirection),
m_stripCenterDistance(stripCenterDistance),
m_bottomStripCenterPosition(bottomStripCenterPosition),
m_topStripCenterPosition(topStripCenterPosition),
m_validDoubleMeasurementDetails(true) {
EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(position_t, 3);
}
Expand Down Expand Up @@ -96,8 +96,8 @@ class SimSpacePoint {
Acts::Vector3 topStripDirection() const { return m_topStripDirection; }
Acts::Vector3 bottomStripDirection() const { return m_bottomStripDirection; }
Acts::Vector3 stripCenterDistance() const { return m_stripCenterDistance; }
Acts::Vector3 bottomStripCenterPosition() const {
return m_bottomStripCenterPosition;
Acts::Vector3 topStripCenterPosition() const {
return m_topStripCenterPosition;
}
constexpr bool validDoubleMeasurementDetails() const {
return m_validDoubleMeasurementDetails;
Expand Down Expand Up @@ -126,7 +126,7 @@ class SimSpacePoint {
// distance between the center of the two strips
Acts::Vector3 m_stripCenterDistance = {0, 0, 0};
// position of the center of the bottom strip
Acts::Vector3 m_bottomStripCenterPosition = {0, 0, 0};
Acts::Vector3 m_topStripCenterPosition = {0, 0, 0};
bool m_validDoubleMeasurementDetails = false;
};

Expand Down
7 changes: 3 additions & 4 deletions Examples/Io/Csv/src/CsvOutputData.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ struct SpacePointData {
// distance between the center of the two strips
Acts::Vector3 sp_stripCenterDistance;
// position of the center of the bottom strip
Acts::Vector3 sp_bottomStripCenterPosition;
Acts::Vector3 sp_topStripCenterPosition;

DFE_NAMEDTUPLE(SpacePointData, measurement_id, sp_x, sp_y, sp_z, sp_radius,
sp_covr, sp_covz, sp_topHalfStripLength,
Expand All @@ -226,9 +226,8 @@ struct SpacePointData {
sp_bottomStripDirection[0], sp_bottomStripDirection[1],
sp_bottomStripDirection[2], sp_stripCenterDistance[0],
sp_stripCenterDistance[1], sp_stripCenterDistance[2],
sp_bottomStripCenterPosition[0],
sp_bottomStripCenterPosition[1],
sp_bottomStripCenterPosition[2]);
sp_topStripCenterPosition[0], sp_topStripCenterPosition[1],
sp_topStripCenterPosition[2]);
};

struct SurfaceGridData {
Expand Down
9 changes: 4 additions & 5 deletions Examples/Io/Csv/src/CsvSpacePointReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,15 @@ ActsExamples::ProcessCode ActsExamples::CsvSpacePointReader::read(
Acts::Vector3 stripCenterDistance(data.sp_stripCenterDistance[0],
data.sp_stripCenterDistance[1],
data.sp_stripCenterDistance[2]);
Acts::Vector3 bottomStripCenterPosition(
data.sp_bottomStripCenterPosition[0],
data.sp_bottomStripCenterPosition[1],
data.sp_bottomStripCenterPosition[2]);
Acts::Vector3 topStripCenterPosition(data.sp_topStripCenterPosition[0],
data.sp_topStripCenterPosition[1],
data.sp_topStripCenterPosition[2]);

spacePoints.emplace_back(
globalPos, data.sp_covr, data.sp_covz, data.measurement_id,
data.sp_topHalfStripLength, data.sp_bottomHalfStripLength,
topStripDirection, bottomStripDirection, stripCenterDistance,
bottomStripCenterPosition);
topStripCenterPosition);
} else {
spacePoints.emplace_back(globalPos, data.sp_covr, data.sp_covz,
data.measurement_id);
Expand Down
2 changes: 1 addition & 1 deletion Examples/Scripts/Python/itk_seeding.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def runITkSeeding(field, csvInputDir, outputDir, s=None):
+ "/event000000000-spacepoints_pixel.csv"
)
temp.write(
"measurement_id,sp_type,module_idhash,sp_x,sp_y,sp_z,sp_radius,sp_covr,sp_covz,sp_topHalfStripLength,sp_bottomHalfStripLength,sp_topStripDirection[0],sp_topStripDirection[1],sp_topStripDirection[2],sp_bottomStripDirection[0],sp_bottomStripDirection[1],sp_bottomStripDirection[2],sp_stripCenterDistance[0],sp_stripCenterDistance[1],sp_stripCenterDistance[2],sp_bottomStripCenterPosition[0],sp_bottomStripCenterPosition[1],sp_bottomStripCenterPosition[2]\n 1,0,3139,32.67557144165039,-5.311902523040771,-47.65000152587891,33.10452270507812,0.05999999865889549,0.02999880164861679,0,0,0,0,0,0,0,0,0,0,0,0,0,0\n 2,0,3422,95.14442443847656,-15.46361255645752,-52.125,96.39286804199219,0.05999999865889549,0.01687432639300823,0,0,0,0,0,0,0,0,0,0,0,0,0,0\n 3,0,3650,102.8257064819336,-16.71612739562988,-52.67499923706055,104.1755981445312,0.05999999865889549,0.001875000074505806,0,0,0,0,0,0,0,0,0,0,0,0,0,0\n 4,0,4223,159.4266204833984,-25.91166687011719,-56.75,161.5186157226562,0.05999999865889549,0.02999880164861679,0,0,0,0,0,0,0,0,0,0,0,0,0,0\n 5,0,5015,224.07958984375,-36.37123107910156,-61.40000152587891,227.0121765136719,0.05999999865889549,0.007499700412154198,0,0,0,0,0,0,0,0,0,0,0,0,0,0\n 6,0,6023,284.1485595703125,-46.0638542175293,-65.72499847412109,287.8580932617188,0.05999999865889549,0.001875000074505806,0,0,0,0,0,0,0,0,0,0,0,0,0,0"
"measurement_id,sp_type,module_idhash,sp_x,sp_y,sp_z,sp_radius,sp_covr,sp_covz,sp_topHalfStripLength,sp_bottomHalfStripLength,sp_topStripDirection[0],sp_topStripDirection[1],sp_topStripDirection[2],sp_bottomStripDirection[0],sp_bottomStripDirection[1],sp_bottomStripDirection[2],sp_stripCenterDistance[0],sp_stripCenterDistance[1],sp_stripCenterDistance[2],sp_topStripCenterPosition[0],sp_topStripCenterPosition[1],sp_topStripCenterPosition[2]\n 1,0,3139,32.67557144165039,-5.311902523040771,-47.65000152587891,33.10452270507812,0.05999999865889549,0.02999880164861679,0,0,0,0,0,0,0,0,0,0,0,0,0,0\n 2,0,3422,95.14442443847656,-15.46361255645752,-52.125,96.39286804199219,0.05999999865889549,0.01687432639300823,0,0,0,0,0,0,0,0,0,0,0,0,0,0\n 3,0,3650,102.8257064819336,-16.71612739562988,-52.67499923706055,104.1755981445312,0.05999999865889549,0.001875000074505806,0,0,0,0,0,0,0,0,0,0,0,0,0,0\n 4,0,4223,159.4266204833984,-25.91166687011719,-56.75,161.5186157226562,0.05999999865889549,0.02999880164861679,0,0,0,0,0,0,0,0,0,0,0,0,0,0\n 5,0,5015,224.07958984375,-36.37123107910156,-61.40000152587891,227.0121765136719,0.05999999865889549,0.007499700412154198,0,0,0,0,0,0,0,0,0,0,0,0,0,0\n 6,0,6023,284.1485595703125,-46.0638542175293,-65.72499847412109,287.8580932617188,0.05999999865889549,0.001875000074505806,0,0,0,0,0,0,0,0,0,0,0,0,0,0"
)
temp.read()

Expand Down

0 comments on commit 29f3649

Please sign in to comment.