Class Swim

java.lang.Object
org.jlab.clas.swimtools.Swim
Direct Known Subclasses:
DoubleSwim

public class Swim extends Object
Author:
ziegler
  • Field Details

    • stepSize

      public double stepSize
    • distanceBetweenSaves

      public double distanceBetweenSaves
  • Constructor Details

    • Swim

      public Swim()
      Class for swimming to various surfaces. The input and output units are cm and GeV/c
  • Method Details

    • SetSwimParameters

      public void SetSwimParameters(int direction, double x0, double y0, double z0, double thx, double thy, double p, int charge)
      Parameters:
      direction - +1 for out -1 for in
      x0 -
      y0 -
      z0 -
      thx -
      thy -
      p -
      charge -
    • SetSwimParameters

      public void SetSwimParameters(int superlayerIdx, int layerIdx, double x0, double y0, double z0, double thx, double thy, double p, int charge)
      Sets the parameters used by swimmer based on the input track state vector parameters swimming outwards
      Parameters:
      superlayerIdx -
      layerIdx -
      x0 -
      y0 -
      thx -
      thy -
      p -
      charge -
    • SetSwimParameters

      public void SetSwimParameters(double x0, double y0, double z0, double px, double py, double pz, int charge)
      Sets the parameters used by swimmer based on the input track parameters
      Parameters:
      x0 -
      y0 -
      z0 -
      px -
      py -
      pz -
      charge -
    • SetSwimParameters

      public void SetSwimParameters(double xcm, double ycm, double zcm, double phiDeg, double thetaDeg, double p, int charge, double maxPathLength)
      Parameters:
      xcm -
      ycm -
      zcm -
      phiDeg -
      thetaDeg -
      p -
      charge -
      maxPathLength -
    • SetSwimParameters

      public void SetSwimParameters(double xcm, double ycm, double zcm, double phiDeg, double thetaDeg, double p, int charge, double maxPathLength, double Accuracy, double StepSize)
      Parameters:
      xcm -
      ycm -
      zcm -
      phiDeg -
      thetaDeg -
      p -
      charge -
      maxPathLength -
      Accuracy -
      StepSize -
    • SwimToPlaneTiltSecSys

      public double[] SwimToPlaneTiltSecSys(int sector, double z_cm)
    • SwimToPlaneTiltSecSysBdlXZPlane

      public double[] SwimToPlaneTiltSecSysBdlXZPlane(int sector, double z_cm)
    • SwimToPlaneLab

      public double[] SwimToPlaneLab(double z_cm)
      Parameters:
      z_cm -
      Returns:
      state x,y,z,px,py,pz, pathlength, iBdl at the plane surface
    • SwimToCylinder

      public double[] SwimToCylinder(double Rad)
      Parameters:
      Rad -
      Returns:
      state x,y,z,px,py,pz, pathlength, iBdl at the surface
    • SwimRho

      public double[] SwimRho(double radius)
      Parameters:
      radius - in cm
      Returns:
      state x,y,z,px,py,pz, pathlength, iBdl at the surface
    • SwimRho

      public double[] SwimRho(double radius, double accuracy)
      Parameters:
      radius - in cm
      accuracy - in cm
      Returns:
      state x,y,z,px,py,pz, pathlength, iBdl at the surface
    • SwimGenCylinder

      public double[] SwimGenCylinder(Point3D axisPoint1, Point3D axisPoint2, double radius)
      Parameters:
      axisPoint1 - in cm
      axisPoint2 - in cm
      radius - in cm
      Returns:
      swam trajectory to the cylinder
    • SwimGenCylinder

      public double[] SwimGenCylinder(Point3D axisPoint1, Point3D axisPoint2, double radius, double accuracy)
      Parameters:
      axisPoint1 - in cm
      axisPoint2 - in cm
      radius - in cm
      accuracy - in cm
      Returns:
      swam trajectory to the cylinder
    • SwimPlane

      public double[] SwimPlane(Vector3D n, Point3D p, double accuracy)
    • SwimToSphere

      public double[] SwimToSphere(double Rad)
      Parameters:
      Rad -
      Returns:
      state x,y,z,px,py,pz, pathlength, iBdl at the surface
    • SwimToPlaneBoundary

      public double[] SwimToPlaneBoundary(double d_cm, Vector3D n, int dir)
      Parameters:
      d_cm -
      n -
      dir -
      Returns:
      return state x,y,z,px,py,pz, pathlength, iBdl at the plane surface in the lab frame
    • SwimToBeamLine

      public double[] SwimToBeamLine(double xB, double yB)
    • SwimToLine

      public double[] SwimToLine(Line3D l)
    • Bfield

      public void Bfield(int sector, double x_cm, double y_cm, double z_cm, float[] result)
      Parameters:
      sector -
      x_cm -
      y_cm -
      z_cm -
      result - B field components in T in the tilted sector system
    • BfieldLab

      public void BfieldLab(double x_cm, double y_cm, double z_cm, float[] result)
      Parameters:
      x_cm -
      y_cm -
      z_cm -
      result - B field components in T in the lab frame
    • AdaptiveSwimPlane

      public double[] AdaptiveSwimPlane(double px, double py, double pz, double nx, double ny, double nz, double accuracy)
    • AdaptiveSwimCylinder

      public double[] AdaptiveSwimCylinder(double a1x, double a1y, double a1z, double a2x, double a2y, double a2z, double radius, double accuracy)
    • AdaptiveSwimRho

      public double[] AdaptiveSwimRho(double radius, double accuracy)
    • SwimToZ

      public double[] SwimToZ(double Z, int dir)
      Parameters:
      Z -
      Returns:
      state x,y,z,px,py,pz, pathlength, iBdl at the surface
    • getSwimTraj

      public SwimTrajectory getSwimTraj()
      Returns:
      the swimTraj
    • setSwimTraj

      public void setSwimTraj(SwimTrajectory swimTraj)
      Parameters:
      swimTraj - the swimTraj to set
    • SwimToDCA

      public double[] SwimToDCA(SwimTrajectory trk2)