Skip to content

Commit

Permalink
Merge branch 'main' into fix_enum_inner_tube_cover_surface_test
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminhuth authored Jan 17, 2023
2 parents 04c9094 + f266387 commit ad2aed3
Show file tree
Hide file tree
Showing 55 changed files with 436 additions and 475 deletions.
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_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_gsf.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_seeding_hists_orthogonal.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_seeding_hists_seeded.root
Binary file not shown.
Binary file not shown.
Binary file modified CI/physmon/reference/performance_truth_tracking.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_vertexing_orthogonal_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_vertexing_seeded_hist.root
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion Core/include/Acts/Geometry/SurfaceArrayCreator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class SurfaceArrayCreator {
if (binEdges.empty()) {
// equidistant
AxisScalar w = (max - min) / nBins;
return std::floor((x - min) / w);
return static_cast<size_t>(std::floor((x - min) / w));
} else {
// variable
const auto it =
Expand Down
2 changes: 1 addition & 1 deletion Core/include/Acts/Material/MaterialComposition.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class MaterialComposition {
// compute scale factor into the [0, 256) range
float scale = float(UINT8_MAX) / float(total);
for (auto& element : m_elements) {
element.m_fraction *= scale;
element.m_fraction = static_cast<uint8_t>(element.m_fraction * scale);
}
}

Expand Down
12 changes: 7 additions & 5 deletions Core/include/Acts/Material/MaterialGridHelper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ using MaterialGrid2D =
using MaterialGrid3D =
Acts::detail::Grid<Acts::Material::ParametersVector, EAxis, EAxis, EAxis>;

using MaterialGridAxisData = std::tuple<double, double, size_t>;

/// @brief Helper method that creates the cache grid for the mapping. This
/// grid allows the collection of material at a the anchor points.
///
Expand All @@ -44,8 +46,8 @@ using MaterialGrid3D =
/// maximum value, number of bins}
///
/// @return The grid
Grid2D createGrid(std::array<double, 3> gridAxis1,
std::array<double, 3> gridAxis2);
Grid2D createGrid(MaterialGridAxisData gridAxis1,
MaterialGridAxisData gridAxis2);

/// @brief Helper method that creates the cache grid for the mapping. This
/// grid allows the collection of material at a the anchor points.
Expand All @@ -57,9 +59,9 @@ Grid2D createGrid(std::array<double, 3> gridAxis1,
/// maximum value, number of bins}
///
/// @return The grid
Grid3D createGrid(std::array<double, 3> gridAxis1,
std::array<double, 3> gridAxis2,
std::array<double, 3> gridAxis3);
Grid3D createGrid(MaterialGridAxisData gridAxis1,
MaterialGridAxisData gridAxis2,
MaterialGridAxisData gridAxis3);

/// @brief return a function that return the coordinate corresponding to type of
/// bin
Expand Down
9 changes: 7 additions & 2 deletions Core/include/Acts/Propagator/Navigator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ class Navigator {

/// The tolerance used to defined "reached"
double tolerance = s_onSurfaceTolerance;

/// Wether to perform boundary checks for layer resolving (improves
/// navigation for bended tracks)
BoundaryCheck boundaryCheckLayerResolving = true;
};

/// Nested State struct
Expand Down Expand Up @@ -1193,8 +1197,9 @@ class Navigator {
// Create the navigation options
// - and get the compatible layers, start layer will be excluded
NavigationOptions<Layer> navOpts(
state.stepping.navDir, true, m_cfg.resolveSensitive,
m_cfg.resolveMaterial, m_cfg.resolvePassive, startLayer, nullptr);
state.stepping.navDir, m_cfg.boundaryCheckLayerResolving,
m_cfg.resolveSensitive, m_cfg.resolveMaterial, m_cfg.resolvePassive,
startLayer, nullptr);
// Set also the target surface
navOpts.targetSurface = state.navigation.targetSurface;
navOpts.pathLimit =
Expand Down
5 changes: 3 additions & 2 deletions Core/include/Acts/Seeding/BinnedSPGroup.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ Acts::BinnedSPGroup<external_spacepoint_t>::BinnedSPGroup(
// create number of bins equal to number of millimeters rMax
// (worst case minR: configured minR + 1mm)
// binSizeR allows to increase or reduce numRBins if needed
size_t numRBins = (config.rMax + options.beamPos.norm()) / config.binSizeR;
size_t numRBins = static_cast<size_t>((config.rMax + options.beamPos.norm()) /
config.binSizeR);
std::vector<
std::vector<std::unique_ptr<InternalSpacePoint<external_spacepoint_t>>>>
rBins(numRBins);
Expand Down Expand Up @@ -72,7 +73,7 @@ Acts::BinnedSPGroup<external_spacepoint_t>::BinnedSPGroup(
sp, spPosition, options.beamPos, variance);
// calculate r-Bin index and protect against overflow (underflow not
// possible)
size_t rIndex = isp->radius() / config.binSizeR;
size_t rIndex = static_cast<size_t>(isp->radius() / config.binSizeR);
// if index out of bounds, the SP is outside the region of interest
if (rIndex >= numRBins) {
continue;
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 @@ -87,7 +87,7 @@ Acts::SpacePointGridCreator::createGrid(

// divide 2pi by angle delta to get number of phi-bins
// size is always 2pi even for regions of interest
phiBins = std::ceil(2 * M_PI / deltaPhi);
phiBins = static_cast<int>(std::ceil(2 * M_PI / deltaPhi));
// need to scale the number of phi bins accordingly to the number of
// consecutive phi bins in the seed making step.
// Each individual bin should be approximately a fraction (depending on this
Expand Down
4 changes: 2 additions & 2 deletions Core/include/Acts/Surfaces/detail/FacesHelper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ struct FacesHelper {
const std::vector<Vector3>& vertices, bool fullTwoPi = true) {
FaceVector faces;
FaceVector triangularMesh;
size_t nqfaces = 0.5 * vertices.size();
size_t nqfaces = static_cast<size_t>(0.5 * vertices.size());
size_t reduce = (not fullTwoPi) ? 1 : 0;
for (size_t iface = 0; iface < nqfaces - reduce; ++iface) {
size_t p2 = (iface + 1 == nqfaces) ? 0 : iface + 1;
Expand All @@ -84,4 +84,4 @@ struct FacesHelper {

} // namespace detail

} // namespace Acts
} // namespace Acts
3 changes: 2 additions & 1 deletion Core/include/Acts/Surfaces/detail/VerticesHelper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ void createSegment(std::vector<vertex_t>& vertices,
const vertex_t& offset = vertex_t::Zero(),
const transform_t& transform = transform_t::Identity()) {
// Calculate the number of segments - 1 is the minimum
unsigned int segs = std::abs(phi2 - phi1) / (2 * M_PI) * lseg;
unsigned int segs =
static_cast<unsigned int>(std::abs(phi2 - phi1) / (2 * M_PI) * lseg);
segs = segs > 0 ? segs : 1;
ActsScalar phistep = (phi2 - phi1) / segs;
// Create the segments
Expand Down
4 changes: 0 additions & 4 deletions Core/include/Acts/TrackFitting/detail/KLMixtureReduction.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,6 @@ class SymmetricKLDistanceMatrix {
setAssociated(n, m_mask, [&](std::size_t, std::size_t) { return false; });
}

void setAssociatedDistances(std::size_t n, ActsScalar value) {
setAssociated(n, m_mask, [&](std::size_t, std::size_t) { return value; });
}

auto minDistancePair() const {
ActsScalar min = std::numeric_limits<ActsScalar>::max();
std::size_t idx = 0;
Expand Down
2 changes: 1 addition & 1 deletion Core/include/Acts/Utilities/BinningData.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ class BinningData {
const BinningData& bData) {
// vanilla

int bin = ((value - bData.min) / bData.step);
int bin = static_cast<int>((value - bData.min) / bData.step);
// special treatment of the 0 bin for closed
if (bData.option == closed) {
if (value < bData.min) {
Expand Down
2 changes: 1 addition & 1 deletion Core/include/Acts/Utilities/Helpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ auto matrixToBitset(const Eigen::PlainObjectBase<Derived>& m) {

auto* p = m.data();
for (size_t i = 0; i < rows * cols; i++) {
res[rows * cols - 1 - i] = p[i];
res[rows * cols - 1 - i] = static_cast<bool>(p[i]);
}

return res;
Expand Down
Loading

0 comments on commit ad2aed3

Please sign in to comment.