diff --git a/DCHdigi/include/DCHdigi_v01.h b/DCHdigi/include/DCHdigi_v01.h
index b52bfb9..f2f52bc 100644
--- a/DCHdigi/include/DCHdigi_v01.h
+++ b/DCHdigi/include/DCHdigi_v01.h
@@ -12,7 +12,7 @@
* Processor produces collection of Digitized hits of Drift Chamber v2
* @param DCH_simhits The name of input collection, type edm4hep::SimTrackerHitCollection
* (default name empty)
- * @param DCH_DigiCollection The name of out collection, type extension::DriftChamberDigiV2Collection
+ * @param DCH_DigiCollection The name of out collection, type extension::SenseWireHitCollection
* (default name DCH_DigiCollection)
* @param DCH_name DCH subdetector name
* (default value DCH_v2)
@@ -50,8 +50,8 @@
#include "edm4hep/SimTrackerHitCollection.h"
// EDM4HEP extension
-#include "extension/DriftChamberDigiV2Collection.h"
-#include "extension/MCRecoDriftChamberDigiV2AssociationCollection.h"
+#include "extension/SenseWireHitCollection.h"
+#include "extension/SenseWireHitSimTrackerHitLinkCollection.h"
// DD4hep
#include "DD4hep/Detector.h" // for dd4hep::VolumeManager
@@ -77,14 +77,14 @@
struct DCHdigi_v01 final
: k4FWCore::MultiTransformer<
- std::tuple(
+ std::tuple(
const edm4hep::SimTrackerHitCollection&, const edm4hep::EventHeaderCollection&)> {
DCHdigi_v01(const std::string& name, ISvcLocator* svcLoc);
StatusCode initialize() override;
StatusCode finalize() override;
- std::tuple
+ std::tuple
operator()(const edm4hep::SimTrackerHitCollection&, const edm4hep::EventHeaderCollection&) const override;
private:
diff --git a/DCHdigi/src/DCHdigi_v01.cpp b/DCHdigi/src/DCHdigi_v01.cpp
index a981046..d35c0f8 100644
--- a/DCHdigi/src/DCHdigi_v01.cpp
+++ b/DCHdigi/src/DCHdigi_v01.cpp
@@ -4,7 +4,7 @@
#include
#include
-#include "extension/MutableDriftChamberDigiV2.h"
+#include "extension/MutableSenseWireHit.h"
///////////////////////////////////////////////////////////////////////////////////////
////////////////////// DCHdigi_v01 constructor ////////////////////////////
@@ -96,7 +96,7 @@ StatusCode DCHdigi_v01::initialize() {
///////////////////////////////////////////////////////////////////////////////////////
/////////////////////// operator() ////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////
-std::tuple
+std::tuple
DCHdigi_v01::operator()(const edm4hep::SimTrackerHitCollection& input_sim_hits,
const edm4hep::EventHeaderCollection& headers) const {
// initialize seed for random engine
@@ -105,8 +105,8 @@ DCHdigi_v01::operator()(const edm4hep::SimTrackerHitCollection& input_sim_hits,
debug() << "Input Sim Hit collection size: " << input_sim_hits.size() << endmsg;
// Create the collections we are going to return
- extension::DriftChamberDigiV2Collection output_digi_hits;
- extension::MCRecoDriftChamberDigiV2AssociationCollection output_digi_sim_association;
+ extension::SenseWireHitCollection output_digi_hits;
+ extension::SenseWireHitSimTrackerHitLinkCollection output_digi_sim_association;
//loop over hit collection
for (const auto& input_sim_hit : input_sim_hits) {
@@ -157,7 +157,7 @@ DCHdigi_v01::operator()(const edm4hep::SimTrackerHitCollection& input_sim_hits,
auto directionSW = Convert_TVector3_to_EDM4hepVector(wire_direction_ez, 1. / MM_TO_CM);
float distanceToWire = distanceToWire_smeared / MM_TO_CM;
- extension::MutableDriftChamberDigiV2 oDCHdigihit;
+ extension::MutableSenseWireHit oDCHdigihit;
oDCHdigihit.setCellID(input_sim_hit.getCellID());
oDCHdigihit.setType(type);
oDCHdigihit.setQuality(quality);
@@ -165,13 +165,12 @@ DCHdigi_v01::operator()(const edm4hep::SimTrackerHitCollection& input_sim_hits,
oDCHdigihit.setEDep(input_sim_hit.getEDep());
oDCHdigihit.setEDepError(eDepError);
oDCHdigihit.setPosition(positionSW);
- oDCHdigihit.setDirectionSW(directionSW);
+// oDCHdigihit.setDirectionSW(directionSW);
oDCHdigihit.setDistanceToWire(distanceToWire);
// For the sake of speed, let the dNdx calculation be optional
if( m_calculate_dndx.value() )
{
auto [nCluster, nElectrons_v] = CalculateClusters(input_sim_hit);
- oDCHdigihit.setNCluster(nCluster);
// to return the total number of electrons within the step, do the following:
// int nElectronsTotal = std::accumulate( nElectrons_v.begin(), nElectrons_v.end(), 0);
// oDCHdigihit.setNElectronsTotal(nElectronsTotal);
@@ -182,16 +181,16 @@ DCHdigi_v01::operator()(const edm4hep::SimTrackerHitCollection& input_sim_hits,
output_digi_hits.push_back(oDCHdigihit);
- extension::MutableMCRecoDriftChamberDigiV2Association oDCHsimdigi_association;
- oDCHsimdigi_association.setDigi(oDCHdigihit);
- oDCHsimdigi_association.setSim(input_sim_hit);
+ extension::MutableSenseWireHitSimTrackerHitLink oDCHsimdigi_association;
+ oDCHsimdigi_association.setFrom(oDCHdigihit);
+ oDCHsimdigi_association.setTo(input_sim_hit);
output_digi_sim_association.push_back(oDCHsimdigi_association);
} // end loop over hit collection
/////////////////////////////////////////////////////////////////
- return std::make_tuple(
+ return std::make_tuple(
std::move(output_digi_hits), std::move(output_digi_sim_association));
}