diff --git a/DCHdigi/dataFormatExtension/driftChamberHit.yaml b/DCHdigi/dataFormatExtension/driftChamberHit.yaml index fd42930..228668e 100644 --- a/DCHdigi/dataFormatExtension/driftChamberHit.yaml +++ b/DCHdigi/dataFormatExtension/driftChamberHit.yaml @@ -43,7 +43,7 @@ datatypes: - extension::DriftChamberDigi digi // reference to the digitized hit - edm4hep::SimTrackerHit sim // reference to the simulated hit - edm4hep::DriftChamberDigiV2: + extension::DriftChamberDigiV2: Description: "Digitized hit (before tracking) for Drift Chamber v2 (requires data extension)." Author: "A. Tolosa-Delgado, B. Francois, CERN" Members: @@ -59,28 +59,11 @@ datatypes: - uint32_t clusterCount // number of clusters associated to this hit - uint32_t clusterSize // number of electrons per cluster - edm4hep::MCRecoDriftChamberDigiV2Association: + extension::MCRecoDriftChamberDigiV2Association: Description: "Association between a DriftChamberDigi and the corresponding simulated hit" Author: "B. Francois, CERN" Members: - float weight // weight of this association OneToOneRelations: - - edm4hep::DriftChamberDigiV2 digi // reference to the digitized hit + - extension::DriftChamberDigiV2 digi // reference to the digitized hit - edm4hep::SimTrackerHit sim // reference to the simulated hit - -interfaces: - edm4hep::TrackerHit: - Description: "Evolution of tracker hit interface class" - Author: "Thomas Madlener, DESY" - Members: - - uint64_t cellID // ID of the sensor that created this hit - - int32_t type // type of the raw data hit - - int32_t quality // quality bit flag of the hit - - float time [ns] // time of the hit - - float eDep [GeV] // energy deposited on the hit - - float eDepError [GeV] // error measured on eDep - - edm4hep::Vector3d position [mm] // hit position - Types: - - edm4hep::TrackerHit3D - - edm4hep::TrackerHitPlane - - edm4hep::DriftChamberDigiV2 diff --git a/DCHdigi/include/DCHdigi.h b/DCHdigi/include/DCHdigi.h index a9cf72d..08659a4 100644 --- a/DCHdigi/include/DCHdigi.h +++ b/DCHdigi/include/DCHdigi.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 edm4hep::DriftChamberDigiV2Collection
+ * @param DCH_DigiCollection The name of out collection, type extension::DriftChamberDigiV2Collection
* (default name DCH_DigiCollection)
* @param DCH_name DCH subdetector name
* (default value DCH_v2)
@@ -78,14 +78,14 @@ constexpr double MM_TO_CM = 0.1; struct DCHdigi final : k4FWCore::MultiTransformer< - std::tuple( + std::tuple( const edm4hep::SimTrackerHitCollection&, const edm4hep::EventHeaderCollection&)> { DCHdigi(const std::string& name, ISvcLocator* svcLoc); StatusCode initialize() override; StatusCode finalize() override; - std::tuple operator()( + std::tuple operator()( const edm4hep::SimTrackerHitCollection& , const edm4hep::EventHeaderCollection& ) const override; diff --git a/DCHdigi/src/DCHdigi.cpp b/DCHdigi/src/DCHdigi.cpp index 1880ad4..5e00be4 100644 --- a/DCHdigi/src/DCHdigi.cpp +++ b/DCHdigi/src/DCHdigi.cpp @@ -97,7 +97,7 @@ StatusCode DCHdigi::initialize() { /////////////////////////////////////////////////////////////////////////////////////// /////////////////////// operator() //////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////// -std::tuple +std::tuple DCHdigi::operator()(const edm4hep::SimTrackerHitCollection& input_sim_hits, const edm4hep::EventHeaderCollection& headers) const { @@ -107,8 +107,8 @@ DCHdigi::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 - edm4hep::DriftChamberDigiV2Collection output_digi_hits; - edm4hep::MCRecoDriftChamberDigiV2AssociationCollection output_digi_sim_association; + extension::DriftChamberDigiV2Collection output_digi_hits; + extension::MCRecoDriftChamberDigiV2AssociationCollection output_digi_sim_association; //loop over hit collection for (const auto& input_sim_hit : input_sim_hits) @@ -162,7 +162,7 @@ DCHdigi::operator()(const edm4hep::SimTrackerHitCollection& input_sim_hits, auto [clusterCount,clusterSize] = CalculateClusters(input_sim_hit); - edm4hep::MutableDriftChamberDigiV2 oDCHdigihit; + extension::MutableDriftChamberDigiV2 oDCHdigihit; oDCHdigihit.setCellID(input_sim_hit.getCellID()); oDCHdigihit.setType(type); oDCHdigihit.setQuality(quality); @@ -177,7 +177,7 @@ DCHdigi::operator()(const edm4hep::SimTrackerHitCollection& input_sim_hits, output_digi_hits.push_back(oDCHdigihit); - edm4hep::MutableMCRecoDriftChamberDigiV2Association oDCHsimdigi_association; + extension::MutableMCRecoDriftChamberDigiV2Association oDCHsimdigi_association; oDCHsimdigi_association.setDigi( oDCHdigihit ); oDCHsimdigi_association.setSim( input_sim_hit ); output_digi_sim_association.push_back(oDCHsimdigi_association); @@ -185,7 +185,7 @@ DCHdigi::operator()(const edm4hep::SimTrackerHitCollection& input_sim_hits, }// end loop over hit collection ///////////////////////////////////////////////////////////////// - return std::make_tuple(std::move(output_digi_hits),std::move(output_digi_sim_association)); + return std::make_tuple(std::move(output_digi_hits),std::move(output_digi_sim_association)); } ///////////////////////////////////////////////////////////////////////////////////////