diff --git a/corsika/detail/modules/radio/CoREAS.inl b/corsika/detail/modules/radio/CoREAS.inl index f79a0f8d77f0d23a3e78a4165bbd3ef2485f06d3..317d3febfcbb42cba6b5cca73f8e9c0c396e43e1 100644 --- a/corsika/detail/modules/radio/CoREAS.inl +++ b/corsika/detail/modules/radio/CoREAS.inl @@ -46,9 +46,12 @@ namespace corsika { // get particle charge auto const charge_{get_charge(step.getParticlePre().getPID())}; + // get thinning weight + auto const thinningWeight{step.getParticlePre().getWeight()}; + // constants for electric field vector calculation - auto const constants_{charge_ / (4 * M_PI) / (constants::epsilonZero) / - constants::c}; + auto const constants_{(charge_ / (4 * M_PI) / (constants::epsilonZero) / + constants::c) * thinningWeight}; // set threshold for application of ZHS-like approximation. const double approxThreshold_{1.0e-3}; diff --git a/corsika/detail/modules/radio/ZHS.inl b/corsika/detail/modules/radio/ZHS.inl index 6b8b4907aa37d98965daf67f8611d279ce66f3bd..db6971c5f21c00f60b3c0a598092e27d63461cd1 100644 --- a/corsika/detail/modules/radio/ZHS.inl +++ b/corsika/detail/modules/radio/ZHS.inl @@ -41,7 +41,10 @@ namespace corsika { auto const halfVector{(startPoint - endPoint) / 2}; auto const midPoint{endPoint + halfVector}; - auto const constants{charge / (4 * M_PI) / (constants::epsilonZero) / constants::c}; + // get thinning weight + auto const thinningWeight{step.getParticlePre().getWeight()}; + + auto const constants{(charge / (4 * M_PI) / (constants::epsilonZero) / constants::c) * thinningWeight}; // we loop over each antenna in the collection for (auto& antenna : antennas_.getAntennas()) {