TGeoElementRN Decay Problem

Hi everyone!

Currently I’m trying to get more information about the decay of Rn-222, especially at which time how much of Rn-222 or its “daughters” is left. Therefore I modified this tutorial: … ource.html

The problem is, that it seems like my code woudn’t be able to get all daughters of the decay scheme of Rn-222:

And it should be:

Do you know what the problem is?

Thank you in advance for your answer,

My code is:

[code]void Rn222()

TGeoManager *geom = new TGeoManager("", “”);
TGeoElementTable *table = gGeoManager->GetElementTable();
TGeoElementRN *rn22 = table->GetElementRN(222, 86);

TGeoElementRN *el1 = table->GetElementRN(222, 86);
//TGeoElementRN *el2 = table->GetElementRN(12,6);

//Radioactive material
TGeoMaterial *mat = new TGeoMaterial(“RN22”, rn22, 9.73);
printf(“Radioactive material:\n”);

//Calculate seconds
Double_t time = 1.5e11; // seconds
Double_t precision = 1e-20;
TGeoMaterial *decaymat = mat->DecayMaterial(time, precision);//Define Calculate
printf(“Radioactive material evolution after %g years:\n”, time / 3.1536e7);

//Calculate years
time = 100000000.;
decaymat = mat->DecayMaterial(time, precision);
printf(“Radioactive material evolution after %g seconds:\n”, time);

//Fill Vector
TObjArray *vect = new TObjArray();
TCanvas *c2 = new TCanvas(“c2”, “Mixture decay”, 1000, 800);
DrawPopulation(vect, c2, 0.01, 100000000., kTRUE);


void DrawPopulation(TObjArray *vect, TCanvas *c2, Double_t tmin = 0.,
Double_t tmax = 0., Bool_t logx = kFALSE)
Int_t n = vect->GetEntriesFast();//set n to amount of entries
TGeoElementRN *elem;
TGeoBatemanSol *sol;
c2->SetLogy(); //set axes scale logarithm

if (logx) c2->SetLogx();

for (Int_t i = 0; i<n; i++)
	TGeoElement *el = (TGeoElement*)vect->At(i);
	if (!el->IsRadioNuclide()) continue;
	TGeoElementRN *elem = (TGeoElementRN *)el;
	TGeoBatemanSol *sol = elem->Ratio();
	if (sol)
		sol->SetLineColor(1 + (i % 9));
		if (tmax>0.) sol->SetRange(tmin, tmax);
		if (i == 0) //Titel is set at the beginning of the array
			TF1 *func = (TF1*)c2->FindObject(
				Form("conc%s", sol->GetElement()->GetName())); //Get Name of the first element in the array
				"Concentration of elements derived from Rn22;\
													time[s];Rn222 and Daughters");
		else sol->Draw("SAME");//do not overwrite


Dear Alina, what makes you think that what you get is wrong? All the decay channels from the diagram you display are taken into account, entering the Bateman equation that gives the evolution of the populations of radioactive products produced in the chain. Some are short lived, others very long, so it is normal that after very long time you will find just the stable elements at the end of the decay chain, while at some intermediate ages you get a combination of those. It is very unlikely to have all these elements at the same time, no matter the moment when you look.

Best, Andrei