From f113dac65f365f939de051eb1d64f37afda21e71 Mon Sep 17 00:00:00 2001 From: Placido Fernandez Declara Date: Fri, 27 Aug 2021 17:47:04 +0200 Subject: [PATCH 1/2] update paths using LCGEO for tests --- test/gaudi_opts/test_k4MarlinWrapper1.py | 6 +++--- test/gaudi_opts/test_k4MarlinWrapper2.py | 4 ++-- test/inputFiles/testConverterConstants.xml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/gaudi_opts/test_k4MarlinWrapper1.py b/test/gaudi_opts/test_k4MarlinWrapper1.py index bb5c9690..5ece4f93 100644 --- a/test/gaudi_opts/test_k4MarlinWrapper1.py +++ b/test/gaudi_opts/test_k4MarlinWrapper1.py @@ -1,3 +1,4 @@ +import os from Gaudi.Configuration import * @@ -35,9 +36,8 @@ proc1 = MarlinProcessorWrapper("InitDD4hep") proc1.OutputLevel = DEBUG proc1.ProcessorType = "InitializeDD4hep" -proc1.Parameters = {#"EncodingStringParameter", "GlobalTrackerReadoutID", END_TAG, - #"DD4hepXMLFile", "/cvmfs/clicdp.cern.ch/iLCSoft/builds/nightly/x86_64-slc6-gcc62-opt/lcgeo/HEAD/CLIC/compact/CLIC_o3_v13/CLIC_o3_v13.xml", END_TAG, - "DD4hepXMLFile": ["/cvmfs/clicdp.cern.ch/iLCSoft/builds/nightly/x86_64-slc6-gcc62-opt/lcgeo/HEAD/CLIC/compact/CLIC_o2_v04/CLIC_o2_v04.xml"], +proc1.Parameters = {#"EncodingStringParameter": ["GlobalTrackerReadoutID"], + "DD4hepXMLFile": [os.path.join(os.environ.get('LCGEO'), 'CLIC/compact/CLIC_o2_v04/CLIC_o2_v04.xml')] } algList.append(proc1) diff --git a/test/gaudi_opts/test_k4MarlinWrapper2.py b/test/gaudi_opts/test_k4MarlinWrapper2.py index 04584698..b2e4a095 100644 --- a/test/gaudi_opts/test_k4MarlinWrapper2.py +++ b/test/gaudi_opts/test_k4MarlinWrapper2.py @@ -1,3 +1,4 @@ +import os from Gaudi.Configuration import * @@ -36,8 +37,7 @@ proc1.OutputLevel = DEBUG proc1.ProcessorType = "InitializeDD4hep" proc1.Parameters = {#"EncodingStringParameter": ["GlobalTrackerReadoutID"], - #"DD4hepXMLFile": ["/cvmfs/clicdp.cern.ch/iLCSoft/builds/nightly/x86_64-slc6-gcc62-opt/lcgeo/HEAD/CLIC/compact/CLIC_o3_v13/CLIC_o3_v13.xml"], - "DD4hepXMLFile": ["/cvmfs/clicdp.cern.ch/iLCSoft/builds/nightly/x86_64-slc6-gcc62-opt/lcgeo/HEAD/CLIC/compact/CLIC_o2_v04/CLIC_o2_v04.xml"], + "DD4hepXMLFile": [os.path.join(os.environ.get('LCGEO'), 'CLIC/compact/CLIC_o2_v04/CLIC_o2_v04.xml')] } algList.append(proc1) diff --git a/test/inputFiles/testConverterConstants.xml b/test/inputFiles/testConverterConstants.xml index d2f523f7..b55784b9 100644 --- a/test/inputFiles/testConverterConstants.xml +++ b/test/inputFiles/testConverterConstants.xml @@ -3,7 +3,7 @@ - + 0.003 003 0. From 7291330eb5e029612a02b70195d1d03a6cb0f55c Mon Sep 17 00:00:00 2001 From: Placido Fernandez Declara Date: Thu, 26 Aug 2021 17:18:46 +0200 Subject: [PATCH 2/2] are more automatic collection conversion lcio->edm4hep --- k4MarlinWrapper/src/components/Lcio2EDM4hep.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/k4MarlinWrapper/src/components/Lcio2EDM4hep.cpp b/k4MarlinWrapper/src/components/Lcio2EDM4hep.cpp index 226ff930..0733ac7f 100644 --- a/k4MarlinWrapper/src/components/Lcio2EDM4hep.cpp +++ b/k4MarlinWrapper/src/components/Lcio2EDM4hep.cpp @@ -91,6 +91,11 @@ StatusCode Lcio2EDM4hepTool::convertCollections( if (coll_type_str == "ReconstructedParticle") { convertPut( m_lcio2edm_params[i+1], m_lcio2edm_params[i], lcio_converter, id_table); + // Get associated collection. Name hardcoded in k4LCIOConverter + convertPut( + "ParticleID_EXT", "ParticleID_EXT", lcio_converter, id_table); + convertPut( + "Vertex_EXT", "Vertex_EXT", lcio_converter, id_table); } else if (coll_type_str == "ParticleID") { convertPut( m_lcio2edm_params[i+1], m_lcio2edm_params[i], lcio_converter, id_table); @@ -115,8 +120,7 @@ StatusCode Lcio2EDM4hepTool::convertCollections( } else if (coll_type_str == "SimCalorimeterHit") { convertPut( m_lcio2edm_params[i+1], m_lcio2edm_params[i], lcio_converter, id_table); - // Get associated collections - // This collection name is hardcoded in k4LCIOConverter + // Get associated collection. Name hardcoded in k4LCIOConverter convertPut( "CaloHitContribution_EXT", "CaloHitContribution_EXT", lcio_converter, id_table); } else if (coll_type_str == "RawCalorimeterHit") { @@ -128,6 +132,9 @@ StatusCode Lcio2EDM4hepTool::convertCollections( } else if (coll_type_str == "Cluster") { convertPut( m_lcio2edm_params[i+1], m_lcio2edm_params[i], lcio_converter, id_table); + // Get associated collection. Name hardcoded in k4LCIOConverter + convertPut( + "ParticleID_EXT", "ParticleID_EXT", lcio_converter, id_table); } else { error() << coll_type_str << ": conversion type not supported." << endmsg; }