Skip to content

Commit

Permalink
Merge branch 'main' into seedPerfFloat
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored Feb 5, 2024
2 parents 6b4f578 + ab41e0b commit 941aff0
Show file tree
Hide file tree
Showing 288 changed files with 8,629 additions and 3,309 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- 'release/**'
- 'develop/**'

concurrency:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

Expand All @@ -35,7 +35,7 @@ jobs:
with:
python-version: '3.12'
- name: Install black
run: pip install black==22.3.0
run: pip install black==23.12.1
- name: Run black format check
run: black --check . --extend-exclude ".*thirdparty.*"

Expand Down
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ linux_test_examples:
- export LD_LIBRARY_PATH=$PWD/build/thirdparty/OpenDataDetector/factory:$LD_LIBRARY_PATH
- cd src
- pip3 install -r Examples/Python/tests/requirements.txt
- pytest -rFsv -k "not exatrkx" -v -n auto
- pytest -rFsv -k "not exatrkx" -v

linux_physmon:
stage: test
Expand Down
2 changes: 1 addition & 1 deletion .policy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ approval_rules:
ignore_update_merges: true
if:
targets_branch:
pattern: "^main$"
pattern: "^(main|develop\\/.+)$"

- name: Is a backport
requires:
Expand Down
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,18 @@ repos:
rev: 'v14.0.0'
hooks:
- id: clang-format
types_or: [file]
files: \.(cpp|hpp|ipp|cu|cuh)$

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files

- repo: https://github.com/psf/black
rev: 23.12.1
hooks:
- id: black
1 change: 0 additions & 1 deletion CI/check_include_guards.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ def check_include_guards(file):

if valid_global or len(match_local) > 1:
for m in match_local:

lineno = text[: m.start()].count("\n") + 1

valid_local = False
Expand Down
3 changes: 0 additions & 3 deletions CI/check_license.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ def year_print(*pargs):
nsrcs = len(srcs)
step = int(nsrcs / 20)
for i, src in enumerate(srcs):

if any([fnmatch(src, e) for e in args.exclude]):
continue

Expand Down Expand Up @@ -267,7 +266,6 @@ def year_print(*pargs):
valid = False

if args.check_years:

if git_add_year != git_mod_year:
# need year range in licence
if not (year1 and year2):
Expand Down Expand Up @@ -308,7 +306,6 @@ def year_print(*pargs):
int(year1) != git_add_year
or int(year2) != git_mod_year
):

year_print("File: {}".format(src))
year_print(
"Year range {}-{} does not match range from git {}-{}".format(
Expand Down
1 change: 0 additions & 1 deletion CI/check_smearing_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
ref = ifile.read()

for i, (line_ref, line_gen) in enumerate(zip(ref.split("\n"), output.split("\n"))):

lhs = line_ref.strip()
rhs = line_gen.strip()

Expand Down
2 changes: 2 additions & 0 deletions CI/check_unused_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ def main():
"vertexing_event_mu20_beamspot.csv",
"vertexing_event_mu20_tracks.csv",
"vertexing_event_mu20_vertices_AMVF.csv",
"event000000001-MuonDriftCircle.csv",
"event000000001-MuonSimHit.csv",
# TODO Move the following files to a better place?
"Magfield.ipynb",
"SolenoidField.ipynb",
Expand Down
3 changes: 0 additions & 3 deletions CI/clang_tidy/check_clang_tidy.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,8 @@ def main():

kf = lambda i: i.path
for file, items in itertools.groupby(sorted(data, key=kf), key=kf):

output = []
for item in items:

emoji = Emoji(
{"warning": "yellow_circle", "error": "red_circle"}[item.severity]
)
Expand All @@ -72,7 +70,6 @@ def subpath(m):

accounted_for = False
for pattern in config["limits"].keys():

if not fnmatch.fnmatch(item.code, pattern):
continue
counts[pattern] += 1
Expand Down
2 changes: 0 additions & 2 deletions CI/clang_tidy/parse_clang_tidy.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@


def parse_clang_tidy_item(itemstr):

try:
m = re.match(
r"(?P<file>[/.\-+\w]+):(?P<line>\d+):(?P<col>\d+): (?P<sev>.*?):(?P<msg>[\s\S]*)\[(?P<code>.*)\]\n(?P<info>[\s\S]*)",
Expand Down Expand Up @@ -46,7 +45,6 @@ def parse_clang_tidy_item(itemstr):


def parse_clang_tidy_output(output):

# cleanup
itemstr = output
itemstr = re.sub(r"Enabled checks:\n[\S\s]+?\n\n", "", itemstr)
Expand Down
1 change: 1 addition & 0 deletions CI/codespell_ignore.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ ans
dthe
dthe
vart
pixelx
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_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.
Binary file modified CI/physmon/reference/tracksummary_ckf_ttbar_hist.root
Binary file not shown.
9 changes: 9 additions & 0 deletions CI/physmon/workflows/physmon_ckf_tracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,15 @@ def run_ckf_tracking(truthSmearedSeeded, truthEstimatedSeeded, label):
else SeedingAlgorithm.Default
if label == "seeded"
else SeedingAlgorithm.Orthogonal,
initialSigmas=[
1 * u.mm,
1 * u.mm,
1 * u.degree,
1 * u.degree,
0.1 / u.GeV,
1 * u.ns,
],
initialVarInflation=[1.0] * 6,
geoSelectionConfigFile=setup.geoSel,
rnd=rnd, # only used by SeedingAlgorithm.TruthSmeared
outputDirRoot=tp,
Expand Down
9 changes: 9 additions & 0 deletions CI/physmon/workflows/physmon_vertexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,15 @@ def run_vertexing(fitter, mu, events):
),
SeedFinderOptionsArg(bFieldInZ=2 * u.T),
seedingAlgorithm=SeedingAlgorithm.Default,
initialSigmas=[
1 * u.mm,
1 * u.mm,
1 * u.degree,
1 * u.degree,
0.1 / u.GeV,
1 * u.ns,
],
initialVarInflation=[1.0] * 6,
geoSelectionConfigFile=setup.geoSel,
)

Expand Down
3 changes: 0 additions & 3 deletions CI/run_examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,3 @@ run_example ActsExampleMaterialValidationGeneric
# TODO: Run (AdaptiveMulti|Iterative)?Vertex(Finder|Fitter) examples (currently broken, not ready for CI)

# TODO: Bring back multi-threaded output reproducibility tests

# Run vertex finder tutorial
run_example ActsTutorialVertexFinder
23 changes: 23 additions & 0 deletions CI/setup_cvmfs_lcg105.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# setup appropriate LCG release via cvmfs

if test -e /etc/centos-release && grep 'CentOS Linux release 7' /etc/centos-release; then
lcg_os=centos7
elif test -e /etc/centos-release && grep 'CentOS Stream release 8' /etc/centos-release; then
lcg_os=centos8
# not centos. Check for RHEL
elif test -e /etc/redhat-release && grep 'Linux release 9' /etc/redhat-release; then
lcg_os=el9
else
echo "Unsupported system" 1>&2
return
fi

lcg_release=LCG_105
lcg_compiler=gcc11-opt
lcg_platform=x86_64-${lcg_os}-${lcg_compiler}
lcg_view=/cvmfs/sft.cern.ch/lcg/views/${lcg_release}/${lcg_platform}

source ${lcg_view}/setup.sh
# extra variables required to build acts
export DD4hep_DIR=${lcg_view}

8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ endif()
# minimal dependency versions. they are defined here in a single place so
# they can be easily upgraded, although they might not be used if the
# dependency is included via `add_subdirectory(...)`.
set(_acts_actsvg_version 0.4.39)
set(_acts_actsvg_version 0.4.40)
set(_acts_autodiff_version 0.6)
set(_acts_boost_version 1.71.0)
set(_acts_dd4hep_version 1.21)
Expand Down Expand Up @@ -311,11 +311,11 @@ if(ACTS_BUILD_PLUGIN_SYCL)
find_package(SYCL REQUIRED)
endif()
if(ACTS_BUILD_PLUGIN_TGEO)
find_package(ROOT ${_acts_root_version} REQUIRED CONFIG COMPONENTS Geom)
find_package(ROOT ${_acts_root_version} REQUIRED CONFIG COMPONENTS Geom Graf)
check_root_compatibility()
endif()
if(ACTS_BUILD_ANALYSIS_APPS)
find_package(ROOT ${_acts_root_version} REQUIRED CONFIG COMPONENTS Geom)
find_package(ROOT ${_acts_root_version} REQUIRED CONFIG COMPONENTS Geom Graf)
check_root_compatibility()
endif()
if(ACTS_BUILD_PLUGIN_EXATRKX)
Expand Down Expand Up @@ -359,7 +359,7 @@ if(ACTS_BUILD_EXAMPLES)
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
# for simplicity always request all potentially required components.
find_package(ROOT ${_acts_root_version} REQUIRED CONFIG COMPONENTS Core Geom GenVector Hist Tree TreePlayer)
find_package(ROOT ${_acts_root_version} REQUIRED CONFIG COMPONENTS Core Geom Graf GenVector Hist Tree TreePlayer)
check_root_compatibility()
add_subdirectory(thirdparty/dfelibs)
endif()
Expand Down
4 changes: 2 additions & 2 deletions Core/include/Acts/Definitions/PdgParticle.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file is part of the Acts project.
//
// Copyright (C) 2019 CERN for the benefit of the Acts project
// Copyright (C) 2019-2024 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
Expand All @@ -13,7 +13,7 @@
namespace Acts {

/// Symbolic values for commonly used PDG particle numbers.
enum PdgParticle : int32_t {
enum PdgParticle : std::int32_t {
eInvalid = 0,
eElectron = 11,
eAntiElectron = -eElectron,
Expand Down
5 changes: 5 additions & 0 deletions Core/include/Acts/Detector/Blueprint.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@

#include "Acts/Definitions/Algebra.hpp"
#include "Acts/Definitions/Common.hpp"
#include "Acts/Detector/ProtoBinning.hpp"
#include "Acts/Geometry/VolumeBounds.hpp"
#include "Acts/Utilities/BinningData.hpp"
#include "Acts/Utilities/StringHelpers.hpp"

#include <map>
#include <memory>
#include <string>
#include <vector>
Expand Down Expand Up @@ -91,6 +93,9 @@ struct Node final {
/// Branch definition binning
std::vector<BinningValue> binning = {};

/// Portal proto material binning
std::map<unsigned int, BinningDescription> portalMaterialBinning = {};

/// Auxiliary information
std::vector<std::string> auxiliary = {};

Expand Down
110 changes: 110 additions & 0 deletions Core/include/Acts/Detector/CuboidalContainerBuilder.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
// 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/Detector/Blueprint.hpp"
#include "Acts/Detector/DetectorComponents.hpp"
#include "Acts/Detector/interface/IDetectorComponentBuilder.hpp"
#include "Acts/Geometry/GeometryContext.hpp"
#include "Acts/Utilities/BinningType.hpp"
#include "Acts/Utilities/Logger.hpp"

#include <memory>
#include <string>
#include <vector>

namespace Acts {
namespace Experimental {

class IRootVolumeFinderBuilder;
class IGeometryIdGenerator;

/// @brief A dedicated container builder for cuboid detector containers
///
/// It relies on the detailed implementation of the CuboidDetectorHelper
/// and allows for DetectorVolume attachment in x/y/z
///
/// There exists an option to create this container builder (recursively)
/// from a blueprint tree, which attempts to fill in the gap volumes
/// accordingly.
///
/// @note the builder expects a fully consistent set of sub volume builders
/// that will be executed in a chain
///
/// @note allowed BinningValue(s) for the cuboid container builder are
/// {binX}, {binY}, {binZ}.
///
/// @note Connecting containers isn't functional yet due to the underlying
/// issues in the CuboidDetectorHelper
///
class CuboidalContainerBuilder : public IDetectorComponentBuilder {
public:
/// Nested configuration object
struct Config {
/// The configured volume builders
std::vector<std::shared_ptr<const IDetectorComponentBuilder>> builders = {};
/// Binning prescription of attachment
BinningValue binning{};
/// The root volume finder
std::shared_ptr<const IRootVolumeFinderBuilder> rootVolumeFinderBuilder =
nullptr;
/// The geometry id generator
std::shared_ptr<const IGeometryIdGenerator> geoIdGenerator = nullptr;
/// An eventual reverse geometry id generation
bool geoIdReverseGen = false;
/// Auxiliary information, mainly for screen output
std::string auxiliary = "";
};

/// Constructor with configuration struct
///
/// @param cfg is the configuration struct
/// @param logger logging instance for screen output
CuboidalContainerBuilder(const Config& cfg,
std::unique_ptr<const Logger> logger =
getDefaultLogger("CuboidalContainerBuilder",
Logging::INFO));

/// Constructor from blueprint and logging level
///
/// It will create recursively the builders of sub volumes
///
/// @param bpNode is the entry blue print node
/// @param logLevel is the logging output level for the builder tools
///
/// @note no checking is being done on consistency of the blueprint,
/// it is assumed it has passed first through gap filling via the
/// blueprint helper.
///
/// @note that the naming of the builders is taken from the bluprint nodes
///
/// @return a cylindrical container builder representing this blueprint
CuboidalContainerBuilder(const Acts::Experimental::Blueprint::Node& bpNode,
Acts::Logging::Level logLevel = Acts::Logging::INFO);

/// The final implementation of the cylindrical container builder
///
/// @param gctx The geometry context for this call
///
/// @return an outgoing detector component
DetectorComponent construct(const GeometryContext& gctx) const final;

private:
/// configuration object
Config m_cfg;

/// Private access method to the logger
const Logger& logger() const { return *m_logger; }

/// logging instance
std::unique_ptr<const Logger> m_logger;
};

} // namespace Experimental
} // namespace Acts
Loading

0 comments on commit 941aff0

Please sign in to comment.