Define Heavy ions in the G4SDParticleFilter function

Dear G4 experts:
Recently, I want to use the sensitivity detector (SD) to record the information of primary C-12 ions, and the G4SDParticleFilter class was employed in my code. However, I don’t know how to define the second parameter in the constructor of the class. I noticed that the second parameter is the particle’s name:

G4SDParticleFilter* neutronFilter =
new G4SDParticleFilter(fltName=“neutronFilter”, particleName=“neutron”);

and for these particles, such as neutron, proton, electron, we can directly use its name, and the program will automatically recognize it.

I also noticed that G4SDParticleFilter class provides another construct, which supports the user define the particle:

G4SDParticleFilter(G4String name,
const std::vector<G4ParticleDefinition>& particleDef*);

However, I found this method is very difficult for me since the G4ParticleDefinition is very complicated and requires a lot of parameters input by the user, and I don’t know the values of many parameters. Could you give me some suggestions or provide me a simple method.

Here is the constructor of G4ParticleDefinition class:

G4ParticleDefinition(const G4String& aName,
G4double mass,
G4double width,
G4double charge,
G4int iSpin,
G4int iParity,
G4int iConjugation,
G4int iIsospin,
G4int iIsospinZ,
G4int gParity,
const G4String& pType,
G4int lepton,
G4int baryon,
G4int encoding,
G4bool stable,
G4double lifetime,
G4DecayTable *decaytable,
G4bool shortlived = false,
const G4String& subType ="",
G4int anti_encoding =0,
G4double magneticMoment = 0.0);

The G4ParticleDefinition is a base class for all of the actual particles, which are global singletons. You don’t instantiate one yourself.

For ions (nuclei), you would make use of the addIon() member function:

G4SDParticleFilter myFilter("myIonFilter");
myFilter.addIon(2,4);       // Helium
myFilter.addIon(26,56);     // Iron-56
myFilter.addIon(92,238);    // Depleted uranium

Thank you for your reply, I got it.