diff --git a/k4EDM4hep2LcioConv/include/k4EDM4hep2LcioConv/k4EDM4hep2LcioConv.ipp b/k4EDM4hep2LcioConv/include/k4EDM4hep2LcioConv/k4EDM4hep2LcioConv.ipp index 6d59485..a95eb72 100644 --- a/k4EDM4hep2LcioConv/include/k4EDM4hep2LcioConv/k4EDM4hep2LcioConv.ipp +++ b/k4EDM4hep2LcioConv/include/k4EDM4hep2LcioConv/k4EDM4hep2LcioConv.ipp @@ -420,7 +420,7 @@ std::unique_ptr convertVertices(const edm4hep::VertexColl for (const auto& edm_vertex : (*edmCollection)) { if (edm_vertex.isAvailable()) { auto* lcio_vertex = new lcio::VertexImpl(); - lcio_vertex->setPrimary(edm_vertex.getPrimary()); + lcio_vertex->setPrimary(edm_vertex.isPrimary()); lcio_vertex->setAlgorithmType(std::to_string(edm_vertex.getAlgorithmType())); lcio_vertex->setChi2(edm_vertex.getChi2()); lcio_vertex->setProbability(TMath::Prob(edm_vertex.getChi2(), edm_vertex.getNdf())); diff --git a/tests/src/CompareEDM4hepLCIO.cc b/tests/src/CompareEDM4hepLCIO.cc index 4279df6..c703edc 100644 --- a/tests/src/CompareEDM4hepLCIO.cc +++ b/tests/src/CompareEDM4hepLCIO.cc @@ -416,8 +416,7 @@ bool compare(const lcio::LCCollection* lcioCollection, const edm4hep::TrackerHit // ================= Vertex ================ bool compare(const EVENT::Vertex* lcioElem, const edm4hep::Vertex& edm4hepElem, const ObjectMappings& objectMaps) { - // LCIO has isPrimary (bool), EDM4hep has getPrimary (int32_t) - ASSERT_COMPARE_VALS(lcioElem->isPrimary(), edm4hepElem.getPrimary(), "primary in Vertex"); + ASSERT_COMPARE(lcioElem, edm4hepElem, isPrimary, "primary in Vertex"); ASSERT_COMPARE(lcioElem, edm4hepElem, getChi2, "chi2 in Vertex"); ASSERT_COMPARE_VALS_FLOAT(lcioElem->getProbability(), TMath::Prob(edm4hepElem.getChi2(), edm4hepElem.getNdf()), 1e-6, "probability in Vertex");