Skip to content

Commit

Permalink
Add conversion of Nholes and subdetectorHoleNumbers
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadlener committed Sep 5, 2024
1 parent a7f022d commit 08b3e11
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ std::unique_ptr<lcio::LCCollectionVec> 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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -367,16 +367,22 @@ std::vector<CollNamePair> 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));
}
Expand Down

0 comments on commit 08b3e11

Please sign in to comment.