Skip to content

Commit

Permalink
Merge branch 'main' into unit-test-amvfitter
Browse files Browse the repository at this point in the history
  • Loading branch information
felix-russo authored Nov 10, 2023
2 parents cee88ca + b5e71d9 commit cf8b7c3
Show file tree
Hide file tree
Showing 300 changed files with 2,177 additions and 2,719 deletions.
38 changes: 30 additions & 8 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,43 @@ concurrency:
jobs:
docs:
runs-on: ubuntu-latest
container: ghcr.io/acts-project/ubuntu2204:v41
env:
DOXYGEN_WARN_AS_ERROR: FAIL_ON_WARNINGS
DOXYGEN_VERSION: 1.9.4
steps:
- uses: actions/checkout@v3

- name: Cache doxygen
id: cache-doxygen
uses: actions/cache@v3
with:
path: /usr/local/bin/doxygen
key: doxygen_${{ env.DOXYGEN_VERSION }}

- name: Install doxygen
if: steps.cache-doxygen.outputs.cache-hit != 'true'
run: >
curl -SL https://sourceforge.net/projects/doxygen/files/rel-${{ env.DOXYGEN_VERSION }}/doxygen-${{ env.DOXYGEN_VERSION }}.linux.bin.tar.gz/download | tar -xzC .
&& mv doxygen-${{ env.DOXYGEN_VERSION }}/bin/doxygen /usr/local/bin/doxygen
- name: Install dependencies
run: >
curl -SL https://sourceforge.net/projects/doxygen/files/rel-1.9.4/doxygen-1.9.4.linux.bin.tar.gz/download | tar -xzC .
&& mv doxygen-1.9.4/bin/doxygen /usr/local/bin/doxygen
&& pip3 install --upgrade pip
pip3 install --upgrade pip
&& pip install -r docs/requirements.txt
- name: Configure
run: cmake -B build -S . -GNinja -DACTS_BUILD_DOCS=ON
- name: Build
run: cmake --build build --target docs-with-api
- name: Build documentation
run: >
cd docs
&& sphinx-build
-b html
-d _build/doctrees/
-j auto
-W
--keep-going
-t run_doxygen
-b linkcheck
. _build/html/
- uses: actions/upload-artifact@v3
with:
name: acts-docs
Expand Down
21 changes: 11 additions & 10 deletions CI/check_format
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@

set -e # abort on error


if [ $# -ne 1 ]; then
echo "wrong number of arguments"
echo ""
echo "usage: check_format <DIR>"
echo "\033[31mERROR\033[0m"\
"wrong number of arguments"
echo "\tusage: check_format <DIR>\n"
exit 1
fi

Expand All @@ -33,17 +32,19 @@ if ! [ -z $CI ] || ! [ -z $GITHUB_ACTIONS ]; then
done
fi

echo "clang-format done"
echo "\033[32mINFO\033[0m"\
"clang-format done"

set +e
git diff --exit-code --stat
result=$?

if [ "$result" -eq "128" ]; then
echo "Format was successfully applied"
echo "Could not create summary of affected files"
echo "Are you in a submodule?"

if [ "$result" -eq "128" ] || [ "$result" -eq "129" ]; then
echo "\033[33mWARNING\033[0m"\
"Could not create summary of affected files"
echo "\tFormat was successfully applied"
echo "\tAre you in a submodule?"
echo "\tYou could try running check_format with sudo.\n"
fi

exit $result
11 changes: 5 additions & 6 deletions CI/check_format_local
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,19 @@
set -e

if [ $# -ne 1 ]; then
echo "wrong number of arguments"
echo ""
echo "usage: check_format <DIR>"
echo "\033[31mERROR\033[0m"\
"wrong number of arguments"
echo "\tusage: check_format <DIR>\n"
exit 1
fi

# Setup some variables
WD="$(cd "$(dirname "$1")"; pwd)/$(basename "$1")"
USER_ID=`id -u`
GROUP_ID=`id -g`

docker run --rm -ti \
-v ${WD}:/work_dir:rw \
-v $PWD:/work_dir:rw \
--user "${USER_ID}:${GROUP_ID}" \
-w "/work_dir" \
ghcr.io/acts-project/format14:v41 \
CI/check_format .
CI/check_format $1
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_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.
14 changes: 12 additions & 2 deletions CI/physmon/vertexing_config.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
histograms:
"res.*":
"resX|resY|resZ":
nbins: 100
min: -0.1
max: 0.1

"resT":
nbins: 100
min: -50
max: 50

"trk_res.*":
nbins: 100
min: -0.1
Expand All @@ -20,11 +25,16 @@ histograms:
min: -10
max: 10

"cov.*":
"covXX|covXY|covXZ|covXT|covYY|covYZ|covYT|covZZ|covZT":
nbins: 100
min: -0.0005
max: 0.0005

"covTT":
nbins: 100
min: 0.0
max: 100.0

"^n.*$":
nbins: 250
min: 0
Expand Down
6 changes: 0 additions & 6 deletions Core/include/Acts/Definitions/Algebra.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ namespace Acts {
/// no dynamic-sized symmetric matrix type is defined. Use the
/// `ActsDynamicMatrix` instead.
///
/// @{

/// Common scalar (floating point type used for the default algebra types.
///
Expand All @@ -67,15 +66,12 @@ using ActsDynamicVector = Eigen::Matrix<ActsScalar, Eigen::Dynamic, 1>;
using ActsDynamicMatrix =
Eigen::Matrix<ActsScalar, Eigen::Dynamic, Eigen::Dynamic>;

/// @}

/// @defgroup coordinates-types Fixed-size vector/matrix types for coordinates
///
/// These predefined types should always be used when handling coordinate
/// vectors in different coordinate systems, i.e. on surfaces (2d), spatial
/// position (3d), or space-time (4d).
///
/// @{

// coordinate vectors
using Vector2 = ActsVector<2>;
Expand Down Expand Up @@ -104,6 +100,4 @@ using AngleAxis3 = Eigen::AngleAxis<ActsScalar>;
using Transform2 = Eigen::Transform<ActsScalar, 2, Eigen::AffineCompact>;
using Transform3 = Eigen::Transform<ActsScalar, 3, Eigen::Affine>;

/// @}

} // namespace Acts
21 changes: 15 additions & 6 deletions Core/include/Acts/Detector/detail/CylindricalDetectorHelper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,14 @@ DetectorComponent::PortalContainer wrapInZR(
///
/// @param gctx the geometry context of the call
/// @param volumes the volumes at input
/// @param precision the precision to be used for (optionally)
/// @param logLevel is the screen logging level
///
/// @return extracted boundary values
template <typename volume_container_t>
std::array<std::vector<ActsScalar>, 3u> rzphiBoundaries(
const GeometryContext& gctx, const volume_container_t& volumes,
double precision = 0.,
Acts::Logging::Level logLevel = Acts::Logging::INFO) {
// The local logger
ACTS_LOCAL_LOGGER(getDefaultLogger("CylindricalDetectorHelper", logLevel));
Expand All @@ -187,6 +189,13 @@ std::array<std::vector<ActsScalar>, 3u> rzphiBoundaries(

// The return boundaries
std::array<std::set<ActsScalar>, 3u> uniqueBoundaries;
auto insertWithPrecision = [&](std::size_t is, ActsScalar value) -> void {
if (precision == 0.) {
uniqueBoundaries[is].insert(value);
return;
}
uniqueBoundaries[is].insert(std::round(value / precision) * precision);
};

// Loop over the volumes and collect boundaries
for (const auto& v : volumes) {
Expand All @@ -207,12 +216,12 @@ std::array<std::vector<ActsScalar>, 3u> rzphiBoundaries(
ActsScalar phiMin = phiCenter - phiSector;
ActsScalar phiMax = phiCenter + phiSector;
// Fill the sets
uniqueBoundaries[0].insert(rMin);
uniqueBoundaries[0].insert(rMax);
uniqueBoundaries[1].insert(zMin);
uniqueBoundaries[1].insert(zMax);
uniqueBoundaries[2].insert(phiMin);
uniqueBoundaries[2].insert(phiMax);
insertWithPrecision(0u, rMin);
insertWithPrecision(0u, rMax);
insertWithPrecision(1u, zMin);
insertWithPrecision(1u, zMax);
insertWithPrecision(2u, phiMin);
insertWithPrecision(2u, phiMax);
}
}

Expand Down
7 changes: 3 additions & 4 deletions Core/include/Acts/Propagator/AbortList.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ namespace hana = boost::hana;

namespace Acts {

/// @cond

/// @brief AbortList object to be used in the propagation
///
/// The abort list is a list of structs or classes that
Expand All @@ -39,10 +37,12 @@ struct AbortList : public detail::Extendable<aborters_t...> {
using detail::Extendable<aborters_t...>::tuple;

public:
/// @cond
// This uses the type collector
using result_type = typename decltype(hana::unpack(
detail::type_collector_t<detail::action_type_extractor, aborters_t...>,
hana::template_<AbortList>))::type;
/// @endcond

using detail::Extendable<aborters_t...>::get;

Expand Down Expand Up @@ -103,6 +103,7 @@ struct AbortList : public detail::Extendable<aborters_t...> {
/// @param [in] stepper Stepper used for the propagation
/// @param [in] navigator Navigator used for the propagation
/// @param [in] result is the result object from a certain action
/// @param [in] args are the arguments to be passed to the aborters
template <typename propagator_state_t, typename stepper_t,
typename navigator_t, typename result_t, typename... Args>
bool operator()(propagator_state_t& state, const stepper_t& stepper,
Expand All @@ -114,6 +115,4 @@ struct AbortList : public detail::Extendable<aborters_t...> {
}
};

/// @endcond

} // namespace Acts
7 changes: 3 additions & 4 deletions Core/include/Acts/Propagator/ActionList.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ namespace hana = boost::hana;

namespace Acts {

/// @cond

/// @brief ActionList implementation to be used with the propagator
///
/// This is the ActionList struct that is used in the propagator
Expand All @@ -37,11 +35,13 @@ struct ActionList : public detail::Extendable<actors_t...> {
using detail::Extendable<actors_t...>::tuple;

public:
/// @cond
// This uses the type collector and unpacks using the `R` meta function
template <template <typename...> class R>
using result_type = typename decltype(hana::unpack(
detail::type_collector_t<detail::result_type_extractor, actors_t...>,
hana::template_<R>))::type;
/// @endcond

using detail::Extendable<actors_t...>::get;

Expand Down Expand Up @@ -82,6 +82,7 @@ struct ActionList : public detail::Extendable<actors_t...> {
/// @param [in] stepper The stepper in use
/// @param [in] navigator The navigator in use
/// @param [in,out] result This is the result object from actions
/// @param [in] args The arguments to be passed to the actions
template <typename propagator_state_t, typename stepper_t,
typename navigator_t, typename result_t, typename... Args>
void operator()(propagator_state_t& state, const stepper_t& stepper,
Expand All @@ -93,6 +94,4 @@ struct ActionList : public detail::Extendable<actors_t...> {
}
};

/// @endcond

} // namespace Acts
4 changes: 0 additions & 4 deletions Core/include/Acts/Propagator/ConstrainedStep.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ class ConstrainedStep {
constexpr Scalar value(Type type) const { return m_values[type]; }

/// Access the accuracy value
///
/// @param type is the requested parameter type
constexpr Scalar accuracy() const { return m_accuracy; }

/// release a certain constraint value
Expand All @@ -107,8 +105,6 @@ class ConstrainedStep {
constexpr void release(Type type) { m_values[type] = kNotSet; }

/// release accuracy
///
/// @param type is the constraint type to be released
constexpr void releaseAccuracy() { m_accuracy = kNotSet; }

/// Update the step size of a certain type
Expand Down
12 changes: 12 additions & 0 deletions Core/include/Acts/Propagator/Propagator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@

namespace Acts {

/// @brief Different stages during propagation
enum class PropagatorStage {
invalid, ///< Invalid stage
prePropagation, ///< Before the propagation
postPropagation, ///< After the propagation
preStep, ///< Before a step
postStep, ///< After a step
};

/// @brief Simple class holding result of propagation call
///
/// @tparam parameters_t Type of final track parameters
Expand Down Expand Up @@ -270,6 +279,9 @@ class Propagator final {
navigation{std::move(navigationIn)},
geoContext(topts.geoContext) {}

/// Propagation stage
PropagatorStage stage = PropagatorStage::invalid;

/// These are the options - provided for each propagation step
propagator_options_t options;

Expand Down
6 changes: 6 additions & 0 deletions Core/include/Acts/Propagator/Propagator.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ auto Acts::Propagator<S, N>::propagate_impl(propagator_state_t& state,
// Pre-stepping call to the navigator and action list
ACTS_VERBOSE("Entering propagation.");

state.stage = PropagatorStage::prePropagation;

// Navigator initialize state call
m_navigator.initialize(state, m_stepper);
// Pre-Stepping call to the action list
Expand All @@ -41,6 +43,7 @@ auto Acts::Propagator<S, N>::propagate_impl(propagator_state_t& state,
// Propagation loop : stepping
for (; result.steps < state.options.maxSteps; ++result.steps) {
// Pre-Stepping: target setting
state.stage = PropagatorStage::preStep;
m_navigator.preStep(state, m_stepper);
// Perform a propagation step - it takes the propagation state
Result<double> res = m_stepper.step(state, m_navigator);
Expand All @@ -57,6 +60,7 @@ auto Acts::Propagator<S, N>::propagate_impl(propagator_state_t& state,
}
// Post-stepping:
// navigator post step call - action list - aborter list
state.stage = PropagatorStage::postStep;
m_navigator.postStep(state, m_stepper);
state.options.actionList(state, m_stepper, m_navigator, result, logger());
if (state.options.abortList(state, m_stepper, m_navigator, result,
Expand All @@ -69,6 +73,8 @@ auto Acts::Propagator<S, N>::propagate_impl(propagator_state_t& state,
ACTS_VERBOSE("Propagation terminated without going into stepping loop.");
}

state.stage = PropagatorStage::postPropagation;

// if we didn't terminate normally (via aborters) set navigation break.
// this will trigger error output in the lines below
if (!terminatedNormally) {
Expand Down
2 changes: 1 addition & 1 deletion Core/include/Acts/Surfaces/ConeBounds.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace Acts {
/// The cone can open to both sides, steered by \f$ z_min \f$ and \f$ z_max
/// \f$.
///
/// @image html figures/ConeBounds.gif
/// @image html ConeBounds.gif
///

class ConeBounds : public SurfaceBounds {
Expand Down
Loading

0 comments on commit cf8b7c3

Please sign in to comment.