Skip to content

Commit

Permalink
Merge branch 'main' into fix/exatrkx-boost
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminhuth authored Jun 7, 2022
2 parents ac82f31 + 8a2260b commit 06340ff
Show file tree
Hide file tree
Showing 18 changed files with 47 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ jobs:
brew install cmake eigen ninja ccache
&& sudo mkdir /usr/local/acts
&& sudo chown $USER /usr/local/acts
&& wget --verbose --progress=dot:giga --continue --retry-connrefused --tries=5 --timeout=2 -O deps.tar.gz https://acts.web.cern.ch/ci/macOS/deps.5e0adfa.tar.gz
&& wget --verbose --progress=dot:giga --continue --retry-connrefused --tries=5 --timeout=2 -O deps.tar.gz https://acts.web.cern.ch/ci/macOS/deps.395f534.tar.gz
&& tar -xf deps.tar.gz -C /usr/local/acts
- name: Cache build
Expand Down
5 changes: 4 additions & 1 deletion Core/include/Acts/Propagator/AtlasStepper.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file is part of the Acts project.
//
// Copyright (C) 2016-2020 CERN for the benefit of the Acts project
// Copyright (C) 2016-2022 CERN for the benefit of the Acts project
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
Expand Down Expand Up @@ -1140,6 +1140,7 @@ class AtlasStepper {
bool Helix = false;
// if (std::abs(S) < m_cfg.helixStep) Helix = true;

size_t nStepTrials = 0;
while (h != 0.) {
// PS2 is h/(2*momentum) in EigenStepper
double S3 = (1. / 3.) * h, S4 = .25 * h, PS2 = Pi * h;
Expand Down Expand Up @@ -1224,6 +1225,7 @@ class AtlasStepper {
if (EST > state.options.tolerance) {
h = h * .5;
// dltm = 0.;
nStepTrials++;
continue;
}

Expand Down Expand Up @@ -1354,6 +1356,7 @@ class AtlasStepper {
}

state.stepping.pathAccumulated += h;
state.stepping.stepSize.nStepTrials = nStepTrials;
return h;
}

Expand Down
4 changes: 2 additions & 2 deletions Core/include/Acts/Propagator/ConstrainedStep.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file is part of the Acts project.
//
// Copyright (C) 2018 CERN for the benefit of the Acts project
// Copyright (C) 2018-2022 CERN for the benefit of the Acts project
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
Expand Down Expand Up @@ -134,7 +134,7 @@ struct ConstrainedStep {

/// Number of iterations needed by the stepsize finder
/// (e.g. Runge-Kutta) of the stepper.
int nStepTrials = std::numeric_limits<int>::max();
size_t nStepTrials = std::numeric_limits<size_t>::max();
};

inline std::string ConstrainedStep::toString() const {
Expand Down
2 changes: 1 addition & 1 deletion Core/include/Acts/Propagator/EigenStepper.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file is part of the Acts project.
//
// Copyright (C) 2016-2020 CERN for the benefit of the Acts project
// Copyright (C) 2016-2022 CERN for the benefit of the Acts project
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
Expand Down
2 changes: 1 addition & 1 deletion Core/include/Acts/Propagator/EigenStepper.ipp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file is part of the Acts project.
//
// Copyright (C) 2019-2020 CERN for the benefit of the Acts project
// Copyright (C) 2019-2022 CERN for the benefit of the Acts project
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
Expand Down
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: 4 additions & 0 deletions Core/include/Acts/Seeding/SpacePointGrid.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ struct SpacePointGridConfig {
float cotThetaMax;
// maximum impact parameter in mm
float impactMax;
// minimum phi value for phiAxis construction
float phiMin = -M_PI;
// maximum phi value for phiAxis construction
float phiMax = M_PI;
// Multiplicator for the number of phi-bins. The minimum number of phi-bins
// depends on min_pt, magnetic field: 2*M_PI/(minPT particle phi-deflection).
// phiBinDeflectionCoverage is a multiplier for this number. If
Expand Down
2 changes: 1 addition & 1 deletion Core/include/Acts/Seeding/SpacePointGrid.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Acts::SpacePointGridCreator::createGrid(

Acts::detail::Axis<detail::AxisType::Equidistant,
detail::AxisBoundaryType::Closed>
phiAxis(-M_PI, M_PI, phiBins);
phiAxis(config.phiMin, config.phiMax, phiBins);

// vector that will store the edges of the bins of z
std::vector<AxisScalar> zValues;
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
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file is part of the Acts project.
//
// Copyright (C) 2018 CERN for the benefit of the Acts project
// Copyright (C) 2018-2022 CERN for the benefit of the Acts project
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
Expand Down Expand Up @@ -87,7 +87,7 @@ class RootPropagationStepsWriter
std::vector<float> m_step_act; ///< actor check
std::vector<float> m_step_abt; ///< aborter
std::vector<float> m_step_usr; ///< user
std::vector<int>
std::vector<size_t>
m_nStepTrials; ///< Number of iterations needed by the stepsize
/// finder (e.g. Runge-Kutta) of the stepper.
};
Expand Down
2 changes: 1 addition & 1 deletion Examples/Io/Root/src/RootPropagationStepsWriter.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file is part of the Acts project.
//
// Copyright (C) 2017 CERN for the benefit of the Acts project
// Copyright (C) 2017-2022 CERN for the benefit of the Acts project
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
Expand Down
2 changes: 2 additions & 0 deletions Examples/Python/src/TrackFinding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ void addTrackFinding(Context& ctx) {
ACTS_PYTHON_MEMBER(rMax);
ACTS_PYTHON_MEMBER(zMax);
ACTS_PYTHON_MEMBER(zMin);
ACTS_PYTHON_MEMBER(phiMin);
ACTS_PYTHON_MEMBER(phiMax);
ACTS_PYTHON_MEMBER(deltaRMax);
ACTS_PYTHON_MEMBER(cotThetaMax);
ACTS_PYTHON_MEMBER(phiBinDeflectionCoverage);
Expand Down
6 changes: 3 additions & 3 deletions Examples/Python/tests/root_file_hashes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ test_material_mapping__propagation-material.root: 15d5dfd89583b965ec5a2625126a19
test_volume_material_mapping__material-map-volume_tracks.root: 14815e3f42a64c140450302f06a4381ede147ee4edbb8a88f3dfac7e7ab53fa7
test_volume_material_mapping__propagation-volume-material.root: 47b488e258ca4c964ba9f68a65e4ea576bc096f2c8476b1363b9f98b5cc96820

test_root_prop_step_writer[configPosConstructor]__prop_steps.root: 60a6816999189976aacd9caa7449d7581adf134b99e4dfaf13d0aea338df0cdd
test_root_prop_step_writer[configKwConstructor]__prop_steps.root: 60a6816999189976aacd9caa7449d7581adf134b99e4dfaf13d0aea338df0cdd
test_root_prop_step_writer[kwargsConstructor]__prop_steps.root: 60a6816999189976aacd9caa7449d7581adf134b99e4dfaf13d0aea338df0cdd
test_root_prop_step_writer[configPosConstructor]__prop_steps.root: 6ad8738725ca41d1751efd30f13fc1b45df77ad65ef5d60901d8a05e09bc7201
test_root_prop_step_writer[configKwConstructor]__prop_steps.root: 6ad8738725ca41d1751efd30f13fc1b45df77ad65ef5d60901d8a05e09bc7201
test_root_prop_step_writer[kwargsConstructor]__prop_steps.root: 6ad8738725ca41d1751efd30f13fc1b45df77ad65ef5d60901d8a05e09bc7201
test_root_particle_writer[configPosConstructor]__particles.root: 7d2c8cce6f491c22ce149b526866bdfa8795cfac20105a7c33fce096d52d47d8
test_root_particle_writer[configKwConstructor]__particles.root: 7d2c8cce6f491c22ce149b526866bdfa8795cfac20105a7c33fce096d52d47d8
test_root_particle_writer[kwargsConstructor]__particles.root: 7d2c8cce6f491c22ce149b526866bdfa8795cfac20105a7c33fce096d52d47d8
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 06340ff

Please sign in to comment.