IAP GITLAB

Skip to content
Snippets Groups Projects
Commit c54c03e7 authored by Alan Coleman's avatar Alan Coleman Committed by Alan Coleman
Browse files

Move the constants to an internal variable

parent 3d5f8fc7
No related branches found
No related tags found
1 merge request!522put weight from thinning in radio algorithms
Pipeline #11047 passed
......@@ -50,8 +50,7 @@ namespace corsika {
auto const thinningWeight{step.getParticlePre().getWeight()};
// constants for electric field vector calculation
auto const constants_{(charge_ / (4 * M_PI) / (constants::epsilonZero) /
constants::c) * thinningWeight};
auto const constants_{charge_ * emConstant_ * thinningWeight};
// set threshold for application of ZHS-like approximation.
const double approxThreshold_{1.0e-3};
......
......@@ -44,7 +44,7 @@ namespace corsika {
// get thinning weight
auto const thinningWeight{step.getParticlePre().getWeight()};
auto const constants{(charge / (4 * M_PI) / (constants::epsilonZero) / constants::c) * thinningWeight};
auto const constants{charge * emConstant_ * thinningWeight};
// we loop over each antenna in the collection
for (auto& antenna : antennas_.getAntennas()) {
......
......@@ -47,6 +47,8 @@ namespace corsika {
*/
template <typename Particle>
ProcessReturn simulate(Step<Particle> const& step);
static constexpr auto emConstant_{1.0 / (4.0 * M_PI) / (constants::epsilonZero) /
constants::c};
using Base =
RadioProcess<TRadioDetector, CoREAS<TRadioDetector, TPropagator>, TPropagator>;
......
......@@ -49,6 +49,8 @@ namespace corsika {
*/
template <typename Particle>
ProcessReturn simulate(Step<Particle> const& step) const;
static constexpr auto emConstant_{1.0 / (4.0 * M_PI) / (constants::epsilonZero) /
constants::c};
private:
using Base =
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment