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 Link icon

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

    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 Link icon

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

    • SectorDerivative Link icon

      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 Link icon

    • set Link icon

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

      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).
      dQds - will be filled with the values of the derivatives at t (output).
      dydt - will be filled with the values of the derivatives at t (output).