RadioActiveDecay information

Hello,

I was wondering if it was possible to access the information inside the folders “PhotonEvaporationX.X” and “RadioactiveDecayX.X” with some GEANT4 functions like DumpTable() or GetIonLifeTime(), etc.

Let me explain in more detail.

For particles you can get it is properties and decay modes, for example, following the code at Example showing how to retrieve particle properties

It is possible for light ions too. But basically, it is not possible for any one consider as GenericIon, from one of Vladimir Ivantchenko presentations:
“- Light ions: d, t, 3He, 4He”
“- G4GenericIon is used to define physics for all other ions”

After declaring the needed PhysicsLists, you can follow the next piece of code:

G4int ionA = 137;
G4int ionZ = 55;
G4ParticleDefinition* projectileNucleus = nullptr;
G4GenericIon* gion = G4GenericIon::GenericIon();
gion->SetProcessManager(new G4ProcessManager(gion));
G4ParticleTable* partTable = G4ParticleTable::GetParticleTable();
G4IonTable* ions = partTable->GetIonTable();
partTable->SetReadiness();
ions->CreateAllIon();
ions->CreateAllIsomer();
projectileNucleus = partTable->GetIonTable()->GetIon(ionZ, ionA, 0.0);
projectileNucleus->DumpTable();

And you are going to get the next:

--- G4ParticleDefinition ---
 Particle Name : Cs137
 PDG particle code : 1000551370 [PDG anti-particle code: 0]
 Mass [GeV/c2] : 127.5     Width : 0
 Lifetime [nsec] : 1.36948e+18
 Charge [e]: 55
 Spin : 7/2
 Parity : 1
 Charge conjugation : 0
 Isospin : (I,Iz): (0/2 , 0/2 )
 GParity : 0
 MagneticMoment [MeV/T] : 8.95706e-14
 Quark contents     (d,u,s,c,b,t) : 192, 219, 0, 0, 0, 0
 AntiQuark contents               : 0, 0, 0, 0, 0, 0
 Lepton number : 0 Baryon number : 137
 Particle type : nucleus [generic]
 Atomic Number : 55  Atomic Mass : 137
 Stable : unstable -- lifetime = 43.426 y
 Decay table should be consulted to G4RadioactiveDecayProcess.

The last sentence is coming from G4ParticleDefinition.cc, could be check here:

if (IsGeneralIon()) {
    G4double lftm = GetIonLifeTime();
    if (lftm < -1000.) {
      G4cout << " Stable : No data found -- unknown" << G4endl;
    }
    else if (lftm < 0.) {
      G4cout << " Stable : stable" << G4endl;
    }
    else {
      G4cout << " Stable : unstable -- lifetime = " << G4BestUnit(lftm, "Time")
             << "\n  Decay table should be consulted to G4RadioactiveDecayProcess." << G4endl;
    }
  }

Since, as I said before, it is a generic Ion.

Clearly, when you simulate a RadioactiveDecay, the info inside these files, “PhotonEvaporationX.X” and “RadioactiveDecayX.X”, is accessed.

So, to be more precise, is there a way that the user could access directly this information?

Thank you for your time.

Geant4 Version: v11.3.0 (tried too with v10.3.0, I think it does not matter)
Operating System: Sequoia 15.1
Compiler/Version: Apple clang version 15.0.0 (clang-1500.3.9.4)
CMake Version: 3.30.4


1 Like

I have tried to get the decay table and dumpinfo but get a segmentation violation

fParticle->DumpTable();
G4DecayTable *fDecayTable = fParticle->GetDecayTable();
fDecayTable->DumpInfo();

the stacks was:

─── Stack ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
[0] from 0x00007ffff572dc9b in G4DecayTable::DumpInfo() const
[1] from 0x00005555555715b5 in LAMBETA::PrimaryGeneratorAction::GeneratePrimaries(G4Event*)+583 at /home/fox/Documents/GraPro/BetaDecay/LAMBDA-G4/src/PrimaryGeneratorAction.cc:45
[2] from 0x00007ffff76d8825 in G4WorkerRunManager::GenerateEvent(int)
[3] from 0x00007ffff76d3dd6 in G4WorkerRunManager::DoEventLoop(int, char const*, int)
[4] from 0x00007ffff767afd2 in G4RunManager::BeamOn(int, char const*, int)
[5] from 0x00007ffff76d7d45 in G4WorkerRunManager::DoWork()
[6] from 0x00007ffff7671a00 in G4MTRunManagerKernel::StartThread(G4WorkerThread*)
[7] from 0x00007ffff493cdb4
[8] from 0x00007ffff45c3aa4 in start_thread+900 at ./nptl/pthread_create.c:447
[9] from 0x00007ffff4650c3c in clone3+44 at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
[+]

Please don’t attach your new topic to an existing thread. If you need help, please create a new topic.

Please don’t attach your new topic to an existing thread. If you need help, please create a new topic.

sorry, i think this is the same topic (at least related topic). @areinaco was looking for a way to get the RadioActiveDecay information and i provided this method but get some errors.

So, to be more precise, is there a way that the user could access directly this information?

i find a new way to access this information (but not very readable) by using macro command:

/process/had/rdm/verbose 2 or 3 (i haven't tried verbose=1)

you will get output like this:

Thanks @YiHui-Liu , but that was not exactly what I was looking for. I want to access with some Geant4 “Getter” the parameters (decays, intensities, energies, etc …) inside PhotoEvaporation and RadioactiveDecay folders.