Command thresholdForVeryLongDecayTime for radioactive decay

Please fill out the following information to help in answering your question, and also see tips for posting code snippets. If you don’t provide this information it will take more time to help with your problem!

_Geant4 Version:V11.2.2
_Operating System:Ubuntu 24.04
Compiler/Version:
CMake Version:

No Radioactive decay
Command thresholdForVeryLongDecayTime

Hello,
I’m writing a simple Geant4 program that uses a CO60 source as a particle generator.
The program compiles without errors, but when I run it, I don’t get any secondary particles.
Looking at previous posts, I found that I needed to change the thresholdForVeryLongDecayTime variable from 1 year to a very high value.

As recommended, I wanted to change the value in the GUI using the command
/process/had/rdm/thresholdForVeryLongDecayTime
But apparently this command isn’t among the available options.

I use the Geant4 v11.2.2

Does anyone have any ideas?

Hello,

I guess there is something wrong on your set-up, but I can’t tell you how to fix it.

I confirm that in Geant4 11.2.p02, the command “/process/had/rdm/thresholdForVeryLongDecayTime 1.0e+60 year” is properly defined.
For instance, you can run the Geant4 example:
examples/extended/radioactivedecay/rdecay01
using the macro Co60.mac .
If you comment, in this macro, the above line:
#/process/had/rdm/thresholdForVeryLongDecayTime 1.0e+60 year
you get quite different results.

Best regards,
Alberto

What physics list are you using? The radioactive decay related commands should be available if this process has been added to the relevant particles in the physics list.

I solve my problem…of PhysicsList declaration…
Here after the programs i used.. it can perhaps help some body

first PhysicsList.hh and .cc


#ifndef PHYSICS_HH
#define PHYSICS_HH

#include "G4VModularPhysicsList.hh"
#include "G4EmStandardPhysics.hh"
#include "G4OpticalPhysics.hh"
#include "G4DecayPhysics.hh"
#include "G4RadioactiveDecayPhysics.hh"

class MyPhysicsList : public G4VModularPhysicsList
{
public:
    MyPhysicsList();
    ~MyPhysicsList();
};

#endif
``̀`


``
                               è
#include "physics.hh"

MyPhysicsList::MyPhysicsList()
{
    RegisterPhysics (new G4EmStandardPhysics());
    RegisterPhysics (new G4OpticalPhysics());
    RegisterPhysics (new G4DecayPhysics());
    RegisterPhysics (new G4RadioactiveDecayPhysics());

}

MyPhysicsList::~MyPhysicsList()
{

}

and the generator.cc and .hh


#ifndef GENERATOR_HH
#define GENERATOR_HH

#include "G4VUserPrimaryGeneratorAction.hh"

#include "G4ParticleGun.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleTable.hh"
#include "G4Geantino.hh"
#include "G4IonTable.hh"

class MyPrimaryGenerator : public G4VUserPrimaryGeneratorAction
{
public:
    MyPrimaryGenerator();
    ~MyPrimaryGenerator();

    virtual void GeneratePrimaries(G4Event*);

private:
    G4ParticleGun *fParticleGun;
};

#endif
#include "generator.hh"

MyPrimaryGenerator::MyPrimaryGenerator()
{
    fParticleGun = new G4ParticleGun(1);

    G4ParticleTable *particleTable = G4ParticleTable::GetParticleTable();
    G4ParticleDefinition *particle = particleTable->FindParticle("geantino");

    G4ThreeVector pos(0.,0.,0.);
    G4ThreeVector mom(0.,0.,1.);

    fParticleGun->SetParticlePosition(pos);
    fParticleGun->SetParticleMomentumDirection(mom);
    fParticleGun->SetParticleMomentum(0.*GeV);
    fParticleGun->SetParticleDefinition(particle);
}

MyPrimaryGenerator::~MyPrimaryGenerator()
{
    delete fParticleGun;
}

void MyPrimaryGenerator::GeneratePrimaries(G4Event *anEvent)
{
    G4ParticleDefinition *particle = fParticleGun->GetParticleDefinition();

    if(particle == G4Geantino::Geantino())
    {
        G4int Z = 27;
        G4int A = 60;

        G4double charge = 0.*eplus;
        G4double energy = 0.*keV;

        G4ParticleDefinition *ion = G4IonTable::GetIonTable()->GetIon(Z,A,energy);

        fParticleGun -> SetParticleDefinition(ion);
        fParticleGun -> SetParticleCharge(charge);

        //G4cout << "Generation d'un ion "<<"Z ="<< Z<<"A ="<< A<<"energie :"<<energy<<"charge="<<charge<< G4endl;

    }
    fParticleGun->GeneratePrimaryVertex(anEvent);
}

the results.. when set

/process/had/rdm/thresholdForVeryLongDecayTime 1.0e+60 years

and for 20 events