Utilities — decaylanguage.utils#
- decaylanguage.utils.particleutils.charge_conjugate_name(name, pdg_name=False)[source]#
Return the charge-conjugate particle name matching the given name. If no matching is found, return “ChargeConj(pname)”.
Note
Search/match in order:
Trivial case - does the name correspond to a self-conjugate particle? Only works for particles in the DB.
Try to match the antiparticle looking for the opposite PDG ID in the list of PDG IDs - EvtGen names. This can deal with specific particles or badly-known particles not in the DB but not so rare in decay files.
- Parameters:
name (str) – Input particle name.
pdg_name (str, optional, default=False) – Input particle name is the PDG name, not the (default) EvtGen name.
- Returns:
out (str) – Either the EvtGen or PDG charge-conjugate particle name depending on the value of parameter
pdg_name.- Parameters:
- Return type:
- decaylanguage.utils.particleutils.particle_from_string_name(name)[source]#
Get a particle from an AmpGen style name.
Note: the best match is returned.
- Parameters:
name (str)
- Return type:
Particle