IAP GITLAB

Skip to content
Snippets Groups Projects
Commit b3969f61 authored by André Schmidt's avatar André Schmidt Committed by ralfulrich
Browse files

Update magnetic field

parent c565d50c
No related branches found
No related tags found
1 merge request!278Magnetic Tracking
......@@ -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 /
......
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