Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into releases
Browse files Browse the repository at this point in the history
  • Loading branch information
paulgessinger committed Oct 5, 2023
2 parents 00fa3fa + 6474bd2 commit da92ebe
Show file tree
Hide file tree
Showing 120 changed files with 3,246 additions and 839 deletions.
35 changes: 21 additions & 14 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,19 @@ linux_ubuntu_2204_clang:
before_script:
- 'echo "LCG_VERSION: ${LCG_VERSION}"'
- 'echo "COMPILER: ${COMPILER}"'
- 'if [ "$OS" = "alma9" ]; then export LCG_PLATFORM="centos9"; else export LCG_PLATFORM="$OS"; fi'

# Figure out LCG platform name based on version number and OS
- >
if [ "$OS" = "alma9" ]; then
if [ "$LCG_VERSION" = "104" ]; then
export LCG_PLATFORM="el9"
else
export LCG_PLATFORM="centos9"
fi
else
export LCG_PLATFORM="$OS"
fi
- 'echo "LCG_PLATFORM: ${LCG_PLATFORM}"'
- source /cvmfs/sft.cern.ch/lcg/views/LCG_${LCG_VERSION}/x86_64-${LCG_PLATFORM}-${COMPILER}-opt/setup.sh

Expand All @@ -383,7 +395,7 @@ linux_ubuntu_2204_clang:
-DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}"
-DACTS_LOG_FAILURE_THRESHOLD=WARNING
-DACTS_BUILD_EXAMPLES_PYTHON_BINDINGS=ON
-DACTS_FORCE_ASSERTIONS=ON
-DACTS_FORCE_ASSERTIONS=OFF
-DACTS_BUILD_UNITTESTS=ON
-DACTS_BUILD_INTEGRATIONTESTS=ON
-DACTS_BUILD_BENCHMARKS=ON
Expand Down Expand Up @@ -424,31 +436,26 @@ lcg_102b:
- OS: [centos7]
COMPILER: [gcc11]

- OS: [centos8, alma9]
COMPILER: [gcc11]

lcg_103:
lcg_104:
<<: *lcg_base_job

variables:
LCG_VERSION: "103"
LCG_VERSION: "104"

parallel:
matrix:
- OS: [centos7]
COMPILER:
- gcc11
- gcc12
# currently failing:
# - clang12
# - clang15

- OS: [alma9]
COMPILER:
- gcc11
- gcc12
- gcc13
- clang16

- OS: [centos8]
COMPILER: [gcc11]

rules:
- if: '$COMPILER == "clang12" || $COMPILER == "clang15"'
allow_failure: true
- when: on_success
Binary file modified CI/physmon/reference/particles_final_fatras_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/particles_final_geant4_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/particles_initial_fatras_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/particles_initial_geant4_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_ambi_orthogonal.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_ambi_seeded.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_ambi_ttbar.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_amvf_gridseeder_seeded_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_amvf_gridseeder_ttbar_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_amvf_orthogonal_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_amvf_seeded_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_amvf_truth_estimated_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_amvf_truth_smeared_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_amvf_ttbar_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_ckf_orthogonal.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_ckf_seeded.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_ckf_truth_estimated.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_ckf_truth_smeared.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_ckf_ttbar.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_gsf.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_ivf_orthogonal_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_ivf_seeded_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_ivf_truth_estimated_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_ivf_truth_smeared_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_seeding_orthogonal.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_seeding_seeded.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_seeding_truth_estimated.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_seeding_ttbar.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_truth_tracking.root
Binary file not shown.
Binary file modified CI/physmon/reference/tracksummary_ckf_orthogonal_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/tracksummary_ckf_seeded_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/tracksummary_ckf_truth_estimated_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/tracksummary_ckf_truth_smeared_hist.root
Binary file not shown.
3 changes: 3 additions & 0 deletions Core/include/Acts/Definitions/Algebra.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
#if defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmisleading-indentation"
#if __GNUC__ == 13
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
#include <Eigen/Core>
#include <Eigen/Geometry>
#pragma GCC diagnostic pop
Expand Down
17 changes: 2 additions & 15 deletions Core/include/Acts/Detector/LayerStructureBuilder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "Acts/Definitions/Algebra.hpp"
#include "Acts/Detector/DetectorComponents.hpp"
#include "Acts/Detector/ProtoBinning.hpp"
#include "Acts/Detector/ProtoSupport.hpp"
#include "Acts/Detector/interface/IInternalStructureBuilder.hpp"
#include "Acts/Detector/interface/ISurfacesProvider.hpp"
#include "Acts/Geometry/GeometryContext.hpp"
Expand Down Expand Up @@ -72,20 +73,6 @@ class LayerStructureBuilder : public IInternalStructureBuilder {
std::vector<std::shared_ptr<Surface>> m_surfaces = {};
};

/// @brief Support parameter definitions
struct Support {
/// Define whether you want to build support structures
std::array<ActsScalar, 5u> values = {};
/// The surface type to be built
Surface::SurfaceType type = Surface::SurfaceType::Other;
/// Define in which values the support should be constrained
std::vector<BinningValue> constraints = s_binningValues;
/// Potential splits into planar approximations
unsigned int splits = 1u;
/// The (optional) layer transform
std::optional<Transform3> transform = std::nullopt;
};

/// @brief Configuration struct for the LayerStructureBuilder
///
/// It contain:
Expand All @@ -96,7 +83,7 @@ class LayerStructureBuilder : public IInternalStructureBuilder {
/// Connection point for a function to provide surfaces
std::shared_ptr<ISurfacesProvider> surfacesProvider = nullptr;
/// Definition of Supports
std::vector<Support> supports = {};
std::vector<ProtoSupport> supports = {};
/// Definition of Binnings
std::vector<ProtoBinning> binnings = {};
/// Polyhedron approximations
Expand Down
43 changes: 43 additions & 0 deletions Core/include/Acts/Detector/ProtoSupport.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// This file is part of the Acts project.
//
// Copyright (C) 2023 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
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

#pragma once

#include "Acts/Definitions/Algebra.hpp"
#include "Acts/Definitions/Common.hpp"
#include "Acts/Surfaces/Surface.hpp"
#include "Acts/Utilities/BinningData.hpp"
#include "Acts/Utilities/detail/AxisFwd.hpp"

#include <optional>
#include <stdexcept>
#include <vector>

namespace Acts {

namespace Experimental {
/// @brief Support parameter definitions
struct ProtoSupport {
/// Define whether you want to build support structures
std::array<ActsScalar, 5u> values = {};
/// The surface type to be built
Surface::SurfaceType type = Surface::SurfaceType::Other;
/// Define in which values the support should be constrained
std::vector<BinningValue> constraints = s_binningValues;
/// Potential splits into planar approximations
unsigned int splits = 1u;
/// The (optional) layer transform
std::optional<Transform3> transform = std::nullopt;
/// Alternatively - the support surface can already be provided
std::shared_ptr<Surface> surface = nullptr;
/// Indicate if the support surface should always be addressed in navigation
bool assignToAll = false;
};

} // namespace Experimental
} // namespace Acts
36 changes: 36 additions & 0 deletions Core/include/Acts/EventData/GenericBoundTrackParameters.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,46 @@ class GenericBoundTrackParameters {
ParametersVector& parameters() { return m_params; }
/// Parameters vector.
const ParametersVector& parameters() const { return m_params; }
/// Vector of spatial impact parameters (i.e., d0 and z0)
ActsVector<2> spatialImpactParameters() const { return m_params.head<2>(); }
/// Vector of spatial and temporal impact parameters (i.e., d0, z0, and t)
ActsVector<3> impactParameters() const {
ActsVector<3> ip;
ip.template head<2>() = m_params.template head<2>();
ip(2) = m_params(eBoundTime);
return ip;
}

/// Optional covariance matrix.
std::optional<CovarianceMatrix>& covariance() { return m_cov; }
/// Optional covariance matrix.
const std::optional<CovarianceMatrix>& covariance() const { return m_cov; }
/// Covariance matrix of the spatial impact parameters (i.e., of d0 and z0)
std::optional<ActsSquareMatrix<2>> spatialImpactParameterCovariance() const {
if (not m_cov.has_value()) {
return std::nullopt;
}

return m_cov.value().template topLeftCorner<2, 2>();
}

/// Covariance matrix of the spatial and temporal impact parameters (i.e., of
/// d0, z0, and t)
std::optional<ActsSquareMatrix<3>> impactParameterCovariance() const {
if (not m_cov.has_value()) {
return std::nullopt;
}

ActsSquareMatrix<3> ipCov;
ipCov.template topLeftCorner<2, 2>() =
m_cov.value().template topLeftCorner<2, 2>();
ipCov.template block<2, 1>(0, 2) =
m_cov.value().template block<2, 1>(0, eBoundTime);
ipCov.template block<1, 2>(2, 0) =
m_cov.value().template block<1, 2>(eBoundTime, 0);
ipCov(2, 2) = m_cov.value()(eBoundTime, eBoundTime);
return ipCov;
}

/// Access a single parameter value identified by its index.
///
Expand Down
12 changes: 12 additions & 0 deletions Core/include/Acts/Navigation/DetectorNavigator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,18 @@ class DetectorNavigator {
}

nState.currentVolume->updateNavigationState(state.geoContext, nState);

// Sort properly the surface candidates
auto& nCandidates = nState.surfaceCandidates;
std::sort(nCandidates.begin(), nCandidates.end(),
[&](const auto& a, const auto& b) {
// The two path lengths
ActsScalar pathToA = a.objectIntersection.pathLength();
ActsScalar pathToB = b.objectIntersection.pathLength();
return pathToA < pathToB;
});
// Set the surface candidate
nState.surfaceCandidate = nCandidates.begin();
}

template <typename propagator_state_t, typename stepper_t>
Expand Down
10 changes: 6 additions & 4 deletions Core/include/Acts/Navigation/MultiLayerSurfacesUpdator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ class MultiLayerSurfacesUpdatorImpl : public INavigationDelegate {
/// The grid where the indices are stored
grid_type grid;

/// The path generator
path_generator pgenerator;

/// These are the cast parameters - copied from constructor
std::array<BinningValue, grid_type::DIM> casts{};

/// A transform to be applied to the position
Transform3 transform = Transform3::Identity();

/// The path generator
path_generator pgenerator;

/// @brief Constructor for a grid based surface attacher
///@param igrid the grid that is moved into this attacher
/// @param igrid the grid that is moved into this attacher
/// @param icasts is the cast values array
/// @param itr a transform applied to the global position
MultiLayerSurfacesUpdatorImpl(
Expand Down Expand Up @@ -67,6 +67,8 @@ class MultiLayerSurfacesUpdatorImpl : public INavigationDelegate {

resolveDuplicates(gctx, surfCandidates);
SurfacesFiller::fill(nState, surfCandidates);

updateCandidates(gctx, nState);
}

/// Cast into a lookup position
Expand Down
33 changes: 33 additions & 0 deletions Core/include/Acts/Navigation/NavigationStateUpdators.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@

#include "Acts/Definitions/Algebra.hpp"
#include "Acts/Definitions/Common.hpp"
#include "Acts/Detector/Portal.hpp"
#include "Acts/Navigation/NavigationDelegates.hpp"
#include "Acts/Surfaces/Surface.hpp"
#include "Acts/Utilities/BinningType.hpp"
#include "Acts/Utilities/Enumerate.hpp"
#include "Acts/Utilities/IAxis.hpp"
Expand All @@ -20,8 +22,37 @@
#include <memory>

namespace Acts {

namespace Experimental {

/// Helper method to update the candidates (portals/surfaces),
/// this can be called for initial surface/portal estimation,
/// but also during the navigation to update the current list
/// of candidates.
///
/// @param gctx is the Geometry context of this call
/// @param nState [in,out] is the navigation state to be updated
///
/// @todo for surfaces skip the non-reached ones, while keep for portals
inline void updateCandidates(const GeometryContext& gctx,
NavigationState& nState) {
const auto& position = nState.position;
const auto& direction = nState.direction;
auto& nCandidates = nState.surfaceCandidates;

for (auto& c : nCandidates) {
// Get the surface representation: either native surfcae of portal
const Surface& sRep =
c.surface != nullptr ? *c.surface : c.portal->surface();

// Get the intersection @todo make a templated intersector
// TODO surface tolerance
auto sIntersection = sRep.intersect(gctx, position, direction,
c.boundaryCheck, s_onSurfaceTolerance);
c.objectIntersection = sIntersection[c.objectIntersection.index()];
}
}

/// @brief This sets a single object, e.g. single surface or single volume
/// @tparam object_type the type of the object to be filled
/// @tparam filler_type is the helper to fill the object into nState
Expand Down Expand Up @@ -121,6 +152,8 @@ class IndexedUpdatorImpl : public INavigationDelegate {
const auto& entry = grid.atPosition(castPosition(nState.position));
auto extracted = extractor.extract(gctx, nState, entry);
filler_type::fill(nState, extracted);

updateCandidates(gctx, nState);
}

/// Cast into a lookup position
Expand Down
46 changes: 0 additions & 46 deletions Core/include/Acts/Navigation/SurfaceCandidatesUpdators.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,52 +25,6 @@
namespace Acts {
namespace Experimental {

/// Helper method to update the candidates (portals/surfaces),
/// this can be called for initial surface/portal estimation,
/// but also during the navigation to update the current list
/// of candidates.
///
/// @param gctx is the Geometry context of this call
/// @param nState [in,out] is the navigation state to be updated
///
/// @todo for surfaces skip the non-reached ones, while keep for portals
inline static void updateCandidates(const GeometryContext& gctx,
NavigationState& nState) {
const auto& position = nState.position;
const auto& direction = nState.direction;
auto& nCandidates = nState.surfaceCandidates;

for (auto& c : nCandidates) {
// Get the surface representation: either native surfcae of portal
const Surface& sRep =
c.surface != nullptr ? *c.surface : c.portal->surface();

// Get the intersection @todo make a templated intersector
// TODO surface tolerance
auto sIntersection = sRep.intersect(gctx, position, direction,
c.boundaryCheck, s_onSurfaceTolerance);
c.objectIntersection = sIntersection[c.objectIntersection.index()];
}
// Sort and stuff non-allowed solutions to the end
std::sort(
nCandidates.begin(), nCandidates.end(),
[&](const auto& a, const auto& b) {
// The two path lengths
ActsScalar pathToA = a.objectIntersection.pathLength();
ActsScalar pathToB = b.objectIntersection.pathLength();
if (pathToA + s_onSurfaceTolerance < nState.overstepTolerance or
std::abs(pathToA) < s_onSurfaceTolerance) {
return false;
} else if (pathToB + s_onSurfaceTolerance < nState.overstepTolerance or
std::abs(pathToB) < s_onSurfaceTolerance) {
return true;
}
return pathToA < pathToB;
});
// Set the surface candidate
nState.surfaceCandidate = nCandidates.begin();
}

struct AllPortalsImpl : public INavigationDelegate {
/// A ordered portal provider
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ class CombinatorialKalmanFilter {
// The last active tip
const auto& lastActiveTip = result.activeTips.back().first;
// Get the index of previous state
const auto& iprevious =
auto iprevious =
result.fittedStates->getTrackState(lastActiveTip).previous();
// Find the track states which have the same previous state and remove
// them from active tips
Expand Down
Loading

0 comments on commit da92ebe

Please sign in to comment.