Package cnuphys.lund
Class LundSupport
java.lang.Object
cnuphys.lund.LundSupport
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic int
geantToLund
(int geantId) Convert a geant ID onto a Lund (PDG) id.get
(double id) Finds an LundId object based on the given particle id.get
(int id) Finds an LundId object based on the given particle id.get
(int id, int charge) Finds an LundId object based on the given particle id.static LundId
getCVTbased
(int q) Obtain the LundID object for a cvt based particlestatic LundId
Obtain the LundID object for an electronstatic LundId
getHitbased
(int q) Obtain the LundID object for a hit based particlestatic LundSupport
public access to the singletonGet the list of lundIdsstatic LundId
Obtain the LundID object for a positronstatic LundId
Obtain the LundID object for a protonstatic LundId
getTrackbased
(int q) Obtain the LundID object for a track based particlestatic void
Main program for testingstatic int
massAndChargeToLundId
(double mass, int charge) Returns the Lund ID of a particle given the mass and charge.static void
Set the style for a given lund IdtoString()
Get a string representing a table of Ids.
-
Field Details
-
unknownPlus
Unknown positive lepton -
unknownMinus
Unknown negative lepton -
unknownNeutral
Unknown neutral "lepton"
-
-
Method Details
-
getInstance
public access to the singleton- Returns:
- the singleton object.
-
toString
Get a string representing a table of Ids. -
getTrackbased
Obtain the LundID object for a track based particle- Returns:
- the LundID object for an geantino
-
getHitbased
Obtain the LundID object for a hit based particle- Returns:
- the LundID object for a hit based particle
-
getCVTbased
Obtain the LundID object for a cvt based particle- Returns:
- the LundID object for a hit based particle
-
getElectron
Obtain the LundID object for an electron- Returns:
- the LundID object for an electron
-
getPositron
Obtain the LundID object for a positron- Returns:
- the LundID object for a positron
-
getProton
Obtain the LundID object for a proton- Returns:
- the LundID object for a proton
-
get
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
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
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
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 GeVcharge
- the charge of the particle in units of electron charge- Returns:
- the Geant ID
-
setStyle
Set the style for a given lund Id- Parameters:
lundId
- the id to set the style for.lineColor
- the lineColor to use.darker
- iftrue
make line color datker, else make it lighter.
-
main
Main program for testing- Parameters:
arg
- command arguments ignored.
-