-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the possibility to set edm4hep::utils::ParticleIDMeta
via the IMetadataSvc
#273
base: main
Are you sure you want to change the base?
Conversation
ff46b52
to
baecff1
Compare
I have added a "small" test case that runs similar checks as in the functional algorithm as a standalone application (effectively hard-coding the expected parameter and algorithm names). I have done it in c++ because the PIDHandler is not yet really usable in python (see key4hep/EDM4hep#396). Once the nightly builds have picked up key4hep/EDM4hep#395, CI should also start to pass again (tomorrow). |
edm4hep::utils::ParticleIDMeta
via the IMetadataSvc
edm4hep::utils::ParticleIDMeta
via the IMetadataSvc
b2dc6c8
to
60c885a
Compare
Necessary because there is a new output collection in the functional producer that is used in several places
Since I touched the |
Technically already covered via Gaudi, but this makes it explicit
void operator()(const edm4hep::ParticleIDCollection& pidColl1, const edm4hep::ParticleIDCollection& pidColl2, | ||
const edm4hep::ReconstructedParticleCollection& recos) const { | ||
auto pidHandler = edm4hep::utils::PIDHandler::from(pidColl1, pidColl2); | ||
pidHandler.addMetaInfos(m_pidMeta1, m_pidMeta2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This requires a new version of EDM4hep. Should I go for a version that works with 0.99? Otherwise we need to bump the EDM4hep version, I think. Even if this is only a test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Up to you. But actually 0.99.1 in EDM4hep has the problem that key4hep/EDM4hep#379 is not merged in and this causes issues when trying to build on top of EDM4hep 0.99.1 since it won't find nlohmann_json
, so having a tag with that is probably a good idea regardless.
I'll give this another look and update key4hep/k4MarlinWrapper#216 to use this to see if anything is missing between today and tomorrow. |
|
||
edm4hep::ParticleIDCollection operator()(const edm4hep::ReconstructedParticleCollection& recos) const { | ||
auto pidColl = edm4hep::ParticleIDCollection{}; | ||
for (const auto r : recos) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for (const auto r : recos) { | |
for (const auto& r : recos) { |
return StatusCode::SUCCESS; | ||
} | ||
|
||
edm4hep::ParticleIDCollection operator()(const edm4hep::ReconstructedParticleCollection& recos) const { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
edm4hep::ParticleIDCollection operator()(const edm4hep::ReconstructedParticleCollection& recos) const { | |
edm4hep::ParticleIDCollection operator()(const edm4hep::ReconstructedParticleCollection& recos) const override { |
} | ||
|
||
void operator()(const edm4hep::ParticleIDCollection& pidColl1, const edm4hep::ParticleIDCollection& pidColl2, | ||
const edm4hep::ReconstructedParticleCollection& recos) const { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const edm4hep::ReconstructedParticleCollection& recos) const { | |
const edm4hep::ReconstructedParticleCollection& recos) const override { |
#include <Gaudi/Property.h> | ||
|
||
#include "fmt/format.h" | ||
#include "fmt/ranges.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#include "fmt/ranges.h" |
Only fmt::format
is being used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good related to key4hep/k4MarlinWrapper#216
@@ -30,6 +30,7 @@ find_package(ROOT COMPONENTS RIO Tree REQUIRED) | |||
find_package(Gaudi REQUIRED) | |||
find_package(podio 1.0.1 REQUIRED) | |||
find_package(EDM4HEP 0.99 REQUIRED) | |||
find_package(fmt REQUIRED) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should fmt
be also added to k4FWCoreConfig.cmake.in
(and mentioned in README as a dependency)?
BEGINRELEASENOTES
edm4hep::utils::ParticleIDMeta
with theMetadataSvc
get
andput
that defer to the corresponding utility calls in EDM4hepENDRELEASENOTES
This would be option 1 sketched out in #272