Skip to content

Commit

Permalink
Merge branch 'main' into maputils
Browse files Browse the repository at this point in the history
  • Loading branch information
AJPfleger authored Dec 2, 2024
2 parents 6397bf5 + 8895da1 commit 5344454
Show file tree
Hide file tree
Showing 88 changed files with 1,261 additions and 827 deletions.
20 changes: 15 additions & 5 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -382,11 +382,7 @@ linux_ubuntu_2204_clang:
# Figure out LCG platform name based on version number and OS
- >
if [ "$OS" = "alma9" ]; then
if [ "$LCG_VERSION" -ge "104" ]; then
export LCG_PLATFORM="el9"
else
export LCG_PLATFORM="centos9"
fi
export LCG_PLATFORM="el9"
else
export LCG_PLATFORM="$OS"
fi
Expand Down Expand Up @@ -431,3 +427,17 @@ lcg_105:
COMPILER:
- gcc13
- clang16

lcg_106a:
extends: .lcg_base_job

variables:
LCG_VERSION: "106a"

parallel:
matrix:
- OS: [alma9]
COMPILER:
- gcc13
- gcc14
- clang16
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,9 @@ TrackAlignmentState trackAlignmentState(
measdim) = measCovariance;

// (b) Get and fill the bound parameters to measurement projection matrix
const ActsDynamicMatrix H = state.effectiveProjector();
const ActsDynamicMatrix H =
state.projectorSubspaceHelper().fullProjector().topLeftCorner(
measdim, eBoundSize);
alignState.projectionMatrix.block(iMeasurement, iParams, measdim,
eBoundSize) = H;
// (c) Get and fill the residual
Expand Down
18 changes: 9 additions & 9 deletions CI/physmon/workflows/physmon_trackfinding_1muon.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

from acts.examples.reconstruction import (
addSeeding,
ParticleSmearingSigmas,
TrackSmearingSigmas,
SeedFinderConfigArg,
SeedFinderOptionsArg,
SeedingAlgorithm,
Expand Down Expand Up @@ -91,15 +91,15 @@ def run_ckf_tracking(label, seeding):
s,
setup.trackingGeometry,
setup.field,
ParticleSmearingSigmas( # only used by SeedingAlgorithm.TruthSmeared
TrackSmearingSigmas( # only used by SeedingAlgorithm.TruthSmeared
# zero eveything so the CKF has a chance to find the measurements
d0=0,
d0PtA=0,
d0PtB=0,
z0=0,
z0PtA=0,
z0PtB=0,
t0=0,
loc0=0,
loc0PtA=0,
loc0PtB=0,
loc1=0,
loc1PtA=0,
loc1PtB=0,
time=0,
phi=0,
theta=0,
ptRel=0,
Expand Down
6 changes: 3 additions & 3 deletions CI/physmon/workflows/physmon_trackfitting_gsf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@

tp = Path(temp)
runTruthTrackingGsf(
setup.trackingGeometry,
setup.field,
setup.digiConfig,
trackingGeometry=setup.trackingGeometry,
field=setup.field,
digiConfigFile=setup.digiConfig,
outputDir=tp,
s=s,
)
Expand Down
30 changes: 15 additions & 15 deletions Core/include/Acts/EventData/SubspaceHelpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
#include "Acts/Utilities/AlgebraHelpers.hpp"
#include "Acts/Utilities/Enumerate.hpp"

#include <bitset>
#include <span>
#include <ranges>

#include <boost/container/static_vector.hpp>

Expand All @@ -25,30 +24,30 @@ namespace Acts {
///
/// Indices must be unique and within the full size of the subspace
///
/// @tparam Container type of the container
/// @tparam index_range_t the type of the container of indices
///
/// @param container the container of indices
/// @param indexRange the range of indices
/// @param fullSize the full size of the subspace
/// @param subspaceSize the size of the subspace
///
/// @return true if the indices are consistent
template <typename Container>
inline static bool checkSubspaceIndices(const Container& container,
template <std::ranges::sized_range index_range_t>
inline static bool checkSubspaceIndices(const index_range_t& indexRange,
std::size_t fullSize,
std::size_t subspaceSize) {
if (subspaceSize > fullSize) {
return false;
}
if (static_cast<std::size_t>(container.size()) != subspaceSize) {
if (static_cast<std::size_t>(indexRange.size()) != subspaceSize) {
return false;
}
for (auto it = container.begin(); it != container.end();) {
for (auto it = indexRange.begin(); it != indexRange.end();) {
auto index = *it;
if (index >= fullSize) {
return false;
}
++it;
if (std::find(it, container.end(), index) != container.end()) {
if (std::find(it, indexRange.end(), index) != indexRange.end()) {
return false;
}
}
Expand All @@ -69,7 +68,8 @@ inline static SerializedSubspaceIndices serializeSubspaceIndices(
{
SerializedSubspaceIndices result = 0;
for (std::size_t i = 0; i < FullSize; ++i) {
result |= static_cast<SerializedSubspaceIndices>(indices[i]) << (i * 8);
result |= static_cast<SerializedSubspaceIndices>(indices[i] & 0xFF)
<< (i * 8);
}
return result;
}
Expand All @@ -88,7 +88,7 @@ inline static SubspaceIndices<FullSize> deserializeSubspaceIndices(
{
SubspaceIndices<FullSize> result;
for (std::size_t i = 0; i < FullSize; ++i) {
result[i] = static_cast<std::uint8_t>(serialized >> (i * 8));
result[i] = static_cast<std::uint8_t>((serialized >> (i * 8)) & 0xFF);
}
return result;
}
Expand Down Expand Up @@ -187,8 +187,8 @@ class VariableSubspaceHelper
using IndexType = index_t;
using Container = boost::container::static_vector<IndexType, FullSize>;

template <typename OtherContainer>
explicit VariableSubspaceHelper(const OtherContainer& indices) {
template <std::ranges::sized_range other_index_range_t>
explicit VariableSubspaceHelper(const other_index_range_t& indices) {
assert(checkSubspaceIndices(indices, kFullSize, indices.size()) &&
"Invalid indices");
m_indices.resize(indices.size());
Expand Down Expand Up @@ -236,8 +236,8 @@ class FixedSubspaceHelper
using IndexType = index_t;
using Container = std::array<IndexType, kSubspaceSize>;

template <typename OtherContainer>
explicit FixedSubspaceHelper(const OtherContainer& indices) {
template <std::ranges::sized_range other_index_range_t>
explicit FixedSubspaceHelper(const other_index_range_t& indices) {
assert(checkSubspaceIndices(indices, kFullSize, kSubspaceSize) &&
"Invalid indices");
std::transform(indices.begin(), indices.end(), m_indices.begin(),
Expand Down
Loading

0 comments on commit 5344454

Please sign in to comment.