diff --git a/Simulation/DetSimAna/src/Edm4hepWriterAnaElemTool.cpp b/Simulation/DetSimAna/src/Edm4hepWriterAnaElemTool.cpp index 1efe317dacdd17cacbf796f7bd61241b7c9079b7..9ef16425454ad9a520659b07536d7ebf344018cc 100644 --- a/Simulation/DetSimAna/src/Edm4hepWriterAnaElemTool.cpp +++ b/Simulation/DetSimAna/src/Edm4hepWriterAnaElemTool.cpp @@ -56,6 +56,8 @@ Edm4hepWriterAnaElemTool::EndOfEventAction(const G4Event* anEvent) { auto ecalendcapringcol = m_EcalEndcapRingCol.createAndPut(); auto ecalendcapringcontribcol = m_EcalEndcapRingContributionCol.createAndPut(); + auto driftchamberhitscol = m_DriftChamberHitsCol.createAndPut(); + // readout defined in DD4hep auto lcdd = &(dd4hep::Detector::getInstance()); auto allReadouts = lcdd->readouts(); @@ -116,6 +118,8 @@ Edm4hepWriterAnaElemTool::EndOfEventAction(const G4Event* anEvent) { } else if (collect->GetName() == "EcalEndcapRingCollection") { calo_col_ptr = ecalendcapringcol; calo_contrib_col_ptr = ecalendcapringcontribcol; + } else if (collect->GetName() == "DriftChamberHitsCollection") { + tracker_col_ptr = driftchamberhitscol; } else { warning() << "Unknown collection name: " << collect->GetName() << ". Please register in Edm4hepWriterAnaElemTool. " << endmsg; diff --git a/Simulation/DetSimAna/src/Edm4hepWriterAnaElemTool.h b/Simulation/DetSimAna/src/Edm4hepWriterAnaElemTool.h index 2e69d24e8f6d5858f1efa86a543c2816aefbf83d..17a9d5182fe80f0bcbfefca5385362df2aa738a7 100644 --- a/Simulation/DetSimAna/src/Edm4hepWriterAnaElemTool.h +++ b/Simulation/DetSimAna/src/Edm4hepWriterAnaElemTool.h @@ -81,6 +81,13 @@ private: "EcalEndcapRingContributionCollection", Gaudi::DataHandle::Writer, this}; + // Drift Chamber + // - DriftChamberHitsCollection + DataHandle<edm4hep::SimTrackerHitCollection> m_DriftChamberHitsCol{ + "DriftChamberHitsCollection", + Gaudi::DataHandle::Writer, this}; + + private: // in order to associate the hit contribution with the primary track, // we have a bookkeeping of every track.