Make tritium decay in example "rdecay01"

Environment: Windows 10; Geant4 11.2.2

I am trying to add some physics and make tritium decay, so I made the following changes in the main program:

auto phy = new QBBC;
phy->RegisterPhysics(new FixTritiumPhysics());
phy->RegisterPhysics(new G4DecayPhysics());
phy->RegisterPhysics(new G4RadioactiveDecayPhysics());
runManager->SetUserInitialization(phy);

in which, the FixTritiumPhysics was obtained from this website: Triton decay with rdecay01 example - Getting Started - Geant4 Forum

class FixTritiumPhysics : public G4VPhysicsConstructor
{
  public:
    FixTritiumPhysics() {}
    ~FixTritiumPhysics() {}

  protected:
    void ConstructParticle() override {}
    void ConstructProcess() override
    {
      // Make tritium unstable, so it can be decayed
      G4ParticleDefinition* tr = G4Triton::Definition();
      tr->SetPDGStable(false);
      // Remove G4Decay process, which requires a registered decay table
      G4VProcess* decay = 0;
      G4ProcessManager* pman = tr->GetProcessManager();
      G4ProcessVector* pvec = pman->GetAtRestProcessVector();
      for (G4int i = 0; i < pvec->size() && decay == 0; i++) {
        if ((*pvec)[i]->GetProcessName() == "Decay") decay = (*pvec)[i];
      }
      if (decay) pman->RemoveProcess(decay);

        // Attach RDM, which is a rest-discrete process
#if G4VERSION_NUMBER < 1060 /* See G4RadioactiveDecayPhysics.cc */
      decay = new G4RadioactiveDecay();
#else
      decay = new G4RadioactiveDecayBase();
#endif
      tr->GetProcessManager()->AddProcess(decay, 1000, -1, 1000);
    }
};

So, when I run the tritium decay by /gun/ion 1 3, the tritium can indeed decay and produce electrons.

But when I try to run by Co-60 or other ion, it won’t decay.

/gun/ion 27 60
   Co60:       1  Emean =      0 eV     ( 0 eV  --> 0 eV )    mean life = 7.61 y  
   Total time of life (full chain): mean =      0 ps   half-life =      0 ps    ( 0 ps  --> 0 ps )
   Total visible energy (full chain) : mean =      0 eV    ( 0 eV  --> 0 eV )
   Activity of Co60 =      0 Bq/g   (0 Ci/g) 

I noticed the following in the original post:
The version number check above is needed if you build against older versions of G4. It would be nice if G4Triton had a regular “particle decay table” attached to it, in which case just the first three lines of the function would be needed.

So how can I attach the “particle decay table” or revise the code to make the triton and other ions could decay?

Try

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

1- Triton in rdecay01: it is enough to add 1 statement at end of PhysicsList::ConstructProcess() :
ph–>RegisterProcess(radioactiveDecay, G4Triton::Triton());

2- I am not sure that it makes sense to replace PhysicsList of rdecay01 by QBBC or other …
Start from a “complete” example: rdecay02, Activation, or hadronic Hadr05, Hadr06, Hadr07, NeutronSource, or all basic examples …

Thank you for your reply. However, I am using “Co60.mac”, so this code is already included in the macro.

Thank you for your reply.
1-Your solution is indeed concise and effective.
2-I was experimenting with some possibilities in rdecay01, as I hoped to simulate the entire process where particles decay and interact with matter, rather than just the decay itself. It may not necessarily require QBBC; I might switch to directly registering the electromagnetic processes.
3-I referred to Hadr07, which was quite inspiring.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.