Package cnuphys.lund

Class GeneratedParticleRecord

java.lang.Object
cnuphys.lund.GeneratedParticleRecord
All Implemented Interfaces:
Serializable

public class GeneratedParticleRecord extends Object implements Serializable
Holds the Lund ID, vertex, momentum, and the initial angles giving the direction of the particle's momentum.
Author:
heddle
See Also:
  • Constructor Details

    • GeneratedParticleRecord

      public GeneratedParticleRecord(int charge, double xo, double yo, double zo, double momentum, double theta, double phi)
      Parameters:
      charge - the charge: -1 for electron, 1 for proton, etc
      xo - the x vertex position in m
      yo - the y vertex position in m
      zo - the z vertex position in m
      momentum - initial momentum in GeV/c
      theta - initial polar angle in degrees
      phi - initial azimuthal angle in degrees
  • Method Details

    • getCharge

      public int getCharge()
      Get the integer charge
      Returns:
      the integer charge
    • getVertexX

      public double getVertexX()
      Get the the X vertex position in m
      Returns:
      the X vertex position in m
    • getVertexY

      public double getVertexY()
      Get the the Y vertex position in m
      Returns:
      the Y vertex position in m
    • getVertexZ

      public double getVertexZ()
      Get the the Z vertex position in m
      Returns:
      the Z vertex position in m
    • getMomentum

      public double getMomentum()
      Get the momentum in GeV/c
      Returns:
      the momentum in GeV/c
    • getTheta

      public double getTheta()
      Get the initial polar angle in degrees.
      Returns:
      the initial polar angle in degrees.
    • getPhi

      public double getPhi()
      Get the initial azimuthal angle in degrees.
      Returns:
      the initial azimuthal angle in degrees.
    • getTotalEnergy

      public double getTotalEnergy(LundId lundId)
      The total energy in GeV. This requires that we specify what particle this is.
      Parameters:
      lundid - the lundid of the particle
      Returns:
      the total energy in GeV
    • getKineticEnergy

      public double getKineticEnergy(LundId lundId)
      Get the kinetic energy in GeV. This requires that we specify what particle this is.
      Parameters:
      lundid - the lundid of the particle
      Returns:
      the kinetic energy in GeV
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashKey

      public String hashKey()
      Records a reduced precision String version as a hash key
      Parameters:
      rpr - the GeneratedParticleRecord
      Returns:
      a reduced precision String version
    • hashKey

      public static String hashKey(GeneratedParticleRecord rpr)
      Records a reduced precision String version as a hash key
      Parameters:
      rpr - the GeneratedParticleRecord
      Returns:
      a reduced precision String version
    • valStr

      public static String valStr(double f)
    • fromHash

      public static GeneratedParticleRecord fromHash(String hash)
    • main

      public static void main(String[] arg)