RDmiso package to get Br

Hello, I need to use RDmiso to get Br of radionuclides.
How to do it?
Thank you

Looking up RDMiso on Google gets only a participants list from an old (and undated!) workshop hosted by the ICRM Gamma-ray spectroscopy group. It looks to me like that was an early “internal name” for what is called G4RadioactiveDecay, so just the regular isotope stuff in G4.

Yeah…indeed, my boss wrote me that to get BR he uses RDMiso package. I looked on google, but, I also didn’t find official information from Geant4 collaboration, but only some information from the workshops…

In my simulation, I use G4RadioactiveDecay, but how can I print BR?

I have to replicate this file typology:

exampledata.txt (84.8 KB)

First culomn is a binned deposited energy
Second culomn is the counts number
Third culomn, my boss said that it is th BR got by the RDMiso package using tables about information on the decay, even using the BR from excited levels of sons nuclides.

Currently, I can print a file with the binned deposite energy and the counts (first and second culomn of the example), but I can’t print the BRs (third culomn).
Do you know how to print these BR values?

Well, all the branching ratios are in text files in the $G4RADIOACTIVEDATA directory tree. For example, here’s the file for U-238 (z92.a238):

# 238U ( 4.468E+9 Y)
#  Excitation  flag   Halflife  Mode    Daughter Ex flag   Intensity          Q
P            0  - 1.409994e+17
                                  Alpha            0               1
                              SpFission            0         5.5e-07
                                  Alpha            0  -       79.017      4269.75
                                  Alpha        49.55  -       20.905       4220.2
                                  Alpha       163.05  -     0.078017       4106.7
                              SpFission            0  -      5.5e-05        1e-06
P       2557.9  -      2.8e-07
                                     IT            0               1

The “Intensity” column speaks to the branch fractions. Is that what you’re looking for?

Thank you @mkelsey

Looking the example output file that he gave me
exampledata.txt (84.8 KB)

There is a BR value (third culomn) for each bin energy (first culomn)…then the tables should have the intensity values (of gamma emissions) for each energy value.

Using your example (i.e. 238U), and looking values on Table of Isotopes decay data
at the end of the simulation I shold have a file where the BR show two higher intensity valus at Egamma=49.55keV and Egamma=113.5keV, while for other energies, I think the intensity should be approximately 0 (because there aren’t peaks on Table of Isotopes decay data)

Similarly, if we consider 60Co, I should have values of intensity at Egamma=346.93keV,826.06keV, 1173.237keV, 1332.501keV, 2158.57keV, 2505keV according to the values on Table of Isotopes decay data

In the text that you showed

I read a 49.55 and a 163.05. Are they the gamma energies? (the 49.55 fits with value on Table of Isotopes decay data, but the 163.05 is a bit larger than 113.5keV written on Table of Isotopes decay data)

Lastly, if the tables that you showed me have the intensities for each gamma energies…how could I read these values and write them in a text file together with energy bin and counts?

Well, no I can’t. That’s an environment variable that is set as part of your personal setup. The full path depends on how you installed Geant4 on your local machine, or how it was installed on your computing cluster. At your terminal command line, after setting up your G4 environment, you should be able to type:
and see the long list of tiny “z#.a#” files.

Yes, I found the path just while you were replying.

I looked, for example to 60Co

# 60CO ( 1925.28 D )
#  Excitation  flag   Halflife  Mode    Daughter Ex flag   Intensity          Q
P            0  - 1.663442e+08
                              BetaMinus            0               1
                              BetaMinus     1332.514  -         0.12     1490.299    uniqueSecondForbidden
                              BetaMinus     2158.632  -        1e-27      664.181    uniqueSecondForbidden
                              BetaMinus     2505.753  -        99.88       317.06
P        58.59  -       628.02
                              BetaMinus            0          0.0025
                                     IT            0          0.9975
                              BetaMinus     1332.514  -      0.24135     1548.889
                              BetaMinus     2158.632  -    0.0086484      722.771

by comparing the values 1332.514, 2158.632, 2505,753 with the energies on Table of Isotopes decay data I guess they are the enegies (even if the geant table misses some energies, i.e. 346.93, 826.06 and 1173.237)

do you know how to write the intensities of the table in a text file with the binned energy?
For example

Currently I produce this file (the example refers to 60Co)
EfficiencyData.txt (47.2 KB)

According to the Geant4 table, the simulation should add a third culomn writing:
0.12 in correspondence of 1332
1e-27 in correspondence of 2158
99.88 in correspondence of 2505
0 in correspondence of all other bin energies.

how could I do it?

You may have to do it “by hand” with an editor. You might also look at the radioactive decay examples (rdecay01, rdecay02). I have a vague memory that they print out branching fraction information as part of their summary output.

This is the easilier way, but my boss said that in his simulation (working with old version of Geant4) he automatically gets the BR.

I found this function

void Run::WriteActivity(G4int nevent)
 G4ProcessTable *pTable = G4ProcessTable::GetProcessTable();
 G4Radioactivation* rDecay = (G4Radioactivation *)
         pTable->FindProcess("Radioactivation", "GenericIon");
 // output the induced radioactivities (in VR mode only)
 if ((rDecay == 0) || (rDecay->IsAnalogueMonteCarlo())) return;
 G4String fileName = G4AnalysisManager::Instance()->GetFileName() + ".activity";
 std::ofstream outfile (fileName, std::ios::out );
 std::vector<G4RadioactivityTable*> theTables =

 for (size_t i = 0 ; i < theTables.size(); i++) {
    G4double rate, error;
    outfile << "Radioactivities in decay window no. " << i << G4endl;
    outfile << "Z \tA \tE \tActivity (decays/window) \tError (decays/window) "
            << G4endl;

    map<G4ThreeVector,G4TwoVector> *aMap = theTables[i]->GetTheMap();
    map<G4ThreeVector,G4TwoVector>::iterator iter;
    for (iter=aMap->begin(); iter != aMap->end(); iter++) {
       rate = iter->second.x()/nevent;
       error = std::sqrt(iter->second.y())/nevent;
       if (rate < 0.) rate = 0.;                // statically it can be < 0.
       outfile << iter->first.x() <<"\t"<< iter->first.y() <<"\t"
               << iter->first.z() << "\t" << rate <<"\t" << error << G4endl;
    outfile << G4endl;

In Run.cc of rdecay02 Run.cc (14.0 KB)
but it doesn’t look to be what I need