diff --git a/k4EDM4hep2LcioConv/include/k4EDM4hep2LcioConv/k4EDM4hep2LcioConv.ipp b/k4EDM4hep2LcioConv/include/k4EDM4hep2LcioConv/k4EDM4hep2LcioConv.ipp index 7ec024c..e725f48 100644 --- a/k4EDM4hep2LcioConv/include/k4EDM4hep2LcioConv/k4EDM4hep2LcioConv.ipp +++ b/k4EDM4hep2LcioConv/include/k4EDM4hep2LcioConv/k4EDM4hep2LcioConv.ipp @@ -48,6 +48,13 @@ std::unique_ptr convertTracks(const edm4hep::TrackCollect } } + lcio_tr->setNholes(edm_tr.getNholes()); + const auto edmHoleNumbers = edm_tr.getSubdetectorHoleNumbers(); + lcio_tr->subdetectorHoleNumbers().resize(edmHoleNumbers.size()); + for (auto i = 0u; i < edmHoleNumbers.size(); ++i) { + lcio_tr->subdetectorHoleNumbers()[i] = edmHoleNumbers[i]; + } + // Loop over the track states in the track const auto edm_track_states = edm_tr.getTrackStates(); for (const auto& tr_state : edm_track_states) { diff --git a/k4EDM4hep2LcioConv/include/k4EDM4hep2LcioConv/k4Lcio2EDM4hepConv.ipp b/k4EDM4hep2LcioConv/include/k4EDM4hep2LcioConv/k4Lcio2EDM4hepConv.ipp index 6169cfc..289f7f7 100644 --- a/k4EDM4hep2LcioConv/include/k4EDM4hep2LcioConv/k4Lcio2EDM4hepConv.ipp +++ b/k4EDM4hep2LcioConv/include/k4EDM4hep2LcioConv/k4Lcio2EDM4hepConv.ipp @@ -367,16 +367,22 @@ std::vector convertTracks(const std::string& name, EVENT::LCCollec lval.setType(rval->getType()); lval.setChi2(rval->getChi2()); lval.setNdf(rval->getNdf()); + lval.setNholes(rval->getNholes()); auto& dqdx = trackDqdx.getDQdx(); dqdx.value = rval->getdEdx(); dqdx.error = rval->getdEdxError(); - auto subdetectorHitNum = rval->getSubdetectorHitNumbers(); + const auto& subdetectorHitNum = rval->getSubdetectorHitNumbers(); for (auto hitNum : subdetectorHitNum) { lval.addToSubdetectorHitNumbers(hitNum); } - auto& trackStates = rval->getTrackStates(); + const auto& subdetectorHoleNum = rval->getSubdetectorHoleNumbers(); + for (auto holeNum : subdetectorHoleNum) { + lval.addToSubdetectorHoleNumbers(holeNum); + } + + const auto& trackStates = rval->getTrackStates(); for (auto& trackState : trackStates) { lval.addToTrackStates(convertTrackState(trackState)); }