Package cnuphys.swim

Class SectorDerivative

java.lang.Object
cnuphys.swim.SectorDerivative
All Implemented Interfaces:
IDerivative

public class SectorDerivative extends Object implements IDerivative
Used for swimming in the sector system with a rotated composite field
Author:
heddle
  • Constructor Summary

    Constructors
    Constructor
    Description
    SectorDerivative(int sector, int charge, double momentum, cnuphys.magfield.RotatedCompositeProbe rcProbe)
    The derivative for swimming through a magnetic field
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    derivative(double s, double[] Q, double[] dQds)
    Compute the derivatives given the value of s (path length) and the values of the state vector.
    void
    set(int sector, int charge, double momentum, cnuphys.magfield.RotatedCompositeProbe rcProbe)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SectorDerivative

      public SectorDerivative(int sector, int charge, double momentum, cnuphys.magfield.RotatedCompositeProbe rcProbe)
      The derivative for swimming through a magnetic field
      Parameters:
      sector - the sector [1..6]
      charge - -1 for electron, +1 for proton, etc.
      momentum - the magnitude of the momentum.
      field - the magnetic field
  • Method Details

    • set

      public void set(int sector, int charge, double momentum, cnuphys.magfield.RotatedCompositeProbe rcProbe)
    • derivative

      public void derivative(double s, double[] Q, double[] dQds)
      Compute the derivatives given the value of s (path length) and the values of the state vector.
      Specified by:
      derivative in interface IDerivative
      Parameters:
      s - the value of the independent variable path length (input).
      Q - the values of the state vector ([x,y,z, px/p, py/p, pz/p]) at s (input).
      dydt - will be filled with the values of the derivatives at t (output).