From c6bf856d4c8e197d8a3e1c313bfa4105cc52a52c Mon Sep 17 00:00:00 2001
From: lintao <lintao51@gmail.com>
Date: Mon, 11 May 2020 09:40:53 +0800
Subject: [PATCH] WIP: migrate from plcio to edm4hep.

---
 Examples/options/tut_detsim.py                |  3 +-
 Generator/CMakeLists.txt                      |  2 ++
 Generator/src/GenAlgo.cpp                     |  2 +-
 Generator/src/GenAlgo.h                       |  2 +-
 Generator/src/GenEvent.cpp                    |  8 ++---
 Generator/src/GenEvent.h                      | 12 +++----
 Generator/src/GtGunTool.cpp                   |  4 +--
 Generator/src/HepMCRdr.cpp                    | 32 +++++++++----------
 Generator/src/SLCIORdr.cpp                    | 24 +++++++-------
 Generator/src/StdHepRdr.cpp                   | 20 ++++++------
 Simulation/DetSimAna/CMakeLists.txt           |  3 ++
 Simulation/DetSimCore/CMakeLists.txt          |  2 ++
 .../DetSimCore/src/G4PrimaryCnvTool.cpp       |  4 +--
 Simulation/DetSimCore/src/G4PrimaryCnvTool.h  |  6 ++--
 14 files changed, 63 insertions(+), 61 deletions(-)

diff --git a/Examples/options/tut_detsim.py b/Examples/options/tut_detsim.py
index 2ecb5e3f..67502927 100644
--- a/Examples/options/tut_detsim.py
+++ b/Examples/options/tut_detsim.py
@@ -107,7 +107,8 @@ detsimalg.RunCmds = [
 ]
 detsimalg.AnaElems = [
     # example_anatool.name()
-    "ExampleAnaElemTool"
+    # "ExampleAnaElemTool"
+    "Edm4hepWriterAnaElemTool"
 ]
 detsimalg.RootDetElem = "WorldDetElemTool"
 
diff --git a/Generator/CMakeLists.txt b/Generator/CMakeLists.txt
index f1c10a13..d01b06e0 100644
--- a/Generator/CMakeLists.txt
+++ b/Generator/CMakeLists.txt
@@ -22,6 +22,7 @@ find_package(ROOT COMPONENTS RIO Tree TreePlayer MathCore Net Graf3d Graf Gpad E
 find_package(LCIO)
 find_package(podio)
 find_package(plcio)
+find_package(EDM4HEP)
 find_package(HepMC)
 find_package(CLHEP)
 if(ROOT_FOUND)
@@ -66,6 +67,7 @@ gaudi_add_module(GenAlgo ${GenAlgo_srcs}
     HepMC
     CLHEP
   #   Geant4
+    EDM4HEP::edm4hep
   )
 #gaudi_add_test(Reader FRAMEWORK options/read.py)
 
diff --git a/Generator/src/GenAlgo.cpp b/Generator/src/GenAlgo.cpp
index 74c2db30..58f9d4e8 100644
--- a/Generator/src/GenAlgo.cpp
+++ b/Generator/src/GenAlgo.cpp
@@ -5,7 +5,7 @@
 #include "GaudiKernel/GaudiException.h"
 
 
-#include "plcio/MCParticleCollection.h"//plico
+#include "edm4hep/MCParticleCollection.h"//plico
 
 #include <iostream>
 #include <vector>
diff --git a/Generator/src/GenAlgo.h b/Generator/src/GenAlgo.h
index 44c478a0..47745aef 100644
--- a/Generator/src/GenAlgo.h
+++ b/Generator/src/GenAlgo.h
@@ -42,7 +42,7 @@ private:
     int m_evtid;                               
     int m_evtMax;
     //MyHepMC::GenEvent m_event;
-    DataHandle<plcio::MCParticleCollection> m_hdl{"MCParticle", Gaudi::DataHandle::Writer, this};
+    DataHandle<edm4hep::MCParticleCollection> m_hdl{"MCParticle", Gaudi::DataHandle::Writer, this};
 
 
 };
diff --git a/Generator/src/GenEvent.cpp b/Generator/src/GenEvent.cpp
index 1cd5ccb3..3e40c65b 100644
--- a/Generator/src/GenEvent.cpp
+++ b/Generator/src/GenEvent.cpp
@@ -1,12 +1,12 @@
 #include "GenEvent.h" 
-#include "plcio/MCParticleCollection.h"//plico
+#include "edm4hep/MCParticleCollection.h"//plico
 
 using namespace std;
 
 namespace MyHepMC{
 
 //GenEvent::GenEvent(){
-GenEvent::GenEvent(plcio::MCParticleCollection& mcCol)
+GenEvent::GenEvent(edm4hep::MCParticleCollection& mcCol)
     : m_mc_vec(mcCol){
 
     m_event_id=-1;
@@ -24,11 +24,11 @@ void GenEvent::SetEventHeader(long event_id_, long run_id_, float time_, string
     m_det_name = det_name_;
 }
 /*
-void GenEvent::SetMCCollection(plcio::MCParticleCollection vec_){
+void GenEvent::SetMCCollection(edm4hep::MCParticleCollection vec_){
 m_mc_vec = vec_;
 }
 */
-plcio::MCParticleCollection GenEvent::getMCVec(){
+edm4hep::MCParticleCollection GenEvent::getMCVec(){
 return m_mc_vec;
 }
 
diff --git a/Generator/src/GenEvent.h b/Generator/src/GenEvent.h
index dae1b377..72895413 100644
--- a/Generator/src/GenEvent.h
+++ b/Generator/src/GenEvent.h
@@ -1,25 +1,25 @@
 #ifndef GenEvent_h 
 #define GenEvent_h 1
 
-#include "plcio/MCParticleCollection.h"//plico
+#include "edm4hep/MCParticleCollection.h"//plico
 
 namespace MyHepMC {
 
 class GenEvent{
     public: 
         //GenEvent();
-        GenEvent(plcio::MCParticleCollection& mcCol);
+        GenEvent(edm4hep::MCParticleCollection& mcCol);
         ~GenEvent();
         void SetEventHeader(long event_id_, long run_id_, float time_, std::string det_name_);
-        //void SetMCCollection(plcio::MCParticleCollection vec_);
+        //void SetMCCollection(edm4hep::MCParticleCollection vec_);
         long getID();
         long getRun();
         long getTime();
         void ReSet();
         std::string getName();
-        plcio::MCParticleCollection getMCVec();
-        plcio::MCParticleCollection& m_mc_vec;
-        //plcio::MCParticleCollection m_mc_vec;
+        edm4hep::MCParticleCollection getMCVec();
+        edm4hep::MCParticleCollection& m_mc_vec;
+        //edm4hep::MCParticleCollection m_mc_vec;
     private:
         long m_event_id;
         long m_run_id;
diff --git a/Generator/src/GtGunTool.cpp b/Generator/src/GtGunTool.cpp
index a8f65da3..7a6a8a64 100644
--- a/Generator/src/GtGunTool.cpp
+++ b/Generator/src/GtGunTool.cpp
@@ -81,7 +81,7 @@ GtGunTool::mutate(MyHepMC::GenEvent& event) {
         double energy = m_energies.value()[i];
 
         // create the MC particle
-        plcio::MCParticle mcp = event.m_mc_vec.create();
+        edm4hep::MCParticle mcp = event.m_mc_vec.create();
         mcp.setPDG(pdgcode);
         mcp.setGeneratorStatus(1);
         mcp.setSimulatorStatus(1);
@@ -134,7 +134,7 @@ GtGunTool::mutate(MyHepMC::GenEvent& event) {
         double py = p*sintheta*sin(phi);
         double pz = p*costheta;
 
-        mcp.setMomentum(plcio::FloatThree(px,py,pz));
+        mcp.setMomentum(edm4hep::Vector3f(px,py,pz));
         // mcp.setMomentumAtEndpoint();
         // mcp.setSpin();
         // mcp.setColorFlow();
diff --git a/Generator/src/HepMCRdr.cpp b/Generator/src/HepMCRdr.cpp
index b8c81809..491e0b47 100644
--- a/Generator/src/HepMCRdr.cpp
+++ b/Generator/src/HepMCRdr.cpp
@@ -7,12 +7,10 @@
 #include "HepMC/Polarization.h"
 
 
-#include "plcio/MCParticle.h" //plcio
-#include "plcio/MCParticleObj.h"
-#include "plcio/MCParticleCollection.h"
-#include "plcio/DoubleThree.h"
-#include "plcio/FloatThree.h"
-#include "plcio/EventHeaderCollection.h"
+#include "edm4hep/MCParticle.h" //edm4hep
+#include "edm4hep/MCParticleObj.h"
+#include "edm4hep/MCParticleCollection.h"
+#include "edm4hep/EventHeaderCollection.h"
 
 
 
@@ -21,7 +19,7 @@
 #include <fstream>
 
 
-using namespace plcio;
+using namespace edm4hep;
 using namespace std;
 
 DECLARE_COMPONENT(HepMCRdr)
@@ -41,7 +39,7 @@ bool HepMCRdr::mutate(MyHepMC::GenEvent& event){
     int index = 0 ;
     for ( HepMC::GenEvent::particle_iterator p = evt->particles_begin(); p != evt->particles_end(); ++p ) {
         //std::cout<<"start mc "<<index<<std::endl;
-        plcio::MCParticle mcp = event.m_mc_vec.create();
+        edm4hep::MCParticle mcp = event.m_mc_vec.create();
         pmcid_lmcid.insert(std::pair<int, int>((*p)->barcode(),index));
         index++;
         //std::cout<<"map<id,i>:"<<mc->id()<<","<< i <<std::endl;
@@ -55,26 +53,26 @@ bool HepMCRdr::mutate(MyHepMC::GenEvent& event){
         if ( (*p)->production_vertex() ){
             HepMC::GenVertex* vertex_pro =  (*p)->production_vertex();
             double three[3] = {vertex_pro->point3d().x(), vertex_pro->point3d().y(), vertex_pro->point3d().z()};
-            mcp.setVertex             (plcio::DoubleThree (three)); 
+            mcp.setVertex             (edm4hep::Vector3d (three)); 
         }
-        else mcp.setVertex(plcio::DoubleThree()); 
+        else mcp.setVertex(edm4hep::Vector3d()); 
         if ( (*p)->end_vertex() ){
             HepMC::GenVertex* vertex_end =  (*p)->end_vertex();
             double three[3] = {vertex_end->point3d().x(), vertex_end->point3d().y(), vertex_end->point3d().z()};
-            mcp.setEndpoint           (plcio::DoubleThree (three));
+            mcp.setEndpoint           (edm4hep::Vector3d (three));
         } 
-        else mcp.setEndpoint (plcio::DoubleThree());
-        mcp.setMomentum           (plcio::FloatThree(float((*p)->momentum().px()), float((*p)->momentum().py()), float((*p)->momentum().pz()) ));
-        mcp.setMomentumAtEndpoint (plcio::FloatThree(float((*p)->momentum().px()), float((*p)->momentum().py()), float((*p)->momentum().pz()) ));
+        else mcp.setEndpoint (edm4hep::Vector3d());
+        mcp.setMomentum           (edm4hep::Vector3f(float((*p)->momentum().px()), float((*p)->momentum().py()), float((*p)->momentum().pz()) ));
+        mcp.setMomentumAtEndpoint (edm4hep::Vector3f(float((*p)->momentum().px()), float((*p)->momentum().py()), float((*p)->momentum().pz()) ));
         const HepMC::Polarization & polar = (*p)->polarization();
-        mcp.setSpin               (plcio::FloatThree(polar.normal3d().x(), polar.normal3d().y(), polar.normal3d().z()) );
+        mcp.setSpin               (edm4hep::Vector3f(polar.normal3d().x(), polar.normal3d().y(), polar.normal3d().z()) );
         int two[2] = {1, (*p)->flow(1)};
-        mcp.setColorFlow          (plcio::IntTwo (two) );
+        mcp.setColorFlow          (edm4hep::Vector2i (two) );
     }
     // second loop for setting parents and daughters
     index = 0 ;
     for ( HepMC::GenEvent::particle_iterator p = evt->particles_begin(); p != evt->particles_end(); ++p ) {
-        plcio::MCParticle pmc = event.m_mc_vec.at(index);
+        edm4hep::MCParticle pmc = event.m_mc_vec.at(index);
         index++;
         if ( (*p)->production_vertex() ) {
             for ( HepMC::GenVertex::particle_iterator mother = (*p)->production_vertex()-> particles_begin(HepMC::parents); mother != (*p)->production_vertex()-> particles_end(HepMC::parents); ++mother ) {
diff --git a/Generator/src/SLCIORdr.cpp b/Generator/src/SLCIORdr.cpp
index 9db71153..13bd39ed 100644
--- a/Generator/src/SLCIORdr.cpp
+++ b/Generator/src/SLCIORdr.cpp
@@ -12,12 +12,10 @@
 #include "IMPL/LCCollectionVec.h"
 
 
-#include "plcio/MCParticle.h" //plcio
-#include "plcio/MCParticleObj.h"
-#include "plcio/MCParticleCollection.h"
-#include "plcio/DoubleThree.h"
-#include "plcio/FloatThree.h"
-#include "plcio/EventHeaderCollection.h"
+#include "edm4hep/MCParticle.h" //edm4hep
+#include "edm4hep/MCParticleObj.h"
+#include "edm4hep/MCParticleCollection.h"
+#include "edm4hep/EventHeaderCollection.h"
 
 
 
@@ -28,7 +26,7 @@
 
 using namespace lcio;
 using namespace IMPL;
-using namespace plcio;
+using namespace edm4hep;
 using namespace std;
 
 DECLARE_COMPONENT(SLCIORdr)
@@ -75,7 +73,7 @@ bool SLCIORdr::mutate(MyHepMC::GenEvent& event){
 	    for(i=0;i<NHEP;i++){
 	      if(p==lcCol->getElementAt(i)) break;
 	    }
-	    if(i==NHEP) cout << "HepLCIOInterfaceNew: error" << endl;
+	    if(i==NHEP) cout << "Heedm4hepInterfaceNew: error" << endl;
 	    mcp->addParent(dynamic_cast<MCParticleImpl*>(lcMCVec->getElementAt(i)));
 	  }
 	  //ignore daughter table, auto-regonize relationship while addParent()
@@ -88,7 +86,7 @@ bool SLCIORdr::mutate(MyHepMC::GenEvent& event){
             for(i=0;i<NHEP;i++){
               if(d==lcCol->getElementAt(i)) break;
             }
-            if(i==NHEP) cout << "HepLCIOInterfaceNew: error" << endl;
+            if(i==NHEP) cout << "Heedm4hepInterfaceNew: error" << endl;
             mcp->addDaughter(dynamic_cast<MCParticleImpl*>(lcMCVec->getElementAt(i)));
           }
           */
@@ -108,7 +106,7 @@ bool SLCIORdr::mutate(MyHepMC::GenEvent& event){
     for (int i=0; i < n_mc; i++){
         MCParticleImpl* mc = (MCParticleImpl*) lcMCVec->getElementAt(i);
         //std::cout<<"At mc :"<< i <<std::endl;
-        plcio::MCParticle mcp = event.m_mc_vec.create();
+        edm4hep::MCParticle mcp = event.m_mc_vec.create();
         pmcid_lmcid.insert(std::pair<int, int>(mc->id(),i));
         //std::cout<<"map<id,i>:"<<mc->id()<<","<< i <<std::endl;
                                  
@@ -120,8 +118,8 @@ bool SLCIORdr::mutate(MyHepMC::GenEvent& event){
         mcp.setMass               (mc->getMass());
         mcp.setVertex             (mc->getVertex()); 
         mcp.setEndpoint           (mc->getEndpoint());
-        mcp.setMomentum           (FloatThree(float(mc->getMomentum()[0]), float(mc->getMomentum()[1]), float(mc->getMomentum()[2]) ));
-        mcp.setMomentumAtEndpoint (FloatThree(float(mc->getMomentumAtEndpoint()[0]), float(mc->getMomentumAtEndpoint()[1]), float(mc->getMomentumAtEndpoint()[2]) ));
+        mcp.setMomentum           (Vector3f(float(mc->getMomentum()[0]), float(mc->getMomentum()[1]), float(mc->getMomentum()[2]) ));
+        mcp.setMomentumAtEndpoint (Vector3f(float(mc->getMomentumAtEndpoint()[0]), float(mc->getMomentumAtEndpoint()[1]), float(mc->getMomentumAtEndpoint()[2]) ));
         mcp.setSpin               (mc->getSpin());
         mcp.setColorFlow          (mc->getColorFlow());
     }
@@ -131,7 +129,7 @@ bool SLCIORdr::mutate(MyHepMC::GenEvent& event){
         MCParticleImpl* mc = (MCParticleImpl*) lcMCVec->getElementAt(i);
         const MCParticleVec & mc_parents = mc->getParents();
         const MCParticleVec & mc_daughters = mc->getDaughters();
-        plcio::MCParticle pmc = event.m_mc_vec.at(i);
+        edm4hep::MCParticle pmc = event.m_mc_vec.at(i);
         //std::cout<<"mc at "<< i<<", parent size "<<mc_parents.size() <<std::endl;
         for(unsigned int j=0; j< mc_parents.size(); j++){int p_id = mc_parents.at(j)->id();
                                                  //std::cout<<"parent id "<<p_id<<std::endl;
diff --git a/Generator/src/StdHepRdr.cpp b/Generator/src/StdHepRdr.cpp
index b81abb05..3bc1412f 100644
--- a/Generator/src/StdHepRdr.cpp
+++ b/Generator/src/StdHepRdr.cpp
@@ -7,12 +7,10 @@
 #include "IMPL/MCParticleImpl.h"
 
 
-#include "plcio/MCParticle.h" //plcio
-#include "plcio/MCParticleObj.h"
-#include "plcio/MCParticleCollection.h"
-#include "plcio/DoubleThree.h"
-#include "plcio/FloatThree.h"
-#include "plcio/EventHeaderCollection.h"
+#include "edm4hep/MCParticle.h" //edm4hep
+#include "edm4hep/MCParticleObj.h"
+#include "edm4hep/MCParticleCollection.h"
+#include "edm4hep/EventHeaderCollection.h"
 
 
 
@@ -23,7 +21,7 @@
 
 using namespace lcio;
 using namespace IMPL;
-using namespace plcio;
+using namespace edm4hep;
 using namespace std;
 
 DECLARE_COMPONENT(StdHepRdr)
@@ -42,7 +40,7 @@ bool StdHepRdr::mutate(MyHepMC::GenEvent& event){
     for (int i=0; i < n_mc; i++){
         MCParticleImpl* mc = (MCParticleImpl*) mc_vec->getElementAt(i);
         //std::cout<<"At mc :"<< i <<std::endl;
-        plcio::MCParticle mcp = event.m_mc_vec.create();
+        edm4hep::MCParticle mcp = event.m_mc_vec.create();
         pmcid_lmcid.insert(std::pair<int, int>(mc->id(),i));
         //std::cout<<"map<id,i>:"<<mc->id()<<","<< i <<std::endl;
                                  
@@ -54,8 +52,8 @@ bool StdHepRdr::mutate(MyHepMC::GenEvent& event){
         mcp.setMass               (mc->getMass());
         mcp.setVertex             (mc->getVertex()); 
         mcp.setEndpoint           (mc->getEndpoint());
-        mcp.setMomentum           (FloatThree(float(mc->getMomentum()[0]), float(mc->getMomentum()[1]), float(mc->getMomentum()[2]) ));
-        mcp.setMomentumAtEndpoint (FloatThree(float(mc->getMomentumAtEndpoint()[0]), float(mc->getMomentumAtEndpoint()[1]), float(mc->getMomentumAtEndpoint()[2]) ));
+        mcp.setMomentum           (Vector3f(float(mc->getMomentum()[0]), float(mc->getMomentum()[1]), float(mc->getMomentum()[2]) ));
+        mcp.setMomentumAtEndpoint (Vector3f(float(mc->getMomentumAtEndpoint()[0]), float(mc->getMomentumAtEndpoint()[1]), float(mc->getMomentumAtEndpoint()[2]) ));
         mcp.setSpin               (mc->getSpin());
         mcp.setColorFlow          (mc->getColorFlow());
     }
@@ -65,7 +63,7 @@ bool StdHepRdr::mutate(MyHepMC::GenEvent& event){
         MCParticleImpl* mc = (MCParticleImpl*) mc_vec->getElementAt(i);
         const MCParticleVec & mc_parents = mc->getParents();
         const MCParticleVec & mc_daughters = mc->getDaughters();
-        plcio::MCParticle pmc = event.m_mc_vec.at(i);
+        edm4hep::MCParticle pmc = event.m_mc_vec.at(i);
         //std::cout<<"mc at "<< i<<", parent size "<<mc_parents.size() <<std::endl;
         for(unsigned int j=0; j< mc_parents.size(); j++){int p_id = mc_parents.at(j)->id();
                                                  //std::cout<<"parent id "<<p_id<<std::endl;
diff --git a/Simulation/DetSimAna/CMakeLists.txt b/Simulation/DetSimAna/CMakeLists.txt
index f1f36142..4ab78a91 100644
--- a/Simulation/DetSimAna/CMakeLists.txt
+++ b/Simulation/DetSimAna/CMakeLists.txt
@@ -13,10 +13,12 @@ find_package(DD4hep COMPONENTS DDG4 REQUIRED)
 # For EDM & I/O
 find_package(podio REQUIRED)
 find_package(plcio REQUIRED)
+find_package(EDM4HEP REQUIRED)
 # find_package(LCIO REQUIRED)
 
 set(DetSimAna_srcs
     src/ExampleAnaElemTool.cpp
+    src/Edm4hepWriterAnaElemTool.cpp
 )
 message("podio_LIBRARIES: ${podio_LIBRARIES}")
 message("plcio_LIBRARIES: ${plcio_LIBRARIES}")
@@ -37,5 +39,6 @@ gaudi_add_module(DetSimAna ${DetSimAna_srcs}
       GaudiKernel
       # Geant4
       ${plcio_LIBRARIES} 
+      EDM4HEP::edm4hep
       # ${podio_LIBRARIES}
 )
diff --git a/Simulation/DetSimCore/CMakeLists.txt b/Simulation/DetSimCore/CMakeLists.txt
index 520ba3c5..0de611c0 100644
--- a/Simulation/DetSimCore/CMakeLists.txt
+++ b/Simulation/DetSimCore/CMakeLists.txt
@@ -10,6 +10,7 @@ find_package(Geant4 REQUIRED ui_all vis_all)
 include(${Geant4_USE_FILE})
 find_package(podio REQUIRED)
 find_package(plcio REQUIRED) 
+find_package(EDM4HEP REQUIRED)
 find_package(DD4hep COMPONENTS DDG4 REQUIRED)
 
 set(DetSimCore_srcs
@@ -40,5 +41,6 @@ gaudi_add_module(DetSimCore ${DetSimCore_srcs}
       # ${Geant4_LIBRARIES}
       DD4hep ${DD4hep_COMPONENT_LIBRARIES} 
       plcio
+      EDM4HEP::edm4hep
       # podio
 )
diff --git a/Simulation/DetSimCore/src/G4PrimaryCnvTool.cpp b/Simulation/DetSimCore/src/G4PrimaryCnvTool.cpp
index 3a79e9d9..d725aa27 100644
--- a/Simulation/DetSimCore/src/G4PrimaryCnvTool.cpp
+++ b/Simulation/DetSimCore/src/G4PrimaryCnvTool.cpp
@@ -24,7 +24,7 @@ bool G4PrimaryCnvTool::mutate(G4Event* anEvent) {
         }
 
         // vertex
-        const plcio::DoubleThree& vertex = p.getVertex();
+        const edm4hep::Vector3d& vertex = p.getVertex();
         double t = p.getTime()*CLHEP::ns;
         G4PrimaryVertex* g4vtx = new G4PrimaryVertex(vertex.x*CLHEP::mm,
                                                      vertex.y*CLHEP::mm,
@@ -36,7 +36,7 @@ bool G4PrimaryCnvTool::mutate(G4Event* anEvent) {
         G4ParticleDefinition* particle_def = particletbl->FindParticle(pdgcode);
 
         // momentum
-        const plcio::FloatThree& momentum = p.getMomentum();
+        const edm4hep::Vector3f& momentum = p.getMomentum();
         G4PrimaryParticle* g4prim = new G4PrimaryParticle(particle_def,
                                                           momentum.x*CLHEP::GeV,
                                                           momentum.y*CLHEP::GeV,
diff --git a/Simulation/DetSimCore/src/G4PrimaryCnvTool.h b/Simulation/DetSimCore/src/G4PrimaryCnvTool.h
index 3aaf2997..ed0fd4b5 100644
--- a/Simulation/DetSimCore/src/G4PrimaryCnvTool.h
+++ b/Simulation/DetSimCore/src/G4PrimaryCnvTool.h
@@ -5,8 +5,8 @@
 #include "DetSimInterface/IG4PrimaryCnvTool.h"
 #include "FWCore/DataHandle.h"
 
-#include "plcio/EventHeaderCollection.h"
-#include "plcio/MCParticleCollection.h"
+#include "edm4hep/EventHeaderCollection.h"
+#include "edm4hep/MCParticleCollection.h"
 
 class G4PrimaryCnvTool: public extends<AlgTool, IG4PrimaryCnvTool> {
 public:
@@ -16,7 +16,7 @@ public:
     bool mutate(G4Event* anEvent) override;
 
 private:
-    DataHandle<plcio::MCParticleCollection> m_mcParCol{"MCParticle", Gaudi::DataHandle::Reader, this};
+    DataHandle<edm4hep::MCParticleCollection> m_mcParCol{"MCParticle", Gaudi::DataHandle::Reader, this};
 
 };
 
-- 
GitLab