Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ option(ACTS_BUILD_PLUGIN_ACTSVG "Build SVG display plugin" OFF)
option(ACTS_BUILD_PLUGIN_DD4HEP "Build DD4hep plugin" OFF)
option(ACTS_BUILD_PLUGIN_EDM4HEP "Build EDM4hep plugin" OFF)
option(ACTS_BUILD_PLUGIN_FPEMON "Build FPE monitoring plugin" OFF)
option(ACTS_BUILD_PLUGIN_FASTJET "Build FastJet plugin" OFF)
option(ACTS_BUILD_PLUGIN_GEOMODEL "Build GeoModel plugin" OFF)
option(ACTS_BUILD_PLUGIN_TRACCC "Build Traccc plugin" OFF)
option(ACTS_BUILD_PLUGIN_GEANT4 "Build Geant4 plugin" OFF)
Expand All @@ -106,6 +105,7 @@ option(ACTS_BUILD_ALIGNMENT "Build Alignment package" OFF)
option(ACTS_BUILD_EXAMPLES "Build basic examples components" OFF)
option(ACTS_BUILD_EXAMPLES_DD4HEP "Build DD4hep-based code in the examples" OFF)
option(ACTS_BUILD_EXAMPLES_EDM4HEP "Build EDM4hep-based code in the examples" OFF)
option(ACTS_BUILD_EXAMPLES_FASTJET "Build FastJet plugin" OFF)
option(ACTS_BUILD_EXAMPLES_PODIO "Build Podio-based code in the examples" OFF)
option(ACTS_BUILD_EXAMPLES_GNN "Build the GNN example code" OFF)
option(ACTS_BUILD_EXAMPLES_GEANT4 "Build Geant4-based code in the examples" OFF)
Expand Down Expand Up @@ -190,7 +190,7 @@ set_option_if(
)
set_option_if(ACTS_BUILD_PLUGIN_JSON ACTS_BUILD_EXAMPLES)
set_option_if(ACTS_BUILD_FATRAS ACTS_BUILD_EXAMPLES)
set_option_if(ACTS_BUILD_FATRAS ACTS_BUILD_PLUGIN_FASTJET)
set_option_if(ACTS_BUILD_FATRAS ACTS_BUILD_EXAMPLES_FASTJET)
set_option_if(ACTS_BUILD_PLUGIN_GNN ACTS_BUILD_EXAMPLES_GNN)
set_option_if(ACTS_BUILD_PLUGIN_FPEMON ACTS_BUILD_EXAMPLES)
set_option_if(ACTS_BUILD_PLUGIN_JSON ACTS_BUILD_PLUGIN_TRACCC)
Expand Down Expand Up @@ -428,9 +428,6 @@ if(ACTS_BUILD_PLUGIN_JSON)
add_subdirectory(thirdparty/nlohmann_json)
endif()
endif()
if(ACTS_BUILD_PLUGIN_FASTJET)
find_package(FastJet ${_acts_fastjet_version} REQUIRED)
endif()
if(ACTS_BUILD_PLUGIN_GEOMODEL)
find_package(GeoModelCore CONFIG)
if(NOT GeoModelCore_FOUND)
Expand Down Expand Up @@ -611,6 +608,9 @@ if(ACTS_BUILD_EXAMPLES)
COMPONENTS Core Geom Graf GenVector Hist Tree TreePlayer
)
endif()
if(ACTS_BUILD_EXAMPLES_FASTJET)
find_package(FastJet ${_acts_fastjet_version} REQUIRED)
endif()
if(ACTS_BUILD_EXAMPLES_DD4HEP AND ACTS_BUILD_EXAMPLES_GEANT4)
find_package(
DD4hep
Expand Down
2 changes: 1 addition & 1 deletion Examples/Algorithms/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ add_subdirectory(TrackFinding)
add_subdirectory_if(TrackFindingGnn ACTS_BUILD_EXAMPLES_GNN)
add_subdirectory_if(TrackFindingML ACTS_BUILD_PLUGIN_ONNX)
add_subdirectory(TrackFitting)
add_subdirectory_if(Jets ACTS_BUILD_PLUGIN_FASTJET)
add_subdirectory_if(Jets ACTS_BUILD_EXAMPLES_FASTJET)
add_subdirectory(TruthTracking)
add_subdirectory(Vertexing)
add_subdirectory_if(Alignment ACTS_BUILD_ALIGNMENT)
Expand Down
2 changes: 1 addition & 1 deletion Examples/Algorithms/Jets/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ target_include_directories(
)
target_link_libraries(
ActsExamplesJets
PUBLIC Acts::Fatras Acts::PluginFastJet Acts::ExamplesFramework
PUBLIC Acts::Fatras Acts::ExamplesFramework FastJet::FastJet
)

acts_compile_headers(ExamplesJets GLOB "include/**/*.hpp")
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,25 @@
#pragma once

#include "Acts/Utilities/Logger.hpp"
#include "ActsExamples/EventData/Jets.hpp"
#include "ActsExamples/EventData/SimParticle.hpp"
#include "ActsExamples/EventData/Track.hpp"
#include "ActsExamples/Framework/DataHandle.hpp"
#include "ActsExamples/Framework/IAlgorithm.hpp"
#include "ActsExamples/Framework/ProcessCode.hpp"
#include "ActsPlugins/FastJet/Jets.hpp"

#include <string>

#include <fastjet/JetDefinition.hh>
#include <fastjet/PseudoJet.hh>

namespace fastjet {
class PseudoJet;
}

namespace ActsExamples {

using TruthJetContainer = std::vector<ActsPlugins::FastJet::TruthJet>;
using TruthJetContainer = std::vector<ActsExamples::TruthJet>;

class TruthJetAlgorithm final : public IAlgorithm {
public:
Expand Down
31 changes: 14 additions & 17 deletions Examples/Algorithms/Jets/src/TruthJetAlgorithm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,33 +40,32 @@ TruthJetAlgorithm::TruthJetAlgorithm(const Config& cfg,
}

namespace {
ActsPlugins::FastJet::JetLabel jetLabelFromHadronType(
Acts::HadronType hadronType) {
ActsExamples::JetLabel jetLabelFromHadronType(Acts::HadronType hadronType) {
using enum Acts::HadronType;
switch (hadronType) {
case BBbarMeson:
case BottomMeson:
case BottomBaryon:
return ActsPlugins::FastJet::JetLabel::BJet;
return ActsExamples::JetLabel::BJet;
case CCbarMeson:
case CharmedMeson:
case CharmedBaryon:
return ActsPlugins::FastJet::JetLabel::CJet;
return ActsExamples::JetLabel::CJet;
case StrangeMeson:
case StrangeBaryon:
case LightMeson:
case LightBaryon:
return ActsPlugins::FastJet::JetLabel::LightJet;
return ActsExamples::JetLabel::LightJet;
default:
return ActsPlugins::FastJet::JetLabel::Unknown;
return ActsExamples::JetLabel::Unknown;
}
}

} // namespace

ProcessCode TruthJetAlgorithm::execute(const AlgorithmContext& ctx) const {
// Initialize the output container
std::vector<ActsPlugins::FastJet::TruthJet> outputJetContainer{};
std::vector<ActsExamples::TruthJet> outputJetContainer{};

Acts::ScopedTimer globalTimer("TruthJetAlgorithm", logger(),
Acts::Logging::DEBUG);
Expand Down Expand Up @@ -135,8 +134,7 @@ ProcessCode TruthJetAlgorithm::execute(const AlgorithmContext& ctx) const {
}

// Find hadrons for jet labeling with sim particles
std::vector<std::pair<ActsPlugins::FastJet::JetLabel, const SimParticle*>>
hadrons;
std::vector<std::pair<ActsExamples::JetLabel, const SimParticle*>> hadrons;

if (m_cfg.doJetLabeling) {
Acts::ScopedTimer timer("hadron finding", logger(), Acts::Logging::DEBUG);
Expand All @@ -160,7 +158,7 @@ ProcessCode TruthJetAlgorithm::execute(const AlgorithmContext& ctx) const {
// Apply a pt cut on B or C hadrons
auto label =
jetLabelFromHadronType(Acts::ParticleIdHelper::hadronType(pdgId));
using enum ActsPlugins::FastJet::JetLabel;
using enum ActsExamples::JetLabel;

if (label == BJet || label == CJet) {
if (particle->transverseMomentum() < m_cfg.jetLabelingHadronPtMin) {
Expand All @@ -176,7 +174,7 @@ ProcessCode TruthJetAlgorithm::execute(const AlgorithmContext& ctx) const {
return std::make_pair(label, particle);
}) |
std::views::filter([](const auto& hadron) {
return hadron.first > ActsPlugins::FastJet::JetLabel::Unknown;
return hadron.first > ActsExamples::JetLabel::Unknown;
});

std::ranges::copy(hadronView, std::back_inserter(hadrons));
Expand Down Expand Up @@ -208,7 +206,7 @@ ProcessCode TruthJetAlgorithm::execute(const AlgorithmContext& ctx) const {
Acts::PdgParticle{hadron.second->pdg()}))};
});

std::vector<std::pair<const SimParticle*, ActsPlugins::FastJet::JetLabel>>
std::vector<std::pair<const SimParticle*, ActsExamples::JetLabel>>
hadronsInJet;
std::ranges::copy(hadronsInJetView, std::back_inserter(hadronsInJet));

Expand All @@ -230,7 +228,7 @@ ProcessCode TruthJetAlgorithm::execute(const AlgorithmContext& ctx) const {

if (maxHadronIt == hadronsInJet.end()) {
// Now hadronic "jet"
return ActsPlugins::FastJet::JetLabel::Unknown;
return ActsExamples::JetLabel::Unknown;
}

const auto& [maxHadron, maxHadronLabel] = *maxHadronIt;
Expand All @@ -243,7 +241,7 @@ ProcessCode TruthJetAlgorithm::execute(const AlgorithmContext& ctx) const {
return maxHadronLabel;
}; // jet classification

boost::container::flat_map<ActsPlugins::FastJet::JetLabel, std::size_t>
boost::container::flat_map<ActsExamples::JetLabel, std::size_t>
jetLabelCounts;

{
Expand All @@ -255,8 +253,7 @@ ProcessCode TruthJetAlgorithm::execute(const AlgorithmContext& ctx) const {

// If jet labeling is enabled, classify the jet based on its hadronic
// content
ActsPlugins::FastJet::JetLabel jetLabel =
ActsPlugins::FastJet::JetLabel::Unknown;
ActsExamples::JetLabel jetLabel = ActsExamples::JetLabel::Unknown;
if (m_cfg.doJetLabeling) {
ACTS_DEBUG("Classifying jet " << i);
auto sample = timer.sample();
Expand All @@ -265,7 +262,7 @@ ProcessCode TruthJetAlgorithm::execute(const AlgorithmContext& ctx) const {

// Initialize truth jet for storing in the output container
Acts::Vector4 jetFourMom{jet.px(), jet.py(), jet.pz(), jet.e()};
ActsPlugins::FastJet::TruthJet truthJet(jetFourMom, jetLabel);
ActsExamples::TruthJet truthJet(jetFourMom, jetLabel);

std::vector<fastjet::PseudoJet> jetConstituents = jet.constituents();
std::vector<int> constituentIndices;
Expand Down
1 change: 1 addition & 0 deletions Examples/Framework/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ acts_add_library(
src/EventData/Measurement.cpp
src/EventData/MeasurementCalibration.cpp
src/EventData/SimParticle.cpp
src/EventData/Jets.cpp
src/Framework/IAlgorithm.cpp
src/Framework/SequenceElement.cpp
src/Framework/WhiteBoard.cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,7 @@

#include <vector>

#include <fastjet/JetDefinition.hh>
#include <fastjet/PseudoJet.hh>

namespace ActsPlugins::FastJet {
/// @addtogroup fastjet_plugin
/// @{
namespace ActsExamples {

/// Jet labeling enum

Expand Down Expand Up @@ -164,4 +159,4 @@ class TrackJet : public Jet {
};

/// @}
} // namespace ActsPlugins::FastJet
} // namespace ActsExamples
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

#include "ActsPlugins/FastJet/Jets.hpp"
#include "ActsExamples/EventData/Jets.hpp"

#include "Acts/EventData/VectorMultiTrajectory.hpp"
#include "Acts/EventData/VectorTrackContainer.hpp"

namespace ActsPlugins::FastJet {
namespace ActsExamples {
// Initiate a truth jet with 4-momentum
Acts::Vector4 testVec4(10.0, 0.0, 10.0, 14.1421);
TruthJet testJet(testVec4, JetLabel::Unknown);
} // namespace ActsPlugins::FastJet
const Acts::Vector4 testVec4(10.0, 0.0, 10.0, 14.1421);
const TruthJet testJet(testVec4, JetLabel::Unknown);
} // namespace ActsExamples
1 change: 0 additions & 1 deletion Plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# dependencies in the component list.
# independent plugins
add_component_if(ActSVG PluginActSVG ACTS_BUILD_PLUGIN_ACTSVG)
add_component_if(FastJet PluginFastJet ACTS_BUILD_PLUGIN_FASTJET)
add_component_if(FpeMonitoring PluginFpeMonitoring ACTS_BUILD_PLUGIN_FPEMON)
add_component_if(Geant4 PluginGeant4 ACTS_BUILD_PLUGIN_GEANT4)
add_component_if(GeoModel PluginGeoModel ACTS_BUILD_PLUGIN_GEOMODEL)
Expand Down
17 changes: 0 additions & 17 deletions Plugins/FastJet/CMakeLists.txt

This file was deleted.

2 changes: 1 addition & 1 deletion Python/Examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ add_examples_binding_if(Root Acts::ExamplesIoRoot ACTS_BUILD_PLUGIN_ROOT TRUE)
add_examples_binding_if(Svg Acts::ExamplesIoSvg ACTS_BUILD_PLUGIN_ACTSVG TRUE)
add_examples_binding_if(TGeo Acts::ExamplesDetectorTGeo ACTS_BUILD_PLUGIN_ROOT TRUE)
add_examples_binding_if(Traccc "Acts::PluginCovfie;Acts::ExamplesTraccc" ACTS_BUILD_PLUGIN_TRACCC FALSE)
add_examples_binding_if(TruthJet Acts::ExamplesJets ACTS_BUILD_PLUGIN_FASTJET FALSE)
add_examples_binding_if(TruthJet Acts::ExamplesJets ACTS_BUILD_EXAMPLES_FASTJET FALSE)

# Special case for HepMC3 as it a hard dependency
pybind11_add_module(ActsExamplesPythonBindingsHepMC3 src/plugins/HepMC3.cpp)
Expand Down
1 change: 1 addition & 0 deletions Tests/UnitTests/Examples/EventData/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
set(unittest_extra_libraries ActsExamplesFramework)
add_unittest(Measurement MeasurementTests.cpp)
add_unittest(MuonSpacePointId MuonSpacePointIdTests.cpp)
add_unittest(JetsTests JetsTests.cpp)
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@
#include "Acts/EventData/TrackContainer.hpp"
#include "Acts/EventData/VectorMultiTrajectory.hpp"
#include "Acts/EventData/VectorTrackContainer.hpp"
#include "ActsPlugins/FastJet/Jets.hpp"
#include "ActsExamples/EventData/Jets.hpp"

using namespace Acts;
using namespace ActsPlugins;
using namespace ActsExamples;

namespace ActsTests {

BOOST_AUTO_TEST_SUITE(FastJetSuite)

BOOST_AUTO_TEST_CASE(TruthParticleOneJet) {
ActsFatras::Barcode barcode;
ActsPlugins::FastJet::TruthJet jet(Acts::Vector4(100, 0, 0, 100),
ActsPlugins::FastJet::JetLabel::Unknown);
ActsExamples::TruthJet jet(Acts::Vector4(100, 0, 0, 100),
ActsExamples::JetLabel::Unknown);
jet.setConstituents(std::vector<ActsFatras::Barcode>{barcode});
BOOST_CHECK_EQUAL(jet.constituents().size(), 1);
BOOST_CHECK_EQUAL(jet.constituents()[0], barcode);
Expand All @@ -42,8 +42,8 @@ BOOST_AUTO_TEST_CASE(SingleTrackJet) {

std::vector<Acts::AnyConstTrackProxy> constituents{anyConstTrack};

ActsPlugins::FastJet::TrackJet jet(Acts::Vector4(100, 0, 0, 100),
ActsPlugins::FastJet::JetLabel::Unknown);
ActsExamples::TrackJet jet(Acts::Vector4(100, 0, 0, 100),
ActsExamples::JetLabel::Unknown);
std::vector<Acts::AnyConstTrackProxy> jetConstituents;
jetConstituents.push_back(anyConstTrack);
jet.setConstituents(jetConstituents);
Expand Down
1 change: 0 additions & 1 deletion Tests/UnitTests/Plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ add_subdirectory_if(Covfie ACTS_BUILD_PLUGIN_TRACCC)
add_subdirectory_if(DD4hep ACTS_BUILD_PLUGIN_DD4HEP)
add_subdirectory_if(Detray ACTS_BUILD_PLUGIN_TRACCC)
add_subdirectory_if(EDM4hep ACTS_BUILD_PLUGIN_EDM4HEP)
add_subdirectory_if(FastJet ACTS_BUILD_PLUGIN_FASTJET)
add_subdirectory_if(FpeMonitoring ACTS_BUILD_PLUGIN_FPEMON)
add_subdirectory_if(Geant4 ACTS_BUILD_PLUGIN_GEANT4)
add_subdirectory_if(GeoModel ACTS_BUILD_PLUGIN_GEOMODEL)
Expand Down
2 changes: 0 additions & 2 deletions Tests/UnitTests/Plugins/FastJet/CMakeLists.txt

This file was deleted.

1 change: 0 additions & 1 deletion docs/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,6 @@ INPUT = index.md \
../Plugins/DD4hep/include \
../Plugins/Detray/include \
../Plugins/EDM4hep/include \
../Plugins/FastJet/include \
../Plugins/FpeMonitoring/include \
../Plugins/Geant4/include \
../Plugins/GeoModel/include \
Expand Down
2 changes: 0 additions & 2 deletions docs/groups/plugins/fastjet.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/old/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,6 @@ components.
| ACTS_BUILD_PLUGIN_DD4HEP | Build DD4hep plugin<br> type: `bool`, default: `OFF` |
| ACTS_BUILD_PLUGIN_EDM4HEP | Build EDM4hep plugin<br> type: `bool`, default: `OFF` |
| ACTS_BUILD_PLUGIN_FPEMON | Build FPE monitoring plugin<br> type: `bool`, default: `OFF` |
| ACTS_BUILD_PLUGIN_FASTJET | Build FastJet plugin<br> type: `bool`, default: `OFF` |
| ACTS_BUILD_PLUGIN_GEOMODEL | Build GeoModel plugin<br> type: `bool`, default: `OFF` |
| ACTS_BUILD_PLUGIN_TRACCC | Build Traccc plugin<br> type: `bool`, default: `OFF` |
| ACTS_BUILD_PLUGIN_GEANT4 | Build Geant4 plugin<br> type: `bool`, default: `OFF` |
Expand All @@ -295,6 +294,7 @@ components.
| ACTS_BUILD_EXAMPLES_DD4HEP | Build DD4hep-based code in the examples<br> type: `bool`, default: `OFF` |
| ACTS_BUILD_EXAMPLES_EDM4HEP | Build EDM4hep-based code in the examples<br> type: `bool`, default: `OFF` |
| ACTS_BUILD_EXAMPLES_PODIO | Build Podio-based code in the examples<br> type: `bool`, default: `OFF` |
| ACTS_BUILD_EXAMPLES_FASTJET | Build FastJet-based code in the examples<br> type: `bool`, default: `OFF` |
| ACTS_BUILD_EXAMPLES_GNN | Build the GNN example code<br> type: `bool`, default: `OFF` |
| ACTS_BUILD_EXAMPLES_GEANT4 | Build Geant4-based code in the examples<br> type: `bool`, default: `OFF` |
| ACTS_BUILD_EXAMPLES_HASHING | Build Hashing-based code in the examples<br> type: `bool`, default: `OFF` |
Expand Down
Loading
Loading