Skip to content
Snippets Groups Projects
Commit a6df0996 authored by lintao@ihep.ac.cn's avatar lintao@ihep.ac.cn
Browse files

Register the collection name of the Drift Chamber.

parent a663edc3
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
......@@ -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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment