Generation of beta spectrum with gammas in coincidence

Dear all,

We are trying to simulate a beta decay followed but the emission of gamma rays.

Concerning the beta energy spectrum, there is no problem, the energy deposited in the detector corresponds to a standard continuum Beta decay.
Concerning the emmission of 2 gammas in coincidence, there is no problem. One even see the summing effect.

However, when trying to emit the beta and the 2 gammas (all 3 in coincidence), the energy deposited by beta is well taken into account, but the 2 gammas are completely ignored for some reasons.

Here are the things I tried but failed:

  • Reduced the emission of beta vs 2gammas, to see if one could start seeing the gamma ray energies.
  • Reverted the emission of the beta and 2 gammas.
  • Used a different physics library, other than the standard : FTFP_BERT_EMY
    if (GLOB_source_type[i] == 11) {
       double rdenergy=0;
               rdenergy = gRandom->Uniform(0.0,GLOB_source_energy_bdc_b[i]);
               bool result = BetaFunction(0,GLOB_source_energy_bdc_b[i],rdenergy,1,49);
               if(true == result){
           G4ThreeVector rdpos = G4RandomDirection();
           particleGun->SetParticleMomentumDirection( rdpos );
           double br = gRandom->Uniform(0.0,100);
           if(br<=10){       // Branching of 10%
       particleGun->SetParticleMomentumDirection( rdpos1 );
       G4ThreeVector rdpos2 = G4RandomDirection();
       particleGun->SetParticleMomentumDirection( rdpos2 );


// ****************************************************************************
// ************************* Beta Decay Function *****************************
bool G4IDSPrimaryGeneratorAction::BetaFunction(int type, double Q, double Te, double MaxFactor, double Z)

Main file called and the (6.2 KB) (12.6 KB)

Please could you help me to figure out where to apply modifications in order to be able to generate and record the energy of a beta-gamma-gamma coincidence.

Thank you in advance.