Skip to content

Commit

Permalink
Move Associations to Links
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Aug 6, 2024
1 parent fef47b2 commit bb8f2a9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
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
4 changes: 2 additions & 2 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,7 +36,7 @@ class MCRecoLinkChecker : public Gaudi::Algorithm {
StatusCode execute(const EventContext&) const;

private:
mutable DataHandle<edm4hep::MCRecoParticleAssociationCollection> m_relationCollHandle{
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",
Expand Down

0 comments on commit bb8f2a9

Please sign in to comment.