diff --git a/Simulation/DetSimSD/DetSimSD/CaloSensitiveDetector.h b/Simulation/DetSimSD/DetSimSD/CaloSensitiveDetector.h index f9cbda02c03823ddf02d05d4642eab4d015e4f2c..28b3ab3b11f7e48b6f300402e1e9e9edefd986bb 100644 --- a/Simulation/DetSimSD/DetSimSD/CaloSensitiveDetector.h +++ b/Simulation/DetSimSD/DetSimSD/CaloSensitiveDetector.h @@ -12,7 +12,7 @@ class CaloSensitiveDetector: public DDG4SensitiveDetector { public: typedef dd4hep::sim::Geant4CalorimeterHit CalorimeterHit; - typedef G4THitsCollection<CalorimeterHit> HitCollection; + typedef G4THitsCollection<CalorimeterHit> CaloHitCollection; public: CaloSensitiveDetector(const std::string& name, dd4hep::Detector& description); diff --git a/Simulation/DetSimSD/DetSimSD/DDG4SensitiveDetector.h b/Simulation/DetSimSD/DetSimSD/DDG4SensitiveDetector.h index 94d9525b3f76ff596094911f39b80ec5518e11d3..f7806f7de5f97c5cf36a60c6b22e6d1491ccb24e 100644 --- a/Simulation/DetSimSD/DetSimSD/DDG4SensitiveDetector.h +++ b/Simulation/DetSimSD/DetSimSD/DDG4SensitiveDetector.h @@ -26,6 +26,7 @@ class DDG4SensitiveDetector: public G4VSensitiveDetector { public: + typedef dd4hep::sim::Geant4Hit Geant4Hit; typedef G4THitsCollection<dd4hep::sim::Geant4Hit> HitCollection; typedef dd4hep::sim::Geant4Hit::Contribution HitContribution; diff --git a/Simulation/DetSimSD/src/CaloSensitiveDetector.cpp b/Simulation/DetSimSD/src/CaloSensitiveDetector.cpp index ba740941060329531d4588b2c0f72c6523839d88..1547f9fe3506be659803ef0d8f5da2e3bcd79fdf 100644 --- a/Simulation/DetSimSD/src/CaloSensitiveDetector.cpp +++ b/Simulation/DetSimSD/src/CaloSensitiveDetector.cpp @@ -16,7 +16,8 @@ CaloSensitiveDetector::Initialize(G4HCofThisEvent* HCE) { // the collection name is provided by DD4hep const std::string& coll_name = collectionName[0]; - m_hc = new G4THitsCollection<CalorimeterHit>(GetName(), coll_name); + // m_hc = new G4THitsCollection<CalorimeterHit>(GetName(), coll_name); + m_hc = new HitCollection(GetName(), coll_name); int HCID = -1; if(HCID<0) HCID = G4SDManager::GetSDMpointer()->GetCollectionID(m_hc);