Skip to content

Commit

Permalink
Fix a few warnings after the change Association -> Link
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Sep 27, 2024
1 parent d7694a9 commit 81e069d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Tracking/components/PlotTrackHitResiduals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
*/

struct PlotTrackHitDistances final
: k4FWCore::Consumer<void(const edm4hep::SimTrackerHitCollection&, const edm4hep::MCRecoTrackParticleAssociationCollection&)> {
: k4FWCore::Consumer<void(const edm4hep::SimTrackerHitCollection&, const edm4hep::TrackMCParticleLinkCollection&)> {
PlotTrackHitDistances(const std::string& name, ISvcLocator* svcLoc)
: Consumer(
name, svcLoc,
Expand All @@ -38,7 +38,7 @@ 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();
Expand Down
12 changes: 6 additions & 6 deletions Tracking/components/TracksFromGenParticles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*/

struct TracksFromGenParticles final
: k4FWCore::MultiTransformer<std::tuple<edm4hep::TrackCollection, edm4hep::MCRecoTrackParticleAssociationCollection>(const edm4hep::MCParticleCollection&)> {
: k4FWCore::MultiTransformer<std::tuple<edm4hep::TrackCollection, edm4hep::TrackMCParticleLinkCollection>(const edm4hep::MCParticleCollection&)> {
TracksFromGenParticles(const std::string& name, ISvcLocator* svcLoc)
: MultiTransformer(
name, svcLoc,
Expand All @@ -36,10 +36,10 @@ struct TracksFromGenParticles final
KeyValues("OutputMCRecoTrackParticleAssociation", {"TracksFromGenParticlesAssociation"})}) {
}

std::tuple<edm4hep::TrackCollection, edm4hep::MCRecoTrackParticleAssociationCollection> operator()(const edm4hep::MCParticleCollection& genParticleColl) const override {
std::tuple<edm4hep::TrackCollection, edm4hep::TrackMCParticleLinkCollection> 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;
Expand Down Expand Up @@ -76,9 +76,9 @@ std::tuple<edm4hep::TrackCollection, edm4hep::MCRecoTrackParticleAssociationColl
outputTrackCollection.push_back(trackFromGen);

// Building the association between tracks and genParticles
auto MCRecoTrackParticleAssociation = edm4hep::MutableMCRecoTrackParticleAssociation();
MCRecoTrackParticleAssociation.setRec(trackFromGen);
MCRecoTrackParticleAssociation.setSim(genParticle);
auto MCRecoTrackParticleAssociation = MutableTrackMCParticleLink();
MCRecoTrackParticleAssociation.setFrom(trackFromGen);
MCRecoTrackParticleAssociation.setTo(genParticle);
MCRecoTrackParticleAssociationCollection.push_back(MCRecoTrackParticleAssociation);
}
return std::make_tuple(std::move(outputTrackCollection), std::move(MCRecoTrackParticleAssociationCollection));
Expand Down

0 comments on commit 81e069d

Please sign in to comment.