cnuphys.lund
Class LundSupport

java.lang.Object
  extended by cnuphys.lund.LundSupport

public class LundSupport
extends java.lang.Object


Method Summary
static int geantToLund(int geantId)
          Convert a geant ID onto a Lund (PDG) id.
 LundId get(double id)
          Finds an LundId object based on the given particle id.
 LundId get(int id)
          Finds an LundId object based on the given particle id.
static LundSupport getInstance()
          public access to the singleton
 java.util.ArrayList<LundId> getLundIds()
          Get the list of lundIds
static void main(java.lang.String[] arg)
          Main program for testing
static int massAndChargeToLundId(double mass, int charge)
          Returns the Lund ID of a particle given the mass and charge.
 java.lang.String toString()
          Get a string representing a table of Ids.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getInstance

public static LundSupport getInstance()
public access to the singleton

Returns:
the singleton object.

toString

public java.lang.String toString()
Get a string representing a table of Ids.

Overrides:
toString in class java.lang.Object
Returns:
a string representing a table of Ids.

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 java.util.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

main

public static void main(java.lang.String[] arg)
Main program for testing

Parameters:
arg - command arguments ignored.