From 920776dd0988cbac75f632fc5eecbe2c71eec3e4 Mon Sep 17 00:00:00 2001 From: Brieuc Francois Date: Sat, 10 Apr 2021 17:43:13 +0200 Subject: [PATCH] CellPositionsTools to edm4hep --- .../components/CellPositionsCaloDiscsTool.cpp | 17 +++++++++-------- .../src/components/CellPositionsCaloDiscsTool.h | 2 +- .../src/components/CellPositionsDummyTool.cpp | 17 +++++++++-------- .../src/components/CellPositionsDummyTool.h | 2 +- .../components/CellPositionsECalBarrelTool.cpp | 17 +++++++++-------- .../components/CellPositionsECalBarrelTool.h | 2 +- .../CellPositionsHCalBarrelNoSegTool.cpp | 17 +++++++++-------- .../CellPositionsHCalBarrelNoSegTool.h | 2 +- .../CellPositionsHCalBarrelPhiSegTool.cpp | 17 +++++++++-------- .../CellPositionsHCalBarrelPhiSegTool.h | 2 +- .../components/CellPositionsHCalBarrelTool.cpp | 17 +++++++++-------- .../components/CellPositionsHCalBarrelTool.h | 2 +- .../components/CellPositionsTailCatcherTool.cpp | 17 +++++++++-------- .../components/CellPositionsTailCatcherTool.h | 2 +- .../src/components/CreateCellPositions.cpp | 5 +---- .../src/components/CreateCellPositions.h | 10 ++++------ 16 files changed, 75 insertions(+), 73 deletions(-) diff --git a/RecFCChhCalorimeter/src/components/CellPositionsCaloDiscsTool.cpp b/RecFCChhCalorimeter/src/components/CellPositionsCaloDiscsTool.cpp index 76651ae6..6d018af3 100644 --- a/RecFCChhCalorimeter/src/components/CellPositionsCaloDiscsTool.cpp +++ b/RecFCChhCalorimeter/src/components/CellPositionsCaloDiscsTool.cpp @@ -1,7 +1,6 @@ #include "CellPositionsCaloDiscsTool.h" -#include "datamodel/CaloHitCollection.h" -#include "datamodel/PositionedCaloHitCollection.h" +#include "edm4hep/CalorimeterHitCollection.h" DECLARE_COMPONENT(CellPositionsCaloDiscsTool) @@ -41,20 +40,22 @@ StatusCode CellPositionsCaloDiscsTool::initialize() { return sc; } -void CellPositionsCaloDiscsTool::getPositions(const fcc::CaloHitCollection& aCells, - fcc::PositionedCaloHitCollection& outputColl) { +void CellPositionsCaloDiscsTool::getPositions(const edm4hep::CalorimeterHitCollection& aCells, + edm4hep::CalorimeterHitCollection& outputColl) { debug() << "Input collection size : " << aCells.size() << endmsg; // Loop through cell collection for (const auto& cell : aCells) { - auto outPos = CellPositionsCaloDiscsTool::xyzPosition(cell.core().cellId); + auto outPos = CellPositionsCaloDiscsTool::xyzPosition(cell.getCellID()); - auto edmPos = fcc::Point(); + auto edmPos = edm4hep::Vector3f(); edmPos.x = outPos.x() / dd4hep::mm; edmPos.y = outPos.y() / dd4hep::mm; edmPos.z = outPos.z() / dd4hep::mm; - auto positionedHit = outputColl.create(edmPos, cell.core()); + auto positionedHit = cell.clone(); + positionedHit.setPosition(edmPos); + outputColl.push_back(positionedHit); // Debug information about cell position - debug() << "Cell energy (GeV) : " << cell.core().energy << "\tcellID " << cell.core().cellId << endmsg; + debug() << "Cell energy (GeV) : " << positionedHit.getEnergy() << "\tcellID " << positionedHit.getCellID() << endmsg; debug() << "Position of cell (mm) : \t" << outPos.x() / dd4hep::mm << "\t" << outPos.y() / dd4hep::mm << "\t" << outPos.z() / dd4hep::mm << endmsg; } diff --git a/RecFCChhCalorimeter/src/components/CellPositionsCaloDiscsTool.h b/RecFCChhCalorimeter/src/components/CellPositionsCaloDiscsTool.h index ce1a99b0..cc34e6b4 100644 --- a/RecFCChhCalorimeter/src/components/CellPositionsCaloDiscsTool.h +++ b/RecFCChhCalorimeter/src/components/CellPositionsCaloDiscsTool.h @@ -45,7 +45,7 @@ class CellPositionsCaloDiscsTool : public GaudiTool, virtual public ICellPositio virtual StatusCode finalize() final; - virtual void getPositions(const fcc::CaloHitCollection& aCells, fcc::PositionedCaloHitCollection& outputColl) final; + virtual void getPositions(const edm4hep::CalorimeterHitCollection& aCells, edm4hep::CalorimeterHitCollection& outputColl) final; virtual dd4hep::Position xyzPosition(const uint64_t& aCellId) const final; diff --git a/RecFCChhCalorimeter/src/components/CellPositionsDummyTool.cpp b/RecFCChhCalorimeter/src/components/CellPositionsDummyTool.cpp index 26668c85..5dad5be6 100644 --- a/RecFCChhCalorimeter/src/components/CellPositionsDummyTool.cpp +++ b/RecFCChhCalorimeter/src/components/CellPositionsDummyTool.cpp @@ -1,7 +1,6 @@ #include "CellPositionsDummyTool.h" -#include "datamodel/CaloHitCollection.h" -#include "datamodel/PositionedCaloHitCollection.h" +#include "edm4hep/CalorimeterHitCollection.h" DECLARE_COMPONENT(CellPositionsDummyTool) @@ -22,20 +21,22 @@ StatusCode CellPositionsDummyTool::initialize() { return sc; } -void CellPositionsDummyTool::getPositions(const fcc::CaloHitCollection& aCells, - fcc::PositionedCaloHitCollection& outputColl) { +void CellPositionsDummyTool::getPositions(const edm4hep::CalorimeterHitCollection& aCells, + edm4hep::CalorimeterHitCollection& outputColl) { debug() << "Input collection size : " << aCells.size() << endmsg; // Loop through cell collection for (const auto& cell : aCells) { - auto outPos = CellPositionsDummyTool::xyzPosition(cell.core().cellId); + auto outPos = CellPositionsDummyTool::xyzPosition(cell.getCellID()); - auto edmPos = fcc::Point(); + auto edmPos = edm4hep::Vector3f(); edmPos.x = outPos.x() / dd4hep::mm; edmPos.y = outPos.y() / dd4hep::mm; edmPos.z = outPos.z() / dd4hep::mm; - auto positionedHit = outputColl.create(edmPos, cell.core()); + auto positionedHit = cell.clone(); + positionedHit.setPosition(edmPos); + outputColl.push_back(positionedHit); // Debug information about cell position - debug() << "Cell energy (GeV) : " << cell.core().energy << "\tcellID " << cell.core().cellId << endmsg; + debug() << "Cell energy (GeV) : " << positionedHit.getEnergy() << "\tcellID " << positionedHit.getCellID() << endmsg; debug() << "Position of cell (mm) : \t" << outPos.x() / dd4hep::mm << "\t" << outPos.y() / dd4hep::mm << "\t" << outPos.z() / dd4hep::mm << endmsg; } diff --git a/RecFCChhCalorimeter/src/components/CellPositionsDummyTool.h b/RecFCChhCalorimeter/src/components/CellPositionsDummyTool.h index e0ffa6cd..8edf347e 100644 --- a/RecFCChhCalorimeter/src/components/CellPositionsDummyTool.h +++ b/RecFCChhCalorimeter/src/components/CellPositionsDummyTool.h @@ -31,7 +31,7 @@ class CellPositionsDummyTool : public GaudiTool, virtual public ICellPositionsTo virtual StatusCode finalize() final; - virtual void getPositions(const fcc::CaloHitCollection& aCells, fcc::PositionedCaloHitCollection& outputColl) final; + virtual void getPositions(const edm4hep::CalorimeterHitCollection& aCells, edm4hep::CalorimeterHitCollection& outputColl) final; virtual dd4hep::Position xyzPosition(const uint64_t& aCellId) const final; diff --git a/RecFCChhCalorimeter/src/components/CellPositionsECalBarrelTool.cpp b/RecFCChhCalorimeter/src/components/CellPositionsECalBarrelTool.cpp index cf334e68..67d34b49 100644 --- a/RecFCChhCalorimeter/src/components/CellPositionsECalBarrelTool.cpp +++ b/RecFCChhCalorimeter/src/components/CellPositionsECalBarrelTool.cpp @@ -1,8 +1,7 @@ #include "CellPositionsECalBarrelTool.h" // EDM -#include "datamodel/CaloHitCollection.h" -#include "datamodel/PositionedCaloHitCollection.h" +#include "edm4hep/CalorimeterHitCollection.h" DECLARE_COMPONENT(CellPositionsECalBarrelTool) @@ -42,22 +41,24 @@ StatusCode CellPositionsECalBarrelTool::initialize() { return sc; } -void CellPositionsECalBarrelTool::getPositions(const fcc::CaloHitCollection& aCells, - fcc::PositionedCaloHitCollection& outputColl) { +void CellPositionsECalBarrelTool::getPositions(const edm4hep::CalorimeterHitCollection& aCells, + edm4hep::CalorimeterHitCollection& outputColl) { debug() << "Input collection size : " << aCells.size() << endmsg; // Loop through cell collection for (const auto& cell : aCells) { - auto outSeg = CellPositionsECalBarrelTool::xyzPosition(cell.core().cellId); - auto edmPos = fcc::Point(); + auto outSeg = CellPositionsECalBarrelTool::xyzPosition(cell.getCellID()); + auto edmPos = edm4hep::Vector3f(); edmPos.x = outSeg.x() / dd4hep::mm; edmPos.y = outSeg.y() / dd4hep::mm; edmPos.z = outSeg.z() / dd4hep::mm; - auto positionedHit = outputColl.create(edmPos, cell.core()); + auto positionedHit = cell.clone(); + positionedHit.setPosition(edmPos); + outputColl.push_back(positionedHit); // Debug information about cell position - debug() << "Cell energy (GeV) : " << cell.core().energy << "\tcellID " << cell.core().cellId << endmsg; + debug() << "Cell energy (GeV) : " << positionedHit.getEnergy() << "\tcellID " << positionedHit.getCellID() << endmsg; debug() << "Position of cell (mm) : \t" << outSeg.x() / dd4hep::mm << "\t" << outSeg.y() / dd4hep::mm << "\t" << outSeg.z() / dd4hep::mm << "\n" << endmsg; diff --git a/RecFCChhCalorimeter/src/components/CellPositionsECalBarrelTool.h b/RecFCChhCalorimeter/src/components/CellPositionsECalBarrelTool.h index 33916924..d339832e 100644 --- a/RecFCChhCalorimeter/src/components/CellPositionsECalBarrelTool.h +++ b/RecFCChhCalorimeter/src/components/CellPositionsECalBarrelTool.h @@ -44,7 +44,7 @@ class CellPositionsECalBarrelTool : public GaudiTool, virtual public ICellPositi virtual StatusCode finalize() final; - virtual void getPositions(const fcc::CaloHitCollection& aCells, fcc::PositionedCaloHitCollection& outputColl) final; + virtual void getPositions(const edm4hep::CalorimeterHitCollection& aCells, edm4hep::CalorimeterHitCollection& outputColl) final; virtual dd4hep::Position xyzPosition(const uint64_t& aCellId) const final; diff --git a/RecFCChhCalorimeter/src/components/CellPositionsHCalBarrelNoSegTool.cpp b/RecFCChhCalorimeter/src/components/CellPositionsHCalBarrelNoSegTool.cpp index 0e32849e..7a8a7e7c 100644 --- a/RecFCChhCalorimeter/src/components/CellPositionsHCalBarrelNoSegTool.cpp +++ b/RecFCChhCalorimeter/src/components/CellPositionsHCalBarrelNoSegTool.cpp @@ -1,7 +1,6 @@ #include "CellPositionsHCalBarrelNoSegTool.h" -#include "datamodel/CaloHitCollection.h" -#include "datamodel/PositionedCaloHitCollection.h" +#include "edm4hep/CalorimeterHitCollection.h" DECLARE_COMPONENT(CellPositionsHCalBarrelNoSegTool) @@ -41,22 +40,24 @@ StatusCode CellPositionsHCalBarrelNoSegTool::initialize() { return sc; } -void CellPositionsHCalBarrelNoSegTool::getPositions(const fcc::CaloHitCollection& aCells, - fcc::PositionedCaloHitCollection& outputColl) { +void CellPositionsHCalBarrelNoSegTool::getPositions(const edm4hep::CalorimeterHitCollection& aCells, + edm4hep::CalorimeterHitCollection& outputColl) { debug() << "Input collection size : " << aCells.size() << endmsg; // Loop through cell collection for (const auto& cell : aCells) { - auto outPos = CellPositionsHCalBarrelNoSegTool::xyzPosition(cell.core().cellId); + auto outPos = CellPositionsHCalBarrelNoSegTool::xyzPosition(cell.getCellID()); - auto edmPos = fcc::Point(); + auto edmPos = edm4hep::Vector3f(); edmPos.x = outPos.x() / dd4hep::mm; edmPos.y = outPos.y() / dd4hep::mm; edmPos.z = outPos.z() / dd4hep::mm; - auto positionedHit = outputColl.create(edmPos, cell.core()); + auto positionedHit = cell.clone(); + positionedHit.setPosition(edmPos); + outputColl.push_back(positionedHit); // Debug information about cell position - debug() << "Cell energy (GeV) : " << cell.core().energy << "\tcellID " << cell.core().cellId << endmsg; + debug() << "Cell energy (GeV) : " << positionedHit.getEnergy() << "\tcellID " << positionedHit.getCellID() << endmsg; debug() << "Position of cell (mm) : \t" << outPos.x() / dd4hep::mm << "\t" << outPos.y() / dd4hep::mm << "\t" << outPos.z() / dd4hep::mm << endmsg; } diff --git a/RecFCChhCalorimeter/src/components/CellPositionsHCalBarrelNoSegTool.h b/RecFCChhCalorimeter/src/components/CellPositionsHCalBarrelNoSegTool.h index 42c710f5..97f08795 100644 --- a/RecFCChhCalorimeter/src/components/CellPositionsHCalBarrelNoSegTool.h +++ b/RecFCChhCalorimeter/src/components/CellPositionsHCalBarrelNoSegTool.h @@ -43,7 +43,7 @@ class CellPositionsHCalBarrelNoSegTool : public GaudiTool, virtual public ICellP virtual StatusCode finalize() final; - virtual void getPositions(const fcc::CaloHitCollection& aCells, fcc::PositionedCaloHitCollection& outputColl) final; + virtual void getPositions(const edm4hep::CalorimeterHitCollection& aCells, edm4hep::CalorimeterHitCollection& outputColl) final; virtual dd4hep::Position xyzPosition(const uint64_t& aCellId) const final; diff --git a/RecFCChhCalorimeter/src/components/CellPositionsHCalBarrelPhiSegTool.cpp b/RecFCChhCalorimeter/src/components/CellPositionsHCalBarrelPhiSegTool.cpp index f64bd68c..7e66360b 100644 --- a/RecFCChhCalorimeter/src/components/CellPositionsHCalBarrelPhiSegTool.cpp +++ b/RecFCChhCalorimeter/src/components/CellPositionsHCalBarrelPhiSegTool.cpp @@ -1,7 +1,6 @@ #include "CellPositionsHCalBarrelPhiSegTool.h" -#include "datamodel/CaloHitCollection.h" -#include "datamodel/PositionedCaloHitCollection.h" +#include "edm4hep/CalorimeterHitCollection.h" DECLARE_COMPONENT(CellPositionsHCalBarrelPhiSegTool) @@ -40,22 +39,24 @@ StatusCode CellPositionsHCalBarrelPhiSegTool::initialize() { return sc; } -void CellPositionsHCalBarrelPhiSegTool::getPositions(const fcc::CaloHitCollection& aCells, - fcc::PositionedCaloHitCollection& outputColl) { +void CellPositionsHCalBarrelPhiSegTool::getPositions(const edm4hep::CalorimeterHitCollection& aCells, + edm4hep::CalorimeterHitCollection& outputColl) { debug() << "Input collection size : " << aCells.size() << endmsg; // Loop through cell collection for (const auto& cell : aCells) { - auto outPos = CellPositionsHCalBarrelPhiSegTool::xyzPosition(cell.core().cellId); + auto outPos = CellPositionsHCalBarrelPhiSegTool::xyzPosition(cell.getCellID()); - auto edmPos = fcc::Point(); + auto edmPos = edm4hep::Vector3f(); edmPos.x = outPos.x() / dd4hep::mm; edmPos.y = outPos.y() / dd4hep::mm; edmPos.z = outPos.z() / dd4hep::mm; - auto positionedHit = outputColl.create(edmPos, cell.core()); + auto positionedHit = cell.clone(); + positionedHit.setPosition(edmPos); + outputColl.push_back(positionedHit); // Debug information about cell position - debug() << "Cell energy (GeV) : " << cell.core().energy << "\tcellID " << cell.core().cellId << endmsg; + debug() << "Cell energy (GeV) : " << positionedHit.getEnergy() << "\tcellID " << positionedHit.getCellID() << endmsg; debug() << "Position of cell (mm) : \t" << outPos.x() / dd4hep::mm << "\t" << outPos.y() / dd4hep::mm << "\t" << outPos.z() / dd4hep::mm << endmsg; } diff --git a/RecFCChhCalorimeter/src/components/CellPositionsHCalBarrelPhiSegTool.h b/RecFCChhCalorimeter/src/components/CellPositionsHCalBarrelPhiSegTool.h index 233ef124..82ba2f03 100644 --- a/RecFCChhCalorimeter/src/components/CellPositionsHCalBarrelPhiSegTool.h +++ b/RecFCChhCalorimeter/src/components/CellPositionsHCalBarrelPhiSegTool.h @@ -43,7 +43,7 @@ class CellPositionsHCalBarrelPhiSegTool : public GaudiTool, virtual public ICell virtual StatusCode finalize() final; - virtual void getPositions(const fcc::CaloHitCollection& aCells, fcc::PositionedCaloHitCollection& outputColl) final; + virtual void getPositions(const edm4hep::CalorimeterHitCollection& aCells, edm4hep::CalorimeterHitCollection& outputColl) final; virtual dd4hep::Position xyzPosition(const uint64_t& aCellId) const final; diff --git a/RecFCChhCalorimeter/src/components/CellPositionsHCalBarrelTool.cpp b/RecFCChhCalorimeter/src/components/CellPositionsHCalBarrelTool.cpp index 2f2e1606..9e67c7fb 100644 --- a/RecFCChhCalorimeter/src/components/CellPositionsHCalBarrelTool.cpp +++ b/RecFCChhCalorimeter/src/components/CellPositionsHCalBarrelTool.cpp @@ -1,7 +1,6 @@ #include "CellPositionsHCalBarrelTool.h" -#include "datamodel/CaloHitCollection.h" -#include "datamodel/PositionedCaloHitCollection.h" +#include "edm4hep/CalorimeterHitCollection.h" DECLARE_COMPONENT(CellPositionsHCalBarrelTool) @@ -41,22 +40,24 @@ StatusCode CellPositionsHCalBarrelTool::initialize() { return sc; } -void CellPositionsHCalBarrelTool::getPositions(const fcc::CaloHitCollection& aCells, - fcc::PositionedCaloHitCollection& outputColl) { +void CellPositionsHCalBarrelTool::getPositions(const edm4hep::CalorimeterHitCollection& aCells, + edm4hep::CalorimeterHitCollection& outputColl) { debug() << "Input collection size : " << aCells.size() << endmsg; // Loop through cell collection for (const auto& cell : aCells) { - auto outSeg = CellPositionsHCalBarrelTool::xyzPosition(cell.core().cellId); + auto outSeg = CellPositionsHCalBarrelTool::xyzPosition(cell.getCellID()); - auto edmPos = fcc::Point(); + auto edmPos = edm4hep::Vector3f(); edmPos.x = outSeg.x() / dd4hep::mm; edmPos.y = outSeg.y() / dd4hep::mm; edmPos.z = outSeg.z() / dd4hep::mm; - auto positionedHit = outputColl.create(edmPos, cell.core()); + auto positionedHit = cell.clone(); + positionedHit.setPosition(edmPos); + outputColl.push_back(positionedHit); // Debug information about cell position - debug() << "Cell energy (GeV) : " << cell.core().energy << "\tcellID " << cell.core().cellId << endmsg; + debug() << "Cell energy (GeV) : " << positionedHit.getEnergy() << "\tcellID " << positionedHit.getCellID() << endmsg; debug() << "Position of cell (mm) : \t" << outSeg.x() / dd4hep::mm << "\t" << outSeg.y() / dd4hep::mm << "\t" << outSeg.z() / dd4hep::mm << endmsg; } diff --git a/RecFCChhCalorimeter/src/components/CellPositionsHCalBarrelTool.h b/RecFCChhCalorimeter/src/components/CellPositionsHCalBarrelTool.h index 0a96d121..047f3692 100644 --- a/RecFCChhCalorimeter/src/components/CellPositionsHCalBarrelTool.h +++ b/RecFCChhCalorimeter/src/components/CellPositionsHCalBarrelTool.h @@ -38,7 +38,7 @@ class CellPositionsHCalBarrelTool : public GaudiTool, virtual public ICellPositi virtual StatusCode finalize() final; - virtual void getPositions(const fcc::CaloHitCollection& aCells, fcc::PositionedCaloHitCollection& outputColl) final; + virtual void getPositions(const edm4hep::CalorimeterHitCollection& aCells, edm4hep::CalorimeterHitCollection& outputColl) final; virtual dd4hep::Position xyzPosition(const uint64_t& aCellId) const final; diff --git a/RecFCChhCalorimeter/src/components/CellPositionsTailCatcherTool.cpp b/RecFCChhCalorimeter/src/components/CellPositionsTailCatcherTool.cpp index 32579097..b421598c 100644 --- a/RecFCChhCalorimeter/src/components/CellPositionsTailCatcherTool.cpp +++ b/RecFCChhCalorimeter/src/components/CellPositionsTailCatcherTool.cpp @@ -1,7 +1,6 @@ #include "CellPositionsTailCatcherTool.h" -#include "datamodel/CaloHitCollection.h" -#include "datamodel/PositionedCaloHitCollection.h" +#include "edm4hep/CalorimeterHitCollection.h" DECLARE_COMPONENT(CellPositionsTailCatcherTool) @@ -42,23 +41,25 @@ StatusCode CellPositionsTailCatcherTool::initialize() { return sc; } -void CellPositionsTailCatcherTool::getPositions(const fcc::CaloHitCollection& aCells, - fcc::PositionedCaloHitCollection& outputColl) { +void CellPositionsTailCatcherTool::getPositions(const edm4hep::CalorimeterHitCollection& aCells, + edm4hep::CalorimeterHitCollection& outputColl) { debug() << "Input collection size : " << aCells.size() << endmsg; // Loop through cell collection for (const auto& cell : aCells) { - auto outSeg = CellPositionsTailCatcherTool::xyzPosition(cell.core().cellId); + auto outSeg = CellPositionsTailCatcherTool::xyzPosition(cell.getCellID()); - auto edmPos = fcc::Point(); + auto edmPos = edm4hep::Vector3f(); edmPos.x = outSeg.x() / dd4hep::mm; edmPos.y = outSeg.y() / dd4hep::mm; edmPos.z = outSeg.z() / dd4hep::mm; - auto positionedHit = outputColl.create(edmPos, cell.core()); + auto positionedHit = cell.clone(); + positionedHit.setPosition(edmPos); + outputColl.push_back(positionedHit); ; // Debug information about cell position - debug() << "Cell energy (GeV) : " << cell.core().energy << "\tcellID " << cell.core().cellId << endmsg; + debug() << "Cell energy (GeV) : " << positionedHit.getEnergy() << "\tcellID " << positionedHit.getCellID() << endmsg; debug() << "Position of cell (mm) : \t" << outSeg.x() / dd4hep::mm << "\t" << outSeg.y() / dd4hep::mm << "\t" << outSeg.z() / dd4hep::mm << endmsg; } diff --git a/RecFCChhCalorimeter/src/components/CellPositionsTailCatcherTool.h b/RecFCChhCalorimeter/src/components/CellPositionsTailCatcherTool.h index a109d48d..e4f764c9 100644 --- a/RecFCChhCalorimeter/src/components/CellPositionsTailCatcherTool.h +++ b/RecFCChhCalorimeter/src/components/CellPositionsTailCatcherTool.h @@ -44,7 +44,7 @@ class CellPositionsTailCatcherTool : public GaudiTool, virtual public ICellPosit virtual StatusCode finalize() final; - virtual void getPositions(const fcc::CaloHitCollection& aCells, fcc::PositionedCaloHitCollection& outputColl) final; + virtual void getPositions(const edm4hep::CalorimeterHitCollection& aCells, edm4hep::CalorimeterHitCollection& outputColl) final; virtual dd4hep::Position xyzPosition(const uint64_t& aCellId) const final; diff --git a/RecFCChhCalorimeter/src/components/CreateCellPositions.cpp b/RecFCChhCalorimeter/src/components/CreateCellPositions.cpp index 8aaa1685..2dbb5a5a 100644 --- a/RecFCChhCalorimeter/src/components/CreateCellPositions.cpp +++ b/RecFCChhCalorimeter/src/components/CreateCellPositions.cpp @@ -8,10 +8,7 @@ #include "DD4hep/Detector.h" // EDM -#include "datamodel/CaloHitCollection.h" -#include "datamodel/PositionedCaloHitCollection.h" -#include "datamodel/PositionedTrackHitCollection.h" -#include "datamodel/TrackHitCollection.h" +#include "edm4hep/CalorimeterHitCollection.h" DECLARE_COMPONENT(CreateCellPositions) diff --git a/RecFCChhCalorimeter/src/components/CreateCellPositions.h b/RecFCChhCalorimeter/src/components/CreateCellPositions.h index 8b91ffcf..87e15928 100644 --- a/RecFCChhCalorimeter/src/components/CreateCellPositions.h +++ b/RecFCChhCalorimeter/src/components/CreateCellPositions.h @@ -9,10 +9,8 @@ #include "GaudiAlg/GaudiAlgorithm.h" #include "GaudiKernel/ToolHandle.h" -#include "datamodel/CaloHit.h" -#include "datamodel/CaloHitCollection.h" -#include "datamodel/PositionedCaloHit.h" -#include "datamodel/PositionedCaloHitCollection.h" +#include "edm4hep/CalorimeterHit.h" +#include "edm4hep/CalorimeterHitCollection.h" class IGeoSvc; @@ -48,9 +46,9 @@ class CreateCellPositions : public GaudiAlgorithm { /// Handle for tool to get positions ToolHandle m_cellPositionsTool; /// Input collection - DataHandle m_hits{"hits/hits", Gaudi::DataHandle::Reader, this}; + DataHandle m_hits{"hits/hits", Gaudi::DataHandle::Reader, this}; /// Output collection - DataHandle m_positionedHits{"hits/positionedHits", Gaudi::DataHandle::Writer, this}; + DataHandle m_positionedHits{"hits/positionedHits", Gaudi::DataHandle::Writer, this}; }; #endif /* DETCOMPONENTS_CREATECELLPOSITIONS_H */