From ef0fbf40486cfa8e932b2877d7380796a2a05092 Mon Sep 17 00:00:00 2001 From: Chengdong Fu <fucd@ihep.ac.cn> Date: Wed, 13 Jan 2021 16:37:47 +0800 Subject: [PATCH] add collections for COIL and Muon --- .../DetSimAna/src/Edm4hepWriterAnaElemTool.cpp | 15 +++++++++++++++ .../DetSimAna/src/Edm4hepWriterAnaElemTool.h | 16 ++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/Simulation/DetSimAna/src/Edm4hepWriterAnaElemTool.cpp b/Simulation/DetSimAna/src/Edm4hepWriterAnaElemTool.cpp index 951ff463..2736ac98 100644 --- a/Simulation/DetSimAna/src/Edm4hepWriterAnaElemTool.cpp +++ b/Simulation/DetSimAna/src/Edm4hepWriterAnaElemTool.cpp @@ -66,6 +66,13 @@ Edm4hepWriterAnaElemTool::EndOfEventAction(const G4Event* anEvent) { auto hcalendcapringcol = m_HcalEndcapRingCol.createAndPut(); auto hcalendcapringcontribcol = m_HcalEndcapRingContributionCol.createAndPut(); + auto coilcols = m_COILCol.createAndPut(); + + auto muonbarrelcol = m_MuonBarrelCol.createAndPut(); + auto muonbarrelcontribcols = m_MuonBarrelContributionCol.createAndPut(); + auto muonendcapscol = m_MuonEndcapsCol.createAndPut(); + auto muonendcapscontribcols = m_MuonEndcapsContributionCol.createAndPut(); + auto driftchamberhitscol = m_DriftChamberHitsCol.createAndPut(); // readout defined in DD4hep @@ -137,6 +144,14 @@ Edm4hepWriterAnaElemTool::EndOfEventAction(const G4Event* anEvent) { } else if (collect->GetName() == "HcalEndcapRingCollection") { calo_col_ptr = hcalendcapringcol; calo_contrib_col_ptr = hcalendcapringcontribcol; + } else if (collect->GetName() == "COILCollection") { + tracker_col_ptr = coilcols; + } else if (collect->GetName() == "MuonBarrelCollection") { + calo_col_ptr = muonbarrelcol; + calo_contrib_col_ptr = muonbarrelcontribcols; + } else if (collect->GetName() == "MuonEndcapsCollection") { + calo_col_ptr = muonendcapscol; + calo_contrib_col_ptr = muonendcapscontribcols; } else if (collect->GetName() == "DriftChamberHitsCollection") { tracker_col_ptr = driftchamberhitscol; } else { diff --git a/Simulation/DetSimAna/src/Edm4hepWriterAnaElemTool.h b/Simulation/DetSimAna/src/Edm4hepWriterAnaElemTool.h index bd71f932..26a1ba48 100644 --- a/Simulation/DetSimAna/src/Edm4hepWriterAnaElemTool.h +++ b/Simulation/DetSimAna/src/Edm4hepWriterAnaElemTool.h @@ -98,6 +98,22 @@ private: "HcalEndcapRingContributionCollection", Gaudi::DataHandle::Writer, this}; + // Coil + DataHandle<edm4hep::SimTrackerHitCollection> m_COILCol{"COILCollection", + Gaudi::DataHandle::Writer, this}; + + // Muon + DataHandle<edm4hep::SimCalorimeterHitCollection> m_MuonBarrelCol{"MuonBarrelCollection", + Gaudi::DataHandle::Writer, this}; + DataHandle<edm4hep::CaloHitContributionCollection> m_MuonBarrelContributionCol{ + "MuonBarrelContributionCollection", + Gaudi::DataHandle::Writer, this}; + DataHandle<edm4hep::SimCalorimeterHitCollection> m_MuonEndcapsCol{"MuonEndcapsCollection", + Gaudi::DataHandle::Writer, this}; + DataHandle<edm4hep::CaloHitContributionCollection> m_MuonEndcapsContributionCol{ + "MuonEndcapsContributionCollection", + Gaudi::DataHandle::Writer, this}; + // Drift Chamber // - DriftChamberHitsCollection DataHandle<edm4hep::SimTrackerHitCollection> m_DriftChamberHitsCol{ -- GitLab