Commit 12754847 authored by Vratislav Chudoba's avatar Vratislav Chudoba

Macros testing work of TELoss.so functionality added.

parent be1d864c
{
TString pathToTELoss = "../build/TELoss/libTELoss.so";
Int_t teloss = gSystem->Load(pathToTELoss);
if (teloss==0) Info("rootlogon.C", "Library %s was successfully loaded.", pathToTELoss.Data());
else Error("rootlogon.C", "Some error with %s loading", pathToTELoss.Data());
}
\ No newline at end of file
#include "TSystem.h"
#include "../TELoss/TELoss.h"
void testOfTELoss() {
//creating two object for combination particle-material
TELoss mSi_4He;
TELoss mSi_1H;
//setting tables for alphas in silicon
mSi_4He.SetEL(1, 2.321); //general properties of material (silicon)
mSi_4He.AddEL(14., 28.086, 1); //add Si element to material
mSi_4He.SetZP(2., 4.); //set 4He particles
mSi_4He.SetEtab(100000, 200.); //set table with ranges
mSi_4He.SetDeltaEtab(300); //some other table
//setting tables for protons in silicon
mSi_1H.SetEL(1, 2.321); //general properties of material (silicon)
mSi_1H.AddEL(14., 28.086, 1); //add Si element to material
mSi_1H.SetZP(1., 1.); //set 4He particles
mSi_1H.SetEtab(100000, 200.); //set table with ranges
mSi_1H.SetDeltaEtab(300); //some other table
cout << "Remaining energy of proton with energy of 20 MeV after penetration 1 mm of silicon is:" << endl;
cout << "expected (according to LISE++):\t14.604 MeV" << endl;
cout << "calculated:\t\t\t" << mSi_1H.GetE(20, 1000) << " MeV" << endl << endl;
cout << "Remaining energy of alpha with energy of 50 MeV after penetration 1 mm of silicon is:" << endl << endl;
cout << "expected (according to LISE++):\t5.447 MeV" << endl;
cout << "calculated:\t\t\t" << mSi_4He.GetE(50, 1000) << " MeV" << endl << endl;
cout << "Remaining energy of alpha with energy of 70 MeV after penetration 1 mm of silicon is:" << endl << endl;
cout << "expected (according to LISE++):\t45.076 MeV" << endl;
cout << "calculated:\t\t\t" << mSi_4He.GetE(70, 1000) << " MeV" << endl << endl;
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment