Skip to content

Commit

Permalink
Merge branch 'main' into structured-bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored Oct 21, 2024
2 parents 76ef733 + c83597c commit 15cc7cc
Show file tree
Hide file tree
Showing 83 changed files with 943 additions and 899 deletions.
32 changes: 20 additions & 12 deletions CI/physmon/phys_perf_mon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,19 @@ function trackfinding() {
fi

run_histcmp \
$outdir/data/$path/performance_ckf.root \
$refdir/$path/performance_ckf.root \
"CKF | ${name}" \
$path/performance_ckf.html \
$path/performance_ckf_plots \
$outdir/data/$path/performance_finding_ckf.root \
$refdir/$path/performance_finding_ckf.root \
"CKF finding performance | ${name}" \
$path/performance_finding_ckf.html \
$path/performance_finding_ckf_plots \
--config $default_config

run_histcmp \
$outdir/data/$path/performance_fitting_ckf.root \
$refdir/$path/performance_fitting_ckf.root \
"CKF fitting performance | ${name}" \
$path/performance_fitting_ckf.html \
$path/performance_fitting_ckf_plots \
--config $default_config

run Examples/Scripts/generic_plotter.py \
Expand All @@ -244,17 +252,17 @@ function trackfinding() {
run_histcmp \
$outdir/data/$path/tracksummary_ckf_hist.root \
$refdir/$path/tracksummary_ckf_hist.root \
"Track Summary CKF | ${name}" \
"CKF track summary | ${name}" \
$path/tracksummary_ckf.html \
$path/tracksummary_ckf_plots

if [ -f $refdir/$path/performance_ckf_ambi.root ]; then
if [ -f $refdir/$path/performance_finding_ckf_ambi.root ]; then
run_histcmp \
$outdir/data/$path/performance_ckf_ambi.root \
$refdir/$path/performance_ckf_ambi.root \
"Ambisolver | ${name}" \
$path/performance_ckf_ambi.html \
$path/performance_ckf_ambi
$outdir/data/$path/performance_finding_ckf_ambi.root \
$refdir/$path/performance_finding_ckf_ambi.root \
"Ambisolver finding performance | ${name}" \
$path/performance_finding_ckf_ambi.html \
$path/performance_finding_ckf_ambi
fi
}

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
5 changes: 3 additions & 2 deletions CI/physmon/workflows/physmon_trackfinding_1muon.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def run_ckf_tracking(label, seeding):
maxSeedsPerSpM=1,
sigmaScattering=5,
radLengthPerSeed=0.1,
minPt=500 * u.MeV,
minPt=0.5 * u.GeV,
impactMax=3 * u.mm,
),
SeedFinderOptionsArg(bFieldInZ=2 * u.T),
Expand Down Expand Up @@ -163,8 +163,9 @@ def run_ckf_tracking(label, seeding):
if seeding != SeedingAlgorithm.TruthSmeared
else []
) + [
"performance_ckf.root",
"tracksummary_ckf.root",
"performance_finding_ckf.root",
"performance_fitting_ckf.root",
]:
perf_file = tp / file
assert perf_file.exists(), f"Performance file not found {perf_file}"
Expand Down
16 changes: 11 additions & 5 deletions CI/physmon/workflows/physmon_trackfinding_4muon_50vertices.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
maxSeedsPerSpM=1,
sigmaScattering=5,
radLengthPerSeed=0.1,
minPt=500 * u.MeV,
minPt=0.5 * u.GeV,
impactMax=3 * u.mm,
),
SeedFinderOptionsArg(bFieldInZ=2 * u.T, beamPos=(0.0, 0.0)),
Expand Down Expand Up @@ -196,8 +196,12 @@
s.run()

shutil.move(
tp / "performance_ambi.root",
tp / "performance_ckf_ambi.root",
tp / "performance_finding_ambi.root",
tp / "performance_finding_ckf_ambi.root",
)
shutil.move(
tp / "performance_fitting_ambi.root",
tp / "performance_fitting_ckf_ambi.root",
)
for vertexing in ["ivf_notime", "amvf_gauss_notime", "amvf_grid_time"]:
shutil.move(
Expand All @@ -208,8 +212,10 @@
for file in [
"performance_seeding.root",
"tracksummary_ckf.root",
"performance_ckf.root",
"performance_ckf_ambi.root",
"performance_finding_ckf.root",
"performance_fitting_ckf.root",
"performance_finding_ckf_ambi.root",
"performance_fitting_ckf_ambi.root",
"performance_vertexing_ivf_notime.root",
"performance_vertexing_amvf_gauss_notime.root",
"performance_vertexing_amvf_grid_time.root",
Expand Down
18 changes: 12 additions & 6 deletions CI/physmon/workflows/physmon_trackfinding_ttbar_pu200.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
maxSeedsPerSpM=1,
sigmaScattering=5,
radLengthPerSeed=0.1,
minPt=500 * u.MeV,
minPt=0.5 * u.GeV,
impactMax=3 * u.mm,
),
SeedFinderOptionsArg(bFieldInZ=2 * u.T, beamPos=(0.0, 0.0)),
Expand All @@ -118,7 +118,7 @@
setup.trackingGeometry,
setup.field,
TrackSelectorConfig(
pt=(500 * u.MeV, None),
pt=(0.5 * u.GeV, None),
loc0=(-4.0 * u.mm, 4.0 * u.mm),
nMeasurementsMin=6,
maxHoles=2,
Expand Down Expand Up @@ -180,8 +180,12 @@
s.run()

shutil.move(
tp / "performance_ambi.root",
tp / "performance_ckf_ambi.root",
tp / "performance_finding_ambi.root",
tp / "performance_finding_ckf_ambi.root",
)
shutil.move(
tp / "performance_fitting_ambi.root",
tp / "performance_fitting_ckf_ambi.root",
)
for vertexing in ["amvf_gauss_notime", "amvf_grid_time"]:
shutil.move(
Expand All @@ -192,8 +196,10 @@
for file in [
"performance_seeding.root",
"tracksummary_ckf.root",
"performance_ckf.root",
"performance_ckf_ambi.root",
"performance_finding_ckf.root",
"performance_fitting_ckf.root",
"performance_finding_ckf_ambi.root",
"performance_fitting_ckf_ambi.root",
"performance_vertexing_amvf_gauss_notime.root",
"performance_vertexing_amvf_grid_time.root",
]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ struct AlignmentFunctionImpl
: public ActsExamples::AlignmentAlgorithm::AlignmentFunction {
Alignment align;

AlignmentFunctionImpl(Alignment&& a) : align(std::move(a)) {}
explicit AlignmentFunctionImpl(Alignment&& a) : align(std::move(a)) {}

ActsExamples::AlignmentAlgorithm::AlignmentResult operator()(
const std::vector<std::vector<ActsExamples::IndexSourceLink>>&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class DigitizationConfig {
bool doMerge, double mergeNsigma, bool mergeCommonCorner,
Acts::GeometryHierarchyMap<DigiComponentsConfig> &&digiCfgs);

DigitizationConfig(
explicit DigitizationConfig(
Acts::GeometryHierarchyMap<DigiComponentsConfig> &&digiCfgs);

/// Input collection of simulated hits.
Expand Down
3 changes: 2 additions & 1 deletion Examples/Algorithms/Digitization/src/MeasurementCreation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ ActsExamples::VariableBoundMeasurementProxy ActsExamples::createMeasurement(
return Acts::visit_measurement(
dParams.indices.size(), [&](auto dim) -> VariableBoundMeasurementProxy {
auto [indices, par, cov] = measurementConstituents<dim>(dParams);
return container.emplaceMeasurement<dim>(geometryId, indices, par, cov);
return VariableBoundMeasurementProxy{
container.emplaceMeasurement<dim>(geometryId, indices, par, cov)};
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ class MaterialPhysicsList final : public G4VUserPhysicsList {
///
/// @param cfg the configuration struct for this Stepping action
/// @param logger is an Acts::Logger for unique logging
MaterialPhysicsList(std::unique_ptr<const Acts::Logger> logger =
Acts::getDefaultLogger("MaterialPhysicsList",
Acts::Logging::INFO));
explicit MaterialPhysicsList(std::unique_ptr<const Acts::Logger> logger =
Acts::getDefaultLogger("MaterialPhysicsList",
Acts::Logging::INFO));
~MaterialPhysicsList() override = default;

/// @brief Interface particle construction method
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class PhysicsListFactoryFunction final : public PhysicsListFactory {
public:
using Function = std::function<std::unique_ptr<G4VUserPhysicsList>()>;

PhysicsListFactoryFunction(Function function);
explicit PhysicsListFactoryFunction(Function function);

std::unique_ptr<G4VUserPhysicsList> factorize() const final;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class SteppingActionList : public G4UserSteppingAction {
std::vector<std::shared_ptr<G4UserSteppingAction>> actions;
};

SteppingActionList(const Config &cfg) : m_cfg(cfg) {}
explicit SteppingActionList(const Config &cfg) : m_cfg(cfg) {}

void UserSteppingAction(const G4Step *step) override {
for (const auto &action : m_cfg.actions) {
Expand Down
2 changes: 1 addition & 1 deletion Examples/Algorithms/Geant4HepMC/src/EventAction.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class EventAction final : public G4UserEventAction {
static EventAction* instance();

/// Construct the action and ensure singleton usage.
EventAction(std::vector<std::string> processFilter);
explicit EventAction(std::vector<std::string> processFilter);
~EventAction() override;

/// Interface method for begin of the event
Expand Down
2 changes: 1 addition & 1 deletion Examples/Algorithms/Geant4HepMC/src/SteppingAction.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace ActsExamples::Geant4::HepMC3 {
/// Collects the particles history.
class SteppingAction : public G4UserSteppingAction {
public:
SteppingAction(std::vector<std::string> eventRejectionProcess);
explicit SteppingAction(std::vector<std::string> eventRejectionProcess);
~SteppingAction() override;

/// Static access method to the instance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ struct FixedMultiplicityGenerator
: public EventGenerator::MultiplicityGenerator {
std::size_t n = 1;

FixedMultiplicityGenerator(std::size_t _n) : n{_n} {}
explicit FixedMultiplicityGenerator(std::size_t _n) : n{_n} {}
FixedMultiplicityGenerator() = default;

std::size_t operator()(RandomEngine& /*rng*/) const override { return n; }
Expand All @@ -28,7 +28,7 @@ struct FixedMultiplicityGenerator
struct PoissonMultiplicityGenerator
: public EventGenerator::MultiplicityGenerator {
double mean = 1;
PoissonMultiplicityGenerator(double _mean) : mean{_mean} {}
explicit PoissonMultiplicityGenerator(double _mean) : mean{_mean} {}
PoissonMultiplicityGenerator() = default;

std::size_t operator()(RandomEngine& rng) const override {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ ParametricParticleGenerator::operator()(RandomEngine& rng) {
SimParticleContainer::sequence_type particles;

// create the primary vertex
auto& primaryVertex =
vertices.emplace_back(0, SimVertex::Vector4(0., 0., 0., 0.));
auto& primaryVertex = vertices.emplace_back(
SimVertexBarcode{0}, SimVertex::Vector4(0., 0., 0., 0.));

// counter will be reused as barcode particle number which must be non-zero.
for (std::size_t ip = 1; ip <= m_cfg.numParticles; ++ip) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class ParametricParticleGenerator : public EventGenerator::ParticlesGenerator {
std::optional<double> mass;
};

ParametricParticleGenerator(const Config& cfg);
explicit ParametricParticleGenerator(const Config& cfg);

/// Generate a single primary vertex with the given number of particles.
std::pair<SimVertexContainer, SimParticleContainer> operator()(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ Pythia8Generator::operator()(RandomEngine& rng) {
}

// create the primary vertex
vertices.emplace_back(0, SimVertex::Vector4(0., 0., 0., 0.));
vertices.emplace_back(SimVertexBarcode{0},
SimVertex::Vector4(0., 0., 0., 0.));

// convert generated final state particles into internal format
for (int ip = 0; ip < m_pythia8->event.size(); ++ip) {
Expand Down Expand Up @@ -166,7 +167,8 @@ Pythia8Generator::operator()(RandomEngine& rng) {
} else {
// no matching secondary vertex exists -> create new one
particleId.setVertexSecondary(vertices.size());
auto& vertex = vertices.emplace_back(particleId.vertexId(), pos4);
auto& vertex = vertices.emplace_back(
static_cast<SimVertexBarcode>(particleId.vertexId()), pos4);
vertex.outgoing.insert(particleId);
ACTS_VERBOSE("created new secondary vertex " << pos4.transpose());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class PropagatorInterface {
template <typename propagator_t>
class ConcretePropagator : public PropagatorInterface {
public:
ConcretePropagator(propagator_t propagator)
explicit ConcretePropagator(propagator_t propagator)
: m_propagator{std::move(propagator)} {}

Acts::Result<PropagationOutput> execute(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ struct TrackFinderFunctionImpl
: public ActsExamples::TrackFindingAlgorithm::TrackFinderFunction {
CKF trackFinder;

TrackFinderFunctionImpl(CKF&& f) : trackFinder(std::move(f)) {}
explicit TrackFinderFunctionImpl(CKF&& f) : trackFinder(std::move(f)) {}

ActsExamples::TrackFindingAlgorithm::TrackFinderResult operator()(
const ActsExamples::TrackParameters& initialParameters,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,8 @@ ProcessCode AdaptiveMultiVertexFinderAlgorithm::execute(
// Count the number of particles associated with each vertex
std::size_t particleCount = 0;
for (const auto& particle : truthParticles) {
if (particle.particleId().vertexId() == truthVertex.vertexId()) {
if (static_cast<SimVertexBarcode>(particle.particleId().vertexId()) ==
truthVertex.vertexId()) {
++particleCount;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ struct DD4hepDetector {
DD4hepDetector() = default;
/// @brief Constructor from geometry service
/// @param _geometryService the geometry service
DD4hepDetector(std::shared_ptr<DD4hepGeometryService> _geometryService);
explicit DD4hepDetector(
std::shared_ptr<DD4hepGeometryService> _geometryService);
/// @brief Default destructor
~DD4hepDetector() = default;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class DD4hepGeometryService {
std::make_shared<const Acts::GeometryIdentifierHook>();
};

DD4hepGeometryService(const Config& cfg);
explicit DD4hepGeometryService(const Config& cfg);
DD4hepGeometryService(const DD4hepGeometryService&) = delete;
DD4hepGeometryService(DD4hepGeometryService&&) = delete;
~DD4hepGeometryService();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class ScalableBField final : public Acts::MagneticFieldProvider {
Acts::ActsScalar scalor = 1.;

/// @brief constructor with context
Cache(const Acts::MagneticFieldContext& mctx) {
explicit Cache(const Acts::MagneticFieldContext& mctx) {
scalor = mctx.get<const ScalableBFieldContext>().scalor;
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class MockupSectorBuilder {

/// Constructor
///@param config The configuration struct
MockupSectorBuilder(const Config& config);
explicit MockupSectorBuilder(const Config& config);

/// Destructor
~MockupSectorBuilder() = default;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ struct TGeoDetector {
struct LayerTriplet {
LayerTriplet() = default;

LayerTriplet(T value)
explicit LayerTriplet(T value)
: negative{value}, central{value}, positive{value} {}

LayerTriplet(T _negative, T _central, T _positive)
Expand Down
3 changes: 2 additions & 1 deletion Examples/Framework/ML/src/NeuralCalibrator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@ void ActsExamples::NeuralCalibrator::calibrate(
Acts::visit_measurement(measurement.size(), [&](auto N) -> void {
constexpr std::size_t kMeasurementSize = decltype(N)::value;
const ConstFixedBoundMeasurementProxy<kMeasurementSize> fixedMeasurement =
measurement;
static_cast<ConstFixedBoundMeasurementProxy<kMeasurementSize>>(
measurement);

Acts::ActsVector<kMeasurementSize> calibratedParameters =
fixedMeasurement.parameters();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ class MeasurementProxyBase {
MeasurementProxyBase(Container& container_, Index index_)
: m_container(&container_), m_index(index_) {}
template <typename OtherDerived, bool OtherReadOnly>
MeasurementProxyBase(
explicit MeasurementProxyBase(
const MeasurementProxyBase<OtherDerived, FullSize, OtherReadOnly>& other)
requires(ReadOnly == OtherReadOnly || ReadOnly)
: m_container(&other.container()), m_index(other.index()) {}
Expand Down Expand Up @@ -358,7 +358,7 @@ class FixedMeasurementProxy
assert(container().m_entries.at(index()).size == Size && "Size mismatch");
}
template <typename OtherDerived, bool OtherReadOnly>
FixedMeasurementProxy(
explicit FixedMeasurementProxy(
const MeasurementProxyBase<OtherDerived, FullSize, OtherReadOnly>& other)
requires(ReadOnly == OtherReadOnly || ReadOnly)
: Base(other) {
Expand Down Expand Up @@ -450,7 +450,7 @@ class VariableMeasurementProxy
VariableMeasurementProxy(Container& container_, Index index_)
: Base(container_, index_) {}
template <typename OtherDerived, bool OtherReadOnly>
VariableMeasurementProxy(
explicit VariableMeasurementProxy(
const MeasurementProxyBase<OtherDerived, FullSize, OtherReadOnly>& other)
requires(ReadOnly == OtherReadOnly || ReadOnly)
: Base(other) {}
Expand Down
Loading

0 comments on commit 15cc7cc

Please sign in to comment.