e15190.hira.spectra.convert_particle¶
- e15190.hira.spectra.convert_particle(notation: str) str¶
Convert particle notation into Rensheng’s convention.
The ROOT file contains spectra for multiple particles. This function converts user’s particle notation into the one that is used to named to spectra in the ROOT file.
- Parameters
notation (str) – Particle notation, e.g. “H1”, “He4”.
- Returns
converted – Converted particle notation.
- Return type
str
:raises KeyError : If the particle is not found in the file.:
Example
>>> file = HiraFile('ca48ni64e140') >>> file.convert_particle('H1') 'p'