Contents
Class SectorDerivative
java.lang.Object
cnuphys.swim.SectorDerivative
- All Implemented Interfaces:
IDerivative
Used for swimming in the sector system with a rotated composite field
- Author:
- heddle
-
Constructor Summary
ConstructorsConstructorDescriptionSectorDerivative
(int sector, int charge, double momentum, cnuphys.magfield.RotatedCompositeProbe rcProbe) The derivative for swimming through a magnetic field -
Method Summary
Modifier and TypeMethodDescriptionvoid
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)
-
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 interfaceIDerivative
- 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).
-