Package cnuphys.lund

Class LundSupport

java.lang.Object
cnuphys.lund.LundSupport

public class LundSupport extends Object
  • Field Details

    • unknownPlus

      public static LundId unknownPlus
      Unknown positive lepton
    • unknownMinus

      public static LundId unknownMinus
      Unknown negative lepton
    • unknownNeutral

      public static LundId unknownNeutral
      Unknown neutral "lepton"
  • Method Details

    • getInstance

      public static LundSupport getInstance()
      public access to the singleton
      Returns:
      the singleton object.
    • toString

      public String toString()
      Get a string representing a table of Ids.
      Overrides:
      toString in class Object
      Returns:
      a string representing a table of Ids.
    • getTrackbased

      public static LundId getTrackbased(int q)
      Obtain the LundID object for a track based particle
      Returns:
      the LundID object for an geantino
    • getHitbased

      public static LundId getHitbased(int q)
      Obtain the LundID object for a hit based particle
      Returns:
      the LundID object for a hit based particle
    • getCVTbased

      public static LundId getCVTbased(int q)
      Obtain the LundID object for a cvt based particle
      Returns:
      the LundID object for a hit based particle
    • getElectron

      public static LundId getElectron()
      Obtain the LundID object for an electron
      Returns:
      the LundID object for an electron
    • getPositron

      public static LundId getPositron()
      Obtain the LundID object for a positron
      Returns:
      the LundID object for a positron
    • getProton

      public static LundId getProton()
      Obtain the LundID object for a proton
      Returns:
      the LundID object for a proton
    • get

      public LundId get(int id, int charge)
      Finds an LundId object based on the given particle id. Uses a binary search.
      Parameters:
      id - the id to look for
      Returns:
      the object if found, or null
    • get

      public LundId get(int id)
      Finds an LundId object based on the given particle id. Uses a binary search.
      Parameters:
      id - the id to look for
      Returns:
      the object if found, or null
    • get

      public LundId get(double id)
      Finds an LundId object based on the given particle id. Uses a binary search.
      Parameters:
      id - the id to look for. This is rounded. This method is to support GEMC.
      Returns:
      the object if found, or null
    • getLundIds

      public ArrayList<LundId> getLundIds()
      Get the list of lundIds
      Returns:
      the list of lundIds
    • geantToLund

      public static int geantToLund(int geantId)
      Convert a geant ID onto a Lund (PDG) id.
      Parameters:
      geantId - the geant Id
      Returns:
      the lund (pdg) Id.
    • massAndChargeToLundId

      public static int massAndChargeToLundId(double mass, int charge)
      Returns the Lund ID of a particle given the mass and charge.
      Parameters:
      mass - the mass of the particle in GeV
      charge - the charge of the particle in units of electron charge
      Returns:
      the Geant ID
    • setStyle

      public static void setStyle(int lundId, Color lineColor)
      Set the style for a given lund Id
      Parameters:
      lundId - the id to set the style for.
      lineColor - the lineColor to use.
      darker - if true make line color datker, else make it lighter.
    • main

      public static void main(String[] arg)
      Main program for testing
      Parameters:
      arg - command arguments ignored.