Skip to content

Commit

Permalink
Merge branch 'main' into fix/gsf-copy-whole-trackstate
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminhuth authored Oct 4, 2024
2 parents fd862c4 + 81e129b commit 4b5917d
Show file tree
Hide file tree
Showing 152 changed files with 1,555 additions and 1,042 deletions.
Binary file modified CI/physmon/reference/trackfinding_ttbar_pu200/performance_ckf.root
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions CI/test_coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def call(cmd):

ret, gcovr_version_text = check_output(["gcovr", "--version"])
gcovr_version = tuple(
map(int, re.match("gcovr (\d+\.\d+)", gcovr_version_text).group(1).split("."))
map(int, re.match(r"gcovr (\d+\.\d+)", gcovr_version_text).group(1).split("."))
)

extra_flags = []
Expand All @@ -63,7 +63,7 @@ def call(cmd):
if not os.path.exists(coverage_dir):
os.makedirs(coverage_dir)

excludes = ["-e", "../Tests/", "-e", ".*json\.hpp"]
excludes = ["-e", "../Tests/", "-e", r".*json\.hpp"]

# create the html report
call(
Expand Down
5 changes: 3 additions & 2 deletions Core/include/Acts/Detector/LayerStructureBuilder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,9 @@ class LayerStructureBuilder : public IInternalStructureBuilder {
/// Minimum number of surfaces to build an internal structure
/// - otherwise the tryAll options is used
unsigned int nMinimalSurfaces = 4u;
/// Polyhedron approximations
unsigned int nSegments = 1u;
/// Polyhedron approximations: number of segments to be used
/// to approximate a quarter of a circle
unsigned int quarterSegments = 1u;
/// Extra information, mainly for screen output
std::string auxiliary = "";
};
Expand Down
28 changes: 19 additions & 9 deletions Core/include/Acts/EventData/SpacePointContainer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
#include "Acts/Definitions/Units.hpp"
#include "Acts/EventData/SpacePointData.hpp"
#include "Acts/EventData/SpacePointProxy.hpp"
#include "Acts/EventData/SpacePointProxyIterator.hpp"
#include "Acts/EventData/Utils.hpp"
#include "Acts/Utilities/HashedString.hpp"
#include "Acts/Utilities/Iterator.hpp"

#include <any>
#include <vector>
Expand Down Expand Up @@ -67,19 +67,22 @@ class SpacePointContainer {
public:
friend class Acts::SpacePointProxy<
Acts::SpacePointContainer<container_t, holder_t>>;
friend class Acts::SpacePointProxyIterator<
Acts::SpacePointContainer<container_t, holder_t>>;

public:
using iterator = Acts::SpacePointProxyIterator<
Acts::SpacePointContainer<container_t, holder_t>>;
using const_iterator = iterator;

using SpacePointProxyType =
Acts::SpacePointProxy<Acts::SpacePointContainer<container_t, holder_t>>;

using iterator =
ContainerIndexIterator<Acts::SpacePointContainer<container_t, holder_t>,
SpacePointProxyType&, false>;
using const_iterator =
ContainerIndexIterator<Acts::SpacePointContainer<container_t, holder_t>,
const SpacePointProxyType&, true>;

using ValueType = typename container_t::ValueType;
using ProxyType = SpacePointProxyType;
using value_type = ProxyType;
using size_type = std::size_t;

public:
// Constructors
Expand Down Expand Up @@ -118,16 +121,23 @@ class SpacePointContainer {

std::size_t size() const;

iterator begin() const;
iterator end() const;
iterator begin();
iterator end();
const_iterator cbegin() const;
const_iterator cend() const;
const_iterator begin() const;
const_iterator end() const;

ProxyType& at(const std::size_t n);
const ProxyType& at(const std::size_t n) const;
const ValueType& sp(const std::size_t n) const;

private:
void initialize();

const container_t& container() const;
const ProxyType& proxy(const std::size_t n) const;
std::vector<ProxyType>& proxies();
const std::vector<ProxyType>& proxies() const;

float x(const std::size_t n) const;
Expand Down
44 changes: 43 additions & 1 deletion Core/include/Acts/EventData/SpacePointContainer.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -105,22 +105,58 @@ std::size_t SpacePointContainer<container_t, holder_t>::size() const {

template <typename container_t, template <typename> class holder_t>
typename SpacePointContainer<container_t, holder_t>::iterator
SpacePointContainer<container_t, holder_t>::begin() const {
SpacePointContainer<container_t, holder_t>::begin() {
return {*this, 0};
}

template <typename container_t, template <typename> class holder_t>
typename SpacePointContainer<container_t, holder_t>::iterator
SpacePointContainer<container_t, holder_t>::end() {
return {*this, size()};
}

template <typename container_t, template <typename> class holder_t>
typename SpacePointContainer<container_t, holder_t>::const_iterator
SpacePointContainer<container_t, holder_t>::begin() const {
return {*this, 0};
}

template <typename container_t, template <typename> class holder_t>
typename SpacePointContainer<container_t, holder_t>::const_iterator
SpacePointContainer<container_t, holder_t>::end() const {
return {*this, size()};
}

template <typename container_t, template <typename> class holder_t>
typename SpacePointContainer<container_t, holder_t>::const_iterator
SpacePointContainer<container_t, holder_t>::cbegin() const {
return {*this, 0};
}

template <typename container_t, template <typename> class holder_t>
typename SpacePointContainer<container_t, holder_t>::const_iterator
SpacePointContainer<container_t, holder_t>::cend() const {
return {*this, size()};
}

template <typename container_t, template <typename> class holder_t>
const container_t& SpacePointContainer<container_t, holder_t>::container()
const {
return *m_container;
}

template <typename container_t, template <typename> class holder_t>
typename SpacePointContainer<container_t, holder_t>::ProxyType&
SpacePointContainer<container_t, holder_t>::at(const std::size_t n) {
return proxies().at(n);
}

template <typename container_t, template <typename> class holder_t>
const typename SpacePointContainer<container_t, holder_t>::ProxyType&
SpacePointContainer<container_t, holder_t>::at(const std::size_t n) const {
return proxies().at(n);
}

template <typename container_t, template <typename> class holder_t>
const typename SpacePointContainer<container_t, holder_t>::ValueType&
SpacePointContainer<container_t, holder_t>::sp(const std::size_t n) const {
Expand Down Expand Up @@ -173,6 +209,12 @@ SpacePointContainer<container_t, holder_t>::proxy(const std::size_t n) const {
return proxies()[n];
}

template <typename container_t, template <typename> class holder_t>
std::vector<typename SpacePointContainer<container_t, holder_t>::ProxyType>&
SpacePointContainer<container_t, holder_t>::proxies() {
return m_proxies;
}

template <typename container_t, template <typename> class holder_t>
const std::vector<
typename SpacePointContainer<container_t, holder_t>::ProxyType>&
Expand Down
58 changes: 0 additions & 58 deletions Core/include/Acts/EventData/SpacePointProxyIterator.hpp

This file was deleted.

100 changes: 0 additions & 100 deletions Core/include/Acts/EventData/SpacePointProxyIterator.ipp

This file was deleted.

Loading

0 comments on commit 4b5917d

Please sign in to comment.