Message: Add interface for FindIon()/GetIon() by name? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Idea Add interface for FindIon()/GetIon() by name? 

Forum: Particles
Date: 26 Apr, 2017
From: Michael H. Kelsey <Michael H. Kelsey>

The regular G4ParticleTable includes an interface to fetch particles using their name string, e.g., G4ParticleTable::GetParticleTable()->GetParticle("gamma"). This is used extensively in the UI, to configure generators, visualization, and so forth.

There is no comparable interface for ions. G4ParticleGun has to first specify the particle name as "ion", and then to specify Z and A in a separate command. Not only for this, but for many other use cases, it would be "nice" if there was an interface to take the officially generated ion name strings as input, and convert them back to Z/A/E/L/J/etc. for the existing accessor functions. For example, /gun/particle Pb210 or /gun/particle Pb210[0.0].

I've written such an interface by hand for my own simulation framework, but it would be more convenient to have it as part of G4IonTable.

  -- Michael Kelsey

 Add Message Add Message
to: "Add interface for FindIon()/GetIon() by name?"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews

[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]