Skip to content
Snippets Groups Projects

RawHitAnalysis: prepare for OneToOne relation to SimHit in MCRecoTrackerHitAssociation

Merged Dmitry Kalinkin requested to merge pr/MCRecoTrackerHitAssociation_OneToOne into master
1 file
+ 13
5
Compare changes
  • Side-by-side
  • Inline
@@ -2,6 +2,7 @@
// Subject to the terms in the LICENSE file found in the top-level directory.
#include "RawHitAnalysis.h"
#include <edm4eic/EDM4eicVersion.h>
namespace benchmarks {
@@ -65,11 +66,18 @@ namespace benchmarks {
// loop over hits with associations (no noise)
for(const auto& assoc : assocs) {
for(const auto& hit : assoc.getSimHits()) {
auto wavelength = Tools::GetPhotonWavelength(hit, m_log);
if(wavelength>=0)
m_phot_spectrum->Fill(wavelength);
}
#if EDM4EIC_VERSION_MAJOR >= 6
auto hit = assoc.getSimHit();
#else
for(const auto& hit : assoc.getSimHits()) {
#endif
auto wavelength = Tools::GetPhotonWavelength(hit, m_log);
if(wavelength>=0)
m_phot_spectrum->Fill(wavelength);
#if EDM4EIC_VERSION_MAJOR >= 6
#else
}
#endif
}
}
Loading