Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the new edm4hep::CellIDEncoding #56

Merged
merged 2 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ find_package(ROOT COMPONENTS RIO Tree)
# Load macros and functions for Gaudi-based projects
find_package(Gaudi)
find_package(k4FWCore)
find_package(EDM4HEP)
find_package(EDM4HEP 0.10.1)
find_package(Geant4)
find_package(DD4hep)
find_package(CLHEP)
Expand Down
8 changes: 3 additions & 5 deletions Detector/DetComponents/src/RedoSegmentation.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
// EDM4hep
#include "edm4hep/CalorimeterHitCollection.h"
#include "edm4hep/SimCalorimeterHitCollection.h"
#include "edm4hep/Constants.h"

/** @class RedoSegmentation Detector/DetComponents/src/RedoSegmentation.h RedoSegmentation.h
*
Expand Down Expand Up @@ -61,15 +62,12 @@ class RedoSegmentation : public GaudiAlgorithm {
/// Handle for the EDM positioned hits to be read
DataHandle<edm4hep::CalorimeterHitCollection> m_inHits{
"hits/caloInHits", Gaudi::DataHandle::Reader, this};
/// Handle for the input hits cell id encoding
MetaDataHandle<std::string> m_inHitsCellIDEncoding{
m_inHits,"CellIDEncodingString", Gaudi::DataHandle::Reader};
/// Handle for the EDM hits to be written
DataHandle<edm4hep::SimCalorimeterHitCollection> m_outHits{
"hits/caloOutHits", Gaudi::DataHandle::Writer, this};
/// Handle for the output hits cell id encoding
/// Handle for the output hits cell id encoding.
MetaDataHandle<std::string> m_outHitsCellIDEncoding{
m_outHits,"CellIDEncodingString", Gaudi::DataHandle::Writer};
m_outHits, edm4hep::CellIDEncoding, Gaudi::DataHandle::Writer};
/// New segmentation
dd4hep::DDSegmentation::Segmentation* m_segmentation;
int m_segmentationType; // use enum instead? defined in some namespace?
Expand Down
3 changes: 2 additions & 1 deletion SimG4Components/src/SimG4SaveCalHits.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

// EDM4hep
#include "edm4hep/SimCalorimeterHitCollection.h"
#include "edm4hep/Constants.h"

/** @class SimG4SaveCalHits SimG4Components/src/SimG4SaveCalHits.h SimG4SaveCalHits.h
*
Expand Down Expand Up @@ -68,7 +69,7 @@ class SimG4SaveCalHits : public GaudiTool, virtual public ISimG4SaveOutputTool {
"CaloHits", Gaudi::DataHandle::Writer, this};
/// Output handle for cell ID encoding string
MetaDataHandle<std::string> m_cellIDEncoding{
m_caloHits, "CellIDEncodingString", Gaudi::DataHandle::Writer};
m_caloHits, edm4hep::CellIDEncoding, Gaudi::DataHandle::Writer};
/// Name of the readouts (hits collections) to save, deprecated
Gaudi::Property<std::vector<std::string>> m_readoutNames{
this, "readoutNames", {}, "[Deprecated] Names of the readouts (hits collections) to save"};
Expand Down
3 changes: 2 additions & 1 deletion SimG4Components/src/SimG4SaveTrackerHits.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

// EDM4hep
#include "edm4hep/SimTrackerHitCollection.h"
#include "edm4hep/Constants.h"

/** @class SimG4SaveTrackerHits SimG4Components/src/SimG4SaveTrackerHits.h SimG4SaveTrackerHits.h
*
Expand Down Expand Up @@ -69,7 +70,7 @@ class SimG4SaveTrackerHits : public GaudiTool, virtual public ISimG4SaveOutputTo
"TrackerHits", Gaudi::DataHandle::Writer, this};
/// Output handle for cell ID encoding string
MetaDataHandle<std::string> m_cellIDEncoding {
m_trackHits, "CellIDEncodingString", Gaudi::DataHandle::Writer};
m_trackHits, edm4hep::CellIDEncoding, Gaudi::DataHandle::Writer};
/// Names of the readouts (hits collections) to save, deprecated
Gaudi::Property<std::vector<std::string>> m_readoutNames {
this, "readoutNames", {}, "[Deprecated] Name of the readouts (hits collections) to save"};
Expand Down
Loading