From b3969f612ebbb8f2efad11afddf53c9862472c9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Schmidt?= <upwli@student.kit.edu> Date: Wed, 15 Jul 2020 16:32:13 +0200 Subject: [PATCH] Update magnetic field --- Framework/Cascade/Cascade.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Framework/Cascade/Cascade.h b/Framework/Cascade/Cascade.h index 919d1845e..20bfa7348 100644 --- a/Framework/Cascade/Cascade.h +++ b/Framework/Cascade/Cascade.h @@ -227,10 +227,8 @@ namespace corsika::cascade { auto magMaxLength = 1_m / 0; auto directionAfter = directionBefore; if (chargeNumber != 0) { - /* auto magneticfield = currentLogicalNode->GetModelProperties(). - GetMagneticField(vParticle.GetPosition()); */ - auto magneticfield = corsika::geometry::Vector(fEnvironment.GetCoordinateSystem(), - 0_uT, 50_uT, 0_uT); + auto magneticfield = currentLogicalNode->GetModelProperties(). + GetMagneticField(vParticle.GetPosition()); geometry::Vector<SpeedType::dimension_type> const velocityVerticalMag = velocity - velocity.parallelProjectionOnto(magneticfield); LengthType const gyroradius = @@ -242,9 +240,7 @@ namespace corsika::cascade { // First Movement auto position = vParticle.GetPosition() + directionBefore * Steplength / 2; // Change of direction by magnetic field at position - // magneticfield = currentLogicalNode->GetModelProperties.GetMagneticField(position); - magneticfield = corsika::geometry::Vector(fEnvironment.GetCoordinateSystem(), - 0_uT, 50_uT, 0_uT); + magneticfield = currentLogicalNode->GetModelProperties.GetMagneticField(position); directionAfter = directionBefore + velocity.cross(magneticfield) * chargeNumber * Steplength * corsika::units::constants::cSquared * 1_eV / -- GitLab