diff --git a/k4EDM4hep2LcioConv/include/k4EDM4hep2LcioConv/k4EDM4hep2LcioConv.ipp b/k4EDM4hep2LcioConv/include/k4EDM4hep2LcioConv/k4EDM4hep2LcioConv.ipp index 2b63f163..20abcf5b 100644 --- a/k4EDM4hep2LcioConv/include/k4EDM4hep2LcioConv/k4EDM4hep2LcioConv.ipp +++ b/k4EDM4hep2LcioConv/include/k4EDM4hep2LcioConv/k4EDM4hep2LcioConv.ipp @@ -672,10 +672,9 @@ namespace EDM4hep2LCIOConv { lcio_mcp->setEndpoint(endpoint); double momentum[3] = {edm_mcp.getMomentum()[0], edm_mcp.getMomentum()[1], edm_mcp.getMomentum()[2]}; lcio_mcp->setMomentum(momentum); - float momentumEndpoint[3] = { + double momentumEndpoint[3] = { edm_mcp.getMomentumAtEndpoint()[0], edm_mcp.getMomentumAtEndpoint()[1], edm_mcp.getMomentumAtEndpoint()[2]}; lcio_mcp->setMomentumAtEndpoint(momentumEndpoint); -#warning "double to float" lcio_mcp->setMass(edm_mcp.getMass()); lcio_mcp->setCharge(edm_mcp.getCharge()); float spin[3] = {edm_mcp.getSpin()[0], edm_mcp.getSpin()[1], edm_mcp.getSpin()[2]}; diff --git a/k4EDM4hep2LcioConv/include/k4EDM4hep2LcioConv/k4Lcio2EDM4hepConv.ipp b/k4EDM4hep2LcioConv/include/k4EDM4hep2LcioConv/k4Lcio2EDM4hepConv.ipp index 4b1e5914..1b7cd9fa 100644 --- a/k4EDM4hep2LcioConv/include/k4EDM4hep2LcioConv/k4Lcio2EDM4hepConv.ipp +++ b/k4EDM4hep2LcioConv/include/k4EDM4hep2LcioConv/k4Lcio2EDM4hepConv.ipp @@ -100,8 +100,8 @@ namespace LCIO2EDM4hepConv { lval.setColorFlow(edm4hep::Vector2i(rval->getColorFlow())); lval.setVertex(edm4hep::Vector3d(rval->getVertex())); lval.setEndpoint(edm4hep::Vector3d(rval->getEndpoint())); - lval.setMomentum(Vector3fFrom(rval->getMomentum())); - lval.setMomentumAtEndpoint(Vector3fFrom(rval->getMomentumAtEndpoint())); + lval.setMomentum(rval->getMomentum()); + lval.setMomentumAtEndpoint(rval->getMomentumAtEndpoint()); const auto [iterator, inserted] = k4EDM4hep2LcioConv::detail::mapInsert(rval, lval, mcparticlesMap); if (!inserted) { diff --git a/standalone/lcio2edm4hep.cpp b/standalone/lcio2edm4hep.cpp index cd2136d7..4933752f 100644 --- a/standalone/lcio2edm4hep.cpp +++ b/standalone/lcio2edm4hep.cpp @@ -4,7 +4,15 @@ #include #include +#include "podio/podioVersion.h" +#if PODIO_BUILD_VERSION >= PODIO_VERSION(0, 99, 0) +#include "podio/ROOTWriter.h" +#else #include "podio/ROOTFrameWriter.h" +namespace podio { + using ROOTWriter = podio::ROOTFrameWriter; +} +#endif #include #include @@ -156,7 +164,7 @@ int main(int argc, char* argv[]) std::cout << "Number of events in file: " << lcreader->getNumberOfEvents() << '\n'; std::cout << "Number of runs in file: " << lcreader->getNumberOfRuns() << '\n'; - podio::ROOTFrameWriter writer(args.outputFile); + podio::ROOTWriter writer(args.outputFile); for (auto j = 0u; j < lcreader->getNumberOfRuns(); ++j) { if (j % 1 == 0) {