Skip to content
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

Move Associations to Links #197

Merged
merged 2 commits into from
Aug 6, 2024
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
8 changes: 4 additions & 4 deletions test/src/MCRecoLinkChecker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,17 @@ StatusCode MCRecoLinkChecker::execute(const EventContext&) const {
return StatusCode::FAILURE;
}

if (!(relation.getSim() == mc)) {
auto relMC = relation.getSim();
if (!(relation.getTo() == mc)) {
auto relMC = relation.getTo();
error() << "Relation " << i
<< " does not point to the correct MCParticle (expected: " << mc.getObjectID().collectionID << "|"
<< mc.getObjectID().index << ", actual: " << relMC.getObjectID().collectionID << "|"
<< relMC.getObjectID().index << ")" << endmsg;
return StatusCode::FAILURE;
}

if (!(relation.getRec() == reco)) {
auto relRec = relation.getRec();
if (!(relation.getFrom() == reco)) {
auto relRec = relation.getFrom();
error() << "Relation " << i
<< " does not point to the correct RecoParticle (expected: " << reco.getObjectID().collectionID << "|"
<< reco.getObjectID().index << ", actual: " << relRec.getObjectID().collectionID << "|"
Expand Down
6 changes: 3 additions & 3 deletions test/src/MCRecoLinkChecker.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#define K4MARLINWRAPPER_TEST_MCRECOLINKCHECKER_H

#include "edm4hep/MCParticleCollection.h"
#include "edm4hep/MCRecoParticleAssociationCollection.h"
#include "edm4hep/RecoMCParticleLinkCollection.h"
#include "edm4hep/ReconstructedParticleCollection.h"

#include "k4FWCore/DataHandle.h"
Expand All @@ -36,8 +36,8 @@ class MCRecoLinkChecker : public Gaudi::Algorithm {
StatusCode execute(const EventContext&) const;

private:
mutable DataHandle<edm4hep::MCRecoParticleAssociationCollection> m_relationCollHandle{
"MCRecoTruthLinks", Gaudi::DataHandle::Reader, this};
mutable DataHandle<edm4hep::RecoMCParticleLinkCollection> m_relationCollHandle{"MCRecoTruthLinks",
Gaudi::DataHandle::Reader, this};
mutable DataHandle<edm4hep::MCParticleCollection> m_mcCollHandle{"MCParticles", Gaudi::DataHandle::Reader, this};
mutable DataHandle<edm4hep::ReconstructedParticleCollection> m_recoCollHandle{"RecoParticles",
Gaudi::DataHandle::Reader, this};
Expand Down
Loading