Macro that demonstrates usage of radioactive elements/materials/mixtures with TGeo package.
A radionuclide (TGeoElementRN) derives from the class TGeoElement and provides additional information related to its radioactive properties and decay modes.
The radionuclides table is loaded on demand by any call:
The isomeric number is optional and the default value is 0.
To create a radioactive material based on a radionuclide, one should use the constructor:
To create a radioactive mixture, one can use radionuclides as well as stable elements:
Once defined, one can retrieve the time evolution for the radioactive materials/mixtures by using one of the 2 methods:
To use this method, one has to provide an empty TObjArray object that will be filled with all elements coming from the decay chain of the initial radionuclides contained by the material/mixture. The precision represent the cumulative branching ratio for which decay products are still considered. The POPULATION list may contain stable elements as well as radionuclides, depending on the initial elements. To test if an element is a radionuclide:
All radionuclides in the output population list have attached objects that represent the time evolution of their fraction of nuclei with respect to the top radionuclide in the decay chain. These objects (Bateman solutions) can be retrieved and drawn:
Another method allows to create the evolution of a given radioactive material/mixture at a given moment in time:
The method will create the mixture that result from the decay of a initial material/mixture at TIME, while all resulting elements having a fractional weight less than PRECISION are excluded.
void RadioNuclides()
{
printf("___________________________________________________________\n");
printf("Radioactive material:\n");
printf("Radioactive material evolution after %g years:\n", time/3.1536e7);
printf("___________________________________________________________\n");
printf("Radioactive mixture:\n");
time = 1000.;
printf("Radioactive mixture evolution after %g seconds:\n", time);
DrawPopulation(vect, c1, 0, 1.4e12);
TLatex *tex =
new TLatex(8.35e11,0.564871,
"C_{N^{14}_{7}}");
tex =
new TLatex(3.33e11,0.0620678,
"C_{C^{14}_{6}}");
tex =
new TLatex(9.4e11,0.098,
"C_{X}=#frac{N_{X}(t)}{N_{0}(t=0)}=\ #sum_{j}#alpha_{j}e^{-#lambda_{j}t}");
text = pt->
AddText(
"Time evolution of a population of radionuclides.");
text = pt->
AddText(
"The concentration of a nuclide X represent the ");
text = pt->
AddText(
"ratio between the number of X nuclei and the ");
text = pt->
AddText(
"number of nuclei of the top element of the decay");
text = pt->
AddText(
"from which X derives from at T=0. ");
DrawPopulation(vect, c2, 0.01, 1000.,
kTRUE);
tex =
new TLatex(0.019,0.861,
"C_{Ca^{53}_{20}}");
tex =
new TLatex(0.0311,0.078064,
"C_{Sc^{52}_{21}}");
tex =
new TLatex(0.1337,0.010208,
"C_{Ti^{52}_{22}}");
tex =
new TLatex(1.54158,0.00229644,
"C_{V^{52}_{23}}");
tex =
new TLatex(25.0522,0.00135315,
"C_{Cr^{52}_{24}}");
tex =
new TLatex(0.1056,0.5429,
"C_{Sc^{53}_{21}}");
tex =
new TLatex(0.411,0.1044,
"C_{Ti^{53}_{22}}");
tex =
new TLatex(2.93358,0.0139452,
"C_{V^{53}_{23}}");
tex =
new TLatex(10.6235,0.00440327,
"C_{Cr^{53}_{24}}");
tex =
new TLatex(15.6288,0.782976,
"C_{Sr^{78}_{38}}");
tex =
new TLatex(20.2162,0.141779,
"C_{Rb^{78}_{37}}");
tex =
new TLatex(32.4055,0.0302101,
"C_{Kr^{78}_{36}}");
tex =
new TLatex(117.,1.52,
"C_{X}=#frac{N_{X}(t)}{N_{0}(t=0)}=#sum_{j}\ #alpha_{j}e^{-#lambda_{j}t}");
arrow =
new TArrow(0.0543138,0.0586338,0.136594,0.0146596,0.02,
">");
arrow =
new TArrow(0.31528,0.00722919,1.29852,0.00306079,0.02,
">");
arrow =
new TArrow(4.13457,0.00201942,22.5047,0.00155182,0.02,
">");
arrow =
new TArrow(0.0543138,0.761893,0.0928479,0.67253,0.02,
">");
arrow =
new TArrow(0.238566,0.375717,0.416662,0.154727,0.02,
">");
arrow =
new TArrow(0.653714,0.074215,2.41863,0.0213142,0.02,
">");
arrow =
new TArrow(5.58256,0.00953882,10.6235,0.00629343,0.02,
">");
arrow =
new TArrow(22.0271,0.601935,22.9926,0.218812,0.02,
">");
arrow =
new TArrow(27.2962,0.102084,36.8557,0.045686,0.02,
">");
}
{
if (sol) {
if (i==0) {
if (func) {
"Concentration of C14 derived elements;time[s];Ni/N0(C14)");
"Concentration of elements derived from mixture Ca53+Sr78;\
time[s];Ni/N0(Ca53)");
}
}
}
}
}
- Author
- Mihaela Gheata
Definition in file RadioNuclides.C.