diff --git a/src/algorithms/calorimetry/CalorimeterHitReco.cc b/src/algorithms/calorimetry/CalorimeterHitReco.cc index 0457592ae..8d8df473c 100644 --- a/src/algorithms/calorimetry/CalorimeterHitReco.cc +++ b/src/algorithms/calorimetry/CalorimeterHitReco.cc @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -265,6 +266,9 @@ void CalorimeterHitReco::process( const decltype(edm4eic::CalorimeterHitData::local) local_position(pos.x() / dd4hep::mm, pos.y() / dd4hep::mm, pos.z() / dd4hep::mm); +#if EDM4EIC_VERSION_MAJOR >= 7 + auto recohit = +#endif recohits->create( rh.getCellID(), energy, @@ -276,6 +280,9 @@ void CalorimeterHitReco::process( sid, lid, local_position); +#if EDM4EIC_VERSION_MAJOR >= 7 + recohit.setRawHit(rh); +#endif } } diff --git a/src/algorithms/tracking/TrackerHitReconstruction.cc b/src/algorithms/tracking/TrackerHitReconstruction.cc index 155ba7d35..5fe85534e 100644 --- a/src/algorithms/tracking/TrackerHitReconstruction.cc +++ b/src/algorithms/tracking/TrackerHitReconstruction.cc @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -66,7 +67,10 @@ std::unique_ptr TrackerHitReconstruction::process // - XYZ segmentation: xx -> sigma_x, yy-> sigma_y, zz -> sigma_z, tt -> 0 // This is properly in line with how we get the local coordinates for the hit // in the TrackerSourceLinker. - rec_hits->create( + #if EDM4EIC_VERSION_MAJOR >= 7 + auto rec_hit = + #endif + rec_hits->create( raw_hit.getCellID(), // Raw DD4hep cell ID edm4hep::Vector3f{static_cast(pos.x() / mm), static_cast(pos.y() / mm), static_cast(pos.z() / mm)}, // mm edm4eic::CovDiag3f{get_variance(dim[0] / mm), get_variance(dim[1] / mm), // variance (see note above) @@ -75,6 +79,9 @@ std::unique_ptr TrackerHitReconstruction::process m_cfg.timeResolution, // in ns static_cast(raw_hit.getCharge() / 1.0e6), // Collected energy (GeV) 0.0F); // Error on the energy +#if EDM4EIC_VERSION_MAJOR >= 7 + rec_hit.setRawHit(raw_hit); +#endif }