Skip to content

Commit

Permalink
Change Associations to Links (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell authored Aug 9, 2024
1 parent 2a75b5a commit a9433e1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions k4Reco/DDPlanarDigi/components/DDPlanarDigi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ StatusCode DDPlanarDigi::initialize() {
return StatusCode::SUCCESS;
}

std::tuple<edm4hep::TrackerHitPlaneCollection, edm4hep::MCRecoTrackerAssociationCollection> DDPlanarDigi::operator()(
std::tuple<edm4hep::TrackerHitPlaneCollection, edm4hep::TrackerHitSimTrackerHitLinkCollection> DDPlanarDigi::operator()(
const edm4hep::SimTrackerHitCollection& simTrackerHits, const edm4hep::EventHeaderCollection& headers) const {
auto seed = m_uidSvc->getUniqueID(headers[0].getEventNumber(), headers[0].getRunNumber(), this->name());
debug() << "Using seed " << seed << " for event " << headers[0].getEventNumber() << " and run "
Expand All @@ -96,7 +96,7 @@ std::tuple<edm4hep::TrackerHitPlaneCollection, edm4hep::MCRecoTrackerAssociation
int nDismissedHits = 0;

auto trkhitVec = edm4hep::TrackerHitPlaneCollection();
auto thsthcol = edm4hep::MCRecoTrackerAssociationCollection();
auto thsthcol = edm4hep::TrackerHitSimTrackerHitLinkCollection();

std::string cellIDEncodingString = m_geoSvc->constantAsString(m_encodingStringVariable.value());
dd4hep::DDSegmentation::BitFieldCoder bitFieldCoder(cellIDEncodingString);
Expand Down Expand Up @@ -295,8 +295,8 @@ std::tuple<edm4hep::TrackerHitPlaneCollection, edm4hep::MCRecoTrackerAssociation
}

auto association = thsthcol.create();
association.setSim(hit);
association.setRec(trkHit);
association.setTo(hit);
association.setFrom(trkHit);

++nCreatedHits;
}
Expand Down
6 changes: 3 additions & 3 deletions k4Reco/DDPlanarDigi/components/DDPlanarDigi.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
#include "Gaudi/Property.h"

#include "edm4hep/EventHeaderCollection.h"
#include "edm4hep/MCRecoTrackerAssociationCollection.h"
#include "edm4hep/SimTrackerHitCollection.h"
#include "edm4hep/TrackerHitPlaneCollection.h"
#include "edm4hep/TrackerHitSimTrackerHitLinkCollection.h"

#include "k4FWCore/Transformer.h"
#include "k4Interface/IGeoSvc.h"
Expand Down Expand Up @@ -72,13 +72,13 @@ enum { hu = 0, hv, hT, hitE, hitsAccepted, diffu, diffv, diffT, hSize };

struct DDPlanarDigi final
: k4FWCore::MultiTransformer<
std::tuple<edm4hep::TrackerHitPlaneCollection, edm4hep::MCRecoTrackerAssociationCollection>(
std::tuple<edm4hep::TrackerHitPlaneCollection, edm4hep::TrackerHitSimTrackerHitLinkCollection>(
const edm4hep::SimTrackerHitCollection&, const edm4hep::EventHeaderCollection&)> {
DDPlanarDigi(const std::string& name, ISvcLocator* svcLoc);

StatusCode initialize() override;

std::tuple<edm4hep::TrackerHitPlaneCollection, edm4hep::MCRecoTrackerAssociationCollection> operator()(
std::tuple<edm4hep::TrackerHitPlaneCollection, edm4hep::TrackerHitSimTrackerHitLinkCollection> operator()(
const edm4hep::SimTrackerHitCollection& simTrackerHits,
const edm4hep::EventHeaderCollection& headers) const override;

Expand Down

0 comments on commit a9433e1

Please sign in to comment.