diff --git a/macros/rootlogon.C b/macros/rootlogon.C new file mode 100644 index 0000000000000000000000000000000000000000..c93c330f425cd04b7e1fb28ba72960c344b264e6 --- /dev/null +++ b/macros/rootlogon.C @@ -0,0 +1,9 @@ +{ + + 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 diff --git a/macros/testOfTELoss.cxx b/macros/testOfTELoss.cxx new file mode 100644 index 0000000000000000000000000000000000000000..a5f1278de13c22edd1f0088afe1cc13861932c27 --- /dev/null +++ b/macros/testOfTELoss.cxx @@ -0,0 +1,37 @@ +#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