diff --git a/Tracking/components/PlotTrackHitResiduals.cpp b/Tracking/components/PlotTrackHitResiduals.cpp index a9626e8..ea12224 100644 --- a/Tracking/components/PlotTrackHitResiduals.cpp +++ b/Tracking/components/PlotTrackHitResiduals.cpp @@ -6,7 +6,7 @@ // edm4hep #include "edm4hep/MCParticleCollection.h" #include "edm4hep/TrackCollection.h" -#include "edm4hep/MCRecoTrackParticleAssociationCollection.h" +#include "edm4hep/TrackMCParticleLinkCollection.h" #include "edm4hep/SimTrackerHitCollection.h" // marlin @@ -40,7 +40,7 @@ namespace Gaudi::Accumulators { */ struct PlotTrackHitDistances final - : k4FWCore::Consumer { + : k4FWCore::Consumer { PlotTrackHitDistances(const std::string& name, ISvcLocator* svcLoc) : Consumer( name, svcLoc, @@ -49,11 +49,11 @@ struct PlotTrackHitDistances final KeyValues("InputTracksFromGenParticlesAssociation", {"TracksFromGenParticlesAssociation"}), }) {} - void operator()(const edm4hep::SimTrackerHitCollection& simTrackerHits, const edm4hep::MCRecoTrackParticleAssociationCollection& trackParticleAssociations) const override { + void operator()(const edm4hep::SimTrackerHitCollection& simTrackerHits, const edm4hep::TrackMCParticleLinkCollection& trackParticleAssociations) const override { for (const auto& trackParticleAssociation : trackParticleAssociations) { - auto genParticle = trackParticleAssociation.getSim(); - auto track = trackParticleAssociation.getRec(); + auto genParticle = trackParticleAssociation.getTo(); + auto track = trackParticleAssociation.getFrom(); edm4hep::TrackState trackStateAtIP; bool found_trackStateAtIP = false; for (const auto& trackState : track.getTrackStates()) { diff --git a/Tracking/components/TracksFromGenParticles.cpp b/Tracking/components/TracksFromGenParticles.cpp index af03cb8..dab2af0 100644 --- a/Tracking/components/TracksFromGenParticles.cpp +++ b/Tracking/components/TracksFromGenParticles.cpp @@ -3,7 +3,7 @@ // edm4hep #include "edm4hep/MCParticleCollection.h" #include "edm4hep/TrackCollection.h" -#include "edm4hep/MCRecoTrackParticleAssociationCollection.h" +#include "edm4hep/TrackMCParticleLinkCollection.h" // marlin #include @@ -27,7 +27,7 @@ */ struct TracksFromGenParticles final - : k4FWCore::MultiTransformer(const edm4hep::MCParticleCollection&)> { + : k4FWCore::MultiTransformer(const edm4hep::MCParticleCollection&)> { TracksFromGenParticles(const std::string& name, ISvcLocator* svcLoc) : MultiTransformer( name, svcLoc, @@ -36,10 +36,10 @@ struct TracksFromGenParticles final KeyValues("OutputMCRecoTrackParticleAssociation", {"TracksFromGenParticlesAssociation"})}) { } -std::tuple operator()(const edm4hep::MCParticleCollection& genParticleColl) const override { +std::tuple operator()(const edm4hep::MCParticleCollection& genParticleColl) const override { auto outputTrackCollection = edm4hep::TrackCollection(); - auto MCRecoTrackParticleAssociationCollection = edm4hep::MCRecoTrackParticleAssociationCollection(); + auto MCRecoTrackParticleAssociationCollection = edm4hep::TrackMCParticleLinkCollection(); for (const auto& genParticle : genParticleColl) { debug() << "Particle decayed in tracker: " << genParticle.isDecayedInTracker() << endmsg; @@ -76,9 +76,9 @@ std::tuple