Package cnuphys.swimZ
Class SwimZDerivative
java.lang.Object
cnuphys.swimZ.SwimZDerivative
- All Implemented Interfaces:
IDerivative
- Direct Known Subclasses:
SectorSwimZDerivative
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected FieldProbe
protected double
protected double
protected float[]
-
Constructor Summary
ConstructorsConstructorDescriptionSwimZDerivative
(int Q, double p, FieldProbe probe) The derivative for swimming through a magnetic field -
Method Summary
Modifier and TypeMethodDescriptionvoid
derivative
(double z, double[] x, double[] dxdz) Compute the derivatives given the value of the independent variable and the values of the function.void
set
(int Q, double p, FieldProbe probe) Set the parameters
-
Field Details
-
_probe
-
_q
protected double _q -
_qv
protected double _qv -
B
protected float[] B
-
-
Constructor Details
-
SwimZDerivative
public SwimZDerivative() -
SwimZDerivative
The derivative for swimming through a magnetic field- Parameters:
Q
- -1 for electron, +1 for proton, etc.p
- the magnitude of the momentum in GeV/c.probe
- the magnetic field getter
-
-
Method Details
-
set
Set the parameters- Parameters:
Q
- -1 for electron, +1 for proton, etc.p
- the magnitude of the momentum in GeV/c.probe
- the magnetic field getter
-
derivative
public void derivative(double z, double[] x, double[] dxdz) Compute the derivatives given the value of the independent variable and the values of the function. Think of the Differential Equation as being dydt = f[y,t].- Specified by:
derivative
in interfaceIDerivative
- Parameters:
z
- the value of the independent variable (the z coordinate) (input).x
- the values of the state vector (x, y, tx, ty, q) at z (input).dxdz
- will be filled with the values of the derivatives at z (output).
-